From a167920a60212df1b8ff4d9d39b61a8d931f0b92 Mon Sep 17 00:00:00 2001 From: gandhimathi Bharathirajan Date: Tue, 19 Sep 2017 13:25:29 +0530 Subject: [PATCH] PO Number format change --- application/models/purchaseorder_model.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php index ee05efe9..86e6e993 100755 --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -464,7 +464,7 @@ function GetPOType($ReqNo) * This function is used to add New Purchase order to the system */ - function addPOMaster($POMaster) + function addPOMaster($POMaster,$POType,$POSubtype) { $this->db->trans_start(); $this->db->insert('T_PurchaseOrder_Master', $POMaster); @@ -473,9 +473,9 @@ function GetPOType($ReqNo) // print_r($this->db->last_query()); if($insert_id>0) { - $subQuery = 'select max(PONO) as PONO from T_PurchaseOrder_Master'; + $subQuery = 'select max(PONO) as PONO from T_PurchaseOrder_Master where POType=? and POSubType=?'; - $query = $this->db->query($subQuery); + $query = $this->db->query($subQuery,array($POType,$POSubtype)); return $query->result_array(); }