bug fixes 4th mar : ps

This commit is contained in:
VE10-Sanjeev 2025-03-04 05:50:44 +00:00
parent 87f7734a0c
commit 0d5ccfe989
18 changed files with 503 additions and 490 deletions

View File

@ -125,7 +125,7 @@ class Emergencypurchaseorder extends BaseController
// print_r($this->request->getPost());die; // print_r($this->request->getPost());die;
$txtRowCount = $this->request->getPost('txtRowCount'); $txtRowCount = $this->request->getPost('txtRowCount');
$POdt = $this->request->getPost('PODate'); $POdt = $this->request->getPost('PODate');
$PODate = get_date_time_format($POdt); $PODate = get_date_time_dynamical_format('d-m-Y','Y-m-d',"$POdt");
$SupplierID = $this->request->getPost('drpSupplier'); $SupplierID = $this->request->getPost('drpSupplier');
$DeliveryAddr = $this->request->getPost('DeliveryAddr'); $DeliveryAddr = $this->request->getPost('DeliveryAddr');
$CostCenterName = $this->request->getPost('CostCenterName'); $CostCenterName = $this->request->getPost('CostCenterName');
@ -369,7 +369,7 @@ class Emergencypurchaseorder extends BaseController
$POdt = $this->request->getPost('PODate'); $POdt = $this->request->getPost('PODate');
$PODate = get_date_time_format($POdt); $PODate = get_date_time_dynamical_format('d-m-Y','Y-m-d',"$POdt");
$SupplierID = $this->request->getPost('drpSupplier'); $SupplierID = $this->request->getPost('drpSupplier');
$DeliveryAddr = $this->request->getPost('DeliveryAddr'); $DeliveryAddr = $this->request->getPost('DeliveryAddr');
$dt = $this->request->getPost('Deliverydt'); $dt = $this->request->getPost('Deliverydt');

View File

@ -1168,6 +1168,7 @@ class Payslip extends BaseController
$EmpID = $j['Emp ID']; $EmpID = $j['Emp ID'];
$is_driver = $this->driver_model->getDriverName($EmpID,1); $is_driver = $this->driver_model->getDriverName($EmpID,1);
$DaysWorked = $j['Days Worked']; $DaysWorked = $j['Days Worked'];
$NoTrips = isset($j['Number Of Trips']) ? $j['Number Of Trips'] : 0.00 ;
$TotalCalDays = isset($j['Total Days']) ? $j['Total Days'] : 0.00 ; $TotalCalDays = isset($j['Total Days']) ? $j['Total Days'] : 0.00 ;
$ActualSalary = isset($j['Basic Salary']) ? $j['Basic Salary'] : 0.00 ; $ActualSalary = isset($j['Basic Salary']) ? $j['Basic Salary'] : 0.00 ;
$WorkedSalary = isset($j['Worked Salary']) ? $j['Worked Salary'] : 0.00 ; $WorkedSalary = isset($j['Worked Salary']) ? $j['Worked Salary'] : 0.00 ;
@ -1228,7 +1229,8 @@ class Payslip extends BaseController
$drivermonthlypaydata = array( $drivermonthlypaydata = array(
'month_year'=>$month, 'month_year'=>$month,
'driver_id'=>$EmpID, 'driver_id'=>$EmpID,
'no_of_loads'=>(strpos($TotalCalDays, "(trip)") !== false) ? explode(" ", $TotalCalDays)[0] : 0, 'TotalCalDays' => $TotalCalDays,
'no_of_loads'=>(strpos($NoTrips, "(trip)") !== false) ? explode(" ", $NoTrips)[0] : 0,
'monthly_food_amount'=>$Food, 'monthly_food_amount'=>$Food,
'total_diesel_amount'=>$Diesel, 'total_diesel_amount'=>$Diesel,
'total_shed_amount'=>$Shed, 'total_shed_amount'=>$Shed,

View File

@ -1274,10 +1274,8 @@ if (!empty($getlogpodtl)) {
<td style="text-align:left !important;"><?php echo $index; ?></td> <td style="text-align:left !important;"><?php echo $index; ?></td>
<td style="text-align:center !important;"><?php echo $record->ReqNo ?></td> <td style="text-align:center !important;"><?php echo $record->ReqNo ?></td>
<td style="text-align:left !important;"><?php echo $record->MaterialCode ?></td> <td style="text-align:left !important;"><?php echo $record->MaterialCode ?></td>
<td style="text-align:left !important;"> <td style="text-align:left !important;"><?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "..."); echo $shortName; ?></td>
<?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "..."); <td style="text-align:left !important;"><?php if ($PONOStatus === PO_DRAFT || $PONOStatus === PO_CREATED) { ?>
echo $shortName; ?></td>
<?php if ($PONOStatus === PO_DRAFT || $PONOStatus === PO_CREATED) { ?>
<a href="#" <a href="#"
class="editable-field" class="editable-field"
data-id ="<?php echo $index ?>" data-notes="<?php echo $record->LineitemAuditorNotes; ?>"> data-id ="<?php echo $index ?>" data-notes="<?php echo $record->LineitemAuditorNotes; ?>">
@ -1288,8 +1286,7 @@ if (!empty($getlogpodtl)) {
<button class="save-btn"></button> <button class="save-btn"></button>
<button class="cancel-btn"></button> <button class="cancel-btn"></button>
</div> </div>
<?php }else{ echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-"; } ?> <?php }else{ echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-"; } ?></td>
</td>
<td style="text-align:left !important;"><?php echo $record->Quantity ?></td> <td style="text-align:left !important;"><?php echo $record->Quantity ?></td>
<td><?php echo $record->UOM ?></td> <td><?php echo $record->UOM ?></td>
@ -3190,7 +3187,7 @@ if (!empty($getlogpodtl)) {
// $('#content').loader('show'); // $('#content').loader('show');
var formData = new FormData($('.ServicePO')[0]); var formData = new FormData($('.ServicePO')[0]);
$('#loader').show(); $('#loader').show();
disableButtons(); // disableButtons();
$.ajax({ $.ajax({
// data: $('.ServicePO').serialize(), // data: $('.ServicePO').serialize(),
type: "POST", type: "POST",
@ -3218,10 +3215,10 @@ if (!empty($getlogpodtl)) {
$('#SpcialInstruction').val(''); $('#SpcialInstruction').val('');
$('#txtDeliveryAddress').val('') $('#txtDeliveryAddress').val('')
window.location = "purchaseorderListing"; window.location = "purchaseorderListing";
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} else { } else {
$('#loader').hide(); $('#loader').hide();
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
alert("Error"); alert("Error");
} }
@ -3229,7 +3226,7 @@ if (!empty($getlogpodtl)) {
error: function(jqXHR, textStatus, errorThrown) { error: function(jqXHR, textStatus, errorThrown) {
console.error("AJAX Error: " + textStatus + ": " + errorThrown); console.error("AJAX Error: " + textStatus + ": " + errorThrown);
alert("Error: " + textStatus); alert("Error: " + textStatus);
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} }
}); });

View File

@ -244,8 +244,7 @@
$('#ConfigValue').show(); $('#ConfigValue').show();
var temp = index; var temp = index;
var ConfigValue = $("#ConfigValue").val(); var ConfigValue = $.trim($("#ConfigValue").val());
$('#ConfigValue').val(''); $('#ConfigValue').val('');

View File

@ -1876,6 +1876,28 @@ if (!empty($INRSYMBOL)) {
alert('Please Select the Supplier details'); alert('Please Select the Supplier details');
$('#drpSupplier').focus(); $('#drpSupplier').focus();
return false; return false;
} else if (input == 'REVENUE' && $('#Deliverydate').val() == '' && radioValue == 0) {
alert('Please Select the Delivery Date');
$('#Deliverydate').focus();
return false;
} else if (input == 'REVENUE' && $('#Scheduleby').val().trim() == '' && radioValue == 1) {
alert('Please Enter the Schedule By');
$('#Scheduleby').focus();
return false;
} else if (input == 'SERVICE' && $('#Deliverydate').val() == '' && radioValue == 0) {
alert('Please Select the Delivery Date');
$('#Deliverydate').focus();
return false;
} else if (input == 'SERVICE' && $('#Scheduleby').val().trim() == '' && radioValue == 1) {
alert('Please Enter the Schedule By');
$('#Scheduleby').focus();
return false;
} else if ($('#DepartmentName').val() == "0") {
alert('Please Select Department Name ')
return false;
} else if ($('#CostCenterName').val() == "0") {
alert('Please Select Cost Center Name ')
return false;
} else if ($('#PoTypeOptions').val() == "0") { } else if ($('#PoTypeOptions').val() == "0") {
if ($('#purpose').val() == "REVENUE") { if ($('#purpose').val() == "REVENUE") {
@ -1891,40 +1913,19 @@ if (!empty($INRSYMBOL)) {
return false; return false;
} }
}else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
alert('Please Enter Payable Terms Description');
} else if ($('#DepartmentName').val() == "0") { $('#Otherpayment').focus();
alert('Please Select Department Name ')
return false; return false;
} }else if($('#insuranceStatus').val() == "1" && $('#InsuranceNumber').val().trim() == ''){
else if ($('#CostCenterName').val() == "0") { alert('Please Enter the Insurance No / Insurance Details');
alert('Please Select Cost Center Name ') $('#InsuranceNumber').focus();
} return false;
}else if ($('#BudgetType').val() == "0") {
else if ($('#BudgetType').val() == "0") {
alert('Please Select Budget Type'); alert('Please Select Budget Type');
$('#BudgetType').focus(); $('#BudgetType').focus();
return false; return false;
} else {
} else if (input == 'REVENUE' && $('#Deliverydate').val() == '' && radioValue == 0) {
alert('Please Select the Delivery Date');
$('#Deliverydate').focus();
return false;
} else if (input == 'REVENUE' && $('#Scheduleby').val().trim() == '' && radioValue == 1) {
alert('Please Enter the Schedule By');
$('#Scheduleby').focus();
return false;
}
else if ($('#Otherpayment').length > 0 && $('#Otherpayment').is(':visible') && $('#Otherpayment').val() == '') {
alert('Please Enter the Description of payable terms');
$('#Otherpayment').focus();
return false;
}
else {
$("#" + input).modal('show'); $("#" + input).modal('show');
$('#isEdit').val(0); $('#isEdit').val(0);
if (StateTaxCheck == "0") { if (StateTaxCheck == "0") {
@ -2634,21 +2635,21 @@ if (!empty($INRSYMBOL)) {
<label>Purchase Order Date</label> <label>Purchase Order Date</label>
<div class="form-group"> <div class="form-group">
<?php <?php
// $poDt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$poDt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); // $formattedDate = $poDt->format('d-m-Y');
$formattedDate = $poDt->format('Y-m-d'); // $data = array(
$data = array( // 'type' => 'text',
'type' => 'date', // 'name' => 'PODate',
'name' => 'PODate', // 'value' => set_value('PODate', $formattedDate),
'value' => set_value('PODate', $formattedDate), // 'min' => $formattedDate,
'min' => $formattedDate, // 'id' => 'PODate',
'id' => 'PODate', // 'class' => 'form-control num',
'class' => 'form-control', // 'required' => 'true',
'required' => 'true', // 'onkeypress' => 'return false;'
'onkeypress' => 'return false;' // );
); // echo form_input($data);
echo form_input($data);
?> ?>
<input class="form-control num" data-provide="datepicker" data-date-format="dd-mm-yyyy" data-date-autoclose="true" id="PODate" name="PODate" data-date-start-date="<?= date('d-m-Y'); ?>" required autocomplete="off" value="<?= date('d-m-Y'); ?>">
</div> </div>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
@ -7259,7 +7260,7 @@ if (!empty($INRSYMBOL)) {
// } else { // } else {
// Submit the form using AJAX // Submit the form using AJAX
$('#loader').show(); $('#loader').show();
disableButtons(); // disableButtons();
$.ajax({ $.ajax({
url: "<?php echo base_url() ?>emergencypurchaseorder/addNewServicePurchaseOrder", url: "<?php echo base_url() ?>emergencypurchaseorder/addNewServicePurchaseOrder",
type: "POST", type: "POST",
@ -7278,13 +7279,13 @@ if (!empty($INRSYMBOL)) {
$('#SpcialInstruction').val(''); $('#SpcialInstruction').val('');
$('#txtDeliveryAddress').val(''); $('#txtDeliveryAddress').val('');
window.location = "purchaseorderListing"; window.location = "purchaseorderListing";
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
}, },
error: function (xhr, status, error) { error: function (xhr, status, error) {
// Handle errors // Handle errors
$('#loader').hide(); $('#loader').hide();
alert("Error: " + error); alert("Error: " + error);
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} }
}); });
// } // }
@ -7369,7 +7370,7 @@ if (!empty($INRSYMBOL)) {
// } else { // } else {
// Submit the form using AJAX // Submit the form using AJAX
$('#loader').show(); $('#loader').show();
disableButtons(); // disableButtons();
$.ajax({ $.ajax({
url: "<?php echo base_url() ?>emergencypurchaseorder/addNewRevenuePurchaseOrder", url: "<?php echo base_url() ?>emergencypurchaseorder/addNewRevenuePurchaseOrder",
type: "POST", type: "POST",
@ -7384,12 +7385,12 @@ if (!empty($INRSYMBOL)) {
$('#SpcialInstruction').val(''); $('#SpcialInstruction').val('');
$('#txtDeliveryAddress').val(''); $('#txtDeliveryAddress').val('');
window.location = "purchaseorderListing"; window.location = "purchaseorderListing";
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
}, },
error: function (xhr, status, error) { error: function (xhr, status, error) {
// Handle errors // Handle errors
alert("Error: " + error); alert("Error: " + error);
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} }
}); });
// } // }

View File

@ -783,7 +783,8 @@ if (!empty($INRSYMBOL)) {
<br> <br>
</div> </div>
<div class="form-row"> <div class="form-row">
<table id="serviceTax" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;"> <div class="table-responsive" style="padding-bottom: 30px;">
<table id="serviceTax" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
<thead> <thead>
<tr> <tr>
<th style="white-space: nowrap !important;">SNo</th> <th style="white-space: nowrap !important;">SNo</th>
@ -806,6 +807,7 @@ if (!empty($INRSYMBOL)) {
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
<div class="form-row" id="DOMdiv"> <div class="form-row" id="DOMdiv">
<div class="form-group col-md-3"> <div class="form-group col-md-3">
@ -4554,7 +4556,7 @@ if (!empty($INRSYMBOL)) {
formData.append('ExchangeRateOn', ExchangeRateOn); formData.append('ExchangeRateOn', ExchangeRateOn);
formData.append('PaymentMethod', PaymentMethod); formData.append('PaymentMethod', PaymentMethod);
$('#loader').show(); $('#loader').show();
disableButtons(); // disableButtons();
$.ajax({ $.ajax({
data: formData, data: formData,
processData: false, processData: false,
@ -4576,18 +4578,18 @@ if (!empty($INRSYMBOL)) {
clearAfterAddLineItemAdd(); clearAfterAddLineItemAdd();
window.location = "purchaseorderListing"; window.location = "purchaseorderListing";
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} else { } else {
// $('#content').loader('hide'); // $('#content').loader('hide');
alert("Error"); alert("Error");
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} }
}, },
error: function(jqXHR, textStatus, errorThrown) { error: function(jqXHR, textStatus, errorThrown) {
console.error("AJAX Error: " + textStatus + ": " + errorThrown); console.error("AJAX Error: " + textStatus + ": " + errorThrown);
alert("Error: " + textStatus); alert("Error: " + textStatus);
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} }
}); });
@ -5434,11 +5436,11 @@ if (!empty($INRSYMBOL)) {
function Reset() { function Reset() {
disableButtons(); // disableButtons();
location.reload(); location.reload();
setTimeout(function() { // setTimeout(function() {
enableButtons(); // enableButtons();
}, 2000); // }, 2000);
} }
$('#insuranceTxtDiv').hide(); $('#insuranceTxtDiv').hide();

View File

@ -796,9 +796,8 @@ if (!empty($POItem) && $CapitalRange == '1') {
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<div class="table-responsive"> <div class="table-responsive" style="padding-bottom: 30px;">
<table id="serviceTax" class="table table-bordered table-hover mb-0" <table id="serviceTax" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
style="font-size:12px;">
<thead> <thead>
<tr> <tr>
<th style="white-space: nowrap !important; text-align:left !important">SNo</th> <th style="white-space: nowrap !important; text-align:left !important">SNo</th>
@ -3497,7 +3496,7 @@ Calculate Landing charge
$('#loader').show(); $('#loader').show();
disableButtons(); // disableButtons();
$.ajax({ $.ajax({
// data:$('.CapitalPO').serialize()+"&ExchangeRateOn="+ExchangeRateOn+"&PaymentMethod="+PaymentMethod+"&PayableAT="+PayableAT+"&PaymentDate="+PaymentDate, // data:$('.CapitalPO').serialize()+"&ExchangeRateOn="+ExchangeRateOn+"&PaymentMethod="+PaymentMethod+"&PayableAT="+PayableAT+"&PaymentDate="+PaymentDate,
type: "POST", type: "POST",
@ -3516,11 +3515,11 @@ Calculate Landing charge
$('#SpcialInstruction').val(''); $('#SpcialInstruction').val('');
$('#txtDeliveryAddress').val(''); $('#txtDeliveryAddress').val('');
window.location = status == 1 ? "amendmentpurchaseorder" : "purchaseorderListing"; window.location = status == 1 ? "amendmentpurchaseorder" : "purchaseorderListing";
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} else { } else {
$('#loader').hide(); $('#loader').hide();
alert("Error"); alert("Error");
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} }
} }

View File

@ -883,8 +883,9 @@ if (!empty($getlogpodtl)) {
</div> </div>
<div class="box-body"> <div class="box-body">
<table id="serviceTax" class="table table-bordered table-hover" <div class="form-row">
style="background-color:#fff;font-size:12px;"> <div class="table-responsive" style="padding-bottom: 30px;">
<table id="serviceTax" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
<thead> <thead>
<tr> <tr>
<th>SNo</th> <th>SNo</th>
@ -1289,6 +1290,8 @@ if (!empty($getlogpodtl)) {
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
</div>
@ -6009,7 +6012,7 @@ if (!empty($getlogpodtl)) {
//alert('else'); //alert('else');
$('#loader').show(); $('#loader').show();
disableButtons(); // disableButtons();
//alert('ss'); //alert('ss');
var formData = new FormData($('.CapitalPO')[0]); var formData = new FormData($('.CapitalPO')[0]);
formData.append('ExchangeRateOn', ExchangeRateOn); formData.append('ExchangeRateOn', ExchangeRateOn);
@ -6060,11 +6063,11 @@ if (!empty($getlogpodtl)) {
clearAfterAddLineItemAdd(); clearAfterAddLineItemAdd();
window.location = "purchaseorderListing"; window.location = "purchaseorderListing";
setTimeout(function() { enableButtons(); }, 2000); // <!-- setTimeout(function() { enableButtons(); }, 2000); -->
} else { } else {
// $('#content').loader('hide'); // $('#content').loader('hide');
alert("Error"); alert("Error");
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} }
} }

View File

@ -1198,8 +1198,8 @@ if (!empty($RequistionDetails)) {
<br /> <br />
<div class="form-row"> <div class="form-row">
<div class="table-responsive"> <div class="table-responsive" style="padding-bottom: 30px;">
<table id="ImportTax" class="table table-bordered table-hover mb-0" style="font-size:12px;"> <table id="ImportTax" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
<thead> <thead>
<tr> <tr>
@ -2933,7 +2933,7 @@ if (!empty($RequistionDetails)) {
// return false; // return false;
// } else { // } else {
$('#loader').show(); $('#loader').show();
disableButtons(); // disableButtons();
var formData = new FormData($('.ImportPO')[0]); var formData = new FormData($('.ImportPO')[0]);
if (status == 0) { // for draft if (status == 0) { // for draft
@ -2964,23 +2964,23 @@ if (!empty($RequistionDetails)) {
//$('#txtDeliveryAddress').val(''); //$('#txtDeliveryAddress').val('');
window.location = status == 1 ? "amendmentpurchaseorder" : "purchaseorderListing"; window.location = status == 1 ? "amendmentpurchaseorder" : "purchaseorderListing";
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} else { } else {
alert("Error"); alert("Error");
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} }
}, },
error : function (){ error : function (){
console.error(error); console.error(error);
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
}, },
complete : function (){ complete : function (){
console.log("ajax call is completed "); console.log("ajax call is completed ");
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} }

View File

@ -1219,8 +1219,7 @@ if (!empty($INRSYMBOL)) {
<br> <br>
<div class="form-row"> <div class="form-row">
<div class="table-responsive" style="padding-bottom: 30px;"> <div class="table-responsive" style="padding-bottom: 30px;">
<table id="ServiceTable" class="table table-bordered table-hover mb-0" <table id="ServiceTable" class="table table-bordered table-hover" style="font-size:12px;">
style="font-size:12px;">
<thead> <thead>
<tr> <tr>
@ -2575,7 +2574,7 @@ if (!empty($INRSYMBOL)) {
}; };
$('#loader').show(); $('#loader').show();
disableButtons(); // disableButtons();
$.ajax({ $.ajax({
// data:$('.CreatePO').serialize(), // data:$('.CreatePO').serialize(),
type: "POST", type: "POST",
@ -2594,21 +2593,21 @@ if (!empty($INRSYMBOL)) {
$('#txtDeliveryAddress').val('') $('#txtDeliveryAddress').val('')
window.location = (status == 1) ? "amendmentpurchaseorder" : "purchaseorderListing"; window.location = (status == 1) ? "amendmentpurchaseorder" : "purchaseorderListing";
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} else { } else {
$('#loader').hide(); $('#loader').hide();
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} }
}, },
error : function(error){ error : function(error){
console.error("error occured" + error); console.error("error occured" + error);
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
}, },
complete : function (){ complete : function (){
$('#loader').hide(); $('#loader').hide();
console.log("ajax call is completed ..!!") console.log("ajax call is completed ..!!")
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} }
}); });

View File

@ -2132,9 +2132,10 @@ if (!empty($getlogpodtl)) {
<div class="form-group col-md-3" id="Deliverydtdiv"> <div class="form-group col-md-3" id="Deliverydtdiv">
<label>Delivery Date<span class="text-danger">*</span></label> <label>Delivery Date<span class="text-danger">*</span></label>
<div class="form-group"> <div class="form-group">
<input class="form-control num" data-provide="datepicker" data-date-format="dd-mm-yyyy" data-date-autoclose="true" id="Deliverydt" name="Deliverydt" data-date-start-date="<?= date('d-m-Y'); ?>" required autocomplete="off" value="<?= $Deliverydt; ?>">
<?php <?php
$data = array('name' => 'Deliverydt', 'value' => set_value('Deliverydt', $Deliverydt), 'id' => 'Deliverydt', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); // $data = array('name' => 'Deliverydt', 'value' => set_value('Deliverydt', $Deliverydt), 'id' => 'Deliverydt', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;');
echo form_input($data); // echo form_input($data);
?> ?>
</div> </div>
@ -2161,9 +2162,10 @@ if (!empty($getlogpodtl)) {
<div class="form-group col-md-3"> <div class="form-group col-md-3">
<label>Purchase Order Date</label> <label>Purchase Order Date</label>
<div class="form-group"> <div class="form-group">
<input class="form-control num" data-provide="datepicker" data-date-format="dd-mm-yyyy" data-date-autoclose="true" id="PODate" name="PODate" data-date-start-date="<?= date('d-m-Y'); ?>" required autocomplete="off" value="<?= $PODate; ?>">
<?php <?php
$data = array('name' => 'PODate', 'value' => set_value('PODate', $PODate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); // $data = array('name' => 'PODate', 'value' => set_value('PODate', $PODate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;');
echo form_input($data); // echo form_input($data);
?> <input type="hidden" name="b4podate" id="b4podate" value="<?php echo $PODate; ?>"> ?> <input type="hidden" name="b4podate" id="b4podate" value="<?php echo $PODate; ?>">
</div> </div>
</div> </div>
@ -2327,8 +2329,7 @@ if (!empty($getlogpodtl)) {
<br> <br>
<div class="form-row"> <div class="form-row">
<div class="table-responsive" style="padding-bottom: 30px;"> <div class="table-responsive" style="padding-bottom: 30px;">
<table id="revenueTax" class="table table-bordered table-hover" <table id="revenueTax" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
style="font-size:12px;">
<thead> <thead>
<tr> <tr>
@ -5403,7 +5404,7 @@ if (!empty($getlogpodtl)) {
// } else { // } else {
var formData = new FormData($('.CreatePO')[0]); var formData = new FormData($('.CreatePO')[0]);
$('#loader').show(); $('#loader').show();
disableButtons(); // disableButtons();
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "<?php echo base_url() ?>purchaseorder/EditRevenuePurchaseOrder", url: "<?php echo base_url() ?>purchaseorder/EditRevenuePurchaseOrder",
@ -5421,11 +5422,11 @@ if (!empty($getlogpodtl)) {
$('#SpcialInstruction').val(''); $('#SpcialInstruction').val('');
$('#txtDeliveryAddress').val('') $('#txtDeliveryAddress').val('')
window.location = "purchaseorderListing"; window.location = "purchaseorderListing";
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} else { } else {
alert("Something went wrong"); alert("Something went wrong");
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} }
}, },
@ -5434,7 +5435,7 @@ if (!empty($getlogpodtl)) {
$('#loader').hide(); $('#loader').hide();
console.error("AJAX Error: ", textStatus, errorThrown); console.error("AJAX Error: ", textStatus, errorThrown);
alert("An error occurred: " + textStatus + " - " + errorThrown); alert("An error occurred: " + textStatus + " - " + errorThrown);
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
}, },

View File

@ -1012,7 +1012,9 @@ foreach ($PaymentTerms as $TER) {
<br /> <br />
<table id="ServiceTable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;"> <div class="form-row">
<div class="table-responsive" style="padding-bottom: 30px;">
<table id="ServiceTable" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
<thead> <thead>
<tr> <tr>
<th>SNo</th> <th>SNo</th>
@ -1172,6 +1174,8 @@ foreach ($PaymentTerms as $TER) {
?> ?>
</tbody> </tbody>
</table> </table>
</div>
</div>
<div class="form-row"> <div class="form-row">
@ -2236,19 +2240,19 @@ foreach ($PaymentTerms as $TER) {
$('#txtDeliveryAddress').val('') $('#txtDeliveryAddress').val('')
window.location = status == 1 ? "amendmentpurchaseorder" : "purchaseorderListing"; window.location = status == 1 ? "amendmentpurchaseorder" : "purchaseorderListing";
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} else { } else {
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
$('#loader').hide(); $('#loader').hide();
console.error("Error"); console.error("Error");
} }
}, },
error : function (error){ error : function (error){
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
console.log("error occurred" , error); console.log("error occurred" , error);
}, },
complete : function (){ complete : function (){
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
console.log("Ajax call is completed ..!!"); console.log("Ajax call is completed ..!!");
} }
}); });

View File

@ -664,7 +664,8 @@ if (!empty($master)) {
<script> <script>
$('#AddConfigValue, #configValue').change(function() { $('#AddConfigValue, #configValue').change(function() {
let configValue = $(this).val(); let configValue = $(this).val().trim();
console.log(configValue,configValue.length);
let configTable = customTableToJson(); let configTable = customTableToJson();
let configValueExisting = configTable.filter(element => element['Configuration Value'] == configValue); let configValueExisting = configTable.filter(element => element['Configuration Value'] == configValue);

View File

@ -825,7 +825,10 @@ if (!empty($getlogpodtl)) {
</div> </div>
<br><br><br><br> <br><br><br><br>
<div class="box-body" style="margin-top: -3%;"> <div class="box-body" style="margin-top: -3%;">
<table id="ImportTax" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;"> <div class="form-row">
<div class="table-responsive" style="padding-bottom: 30px;">
<table id="ImportTax" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
<thead> <thead>
<tr> <tr>
<th style="white-space: nowrap !important; text-align:left !important">SNo</th> <th style="white-space: nowrap !important; text-align:left !important">SNo</th>
@ -934,8 +937,7 @@ if (!empty($getlogpodtl)) {
<input type="hidden" name="<?php echo 'AfterCustomSHCess' . $index ?>" id="<?php echo 'AfterCustomSHCess' . $index ?>" value="<?php echo $record->AfterCustomSHCess; ?>" /> <input type="hidden" name="<?php echo 'AfterCustomSHCess' . $index ?>" id="<?php echo 'AfterCustomSHCess' . $index ?>" value="<?php echo $record->AfterCustomSHCess; ?>" />
<!-- <input type="hidden" name="<?php echo 'Grossdutypayable' . $index ?>" id="<?php echo 'Grossdutypayable' . $index ?>" value="<?php echo $record->Grossdutypayable; ?>" /> --> <!-- <input type="hidden" name="<?php echo 'Grossdutypayable' . $index ?>" id="<?php echo 'Grossdutypayable' . $index ?>" value="<?php echo $record->Grossdutypayable; ?>" /> -->
<!-- <input type="hidden" name="<?php echo 'QuantityKG' . $index ?>" id="<?php echo 'QuantityKG' . $index ?>" value="<?php echo $record->QuantityKG; ?>" /> <!-- <input type="hidden" name="<?php echo 'QuantityKG' . $index ?>" id="<?php echo 'QuantityKG' . $index ?>" value="<?php echo $record->QuantityKG; ?>" />-->
-->
<input type="hidden" name="<?php echo 'BasicPriceInMTon' . $index ?>" id="<?php echo 'BasicPriceInMTonG' . $index ?>" value="<?php echo $record->BasicPriceInMTon; ?>" /> <input type="hidden" name="<?php echo 'BasicPriceInMTon' . $index ?>" id="<?php echo 'BasicPriceInMTonG' . $index ?>" value="<?php echo $record->BasicPriceInMTon; ?>" />
@ -945,8 +947,7 @@ if (!empty($getlogpodtl)) {
<!-- <input type="hidden" name="<?php echo 'Grossdutypayable' . $index ?>" id="<?php echo 'Grossdutypayable' . $index ?>" value="<?php echo $record->Grossdutypayable; ?>" /> <!-- <input type="hidden" name="<?php echo 'Grossdutypayable' . $index ?>" id="<?php echo 'Grossdutypayable' . $index ?>" value="<?php echo $record->Grossdutypayable; ?>" />-->
-->
<input type="hidden" name="<?php echo 'BasicINRValue' . $index ?>" id="<?php echo 'BasicINRValue' . $index ?>" value="<?php echo $record->BasicINRValue; ?>" /> <input type="hidden" name="<?php echo 'BasicINRValue' . $index ?>" id="<?php echo 'BasicINRValue' . $index ?>" value="<?php echo $record->BasicINRValue; ?>" />
@ -1079,6 +1080,9 @@ if (!empty($getlogpodtl)) {
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
</div>
</div>
<br><br> <br><br>
@ -5504,7 +5508,7 @@ if (!empty($getlogpodtl)) {
formData.append('txtDeletedRow', txtDeletedRow); formData.append('txtDeletedRow', txtDeletedRow);
formData.append('textStatus', stat); formData.append('textStatus', stat);
$('#loader').show(); $('#loader').show();
disableButtons(); // disableButtons();
$.ajax({ $.ajax({
// data:$('.ImportPO').serialize()+"&txtRowCount="+Row+"&txtDeletedRow="+txtDeletedRow+"&textStatus="+stat, // data:$('.ImportPO').serialize()+"&txtRowCount="+Row+"&txtDeletedRow="+txtDeletedRow+"&textStatus="+stat,
data: formData, data: formData,
@ -5525,11 +5529,11 @@ if (!empty($getlogpodtl)) {
//$('#SpcialInstruction').val(''); //$('#SpcialInstruction').val('');
//$('#txtDeliveryAddress').val(''); //$('#txtDeliveryAddress').val('');
window.location = "purchaseorderListing"; window.location = "purchaseorderListing";
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} else { } else {
alert("Error"); alert("Error");
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} }
} }

View File

@ -370,7 +370,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
$("#PODate").datepicker({ $("#PODate").datepicker({
minDate: d, minDate: d,
maxDate: 'now', maxDate: 'now',
dateFormat: 'dd-mm-yy', format: 'dd-mm-yy',
changeMonth: true, changeMonth: true,
changeYear: true, changeYear: true,
yearRange: '-100:+0' yearRange: '-100:+0'
@ -380,7 +380,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
$("#Exchangerateon").datepicker({ $("#Exchangerateon").datepicker({
minDate: m, minDate: m,
//maxDate : 'now', //maxDate : 'now',
dateFormat: 'dd-mm-yy', format: 'dd-mm-yy',
changeMonth: true, changeMonth: true,
changeYear: true, changeYear: true,
yearRange: '-100:+0' yearRange: '-100:+0'
@ -820,9 +820,10 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
</div> </div>
</div> </div>
<br /> <br />
<div class="form-row table-responsive" style="padding-bottom: 30px;"> <div class="form-row">
<table id="ImportTax" class="table table-bordered table-hover mb-0" <div class="table-responsive" style="padding-bottom: 30px;">
style="font-size:12px;"> <table id="ImportTax" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
<thead> <thead>
<tr> <tr>
<th style="white-space: nowrap !important;">SNo</th> <th style="white-space: nowrap !important;">SNo</th>
@ -848,6 +849,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label>Total Landing Charge <?php echo "($INR)" ?></label> <label>Total Landing Charge <?php echo "($INR)" ?></label>
@ -4195,7 +4197,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
formData.append('txtRowCount', txtRowCount); formData.append('txtRowCount', txtRowCount);
formData.append('txtDeletedRow', txtDeletedRow); formData.append('txtDeletedRow', txtDeletedRow);
formData.append('textStatus', stat); formData.append('textStatus', stat);
disableButtons(); // disableButtons();
$.ajax({ $.ajax({
// data:$('.ImportPO').serialize()+"&txtRowCount="+txtRowCount+"&txtDeletedRow="+txtDeletedRow+"&textStatus="+stat, // data:$('.ImportPO').serialize()+"&txtRowCount="+txtRowCount+"&txtDeletedRow="+txtDeletedRow+"&textStatus="+stat,
@ -4214,18 +4216,18 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
//$('#SpcialInstruction').val(''); //$('#SpcialInstruction').val('');
//$('#txtDeliveryAddress').val(''); //$('#txtDeliveryAddress').val('');
window.location = "purchaseorderListing"; window.location = "purchaseorderListing";
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} else { } else {
alert("Error"); alert("Error");
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} }
}, },
error: function(jqXHR, textStatus, errorThrown) { error: function(jqXHR, textStatus, errorThrown) {
console.error("AJAX Error: " + textStatus + ": " + errorThrown); console.error("AJAX Error: " + textStatus + ": " + errorThrown);
alert("Error: " + textStatus); alert("Error: " + textStatus);
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} }
}); });
@ -4333,11 +4335,11 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
}); });
function Reset() { function Reset() {
disableButtons(); // disableButtons();
location.reload(); location.reload();
setTimeout(function() { // setTimeout(function() {
enableButtons(); // enableButtons();
}, 2000); // }, 2000);
} }
</script> </script>

View File

@ -898,8 +898,7 @@ $(document).ready(function () {
if (data) { if (data) {
$('#loader').hide(); $('#loader').hide();
// alert(data); alert(data);
} }
} }

View File

@ -2029,8 +2029,8 @@ if (!empty($INRSYMBOL)) {
<!-- <div> <!-- <div>
<?php <?php
$data = array('name' => 'PODate', 'value' => set_value('PODate', $CurrentDate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); // $data = array('name' => 'PODate', 'value' => set_value('PODate', $CurrentDate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;');
echo form_input($data); // echo form_input($data);
?> ?>
</div> --> </div> -->
</div> </div>
@ -3946,7 +3946,7 @@ if (!empty($INRSYMBOL)) {
// else { // else {
var formData = new FormData($('.CreatePO')[0]); var formData = new FormData($('.CreatePO')[0]);
disableButtons(); // disableButtons();
$.ajax({ $.ajax({
type: "POST", type: "POST",
@ -3963,19 +3963,19 @@ if (!empty($INRSYMBOL)) {
//$('#SpcialInstruction').val(''); //$('#SpcialInstruction').val('');
//$('#txtDeliveryAddress').val(''); //$('#txtDeliveryAddress').val('');
window.location = "purchaseorderListing"; window.location = "purchaseorderListing";
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} else { } else {
alert("Error"); alert("Error");
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} }
}, },
error: function(jqXHR, textStatus, errorThrown) { error: function(jqXHR, textStatus, errorThrown) {
console.error("AJAX Error: " + textStatus + ": " + errorThrown); console.error("AJAX Error: " + textStatus + ": " + errorThrown);
alert("Error: " + textStatus); alert("Error: " + textStatus);
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} }
}); });
@ -4219,11 +4219,11 @@ if (!empty($INRSYMBOL)) {
} }
function Reset() { function Reset() {
disableButtons(); // disableButtons();
location.reload(); location.reload();
setTimeout(function() { // setTimeout(function() {
enableButtons(); // enableButtons();
}, 2000); // }, 2000);
} }

View File

@ -1047,7 +1047,7 @@ if (!empty($INRSYMBOL)) {
</div><!-- 6. form-row div closed here --> </div><!-- 6. form-row div closed here -->
<div class="form-row"> <div class="form-row">
<div class="table-responsive" style="padding-bottom: 30px;"> <div class="table-responsive" style="padding-bottom: 30px;">
<table id="serviceTax" class="table table-bordered table-hover mb-0" style="font-size:12px;"> <table id="serviceTax" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
<thead> <thead>
<tr> <tr>
<th style="white-space: nowrap !important;">SNo</th> <th style="white-space: nowrap !important;">SNo</th>
@ -2402,7 +2402,7 @@ if (!empty($INRSYMBOL)) {
// return false; // return false;
// } else { // } else {
var formData = new FormData($('.ServicePO')[0]); var formData = new FormData($('.ServicePO')[0]);
disableButtons(); // disableButtons();
console.log("inside add service purchase order view page"); console.log("inside add service purchase order view page");
console.log(formData); console.log(formData);
@ -2422,17 +2422,17 @@ if (!empty($INRSYMBOL)) {
$('#SpcialInstruction').val(''); $('#SpcialInstruction').val('');
$('#txtDeliveryAddress').val(''); $('#txtDeliveryAddress').val('');
window.location = "purchaseorderListing"; window.location = "purchaseorderListing";
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} else { } else {
alert("Error"); alert("Error");
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} }
}, },
error: function(jqXHR, textStatus, errorThrown) { error: function(jqXHR, textStatus, errorThrown) {
console.error("AJAX Error: " + textStatus + ": " + errorThrown); console.error("AJAX Error: " + textStatus + ": " + errorThrown);
alert("Error: " + textStatus); alert("Error: " + textStatus);
setTimeout(function() { enableButtons(); }, 2000); // setTimeout(function() { enableButtons(); }, 2000);
} }
}); });
@ -2584,11 +2584,11 @@ if (!empty($INRSYMBOL)) {
function Reset() { function Reset() {
disableButtons(); // disableButtons();
location.reload(); location.reload();
setTimeout(function() { // setTimeout(function() {
enableButtons(); // enableButtons();
}, 2000); // }, 2000);
} }