From 8743ebea834e8ec50c7daa3c79ee3c99e090cb2d Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Tue, 4 Jul 2017 15:56:27 +0530 Subject: [PATCH] po edit changes --- application/controllers/purchaseorder.php | 2 +- application/models/purchaseorder_model.php | 25 +++++++++++++------ .../views/EditservicePurchaseorder.php | 22 ++++++++-------- .../views/editRevenuepurchaseorder.php | 20 +++++++-------- application/views/editimportpo.php | 25 +++++++++++-------- application/views/importpo.php | 2 +- application/views/purchaseorder.php | 2 +- application/views/servicePurchaseorder.php | 2 +- 8 files changed, 57 insertions(+), 43 deletions(-) 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 () {     "/> - +   Save   Submit @@ -1519,8 +1519,8 @@ $(document).ready(function () { 'Select Status'); // echo form_dropdown('Status', $options,set_value('Status'),'id="Status"' ,'required="true"' ,'class="form-control select2') - $options = array("0"=>$POStatus); - echo form_dropdown('Status', $options,set_value('Status',$POStatus),'id="Status"' ,'required="true"' ,'class="form-control select2') + $options = array("0"=>$PONOStatus); + echo form_dropdown('Status', $options,set_value('Status',$PONOStatus),'id="Status"' ,'required="true"' ,'class="form-control select2') ?>
@@ -2279,7 +2279,7 @@ var Detail = ; $.each(Detail, function (index, value) { - $("#PaymentTerms").append( $('').val(value.PaymentTerms).html(value.PaymentTerms) ); + $("#PaymentTerms").append( $('').val(value.ConfigValue).html(value.ConfigValue) ); diff --git a/application/views/editRevenuepurchaseorder.php b/application/views/editRevenuepurchaseorder.php index 6fd38435..194bf33b 100755 --- a/application/views/editRevenuepurchaseorder.php +++ b/application/views/editRevenuepurchaseorder.php @@ -40,7 +40,7 @@ foreach ($PaymentTerms as $TER) $PODate = ''; $Deliverydt =''; $DeliveryAddress =''; - $POStatus = ''; + $PONOStatus = ''; $PONO = ''; $totBasicAmt = 0; $totDiscountAmt = 0.0; @@ -73,7 +73,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; $PayableAT=$Req->PayableAT; @@ -96,10 +96,10 @@ if(!empty($RequistionDetails)) } -foreach ($POSTATUS as $PST ) -{ - $POStatus=$PST->StatusName; -} +// foreach ($POSTATUS as $PST ) +// { +// $POStatus=$PST->StatusName; +// } ?>