payment terms

This commit is contained in:
venbatechnologies@gmail.com 2017-08-16 12:24:06 +05:30
parent 439a9ba524
commit 75b3073620
3 changed files with 18 additions and 11 deletions

View File

@ -1560,6 +1560,7 @@ function addNewImportPurchaseOrder()
$CurrencyType=$this->input->post('currencytype'); $CurrencyType=$this->input->post('currencytype');
$PaymentTerms=$this->input->post('PaymentTerms'); $PaymentTerms=$this->input->post('PaymentTerms');
$OtherPayment=$this->input->post('Otherpayment');
$Palaceoforigin=$this->input->post('PlaceOforigin'); $Palaceoforigin=$this->input->post('PlaceOforigin');
// $Payableat=$this->input->post('PayableAT'); // $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,'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); //print_r($POList);
//die(); //die();
@ -1761,7 +1762,7 @@ function addNewImportPurchaseOrder()
$updateddt = $dt->format('Y-m-d H:i:s'); $updateddt = $dt->format('Y-m-d H:i:s');
$PaymentTerms=$this->input->post('PaymentTerms'); $PaymentTerms=$this->input->post('PaymentTerms');
$OtherPayment=$this->input->post('Otherpayment');
$Palaceoforigin=$this->input->post('PlaceOforigin'); $Palaceoforigin=$this->input->post('PlaceOforigin');
// $Payableat=$this->input->post('PayableAT'); // $Payableat=$this->input->post('PayableAT');
// PO Master // 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 $PONO;
//echo $TotalOrder; //echo $TotalOrder;
//print_r($POList); //print_r($POList);

View File

@ -2036,6 +2036,7 @@ function vaildateBeforeOpenModal()
$("#SupAddress").val(obj.Address); $("#SupAddress").val(obj.Address);
supPaymentTerms=obj.PaymentID; supPaymentTerms=obj.PaymentID;
//$("#PaymentMethod").val(obj.PaymentID); //$("#PaymentMethod").val(obj.PaymentID);

View File

@ -466,6 +466,7 @@ function vaildateBeforeOpenModal()
foreach ($Payment as $payment): foreach ($Payment as $payment):
$options1[$payment->PaymentID] = $payment->PaymentTerms; $options1[$payment->PaymentID] = $payment->PaymentTerms;
//$options6[$pay->PaymentID] = $pay->PaymentTerms;
endforeach; endforeach;
} }
@ -1909,14 +1910,17 @@ $('#drpSupplier').change(function() {
}); });
if(PaymentID!='PT08') if(PaymentID=='PT08')
{ {
$('#otheroptiondiv').hide(); $('#otheroptiondiv').show();
$('#Otherpayment').val(''); $('#Otherpayment').val('');
} }
$('#PaymentTerms').empty();
var paymentList = <?php echo json_encode($Payment, JSON_PRETTY_PRINT) ?>;
$.each(Payment, function(pay, payobj)
$.each(paymentList, function(pay, payobj)
{ {
if(payobj.PaymentID == PaymentID) if(payobj.PaymentID == PaymentID)
@ -1924,10 +1928,11 @@ $('#drpSupplier').change(function() {
$("#PaymentTerms").append( $('<option></option>').val(payobj.PaymentID).html(payobj.PaymentTerms)); $("#PaymentTerms").append( $('<option></option>').val(payobj.PaymentID).html(payobj.PaymentTerms));
} }
// else // else
// { // {
// $("#PaymentTerms").append( $('<option></option>').val(payobj.PaymentID).html(payobj.PaymentTerms)); // // $("#PaymentTerms").append( $('<option></option>').val(payobj.PaymentID).html(payobj.PaymentTerms));
// } // }
@ -3985,7 +3990,7 @@ var Detail = <?php echo json_encode($Payment, JSON_PRETTY_PRINT) ?>;
} ); } );
$("#PaymentTerms").change(function() { $("#PaymentTerms").change(function() {
console.log($('#PaymentTerms').val().trim());
if ($('#PaymentTerms').val().trim()=='PT08') if ($('#PaymentTerms').val().trim()=='PT08')
{ {