payment terms
This commit is contained in:
parent
439a9ba524
commit
75b3073620
@ -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);
|
||||
|
||||
@ -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('');
|
||||
|
||||
@ -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 = <?php echo json_encode($Payment, JSON_PRETTY_PRINT) ?>;
|
||||
|
||||
$.each(Payment, function(pay, payobj)
|
||||
|
||||
$.each(paymentList, function(pay, payobj)
|
||||
|
||||
{
|
||||
if(payobj.PaymentID == PaymentID)
|
||||
{
|
||||
|
||||
|
||||
$("#PaymentTerms").append( $('<option></option>').val(payobj.PaymentID).html(payobj.PaymentTerms));
|
||||
$("#PaymentTerms").append( $('<option></option>').val(payobj.PaymentID).html(payobj.PaymentTerms));
|
||||
|
||||
}
|
||||
// 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() {
|
||||
|
||||
console.log($('#PaymentTerms').val().trim());
|
||||
if ($('#PaymentTerms').val().trim()=='PT08')
|
||||
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user