delete option for final product batch card

This commit is contained in:
venbatechnologies@gmail.com 2018-12-05 15:49:00 +05:30
parent da0416bfc6
commit 6bee895a9c
4 changed files with 63 additions and 1 deletions

View File

@ -367,6 +367,8 @@ $route['MaterialHistory'] = "batchcard/material_history";
$route['EditFinalProduct'] = "batchcard/EditFinalProduct";
$route['DeleteFinalProduct'] = "batchcard/DeleteFinalProduct";
$route['shortagematerialListing'] = 'rawmaterialdetails/shortagematerialListing';

View File

@ -2338,5 +2338,22 @@ class batchcard extends BaseController
}
function DeleteFinalProduct()
{
$FPId = $_GET['FPId'];
$data['check'] = $_GET['check'];
$deletedata =$this->batchcard_model->Delete_ProductBatchCard($FPId);
$data['final_product'] = $this->batchcard_model->getFinalProductDetaisl();
$this->global['pageTitle'] = 'Siddharth : Finished Product Batch Card Listing';
$this->loadViews("FinalProductlisting", $this->global,$data,NULL);
}
}
?>

View File

@ -1643,6 +1643,41 @@ $query = $this->db->query($subquery,array());
}
public function Delete_ProductBatchCard($FPId)
{
$this->db->where('FPId', $FPId);
$this->db->delete('T_FinalProduct_ConsumableMaterials');
$this->db->where('FPId', $FPId);
$this->db->delete('T_FinalProduct_CoProduct_Materials');
$this->db->where('RefID', $FPId);
$this->db->delete('T_FinalProduct_History');
$this->db->where('FPId', $FPId);
$this->db->delete('T_FinalProduct_Master');
$this->db->where('FPId', $FPId);
$this->db->delete('T_FinalProduct_PackingMaterials');
$this->db->where('FPId', $FPId);
$this->db->delete('T_FinalProduct_RawMaterials');
$this->db->where('Ref_No', $FPId);
$this->db->delete('T_Material_stock_history');
return true;
}
}

View File

@ -56,7 +56,15 @@
$CreatedDate= $Cdt->format('d-m-Y');
echo $CreatedDate; ?></td>
<td> <a data-toggle="tooltip" href="<?php echo base_url().'EditFinalProduct?FPId='.$record->FPId.'&check='."0"; ?>" ><i class="fa fa-pencil" data-toggle="tooltip" title="<?php echo $record->FPId; ?> - Click here to Edit details"></i>&nbsp;&nbsp;&nbsp;</a> </td>
<td>
<a data-toggle="tooltip" href="<?php echo base_url().'EditFinalProduct?FPId='.$record->FPId.'&check='."0"; ?>" ><i class="fa fa-pencil" data-toggle="tooltip" title="<?php echo 'FP'.$record->FPId; ?> - Click here to Edit details"></i>&nbsp;&nbsp;&nbsp;</a>
<a data-toggle="tooltip" href="<?php echo base_url().'DeleteFinalProduct?FPId='.$record->FPId; ?>" ><i class="fa fa-trash" data-toggle="tooltip" title="<?php echo 'FP'.$record->FPId; ?> - Click here to Delete"></i>&nbsp;&nbsp;&nbsp;</a>
</td>
</tr>
<?php