diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php index fbeb4750..c87873c9 100644 --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -336,7 +336,14 @@ function purchaseorderListing() return $query->result(); } - + function getLastReleasedPODate() + { + $this->db->select('max(ReleasedOn) as PODate'); + $this->db->from('T_PurchaseOrder_Master'); + $query = $this->db->get(); + + return $query->result(); + } /** * This function is used to add New Purchase order to the system @@ -435,7 +442,8 @@ function purchaseorderListing() function GetServicePurchaseOrder($PONO = '') { $this->db->distinct(); - $this->db->select('ReqNo,POMast.PONO,ServiceDescription,supp.SupplierID,supp.SupplierName,supp.Address,PODate,Stat.StatusName,DeliveryOption,DeliverySchedule,DeliveryDate,DeliveryAddress,Stat.StatusCode'); + $this->db->select('ReqNo,POMast.PONO,ServiceDescription,supp.SupplierID,supp.SupplierName,supp.Address,PODate,Stat.StatusName,DeliveryOption,DeliverySchedule,DeliveryDate,DeliveryAddress,Stat.StatusCode,POMast.ExchangeRateCalculatedon,POMast.ExchangeRate,POMast.CurrencyType'); + $this->db->from('T_PurchaseOrder_Master POMast'); $this->db->join('T_SupplierDetailsN supp', 'supp.SupplierID = POMast.SupplierID'); $this->db->join('T_Status Stat', 'Stat.StatusCode = POMast.Status'); @@ -957,6 +965,4 @@ function GetCurrencytype() return $result->result(); } -} - - +} \ No newline at end of file