igrmulfile
This commit is contained in:
parent
5a0f62dd4f
commit
d3dc61c8ca
@ -1449,6 +1449,7 @@ foreach ($igrvalue as $value) {
|
||||
$NewPOno = array('PONO' =>$NewPO);
|
||||
// print_r($NewPOno);
|
||||
$this->purchaseorder_model->updateigrmaster($igrno,$NewPOno);
|
||||
|
||||
$this->purchaseorder_model->updateigrfile($igrno,$NewPOno);
|
||||
}
|
||||
|
||||
|
||||
@ -573,7 +573,7 @@ $prefile =array();
|
||||
//echo $IGRNO;
|
||||
|
||||
$IGRItemStatus = REQITEM_NEW;
|
||||
|
||||
$TotalPendingQty = '';
|
||||
|
||||
for ($i = 1; $i <= $RowCount; $i++)
|
||||
{
|
||||
@ -590,6 +590,7 @@ $prefile =array();
|
||||
//echo $QuantityAsPerInvoice;
|
||||
//echo $PendingQty.'ReceivedQty'.$ReceivedQty;
|
||||
//echo ' ';
|
||||
$TotalPendingQty = $TotalPendingQty + $PendingQty;
|
||||
|
||||
if(strlen($QuantityAsPerInvoice)>0 && $QuantityAsPerInvoice != '0')
|
||||
{
|
||||
@ -645,6 +646,7 @@ $prefile =array();
|
||||
|
||||
|
||||
$Recqty = $this->inwardgateregister_model->getPOLineItemReceivedQty($PONO,$MaterialCode);
|
||||
|
||||
$ReceivedQuantity = 0.00;
|
||||
if(count($Recqty)>0)
|
||||
{
|
||||
@ -663,7 +665,16 @@ $prefile =array();
|
||||
|
||||
|
||||
}
|
||||
$this->inwardgateregister_model->UpdatePOMaster($PONO,$CreatedBy);
|
||||
|
||||
$this->inwardgateregister_model->UpdatePOMaster($PONO,$CreatedBy);
|
||||
if($TotalPendingQty == 0.00){
|
||||
|
||||
$Newstatus = array('Status'=>IGR_CREATED);
|
||||
|
||||
$this->inwardgateregister_model->POLineItemsupdatestatus($PONO,$Newstatus);
|
||||
$this->inwardgateregister_model->pomasterupdatestatus($PONO,$Newstatus);
|
||||
}
|
||||
else{ /*echo 'error' ;*/ }
|
||||
echo "<script>alert('Successfully Created IGR Number:$IGRNO'); window.location.href='viewIGRDetails';</script>";
|
||||
//echo 'Successfully Created IGR Number:'. $IGRNO;
|
||||
}
|
||||
|
||||
@ -804,4 +804,33 @@ function getPOmaterial($PONO)
|
||||
return $r;
|
||||
}
|
||||
|
||||
|
||||
function getpolineqty($NewPO)
|
||||
{
|
||||
$this->db->select('sum(Quantity)as Qty,sum(ReceivedQuantity)as rec');
|
||||
$this->db->from('T_PurchaseOrder_LineItem');
|
||||
$this->db->where('PONO',$NewPO);
|
||||
|
||||
$query = $this->db->get();
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
|
||||
function POLineItemsupdatestatus($PONO,$Newstatus)
|
||||
{
|
||||
$this->db->where('PONO',$PONO);
|
||||
$this->db->update('T_PurchaseOrder_LineItem',$Newstatus);
|
||||
$update = $this->db->affected_rows();
|
||||
return $update;
|
||||
|
||||
}
|
||||
|
||||
function pomasterupdatestatus($PONO,$Newstatus)
|
||||
{
|
||||
$this->db->where('PONO',$PONO);
|
||||
$this->db->update('T_PurchaseOrder_Master',$Newstatus);
|
||||
$update = $this->db->affected_rows();
|
||||
return $update;
|
||||
}
|
||||
|
||||
}
|
||||
@ -169,8 +169,7 @@ Where IGRM.PONO = ? ';
|
||||
/*--------------------------------------------------*/
|
||||
/* this function used parendpo igr values get inward report display */
|
||||
function updateigrmaster($igrno,$NewPOno)
|
||||
|
||||
{
|
||||
{
|
||||
// $this->db->insert('T_IGR_Master',$IGRaddvalues);
|
||||
// $myfile=$this->db->affected_rows();
|
||||
// return $myfile;
|
||||
|
||||
BIN
uploads/Igrfiles/po.png
Normal file
BIN
uploads/Igrfiles/po.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 263 KiB |
Loading…
Reference in New Issue
Block a user