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->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*/
|
||||
function materialinspectionreport($mrir='',$IGRNO='')
|
||||
{
|
||||
@ -217,10 +225,13 @@ public function viewmMaterialDistributionList()
|
||||
//echo "outside for loop";
|
||||
for ($i = 1; $i <= $RowCount; $i++)
|
||||
{
|
||||
$acceptquantity=trim($this->input->post('AcceptQuantity'.$i));
|
||||
$rejectquantity=trim($this->input->post('RejectQuantity'.$i));
|
||||
$ActualQty=trim($this->input->post('ActualQuantityReceived'.$i));
|
||||
$acceptquantity=trim($this->input->post('QuantityAccepted'.$i));
|
||||
$rejectquantity=trim($this->input->post('QuantityRejected'.$i));
|
||||
$MaterialCode = trim($this->input->post('MaterialCode'.$i));
|
||||
//echo $MaterialCode;
|
||||
$Lineitm = trim($this->input->post('Lineitm'.$i));
|
||||
|
||||
//echo $acceptquantity;
|
||||
if(strlen($acceptquantity)>0)
|
||||
{
|
||||
$strStatus = MRIR_APPROVED;
|
||||
@ -232,7 +243,9 @@ public function viewmMaterialDistributionList()
|
||||
$avlQty = $getAvailableqty[0]['Quantity'];
|
||||
}
|
||||
// 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));
|
||||
|
||||
}
|
||||
@ -240,16 +253,23 @@ public function viewmMaterialDistributionList()
|
||||
{
|
||||
$strStatus = MRIR_REJECTED;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$remark=$this->input->post('Remark'.$i);
|
||||
$remark=$this->input->post('Remarks1'.$i);
|
||||
$updateby=$this->session->userdata('userId');
|
||||
$date = new DateTime('now',new DateTimeZone('Asia/Kolkata'));
|
||||
$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..
|
||||
$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