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');
$CreatedBy = $this->session->userdata('userId');
$this->inwardgateregister_model->UpdatePOMaster($PO,$CreatedBy);
$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);
$QuantityAsPerInvoice = $this->input->post('ReceivedQuantity'.$i);
$QuantityAsPerInvoice = $this->input->post('txtQuantityAsPerInvoice'.$i);
$OrderedQuantity = $this->input->post('OrderedQuantity'.$i);
$ReceivedQty = $this->input->post('txtReceivedQuantity'.$i);
echo ' ';
$PendingQty = $this->input->post('txtPendingQty'.$i);
//echo $QuantityAsPerInvoice;
//echo $PendingQty.'ReceivedQty'.$ReceivedQty;
//echo ' ';
if(strlen($QuantityAsPerInvoice)>0)
{
$Remarks = $this->input->post('txtRemarks'.$i);
$ItemStatus = '';
if($QuantityAsPerInvoice == $OrderedQuantity)
{
//if($QuantityAsPerInvoice == $OrderedQuantity)
if($PendingQty == 0.00 )
{
$ItemStatus = IGR_CREATED;
}
else
@ -165,9 +173,9 @@ class inwardgateregister extends BaseController
$ReceivedQuantity=$key->ReceivedQuantity;
}
}
$totalReceivedqty = $ReceivedQuantity + $QuantityAsPerInvoice;
$totalReceivedqty = $ReceivedQuantity + $QuantityAsPerInvoice;
echo '';
//echo '';
$POLineItem = array('ReceivedQuantity'=>$totalReceivedqty,'Status'=>$ItemStatus,'UpdateBY'=>$CreatedBy,'UpdatedOn'=>$createddt );