MRIR issue fixed and PORelease screen issue Fixed
This commit is contained in:
parent
7b5728664a
commit
8987835ab0
@ -24,7 +24,15 @@ class MRIRcontroller extends BaseController
|
|||||||
$this->load->library('form_validation');
|
$this->load->library('form_validation');
|
||||||
$this->isLoggedIn();
|
$this->isLoggedIn();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* This function used to load the first screen of the user
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$this->global['pageTitle'] = 'Siddharth : View material inspection report';
|
||||||
|
|
||||||
|
$this->loadViews("viewmaterialinspectionreport", $this->global,NULL , NULL);
|
||||||
|
}
|
||||||
/* For Entry MRIR Screen*/
|
/* For Entry MRIR Screen*/
|
||||||
function materialinspectionreport($mrir='',$IGRNO='')
|
function materialinspectionreport($mrir='',$IGRNO='')
|
||||||
{
|
{
|
||||||
@ -217,10 +225,13 @@ public function viewmMaterialDistributionList()
|
|||||||
//echo "outside for loop";
|
//echo "outside for loop";
|
||||||
for ($i = 1; $i <= $RowCount; $i++)
|
for ($i = 1; $i <= $RowCount; $i++)
|
||||||
{
|
{
|
||||||
$acceptquantity=trim($this->input->post('AcceptQuantity'.$i));
|
$ActualQty=trim($this->input->post('ActualQuantityReceived'.$i));
|
||||||
$rejectquantity=trim($this->input->post('RejectQuantity'.$i));
|
$acceptquantity=trim($this->input->post('QuantityAccepted'.$i));
|
||||||
|
$rejectquantity=trim($this->input->post('QuantityRejected'.$i));
|
||||||
$MaterialCode = trim($this->input->post('MaterialCode'.$i));
|
$MaterialCode = trim($this->input->post('MaterialCode'.$i));
|
||||||
//echo $MaterialCode;
|
$Lineitm = trim($this->input->post('Lineitm'.$i));
|
||||||
|
|
||||||
|
//echo $acceptquantity;
|
||||||
if(strlen($acceptquantity)>0)
|
if(strlen($acceptquantity)>0)
|
||||||
{
|
{
|
||||||
$strStatus = MRIR_APPROVED;
|
$strStatus = MRIR_APPROVED;
|
||||||
@ -232,7 +243,9 @@ public function viewmMaterialDistributionList()
|
|||||||
$avlQty = $getAvailableqty[0]['Quantity'];
|
$avlQty = $getAvailableqty[0]['Quantity'];
|
||||||
}
|
}
|
||||||
// echo $avlQty;
|
// echo $avlQty;
|
||||||
$updatStock = array('Quantity'=>($acceptquantity+$avlQty),'Status'=>'0','UpdatedOn'=>$UPdateon,'UpdatedBy'=>$UPdateby,'Remarks'=>'Stock added for'.$mrir_no);
|
//echo 'Stock added for'.$mrir_no;
|
||||||
|
|
||||||
|
$updatStock = array('Quantity'=>($acceptquantity+$avlQty),'Status'=>'0','UpdatedOn'=>$UPdateon,'UpdatedBy'=>$UPdateby,'Remarks'=>'Stock added for'. $this->input->post('MRIRNO'));
|
||||||
$this->mrir_model->UpdateStock($updatStock,trim($MaterialCode));
|
$this->mrir_model->UpdateStock($updatStock,trim($MaterialCode));
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -241,15 +254,22 @@ public function viewmMaterialDistributionList()
|
|||||||
$strStatus = MRIR_REJECTED;
|
$strStatus = MRIR_REJECTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
$remark=$this->input->post('Remark'.$i);
|
|
||||||
|
|
||||||
|
$remark=$this->input->post('Remarks1'.$i);
|
||||||
$updateby=$this->session->userdata('userId');
|
$updateby=$this->session->userdata('userId');
|
||||||
$date = new DateTime('now',new DateTimeZone('Asia/Kolkata'));
|
$date = new DateTime('now',new DateTimeZone('Asia/Kolkata'));
|
||||||
$updateon = $date->format('Y-m-d H:i:s');
|
$updateon = $date->format('Y-m-d H:i:s');
|
||||||
|
echo strlen($acceptquantity);
|
||||||
|
if(strlen($acceptquantity)<=0)
|
||||||
|
{
|
||||||
|
$rejectquantity = $ActualQty;
|
||||||
|
//echo 'Reject qty'.$rejectquantity;
|
||||||
|
}
|
||||||
//this array to store the update value in child table..
|
//this array to store the update value in child table..
|
||||||
$updatedetailvalues = array('UpdateBy'=>$updateby,'UpdatedOn'=>$updateon,'QuantityAccepted'=>$acceptquantity,'QuantityRejected'=>$rejectquantity,'Remarks'=>$remark,'MRIRStatus'=>$strStatus);
|
$updatedetailvalues = array('UpdateBy'=>$updateby,'UpdatedOn'=>$updateon,'QuantityAccepted'=>$acceptquantity,'QuantityRejected'=>$rejectquantity,'Remarks'=>$remark,'MRIRStatus'=>$strStatus);
|
||||||
|
|
||||||
$updatedetails = $this->mrir_model->update_mrirdetail($updatedetailvalues,$mrir_no);
|
$updatedetails = $this->mrir_model->update_mrirdetail($updatedetailvalues,$Lineitm);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user