po screen validations changes date format and empty field check
This commit is contained in:
parent
444d3248ad
commit
e0497a129a
@ -2878,4 +2878,4 @@ $("#PaymentTerms").change(function() {
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php $ReqType ='';
|
||||
$CompanyAddress = '';
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$CurrentDate = $dt->format('Y-m-d');
|
||||
$CurrentDate = $dt->format('d-m-Y');
|
||||
$MaxPoDate = '';
|
||||
if(!empty($MaxPODate))
|
||||
{
|
||||
@ -120,11 +120,11 @@ if(!empty($INRSYMBOL))
|
||||
$("#PODate").datepicker({
|
||||
minDate : 'now',
|
||||
maxDate : 'now',
|
||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
dateFormat: 'dd/mm/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
});
|
||||
$("#Deliverydt").datepicker({
|
||||
minDate : 'now',
|
||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||
dateFormat: 'dd/mm/yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||
});
|
||||
|
||||
|
||||
@ -1841,6 +1841,22 @@ function SetExciseCalculationCancel()
|
||||
else if(avaBud==''){
|
||||
alert ("Select Cost Center Name");
|
||||
}
|
||||
else if($('#drpSupplier').val() == "0")
|
||||
{
|
||||
alert('Please Select the Supplier details');
|
||||
$('#drpSupplier').focus();
|
||||
return false;
|
||||
}
|
||||
else if(input=='REVENUE' && $('#Deliverydate').val()==''){
|
||||
alert('Please Select the Delivery Date');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
}
|
||||
else if(input=='REVENUE' && $('#Scheduleby').val().trim()==''){
|
||||
alert('Please Enter the Schedule By');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#" + input ).modal('show');
|
||||
@ -7148,4 +7164,4 @@ $("#PaymentMethod").change(function() {
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php $ReqType ='';
|
||||
$CompanyAddress = '';
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$CurrentDate = $dt->format('Y-m-d');
|
||||
$CurrentDate = $dt->format('d-m-Y');
|
||||
$MaxPoDate = '';
|
||||
$AvlAmount = 0;
|
||||
$paymentDate='';
|
||||
@ -11,6 +11,7 @@
|
||||
{
|
||||
foreach ($MaxPODate as $date)
|
||||
{
|
||||
|
||||
$MaxPoDate = $date->PODate;
|
||||
}
|
||||
}
|
||||
@ -91,7 +92,9 @@ if(!empty($INRSYMBOL))
|
||||
statusbar: false,
|
||||
toolbar: false
|
||||
});
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
$("#PaymentMethod").select2();
|
||||
clearTotalItemValues();
|
||||
$('#CapitalToatlOrder').val(0);
|
||||
@ -106,19 +109,21 @@ $('#CapitalToatlOrder').val(0);
|
||||
$("#PODate").datepicker({
|
||||
//minDate : d,
|
||||
maxDate : 'now',
|
||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
dateFormat: 'dd/mm/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
});
|
||||
$("#Deliverydt").datepicker({
|
||||
minDate : 'now',
|
||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||
dateFormat: 'dd/mm/yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||
});
|
||||
$('#Date').click(function () {
|
||||
|
||||
//for Dispatch range selection
|
||||
$('#Schedulediv').hide();
|
||||
$('#Deliverydtdiv').show();
|
||||
$('#deliverydateby').hide();
|
||||
});
|
||||
$('#Schedule').click(function () {
|
||||
|
||||
//for schedule range selection
|
||||
$('#Deliverydtdiv').hide();
|
||||
$('#Schedulediv').show();
|
||||
@ -126,6 +131,7 @@ $('#CapitalToatlOrder').val(0);
|
||||
});
|
||||
|
||||
$('#DeliverycheckDate').click(function () {
|
||||
|
||||
//for Delivery Date selection
|
||||
$('#Schedulediv').hide();
|
||||
$('#deliverydateby').show();
|
||||
@ -133,10 +139,12 @@ $('#CapitalToatlOrder').val(0);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
//document.getElementById("Date").checked = true;
|
||||
|
||||
function openModal()
|
||||
{
|
||||
|
||||
if(vaildateBeforeOpenModal())
|
||||
{
|
||||
$('#CAPITAL').modal('show');
|
||||
@ -145,18 +153,37 @@ function openModal()
|
||||
|
||||
function vaildateBeforeOpenModal()
|
||||
{
|
||||
|
||||
var radioValue = $("input[name='DateRange']:checked").val();
|
||||
|
||||
if($('#PODate').val() == '')
|
||||
{
|
||||
alert('Please Enter the Purchase Order date');
|
||||
$('#PODate').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
else if($('#drpSupplier').val() == "0")
|
||||
{
|
||||
alert('Please Select the Supplier details');
|
||||
$('#drpSupplier').focus();
|
||||
return false;
|
||||
}
|
||||
else if(radioValue==0 && $('#Deliverydate').val()==''){
|
||||
alert('Please Select the Delivery Date');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
}
|
||||
else if(radioValue==1 && $('#Scheduleby').val()==''){
|
||||
alert('Please Enter the Schedule By');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
}
|
||||
else if(radioValue==2 && $('#Dispatch').val().trim()==''){
|
||||
alert('Please Enter the Dispatch Instruction');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#DeliveryAddr').val() == '')
|
||||
{
|
||||
alert('Please Enter the Delivery Address');
|
||||
@ -175,13 +202,19 @@ function vaildateBeforeOpenModal()
|
||||
$('#currencytype').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
else if(capitalType=='International'){
|
||||
if($('#ExchangeRt').val() == '')
|
||||
{
|
||||
alert('Please Enter the Exchange Rate');
|
||||
$('#ExchangeRt').focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if($('#PlaceOforigin').val().trim() == ''){
|
||||
alert('Please Enter the Place Of Origin');
|
||||
$('#PlaceOforigin').focus();
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
return true;
|
||||
}
|
||||
@ -4426,4 +4459,4 @@ $("#PaymentMethod").change(function() {
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
$requestedBy=$requestedBy[0]->FirstName;
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$CurrentDate = $dt->format('Y-m-d');
|
||||
$CurrentDate = $dt->format('d-m-Y');
|
||||
$res_arr_values = array();
|
||||
$DeliverOption='';
|
||||
$SupId = '';
|
||||
@ -268,11 +268,11 @@ $("#PaymentMethod").select2();
|
||||
$("#PODate").datepicker({
|
||||
//minDate : d,
|
||||
maxDate : 'now',
|
||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
dateFormat: 'dd/mm/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
});
|
||||
$("#Deliverydt").datepicker({
|
||||
minDate : 'now',
|
||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||
dateFormat: 'dd/mm/yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||
});
|
||||
$('#Date').click(function () {
|
||||
//for Dispatch range selection
|
||||
@ -5379,4 +5379,4 @@ $("#PaymentMethod").change(function() {
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php $ReqType ='';
|
||||
$CompanyAddress = '';
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$CurrentDate = $dt->format('Y-m-d');
|
||||
$CurrentDate = $dt->format('d-m-Y');
|
||||
$MaxPoDate = '';
|
||||
$AvlAmount = 0;
|
||||
$DeliverSchedule='';
|
||||
@ -4539,4 +4539,4 @@ $("#PaymentTerms").change(function() {
|
||||
$('#Otherpayment').val('');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php $ReqType ='';
|
||||
$CompanyAddress = '';
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$CurrentDate = $dt->format('Y-m-d');
|
||||
$CurrentDate = $dt->format('d-m-Y');
|
||||
$MaxPoDate = '';
|
||||
$AvlAmount = 0;
|
||||
$Value="₹";
|
||||
@ -105,6 +105,7 @@ if(!empty($INRSYMBOL))
|
||||
|
||||
function vaildateBeforeOpenModal()
|
||||
{
|
||||
var radioValue = $("input[name='DateRange']:checked").val();
|
||||
if($('#PODate').val() == '')
|
||||
{
|
||||
alert('Please Enter the Purchase Order date');
|
||||
@ -123,19 +124,26 @@ function vaildateBeforeOpenModal()
|
||||
$('#DeliveryAddr').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#Deliverydt').val() == '' && $('#Scheduleby').val() == '')
|
||||
{
|
||||
alert('Please Enter the Delivery Date');
|
||||
$('#Deliverydt').focus();
|
||||
else if(radioValue==0 && $('#Deliverydate').val()==''){
|
||||
alert('Please Select the Delivery Date');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
}
|
||||
else if(radioValue==1 && $('#Scheduleby').val().trim()==''){
|
||||
alert('Please Enter the Schedule By');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
}
|
||||
else if(radioValue==0 && $('#Deliverydate').val()==''){
|
||||
alert('Please Select the Delivery Date');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
}
|
||||
else if(radioValue==1 && $('#Scheduleby').val().trim()==''){
|
||||
alert('Please Enter the Schedule By');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#PayableAT').val()=='')
|
||||
{
|
||||
|
||||
alert('Please Enter Payable AT Value');
|
||||
$('#PayableAT').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
@ -167,11 +175,11 @@ $(function()
|
||||
$("#PODate").datepicker({
|
||||
minDate : d,
|
||||
maxDate : 'now',
|
||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
dateFormat: 'dd/mm/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
});
|
||||
$("#Deliverydt").datepicker({
|
||||
minDate : 'now',
|
||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||
dateFormat: 'dd/mm/yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||
});
|
||||
|
||||
$('#drpSupplier').change(function() {
|
||||
@ -3997,4 +4005,4 @@ $("#PaymentTerms").change(function() {
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php $ReqType ='';
|
||||
$CompanyAddress = '';
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$CurrentDate = $dt->format('Y-m-d');
|
||||
$CurrentDate = $dt->format('d-m-Y');
|
||||
$MaxPoDate = '';
|
||||
$AvlAmount = 0;
|
||||
$Value="₹";
|
||||
@ -68,11 +68,11 @@ var AvilBudAmt = '';
|
||||
$("#PODate").datepicker({
|
||||
minDate : d,
|
||||
maxDate : 'now',
|
||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
dateFormat: 'dd/mm/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
});
|
||||
$("#Deliverydt").datepicker({
|
||||
minDate : 'now',
|
||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||
dateFormat: 'dd/mm/yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||
});
|
||||
|
||||
|
||||
@ -2072,18 +2072,6 @@ var AvlBudAmt = '<?php echo $AvlAmount ?>';
|
||||
|
||||
}
|
||||
}
|
||||
<!-- script for table , It works under the datatable plugin-->
|
||||
$(function () {
|
||||
$('#serviceTax').DataTable({
|
||||
"paging": false,
|
||||
"lengthChange": false,
|
||||
"searching": false,
|
||||
//"ordering": true,
|
||||
// "info": true,
|
||||
"autoWidth": false
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
var Detail = <?php echo json_encode($Payment, JSON_PRETTY_PRINT) ?>;
|
||||
@ -2112,6 +2100,7 @@ function openModal()
|
||||
|
||||
function vaildateBeforeOpenModal()
|
||||
{
|
||||
var radioValue = $("input[name='DateRange']:checked").val();
|
||||
if($('#PODate').val() == '')
|
||||
{
|
||||
alert('Please Enter the Purchase Order date');
|
||||
@ -2130,10 +2119,14 @@ function vaildateBeforeOpenModal()
|
||||
$('#DeliveryAddr').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#Deliverydt').val() == '' && $('#Scheduleby').val() == '')
|
||||
{
|
||||
alert('Please Enter the Delivery Date');
|
||||
$('#Deliverydt').focus();
|
||||
else if(radioValue==0 && $('#Deliverydate').val()==''){
|
||||
alert('Please Select the Delivery Date');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
}
|
||||
else if(radioValue==1 && $('#Scheduleby').val().trim()==''){
|
||||
alert('Please Enter the Schedule By');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#workstatus').val()=="0")
|
||||
@ -2217,4 +2210,4 @@ $("#PaymentTerms").change(function() {
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@ -28,6 +28,8 @@ function myFunction() {
|
||||
}
|
||||
function validate()
|
||||
{
|
||||
var radioValue = $("input[name='DateRange']:checked").val();
|
||||
|
||||
var PoType = $('#POType').val();
|
||||
var currencyType = $('#currencytype').val();
|
||||
if($('#PODate').val() == '')
|
||||
@ -42,18 +44,24 @@ function validate()
|
||||
$('#drpSupplier').focus();
|
||||
return false;
|
||||
}
|
||||
else if(radioValue==0 && $('#Deliverydate').val()==''){
|
||||
alert('Please Select the Delivery Date');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
}
|
||||
else if(radioValue==1 && $('#Scheduleby').val().trim()==''){
|
||||
alert('Please Enter the Schedule By');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
else if($('#DeliveryAddr').val() == '')
|
||||
{
|
||||
alert('Please Enter the Delivery Address');
|
||||
$('#DeliveryAddr').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#Deliverydt').val() == '' && $('#Scheduleby').val() == '')
|
||||
{
|
||||
alert('Please Enter the Delivery Date');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
else if(PoType=='CAPITAL' && capitalType=='International'){
|
||||
|
||||
if(currencyType=='0'){
|
||||
@ -61,6 +69,16 @@ function validate()
|
||||
$('#currencytype').focus();
|
||||
return false;
|
||||
}
|
||||
else if(radioValue==2 && $('#Dispatch').val().trim()==''){
|
||||
alert('Please Enter the Dispatch Instruction');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#PlaceOforigin').val().trim() == ''){
|
||||
alert('Please Enter the Place Of Origin');
|
||||
$('#PlaceOforigin').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#ExchangeRt').val()==''){
|
||||
alert('Please Enter the Exchange Rate');
|
||||
$('#ExchangeRt').focus();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user