IGR issue fixed

This commit is contained in:
gandhimathi Bharathirajan 2017-07-28 12:56:58 +05:30
parent 309762b0bc
commit faa5d6632d

View File

@ -70,9 +70,11 @@ class inwardgateregister extends BaseController
$PO = $this->input->post('id'); $PO = $this->input->post('id');
$CreatedBy = $this->session->userdata('userId');
$this->inwardgateregister_model->UpdatePOMaster($PO,$CreatedBy);
$data = $this->inwardgateregister_model->viewpurchaseorder($PO); $data = $this->inwardgateregister_model->viewpurchaseorder($PO);
//print_r($data);
echo json_encode($data); echo json_encode($data);
} }
@ -129,20 +131,26 @@ class inwardgateregister extends BaseController
$MaterialCode = $this->input->post('MaterialCode'.$i); $MaterialCode = $this->input->post('MaterialCode'.$i);
$QuantityAsPerInvoice = $this->input->post('ReceivedQuantity'.$i); $QuantityAsPerInvoice = $this->input->post('txtQuantityAsPerInvoice'.$i);
$OrderedQuantity = $this->input->post('OrderedQuantity'.$i); $OrderedQuantity = $this->input->post('OrderedQuantity'.$i);
$ReceivedQty = $this->input->post('txtReceivedQuantity'.$i);
$PendingQty = $this->input->post('txtPendingQty'.$i);
//echo $QuantityAsPerInvoice;
echo ' '; //echo $PendingQty.'ReceivedQty'.$ReceivedQty;
//echo ' ';
if(strlen($QuantityAsPerInvoice)>0) if(strlen($QuantityAsPerInvoice)>0)
{ {
$Remarks = $this->input->post('txtRemarks'.$i); $Remarks = $this->input->post('txtRemarks'.$i);
$ItemStatus = ''; $ItemStatus = '';
if($QuantityAsPerInvoice == $OrderedQuantity) //if($QuantityAsPerInvoice == $OrderedQuantity)
{
if($PendingQty == 0.00 )
{
$ItemStatus = IGR_CREATED; $ItemStatus = IGR_CREATED;
} }
else else
@ -165,9 +173,9 @@ class inwardgateregister extends BaseController
$ReceivedQuantity=$key->ReceivedQuantity; $ReceivedQuantity=$key->ReceivedQuantity;
} }
} }
$totalReceivedqty = $ReceivedQuantity + $QuantityAsPerInvoice; $totalReceivedqty = $ReceivedQuantity + $QuantityAsPerInvoice;
echo ''; //echo '';
$POLineItem = array('ReceivedQuantity'=>$totalReceivedqty,'Status'=>$ItemStatus,'UpdateBY'=>$CreatedBy,'UpdatedOn'=>$createddt ); $POLineItem = array('ReceivedQuantity'=>$totalReceivedqty,'Status'=>$ItemStatus,'UpdateBY'=>$CreatedBy,'UpdatedOn'=>$createddt );