diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php index ae1eb55e..416ecfd6 100755 --- a/application/controllers/purchaseorder.php +++ b/application/controllers/purchaseorder.php @@ -115,7 +115,7 @@ class purchaseorder extends BaseController $data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006'); $data['FreightType'] = $this->purchaseorder_model->getConfigValue('C018'); $data['Suplist'] = $this->purchaseorder_model->getSupplierName(); - $data['Payment']=$this->purchaseorder_model->getSupplierPayment(); + $data['Payment']=$this->purchaseorder_model->getSupplierPayment('C009'); $data['WorkStatus']=$this->purchaseorder_model->GetWorkStatus('C019'); diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php index 34f5d776..1e4233b6 100755 --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -600,15 +600,26 @@ function GetImportPurchaseOrderDetailsForPDF($PONO = '') - function getSupplierPayment($Currency='') - { + // function getSupplierPayment($Currency='') + // { - $subQuery='select distinct PaymentTerms from T_SupplierDetailsN'; - $query=$this->db->query($subQuery,array($Currency)); - //print_r($this->db->last_query()); - return $query->result(); + // $subQuery='select distinct PaymentTerms from T_SupplierDetailsN'; + // $query=$this->db->query($subQuery,array($Currency)); + // //print_r($this->db->last_query()); + // return $query->result(); - } + // } + + function getSupplierPayment($Config_ID='') + { + + // $subQuery='select distinct PaymentTerms from T_SupplierDetailsN'; + $subQuery='select ConfigValue from T_ConfigDetails where Config_ID=?'; + $query=$this->db->query($subQuery,array($Config_ID)); + //print_r($this->db->last_query()); + return $query->result(); + + } function GetWorkStatus($Config_ID='') { diff --git a/application/views/EditservicePurchaseorder.php b/application/views/EditservicePurchaseorder.php index d0dcb3d1..ea8fae50 100755 --- a/application/views/EditservicePurchaseorder.php +++ b/application/views/EditservicePurchaseorder.php @@ -7,7 +7,7 @@ $DeliverOption=''; $PODate = ''; $DeliveryAddress =''; - $POStatus = ''; + $PONOStatus = ''; $PONO = ''; $TotalServiceTax = 0; $TotalEducessTax = 0.0; @@ -47,7 +47,7 @@ if(!empty($POMaster)) $Deliverydt = $Ddt->format('Y-m-d'); $DeliveryAddress =$Req->DeliveryAddress; - $POStatus = $Req->StatusCode; + $PONOStatus = $Req->StatusCode; $PONO = $Req->PONO; $ServiceDescription = $Req->ServiceDescription; //$PaymentTerms=$Req->PaymentTerms; @@ -86,10 +86,10 @@ foreach ($PaymentTerms as $TER) -foreach ($POSTATUS as $PST ) -{ - $POStatus=$PST->StatusName; -} +// foreach ($POSTATUS as $PST ) +// { +// $POStatus=$PST->StatusName; +// } ?> @@ -1385,7 +1385,7 @@ $(document).ready(function () {