payment terms

This commit is contained in:
venbatechnologies@gmail.com 2017-11-30 11:47:17 +05:30
parent da20fb8af6
commit c19460773d
4 changed files with 206 additions and 7 deletions

View File

@ -247,6 +247,15 @@ function vaildateBeforeOpenModal()
$('#DeliveryAddr').focus();
return false;
}
else if($('#PoTypeOptions').val()== "0")
{
alert('Please Select POType');
$('#PoTypeOptions').focus();
return false;
}
else if($('#Deliverydt').val() == '' && $('#Scheduleby').val() == '')
{
alert('Please Enter the Dispatch Instruction');
@ -628,7 +637,7 @@ function vaildateBeforeOpenModal()
<?php
//$optionsWork = array("0"=>'Select Work Status');
$optionsPO = array("0"=>'Select');
if(!empty($PoTypeOptions))
@ -2614,6 +2623,53 @@ function vaildateBeforeOpenModal()
// }
$('#PoTypeOptions').change(function()
{
var potypeval=$('#PoTypeOptions').val();
var poopt= <?php echo json_encode($PoTypeOptions, JSON_PRETTY_PRINT) ?>;
var config=poopt[0].ConfigValue;
var Payment = <?php echo json_encode($Payment, JSON_PRETTY_PRINT) ?>;
var default1=Payment[4].PaymentTerms;
if(potypeval==config)
{
$('#PaymentMethod').empty();
$.each(Payment,function(idx,obj)
{
if(obj.PaymentID=='PT05')
{
// console.log(obj.PaymentID);
// console.log(obj.PaymentTerms)
$("#PaymentMethod").append( $('<option></option>').val(obj.PaymentID).html(obj.PaymentTerms));
}
});
$.each(Payment,function(idx,obj)
{
if(obj.PaymentID=='PT05')
{
}
else
{
$("#PaymentMethod").append( $('<option></option>').val(obj.PaymentID).html(obj.PaymentTerms));
}
});
}
});
$('#drpSupplier').change(function() {
var supPaymentTerms='';

View File

@ -236,7 +236,7 @@ function vaildateBeforeOpenModal()
else if($('#Importoption').val()== "0")
{
alert('Please Enter Value In Import Option Field');
alert('Please Select POType');
$('#Importoption').focus();
return false;
@ -576,10 +576,8 @@ function vaildateBeforeOpenModal()
<?php
// $options1 = array("0"=>'Select Import Option');
$options3 = array("0"=>'Select');
if(!empty($PoTypeOptions))
{
foreach ($PoTypeOptions as $payment):
@ -2130,6 +2128,51 @@ else
$('#Importoption').change(function()
{
var potypeval=$('#Importoption').val();
var poopt= <?php echo json_encode($PoTypeOptions, JSON_PRETTY_PRINT) ?>;
var config=poopt[0].ConfigValue;
var Payment = <?php echo json_encode($Payment, JSON_PRETTY_PRINT) ?>;
var default1=Payment[4].PaymentTerms;
if(potypeval==config)
{
$('#PaymentTerms').empty();
$.each(Payment,function(idx,obj)
{
if(obj.PaymentID=='PT05')
{
$("#PaymentTerms").append( $('<option></option>').val(obj.PaymentID).html(obj.PaymentTerms));
}
});
$.each(Payment,function(idx,obj)
{
if(obj.PaymentID=='PT05')
{
}
else
{
$("#PaymentTerms").append( $('<option></option>').val(obj.PaymentID).html(obj.PaymentTerms));
}
});
}
});
$('#drpSupplier').change(function() {
var id = $('#drpSupplier').val();

View File

@ -173,6 +173,13 @@ function vaildateBeforeOpenModal()
$('#Deliverydate').focus();
return false;
}
else if($('#PoTypeOptions').val()==0)
{
alert('Please Select POType');
$('#PoTypeOptions').focus();
return false;
}
else
{
@ -211,6 +218,51 @@ $(function()
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
});
$('#PoTypeOptions').change(function()
{
var potypeval=$('#PoTypeOptions').val();
var poopt= <?php echo json_encode($PoTypeOptions, JSON_PRETTY_PRINT) ?>;
var config=poopt[0].ConfigValue;
var Payment = <?php echo json_encode($Payment, JSON_PRETTY_PRINT) ?>;
var default1=Payment[4].PaymentTerms;
if(potypeval==config)
{
$('#PaymentTerms').empty();
$.each(Payment,function(idx,obj)
{
if(obj.PaymentID=='PT05')
{
$("#PaymentTerms").append( $('<option></option>').val(obj.PaymentID).html(obj.PaymentTerms));
}
});
$.each(Payment,function(idx,obj)
{
if(obj.PaymentID=='PT05')
{
}
else
{
$("#PaymentTerms").append( $('<option></option>').val(obj.PaymentID).html(obj.PaymentTerms));
}
});
}
});
$('#drpSupplier').change(function() {
var id = $('#drpSupplier').val();
@ -2382,7 +2434,7 @@ function calculateEditTaxValue()
<?php
//$optionsWork = array("0"=>'Select Work Status');
$optionsPO = array("0"=>'Select');
if(!empty($PoTypeOptions))

View File

@ -103,6 +103,47 @@ var AvilBudAmt = '';
$('#PoTypeOptions').change(function()
{
var potypeval=$('#PoTypeOptions').val();
var poopt= <?php echo json_encode($PoTypeOptions, JSON_PRETTY_PRINT) ?>;
var config=poopt[0].ConfigValue;
var Payment = <?php echo json_encode($Payment, JSON_PRETTY_PRINT) ?>;
var default1=Payment[4].PaymentTerms;
if(potypeval==config)
{
$('#PaymentTerms').empty();
$.each(Payment,function(idx,obj)
{
if(obj.PaymentID=='PT05')
{
$("#PaymentTerms").append( $('<option></option>').val(obj.PaymentID).html(obj.PaymentTerms));
}
});
$.each(Payment,function(idx,obj)
{
if(obj.PaymentID=='PT05')
{
}
else
{
$("#PaymentTerms").append( $('<option></option>').val(obj.PaymentID).html(obj.PaymentTerms));
}
});
}
});
document.getElementById("Date").checked = true;
@ -837,7 +878,7 @@ function clearEditTaxField()
<?php
//$optionsWork = array("0"=>'Select Work Status');
$optionsPO = array("0"=>'Select');
if(!empty($PoTypeOptions))
@ -2417,6 +2458,13 @@ function vaildateBeforeOpenModal()
}
else if($('#PoTypeOptions').val()=="0")
{
alert('Please Select POType');
$('#PoTypeOptions').focus();
return false;
}
else
{