stock report category wise report
This commit is contained in:
parent
464edac1fd
commit
da0416bfc6
@ -1917,14 +1917,14 @@ class batchcard extends BaseController
|
||||
|
||||
|
||||
|
||||
|
||||
//echo $consuline;
|
||||
for($i=1;$i<=$consuline;$i++)
|
||||
{
|
||||
$conmaterial = $this->input->post('consumematerialcode'.$i);
|
||||
$consupplier =$this->input->post('consumeSupplierID'.$i);
|
||||
$conqty = $this->input->post('consumeQty'.$i);
|
||||
$convalue = $this->input->post('consumeprice'.$i);
|
||||
$consuline = $this->input->post('Consumable'.$i);
|
||||
$consulinee = $this->input->post('Consumable'.$i);
|
||||
|
||||
$beforeconqty = $this->input->post('beforeconsumeQty'.$i);
|
||||
|
||||
@ -1939,10 +1939,14 @@ class batchcard extends BaseController
|
||||
|
||||
$conarray =array('FPId'=>$FPID,'MaterialCode'=>$conmaterial,'SupplierID'=>$consupplier,'Quantity'=>$conqty,'Price'=>$convalue,'CreatedBy'=>$createdby,'CreatedDate'=>$createddt);
|
||||
|
||||
//echo $consuline;
|
||||
|
||||
//print_r($conarray);
|
||||
|
||||
$consuhistory= array('MaterialCode'=>$conmaterial,'Transaction_type'=>'Reduce','Ref_Type'=>'Final Product','Ref_No'=>$FPID,'SupplierID'=>$consupplier,'Quantity'=>$conqty,'ItemValue'=>$convalue,'CreatedBy'=>$CreatedBy,'CreatedOn'=>$createddt);
|
||||
|
||||
|
||||
$checkconsuid=$this->batchcard_model->Getconsuid($consuline);
|
||||
$checkconsuid=$this->batchcard_model->Getconsuid($consulinee);
|
||||
|
||||
|
||||
$conget_pre_qty= $this->inwardgateregister_model->get_CurrentQty($conmaterial);
|
||||
@ -1978,15 +1982,19 @@ class batchcard extends BaseController
|
||||
$this->inwardgateregister_model->addmaterialmaster($concurrent_qty,$conmaterial);
|
||||
|
||||
|
||||
|
||||
if(count($checkconsuid)>0)
|
||||
{
|
||||
$this->batchcard_model->update_finalconsu($conarray,$consuline);
|
||||
//echo 'if';
|
||||
|
||||
|
||||
$this->batchcard_model->update_finalconsu($conarray,$consulinee);
|
||||
$this->batchcard_model->update_rawmaterialto_materialHistory($consuhistory,$conmaterial,$FPID);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
echo 'else';
|
||||
$this->batchcard_model->save_finalcon($conarray);
|
||||
$this->batchcard_model->save_rawmaterialto_materialHistory($consuhistory);
|
||||
}
|
||||
|
||||
@ -1504,7 +1504,8 @@ else
|
||||
}
|
||||
|
||||
|
||||
|
||||
$subquery.=" and (mm.Category like '%Consumable%' or mm.Category like '%Raw Material%'
|
||||
or mm.Category like '%Packing%' or mm.Category like '%Reclam%' or mm.Category like '%Finish%' or mm.Category like '%Final%' )";
|
||||
|
||||
$subquery.=" GROUP BY p.MaterialCode";
|
||||
//$subquery. = "GROUP BY p.MaterialCode";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user