diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php
index cb928f62..2362e173 100755
--- a/application/controllers/purchaseorder.php
+++ b/application/controllers/purchaseorder.php
@@ -1560,6 +1560,7 @@ function addNewImportPurchaseOrder()
$CurrencyType=$this->input->post('currencytype');
$PaymentTerms=$this->input->post('PaymentTerms');
+ $OtherPayment=$this->input->post('Otherpayment');
$Palaceoforigin=$this->input->post('PlaceOforigin');
// $Payableat=$this->input->post('PayableAT');
@@ -1568,7 +1569,7 @@ function addNewImportPurchaseOrder()
// $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'CreatedDate'=>$createddt,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType);
- $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin);
+ $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin,'PaymentOtherDescription'=>$OtherPayment);
//print_r($POList);
//die();
@@ -1761,7 +1762,7 @@ function addNewImportPurchaseOrder()
$updateddt = $dt->format('Y-m-d H:i:s');
$PaymentTerms=$this->input->post('PaymentTerms');
-
+ $OtherPayment=$this->input->post('Otherpayment');
$Palaceoforigin=$this->input->post('PlaceOforigin');
// $Payableat=$this->input->post('PayableAT');
// PO Master
@@ -1770,7 +1771,7 @@ function addNewImportPurchaseOrder()
- $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin);
+ $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin,'PaymentOtherDescription'=>$OtherPayment);
//echo $PONO;
//echo $TotalOrder;
//print_r($POList);
diff --git a/application/views/capitalpurchaseorder.php b/application/views/capitalpurchaseorder.php
index f3374e16..3ccc05ba 100755
--- a/application/views/capitalpurchaseorder.php
+++ b/application/views/capitalpurchaseorder.php
@@ -2036,6 +2036,7 @@ function vaildateBeforeOpenModal()
$("#SupAddress").val(obj.Address);
supPaymentTerms=obj.PaymentID;
+
//$("#PaymentMethod").val(obj.PaymentID);
@@ -2043,7 +2044,7 @@ function vaildateBeforeOpenModal()
}
});
-
+
if(supPaymentTerms!='PT08'){
$('#otheroptiondiv').hide();
$('#Otherpayment').val('');
diff --git a/application/views/importpo.php b/application/views/importpo.php
index 5d50cdf7..ea39d49c 100755
--- a/application/views/importpo.php
+++ b/application/views/importpo.php
@@ -461,11 +461,12 @@ function vaildateBeforeOpenModal()
// } echo form_dropdown('PaymentTerms', $optionsPay,set_value('PaymentTerms'),'id="PaymentTerms"' ,'required="true"' ,'class="form-control select2');
- if(!empty($Payment))
+ if(!empty($Payment))
{
foreach ($Payment as $payment):
$options1[$payment->PaymentID] = $payment->PaymentTerms;
+ //$options6[$pay->PaymentID] = $pay->PaymentTerms;
endforeach;
}
@@ -1909,25 +1910,29 @@ $('#drpSupplier').change(function() {
});
- if(PaymentID!='PT08')
+ if(PaymentID=='PT08')
{
- $('#otheroptiondiv').hide();
+ $('#otheroptiondiv').show();
$('#Otherpayment').val('');
}
+ $('#PaymentTerms').empty();
+ var paymentList = ;
- $.each(Payment, function(pay, payobj)
+
+ $.each(paymentList, function(pay, payobj)
{
if(payobj.PaymentID == PaymentID)
{
- $("#PaymentTerms").append( $('').val(payobj.PaymentID).html(payobj.PaymentTerms));
+ $("#PaymentTerms").append( $('').val(payobj.PaymentID).html(payobj.PaymentTerms));
+
}
// else
// {
- // $("#PaymentTerms").append( $('').val(payobj.PaymentID).html(payobj.PaymentTerms));
+ // // $("#PaymentTerms").append( $('').val(payobj.PaymentID).html(payobj.PaymentTerms));
// }
@@ -3985,7 +3990,7 @@ var Detail = ;
} );
$("#PaymentTerms").change(function() {
-
+console.log($('#PaymentTerms').val().trim());
if ($('#PaymentTerms').val().trim()=='PT08')
{