purchaseorder_model.php edited

This commit is contained in:
gandhimathi 2018-04-06 08:42:12 +00:00
parent b40b401646
commit f93c716ec5

View File

@ -566,7 +566,7 @@ function GetPOType($ReqNo)
if($insert_id>0)
{
//$subQuery = 'select max(PONO) as PONO from T_PurchaseOrder_Master where POType=? and POSubType=?';
$subQuery = 'select PONO from T_PurchaseOrder_Master where POType=? and POSubType=? order by CreatedDate desc limit 1';
$subQuery = 'select PONO from T_PurchaseOrder_Master where POType=? and POSubType=? and isnull(ParentPO) order by CreatedDate desc limit 1';
$query = $this->db->query($subQuery,array($POType,$POSubtype));
return $query->result_array();