MRIR Rejected Status Implemetation
This commit is contained in:
parent
264e953a4f
commit
7c3046099a
@ -228,12 +228,8 @@ public function viewmMaterialDistributionList()
|
||||
$strStatus = '';
|
||||
|
||||
$strStatus = '';
|
||||
//echo "outside for loop";
|
||||
$CheckEmpty=0;
|
||||
$TotalRow=0;
|
||||
for($m=1;$m<=$RowCount ; $m++){
|
||||
$TotalRow=$TotalRow+$m;
|
||||
}
|
||||
|
||||
$ISRejected = 0;
|
||||
for ($i = 1; $i <= $RowCount; $i++)
|
||||
{
|
||||
$ActualQty=trim($this->input->post('ActualQuantityReceived'.$i));
|
||||
@ -245,17 +241,17 @@ public function viewmMaterialDistributionList()
|
||||
|
||||
if($acceptquantity != 0 )
|
||||
{
|
||||
$CheckEmpty=$CheckEmpty+$i;
|
||||
|
||||
$ISRejected = 1;
|
||||
$strStatus = MRIR_APPROVED;
|
||||
$avlQty = 0;
|
||||
$getAvailableqty = $this->mrir_model->getItemQuantityFromStock(trim($MaterialCode));
|
||||
// print_r( $getAvailableqty);
|
||||
|
||||
if(count($getAvailableqty)>0)
|
||||
{
|
||||
$avlQty = $getAvailableqty[0]['Quantity'];
|
||||
}
|
||||
// echo $avlQty;
|
||||
//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'));
|
||||
|
||||
@ -274,17 +270,16 @@ public function viewmMaterialDistributionList()
|
||||
$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 && $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);
|
||||
|
||||
// print_r($updatedetailvalues);
|
||||
//die();
|
||||
|
||||
|
||||
$updatedetails = $this->mrir_model->update_mrirdetail($updatedetailvalues,$Lineitm);
|
||||
|
||||
@ -295,7 +290,7 @@ public function viewmMaterialDistributionList()
|
||||
}
|
||||
$PoMrirStatus='';
|
||||
|
||||
if($TotalRow==$CheckEmpty){
|
||||
if($ISRejected==1){
|
||||
$PoMrirStatus = MRIR_APPROVED;
|
||||
}
|
||||
else{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user