mrir multiple po list fix
This commit is contained in:
parent
efe5e4ded4
commit
3bd77f1bb3
@ -2563,9 +2563,21 @@ function addadvancerequest()
|
|||||||
$createddt = $dt->format('Y-m-d H:i:s');
|
$createddt = $dt->format('Y-m-d H:i:s');
|
||||||
$CreateBy = $this->session->userdata ( 'userId' );
|
$CreateBy = $this->session->userdata ( 'userId' );
|
||||||
|
|
||||||
|
$isExists = $this->purchaseorder_model->PONOExists($PONO);
|
||||||
|
|
||||||
|
if(count($isExists)==0)
|
||||||
|
{
|
||||||
|
|
||||||
$advance=array('PONO'=>$PONO,'AdvancePercentage'=>$AdvancePercentage,'AdvanceAmount'=>$AdvanceAmount,'Remarks'=>$Remarks,'CreatedBy'=>$CreateBy ,'CreatedDt'=>$createddt);
|
$advance=array('PONO'=>$PONO,'AdvancePercentage'=>$AdvancePercentage,'AdvanceAmount'=>$AdvanceAmount,'Remarks'=>$Remarks,'CreatedBy'=>$CreateBy ,'CreatedDt'=>$createddt);
|
||||||
$this->purchaseorder_model->addadvanceRequest($advance);
|
$this->purchaseorder_model->addadvanceRequest($advance);
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$advance=array('AdvancePercentage'=>$AdvancePercentage,'AdvanceAmount'=>$AdvanceAmount,'Remarks'=>$Remarks);
|
||||||
|
$this->purchaseorder_model->updateadvanceRequest($advance,$PONO);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if($advance > 0)
|
if($advance > 0)
|
||||||
|
|||||||
@ -569,6 +569,31 @@ function GetPOType($ReqNo)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function PONOExists($PONO)
|
||||||
|
{
|
||||||
|
|
||||||
|
$this->db->select('PONO');
|
||||||
|
$this->db->from('T_PurchaseOrder_AdvanceRequest');
|
||||||
|
$this->db->where('PONO ',$PONO);
|
||||||
|
$query = $this->db->get();
|
||||||
|
|
||||||
|
if ($query->num_rows > 0) {
|
||||||
|
return $query->result_array();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function updateadvanceRequest($advance,$PONO)
|
||||||
|
{
|
||||||
|
$this->db->where('PONO', $PONO);
|
||||||
|
$this->db->update('T_PurchaseOrder_AdvanceRequest',$advance);
|
||||||
|
$insert_id = $this->db->affected_rows();
|
||||||
|
return $insert_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function used to get user information by id
|
* This function used to get user information by id
|
||||||
|
|||||||
@ -274,7 +274,7 @@ var PONUM=$('#PurchaseOrderNumber').val();
|
|||||||
|
|
||||||
document.getElementById("labeltotal").innerHTML ='Total Order Value In '+currency;
|
document.getElementById("labeltotal").innerHTML ='Total Order Value In '+currency;
|
||||||
document.getElementById("labeladv").innerHTML ='Advance Amount In '+currency;
|
document.getElementById("labeladv").innerHTML ='Advance Amount In '+currency;
|
||||||
advanceamountCalculation();
|
// advanceamountCalculation();
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user