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;
}else if($('#insuranceStatus').val() == "1" && $('#InsuranceNumber').val().trim() == ''){
alert('Please Enter the Insurance No / Insurance Details');
$('#InsuranceNumber').focus();
return false; return false;
} }else if ($('#BudgetType').val() == "0") {
else if ($('#CostCenterName').val() == "0") {
alert('Please Select Cost Center Name ')
}
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>
@ -1288,6 +1289,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>
@ -2326,9 +2328,8 @@ if (!empty($getlogpodtl)) {
</div> </div>
<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,166 +1012,170 @@ 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">
<thead> <div class="table-responsive" style="padding-bottom: 30px;">
<tr> <table id="ServiceTable" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
<th>SNo</th> <thead>
<th style="white-space: nowrap !important; text-align:center !important">Requisition No</th> <tr>
<th style="white-space: nowrap !important;">Item Code</th> <th>SNo</th>
<th style="white-space: nowrap !important;">Item Description</th> <th style="white-space: nowrap !important; text-align:center !important">Requisition No</th>
<th style="white-space: nowrap !important; text-align:right !important">Quantity</th> <th style="white-space: nowrap !important;">Item Code</th>
<th style="white-space: nowrap !important;">UOM</th> <th style="white-space: nowrap !important;">Item Description</th>
<th style="white-space: nowrap !important; text-align:right !important">Rate<?php echo "($INRSYM)" ?></th> <th style="white-space: nowrap !important; text-align:right !important">Quantity</th>
<th style="white-space: nowrap !important; text-align:right !important">Basic Amount<?php echo "($INRSYM)" ?></th> <th style="white-space: nowrap !important;">UOM</th>
<th style="white-space: nowrap !important; text-align:right !important">Tax Amount<?php echo "($INRSYM)" ?></th> <th style="white-space: nowrap !important; text-align:right !important">Rate<?php echo "($INRSYM)" ?></th>
<th style="white-space: nowrap !important; text-align:right !important">Total Order Amount<?php echo "($INRSYM)" ?></th> <th style="white-space: nowrap !important; text-align:right !important">Basic Amount<?php echo "($INRSYM)" ?></th>
<th style="white-space: nowrap !important; text-align:right !important">Actual Quantity</th> <th style="white-space: nowrap !important; text-align:right !important">Tax Amount<?php echo "($INRSYM)" ?></th>
<th style="white-space: nowrap !important; text-align:right !important">Received Quantity</th> <th style="white-space: nowrap !important; text-align:right !important">Total Order Amount<?php echo "($INRSYM)" ?></th>
<th style="white-space: nowrap !important; text-align:right !important">Pending Quantity</th> <th style="white-space: nowrap !important; text-align:right !important">Actual Quantity</th>
<th>Action</th> <th style="white-space: nowrap !important; text-align:right !important">Received Quantity</th>
</tr> <th style="white-space: nowrap !important; text-align:right !important">Pending Quantity</th>
</thead> <th>Action</th>
<tbody id='ServiceAppend'>
<?php
if (!empty($POItem)) {
//print_r($POItem);
$index = 0;
foreach ($POItem as $record) {
$index = $index + 1;
if ($record->Schedule_Type != 'Recurring') {
$FrequencyNo = intval(1);
$Frequency = 'One Time';
} else {
$FrequencyNo = $record->NumberOfService;
$Frequency = $record->Service_Period;
}
?>
<tr id="<?php echo $index; ?>">
<td><?php echo $index; ?></td>
<td style="text-align:center !important"><?php echo $record->ReqNo ?> </td>
<td><?php echo $record->MaterialCode ?></td>
<td><?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "...");
echo $shortName; ?></td>
<td style="text-align:right !important"><?php echo $record->Quantity ?></td>
<td><?php echo $record->UOM ?></td>
<td style="text-align:right !important"><?php echo $record->Rate ?></td>
<td style="text-align:right !important"><?php echo number_format($record->BasicValue * $FrequencyNo, 2, '.', ''); ?></td>
<td style="text-align:right !important"><?php echo $record->Taxamount ?></td>
<td style="text-align:right !important"><?php echo $record->TotalValue ?></td>
<td style="text-align:right !important"><?php echo $record->Quantity ?></td>
<td style="text-align:right !important"><?php echo $record->ReceivedQuantity ?></td>
<td style="text-align:right !important"><?php echo number_format($record->Quantity - $record->ReceivedQuantity, 2, '.', ''); ?></td>
<input type="hidden" name="<?php echo 'Reqnumber' . $index ?>" id="<?php echo 'Reqnumber' . $index ?>" value="<?php echo $record->ReqNo; ?>" />
<input type="hidden" name="<?php echo 'departmentName' . $index ?>" id="<?php echo 'departmentName' . $index ?>" value="<?php echo $record->ReqNo; ?>" />
<input type="hidden" name="<?php echo 'AvilBudget' . $index ?>" id="<?php echo 'AvilBudget' . $index ?>" value="<?php echo $AvlAmount; ?>" />
<input type="hidden" name="<?php echo 'LineItemNo' . $index ?>" id="<?php echo 'LineItemNo' . $index ?>" value="<?php echo $record->LineItemNo; ?>" />
<input type="hidden" name="<?php echo 'costCode' . $index ?>" id="<?php echo 'costCode' . $index ?>" value="<?php echo $record->CostCenterCode; ?>" />
<input type="hidden" name="<?php echo 'materialCode' . $index ?>" id="<?php echo 'materialCode' . $index ?>" value="<?php echo $record->MaterialCode; ?>" />
<input type="hidden" name="<?php echo 'materialName' . $index ?>" id="<?php echo 'materialName' . $index ?>" value="<?php echo $record->MaterialName; ?>" />
<input type="hidden" name="<?php echo 'uom' . $index ?>" id="<?php echo 'uom' . $index ?>" value="<?php echo $record->UOM; ?>" />
<input type="hidden" name="<?php echo 'per' . $index ?>" id="<?php echo 'per' . $index ?>" value="<?php echo $record->Per; ?>" />
<input type="hidden" name="<?php echo 'quantity' . $index ?>" id="<?php echo 'quantity' . $index ?>" value="<?php echo $record->Quantity; ?>" />
<input type="hidden" name="<?php echo 'beforequantity' . $index ?>" id="<?php echo 'beforequantity' . $index ?>" value="<?php echo $record->Quantity; ?>" />
<input type="hidden" name="<?php echo 'itemRate' . $index ?>" id="<?php echo 'itemRate' . $index ?>" value="<?php echo $record->Rate; ?>" />
<input type="hidden" name="<?php echo 'beforeitemRate' . $index ?>" id="<?php echo 'beforeitemRate' . $index ?>" value="<?php echo $record->Rate; ?>" />
<input type="hidden" name="<?php echo 'Cgst' . $index ?>" id="<?php echo 'Cgst' . $index ?>" value="<?php echo $record->CGST; ?>" />
<input type="hidden" name="<?php echo 'beforeCgst' . $index ?>" id="<?php echo 'beforeCgst' . $index ?>" value="<?php echo $record->CGST; ?>" />
<input type="hidden" name="<?php echo 'AfterCgst' . $index ?>" id="<?php echo 'AfterCgst' . $index ?>" value="<?php echo $record->After_CGST; ?>" />
<input type="hidden" name="<?php echo 'beforeCgstvalue' . $index ?>" id="<?php echo 'beforeCgstvalue' . $index ?>" value="<?php echo $record->After_CGST; ?>" />
<input type="hidden" name="<?php echo 'Sgst' . $index ?>" id="<?php echo 'Sgst' . $index ?>" value="<?php echo $record->SGST; ?>" />
<input type="hidden" name="<?php echo 'beforeSgst' . $index ?>" id="<?php echo 'beforeSgst' . $index ?>" value="<?php echo $record->SGST; ?>" />
<input type="hidden" name="<?php echo 'AfterSgst' . $index ?>" id="<?php echo 'AfterSgst' . $index ?>" value="<?php echo $record->After_SGST; ?>" />
<input type="hidden" name="<?php echo 'beforeSgstvalue' . $index ?>" id="<?php echo 'beforeSgstvalue' . $index ?>" value="<?php echo $record->After_SGST; ?>" />
<input type="hidden" name="<?php echo 'Igst' . $index ?>" id="<?php echo 'Igst' . $index ?>" value="<?php echo $record->IGST; ?>" />
<input type="hidden" name="<?php echo 'beforeIgst' . $index ?>" id="<?php echo 'beforeIgst' . $index ?>" value="<?php echo $record->IGST; ?>" />
<input type="hidden" name="<?php echo 'AfterIgst' . $index ?>" id="<?php echo 'AfterIgst' . $index ?>" value="<?php echo $record->After_IGST; ?>" />
<input type="hidden" name="<?php echo 'beforeIgstvalue' . $index ?>" id="<?php echo 'beforeIgstvalue' . $index ?>" value="<?php echo $record->After_IGST; ?>" />
<input type="hidden" name="<?php echo 'otherallowance' . $index ?>" id="<?php echo 'otherallowance' . $index ?>" value="<?php echo $record->otherallowance; ?>" />
<input type="hidden" name="<?php echo 'beforeotherallowance' . $index ?>" id="<?php echo 'beforeotherallowance' . $index ?>" value="<?php echo $record->otherallowance; ?>" />
<input type="hidden" name="<?php echo 'TotalOrderValue' . $index ?>" id="<?php echo 'TotalOrderValue' . $index ?>" value="<?php echo $record->TotalValue; ?>" />
<input type="hidden" name="<?php echo 'servicematerialdescription' . $index ?>" id="<?php echo 'servicematerialdescription' . $index ?>" value="<?php echo $record->ServiceMaterialDescription; ?>" />
<input type="hidden" name="<?php echo 'Frequency' . $index ?>" id="<?php echo 'Frequency' . $index ?>" value="<?php echo $Frequency; ?>" />
<input type="hidden" name="<?php echo 'FrequencyNo' . $index ?>" id="<?php echo 'FrequencyNo' . $index ?>" value="<?php echo $FrequencyNo; ?>" />
<input type="hidden" name="<?php echo 'FrequencyValue' . $index ?>" id="<?php echo 'FrequencyValue' . $index ?>" value="<?php echo $FrequencyNo; ?>" />
<input type="hidden" name="<?php echo 'OtherServiceDescription' . $index ?>" id="<?php echo 'OtherServiceDescription' . $index ?>" value="<?php echo $record->MaterialDescription; ?>" />
<?php
//if($PONOStatus == PO_DRAFT)
//{
?>
<td> <a data-target='#EDITSERVICE' data-id="<?php echo $index; ?>" data-userid="<?php echo $index; ?>"
data-toggle="modal" href="#EDITSERVICE"><i class="ri-pencil-fill" data-toggle="tooltip"
title="Click here to view/Edit the <?php echo $record->ReqNo; ?>
Requisition details"></i>&nbsp;&nbsp;&nbsp;
<!-- </a> <a href='#' onclick = "DeleteRow(<?php echo $index; ?>)" class="link" data-id="<?php echo $index; ?>" data-userid="<?php echo $index; ?>" id="Del" ><span class="ri-delete-bin-7-fill"></span></a>-->
<?php
//} else {
?>
<!-- <td> <a data-toggle="tooltip" href="#"><i class="fa fa-eye" data-toggle="tooltip" title="<?php echo $record->ReqNo; ?> - Click here to view Requistion details"></i>&nbsp;&nbsp;&nbsp;</a> </td> -->
<?php
//}
?>
</tr> </tr>
<?php </thead>
$TotalCgst = $TotalCgst + $record->After_CGST;
$TotalSgst = $TotalSgst + $record->After_SGST; <tbody id='ServiceAppend'>
$TotalIgst = $TotalIgst + $record->After_IGST; <?php
$Totalotherallowance = $Totalotherallowance + $record->otherallowance;
$TotalSummary = $TotalSummary + $record->TotalValue; if (!empty($POItem)) {
//print_r($POItem);
$TotalBasicAmount = $TotalBasicAmount + ($record->BasicValue * $FrequencyNo); $index = 0;
}
?> <input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $index; ?>">
<?php
} foreach ($POItem as $record) {
?> $index = $index + 1;
</tbody> if ($record->Schedule_Type != 'Recurring') {
</table> $FrequencyNo = intval(1);
$Frequency = 'One Time';
} else {
$FrequencyNo = $record->NumberOfService;
$Frequency = $record->Service_Period;
}
?>
<tr id="<?php echo $index; ?>">
<td><?php echo $index; ?></td>
<td style="text-align:center !important"><?php echo $record->ReqNo ?> </td>
<td><?php echo $record->MaterialCode ?></td>
<td><?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "...");
echo $shortName; ?></td>
<td style="text-align:right !important"><?php echo $record->Quantity ?></td>
<td><?php echo $record->UOM ?></td>
<td style="text-align:right !important"><?php echo $record->Rate ?></td>
<td style="text-align:right !important"><?php echo number_format($record->BasicValue * $FrequencyNo, 2, '.', ''); ?></td>
<td style="text-align:right !important"><?php echo $record->Taxamount ?></td>
<td style="text-align:right !important"><?php echo $record->TotalValue ?></td>
<td style="text-align:right !important"><?php echo $record->Quantity ?></td>
<td style="text-align:right !important"><?php echo $record->ReceivedQuantity ?></td>
<td style="text-align:right !important"><?php echo number_format($record->Quantity - $record->ReceivedQuantity, 2, '.', ''); ?></td>
<input type="hidden" name="<?php echo 'Reqnumber' . $index ?>" id="<?php echo 'Reqnumber' . $index ?>" value="<?php echo $record->ReqNo; ?>" />
<input type="hidden" name="<?php echo 'departmentName' . $index ?>" id="<?php echo 'departmentName' . $index ?>" value="<?php echo $record->ReqNo; ?>" />
<input type="hidden" name="<?php echo 'AvilBudget' . $index ?>" id="<?php echo 'AvilBudget' . $index ?>" value="<?php echo $AvlAmount; ?>" />
<input type="hidden" name="<?php echo 'LineItemNo' . $index ?>" id="<?php echo 'LineItemNo' . $index ?>" value="<?php echo $record->LineItemNo; ?>" />
<input type="hidden" name="<?php echo 'costCode' . $index ?>" id="<?php echo 'costCode' . $index ?>" value="<?php echo $record->CostCenterCode; ?>" />
<input type="hidden" name="<?php echo 'materialCode' . $index ?>" id="<?php echo 'materialCode' . $index ?>" value="<?php echo $record->MaterialCode; ?>" />
<input type="hidden" name="<?php echo 'materialName' . $index ?>" id="<?php echo 'materialName' . $index ?>" value="<?php echo $record->MaterialName; ?>" />
<input type="hidden" name="<?php echo 'uom' . $index ?>" id="<?php echo 'uom' . $index ?>" value="<?php echo $record->UOM; ?>" />
<input type="hidden" name="<?php echo 'per' . $index ?>" id="<?php echo 'per' . $index ?>" value="<?php echo $record->Per; ?>" />
<input type="hidden" name="<?php echo 'quantity' . $index ?>" id="<?php echo 'quantity' . $index ?>" value="<?php echo $record->Quantity; ?>" />
<input type="hidden" name="<?php echo 'beforequantity' . $index ?>" id="<?php echo 'beforequantity' . $index ?>" value="<?php echo $record->Quantity; ?>" />
<input type="hidden" name="<?php echo 'itemRate' . $index ?>" id="<?php echo 'itemRate' . $index ?>" value="<?php echo $record->Rate; ?>" />
<input type="hidden" name="<?php echo 'beforeitemRate' . $index ?>" id="<?php echo 'beforeitemRate' . $index ?>" value="<?php echo $record->Rate; ?>" />
<input type="hidden" name="<?php echo 'Cgst' . $index ?>" id="<?php echo 'Cgst' . $index ?>" value="<?php echo $record->CGST; ?>" />
<input type="hidden" name="<?php echo 'beforeCgst' . $index ?>" id="<?php echo 'beforeCgst' . $index ?>" value="<?php echo $record->CGST; ?>" />
<input type="hidden" name="<?php echo 'AfterCgst' . $index ?>" id="<?php echo 'AfterCgst' . $index ?>" value="<?php echo $record->After_CGST; ?>" />
<input type="hidden" name="<?php echo 'beforeCgstvalue' . $index ?>" id="<?php echo 'beforeCgstvalue' . $index ?>" value="<?php echo $record->After_CGST; ?>" />
<input type="hidden" name="<?php echo 'Sgst' . $index ?>" id="<?php echo 'Sgst' . $index ?>" value="<?php echo $record->SGST; ?>" />
<input type="hidden" name="<?php echo 'beforeSgst' . $index ?>" id="<?php echo 'beforeSgst' . $index ?>" value="<?php echo $record->SGST; ?>" />
<input type="hidden" name="<?php echo 'AfterSgst' . $index ?>" id="<?php echo 'AfterSgst' . $index ?>" value="<?php echo $record->After_SGST; ?>" />
<input type="hidden" name="<?php echo 'beforeSgstvalue' . $index ?>" id="<?php echo 'beforeSgstvalue' . $index ?>" value="<?php echo $record->After_SGST; ?>" />
<input type="hidden" name="<?php echo 'Igst' . $index ?>" id="<?php echo 'Igst' . $index ?>" value="<?php echo $record->IGST; ?>" />
<input type="hidden" name="<?php echo 'beforeIgst' . $index ?>" id="<?php echo 'beforeIgst' . $index ?>" value="<?php echo $record->IGST; ?>" />
<input type="hidden" name="<?php echo 'AfterIgst' . $index ?>" id="<?php echo 'AfterIgst' . $index ?>" value="<?php echo $record->After_IGST; ?>" />
<input type="hidden" name="<?php echo 'beforeIgstvalue' . $index ?>" id="<?php echo 'beforeIgstvalue' . $index ?>" value="<?php echo $record->After_IGST; ?>" />
<input type="hidden" name="<?php echo 'otherallowance' . $index ?>" id="<?php echo 'otherallowance' . $index ?>" value="<?php echo $record->otherallowance; ?>" />
<input type="hidden" name="<?php echo 'beforeotherallowance' . $index ?>" id="<?php echo 'beforeotherallowance' . $index ?>" value="<?php echo $record->otherallowance; ?>" />
<input type="hidden" name="<?php echo 'TotalOrderValue' . $index ?>" id="<?php echo 'TotalOrderValue' . $index ?>" value="<?php echo $record->TotalValue; ?>" />
<input type="hidden" name="<?php echo 'servicematerialdescription' . $index ?>" id="<?php echo 'servicematerialdescription' . $index ?>" value="<?php echo $record->ServiceMaterialDescription; ?>" />
<input type="hidden" name="<?php echo 'Frequency' . $index ?>" id="<?php echo 'Frequency' . $index ?>" value="<?php echo $Frequency; ?>" />
<input type="hidden" name="<?php echo 'FrequencyNo' . $index ?>" id="<?php echo 'FrequencyNo' . $index ?>" value="<?php echo $FrequencyNo; ?>" />
<input type="hidden" name="<?php echo 'FrequencyValue' . $index ?>" id="<?php echo 'FrequencyValue' . $index ?>" value="<?php echo $FrequencyNo; ?>" />
<input type="hidden" name="<?php echo 'OtherServiceDescription' . $index ?>" id="<?php echo 'OtherServiceDescription' . $index ?>" value="<?php echo $record->MaterialDescription; ?>" />
<?php
//if($PONOStatus == PO_DRAFT)
//{
?>
<td> <a data-target='#EDITSERVICE' data-id="<?php echo $index; ?>" data-userid="<?php echo $index; ?>"
data-toggle="modal" href="#EDITSERVICE"><i class="ri-pencil-fill" data-toggle="tooltip"
title="Click here to view/Edit the <?php echo $record->ReqNo; ?>
Requisition details"></i>&nbsp;&nbsp;&nbsp;
<!-- </a> <a href='#' onclick = "DeleteRow(<?php echo $index; ?>)" class="link" data-id="<?php echo $index; ?>" data-userid="<?php echo $index; ?>" id="Del" ><span class="ri-delete-bin-7-fill"></span></a>-->
<?php
//} else {
?>
<!-- <td> <a data-toggle="tooltip" href="#"><i class="fa fa-eye" data-toggle="tooltip" title="<?php echo $record->ReqNo; ?> - Click here to view Requistion details"></i>&nbsp;&nbsp;&nbsp;</a> </td> -->
<?php
//}
?>
</tr>
<?php
$TotalCgst = $TotalCgst + $record->After_CGST;
$TotalSgst = $TotalSgst + $record->After_SGST;
$TotalIgst = $TotalIgst + $record->After_IGST;
$Totalotherallowance = $Totalotherallowance + $record->otherallowance;
$TotalSummary = $TotalSummary + $record->TotalValue;
$TotalBasicAmount = $TotalBasicAmount + ($record->BasicValue * $FrequencyNo);
}
?> <input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $index; ?>">
<?php
}
?>
</tbody>
</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,259 +825,263 @@ 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">
<thead> <div class="table-responsive" style="padding-bottom: 30px;">
<tr> <table id="ImportTax" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
<th style="white-space: nowrap !important; text-align:left !important">SNo</th>
<th style="white-space: nowrap !important; text-align:center !important">Requisition No</th> <thead>
<th style="white-space: nowrap !important; text-align:left !important">Item Code</th> <tr>
<th style="white-space: nowrap !important; text-align:left !important">Item Description</th> <th style="white-space: nowrap !important; text-align:left !important">SNo</th>
<th style="white-space: nowrap !important; text-align:left !important">Line Item Specs</th> <th style="white-space: nowrap !important; text-align:center !important">Requisition No</th>
<th style="white-space: nowrap !important; text-align:right !important">Quantity</th> <th style="white-space: nowrap !important; text-align:left !important">Item Code</th>
<th style="white-space: nowrap !important; text-align:left !important">UOM</th> <th style="white-space: nowrap !important; text-align:left !important">Item Description</th>
<th style="white-space: nowrap !important; text-align:right !important">Rate<?php echo "($INR)" ?></th> <th style="white-space: nowrap !important; text-align:left !important">Line Item Specs</th>
<th style="white-space: nowrap !important; text-align:right !important">Basic Amount<?php echo "($INR)" ?></th> <th style="white-space: nowrap !important; text-align:right !important">Quantity</th>
<!-- <th>Received Qty</th> <th style="white-space: nowrap !important; text-align:left !important">UOM</th>
<th>Rejected Qty</th> <th style="white-space: nowrap !important; text-align:right !important">Rate<?php echo "($INR)" ?></th>
<th>Pending Qty</th> --> <th style="white-space: nowrap !important; text-align:right !important">Basic Amount<?php echo "($INR)" ?></th>
<!-- <th>Tax Amount</th> <!-- <th>Received Qty</th>
<th>Total Order Amount</th> --> <th>Rejected Qty</th>
<th>Action</th> <th>Pending Qty</th> -->
</tr> <!-- <th>Tax Amount</th>
</thead> <th>Total Order Amount</th> -->
<th>Action</th>
</tr>
</thead>
<tbody id='ImportAppend'> <tbody id='ImportAppend'>
<?php <?php
if (!empty($POItem)) { if (!empty($POItem)) {
foreach ($POItem as $record) { foreach ($POItem as $record) {
$index = $index + 1; $index = $index + 1;
//echo $record->Rate; //echo $record->Rate;
?> ?>
<tr id="<?php echo $index; ?>"> <tr id="<?php echo $index; ?>">
<td align="left"><?php echo $index; ?></td> <td align="left"><?php echo $index; ?></td>
<td align="center"><?php echo $record->ReqNo ?></td> <td align="center"><?php echo $record->ReqNo ?></td>
<td align="left"><?php echo $record->MaterialCode ?></td> <td align="left"><?php echo $record->MaterialCode ?></td>
<td align="left"><?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "..."); <td align="left"><?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "...");
echo $shortName; ?></td> echo $shortName; ?></td>
<td align="left"> <td align="left">
<?php if ($PONOStatus === PO_DRAFT || $PONOStatus === PO_CREATED) { ?> <?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; ?>">
<?php echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-"; ?> <?php echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-"; ?>
</a> </a>
<div class="edit-container" style="display:none;"> <div class="edit-container" style="display:none;">
<input type="text" class="edit-input-field" /> <input type="text" class="edit-input-field" />
<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 align="right"><?php echo $record->Quantity ?></td> <td align="right"><?php echo $record->Quantity ?></td>
<td align="left"><?php echo $record->UOM ?></td> <td align="left"><?php echo $record->UOM ?></td>
<td align="right"><?php echo $record->Rate ?></td> <td align="right"><?php echo $record->Rate ?></td>
<td align="right"><?php echo $record->BasicValue ?></td> <td align="right"><?php echo $record->BasicValue ?></td>
<!-- <td><?php echo $record->ReceivedQuantity ?></td> --> <!-- <td><?php echo $record->ReceivedQuantity ?></td> -->
<!-- <td><?php echo $record->QuantityRejected ?></td> --> <!-- <td><?php echo $record->QuantityRejected ?></td> -->
<!-- <td><?php echo $record->PendingQty ?></td> --> <!-- <td><?php echo $record->PendingQty ?></td> -->
<!-- <td><?php echo $record->Taxamount ?></td> <!-- <td><?php echo $record->Taxamount ?></td>
<td><?php echo $record->TotalOrderValue ?></td> --> <td><?php echo $record->TotalOrderValue ?></td> -->
<input type="hidden" name="<?php echo 'Reqnumber' . $index ?>" id="<?php echo 'Reqnumber' . $index ?>" value="<?php echo $record->ReqNo; ?>" /> <input type="hidden" name="<?php echo 'Reqnumber' . $index ?>" id="<?php echo 'Reqnumber' . $index ?>" value="<?php echo $record->ReqNo; ?>" />
<input type="hidden" name="<?php echo 'departmentName' . $index ?>" id="<?php echo 'departmentName' . $index ?>" value="<?php echo $record->DepartmentName; ?>" /> <input type="hidden" name="<?php echo 'departmentName' . $index ?>" id="<?php echo 'departmentName' . $index ?>" value="<?php echo $record->DepartmentName; ?>" />
<!--<input type="hidden" name="<?php //echo 'AvlBudAmt'.$index <!--<input type="hidden" name="<?php //echo 'AvlBudAmt'.$index
?>" id="<?php //echo 'AvlBudAmt'.$index ?>" id="<?php //echo 'AvlBudAmt'.$index
?>" value="<?php //echo $record->AvlBudAmt ; ?>" value="<?php //echo $record->AvlBudAmt ;
?>" /> --> ?>" /> -->
<input type="hidden" name="<?php echo 'AvlBudAmt' . $index ?>" id="<?php echo 'AvlBudAmt' . $index ?>" value="<?php echo "$AvlAmount"; ?>" /> <input type="hidden" name="<?php echo 'AvlBudAmt' . $index ?>" id="<?php echo 'AvlBudAmt' . $index ?>" value="<?php echo "$AvlAmount"; ?>" />
<input type="hidden" name="<?php echo 'LineItemNo' . $index ?>" id="<?php echo 'LineItemNo' . $index ?>" value="<?php echo $record->LineItemNo; ?>" /> <input type="hidden" name="<?php echo 'LineItemNo' . $index ?>" id="<?php echo 'LineItemNo' . $index ?>" value="<?php echo $record->LineItemNo; ?>" />
<input type="hidden" name="<?php echo 'costCode' . $index ?>" id="<?php echo 'costCode' . $index ?>" value="<?php echo $record->CostCenterCode; ?>" /> <input type="hidden" name="<?php echo 'costCode' . $index ?>" id="<?php echo 'costCode' . $index ?>" value="<?php echo $record->CostCenterCode; ?>" />
<input type="hidden" name="<?php echo 'materialCode' . $index ?>" id="<?php echo 'materialCode' . $index ?>" value="<?php echo $record->MaterialCode; ?>" /> <input type="hidden" name="<?php echo 'materialCode' . $index ?>" id="<?php echo 'materialCode' . $index ?>" value="<?php echo $record->MaterialCode; ?>" />
<input type="hidden" name="<?php echo 'materialName' . $index ?>" id="<?php echo 'materialName' . $index ?>" value="<?php echo $record->MaterialName; ?>" /> <input type="hidden" name="<?php echo 'materialName' . $index ?>" id="<?php echo 'materialName' . $index ?>" value="<?php echo $record->MaterialName; ?>" />
<input type="hidden" name="<?php echo 'uom' . $index ?>" id="<?php echo 'uom' . $index ?>" value="<?php echo $record->UOM; ?>" /> <input type="hidden" name="<?php echo 'uom' . $index ?>" id="<?php echo 'uom' . $index ?>" value="<?php echo $record->UOM; ?>" />
<input type="hidden" name="<?php echo 'quantity' . $index ?>" id="<?php echo 'quantity' . $index ?>" value="<?php echo $record->Quantity; ?>" /> <input type="hidden" name="<?php echo 'quantity' . $index ?>" id="<?php echo 'quantity' . $index ?>" value="<?php echo $record->Quantity; ?>" />
<input align="right" type="hidden" name="<?php echo 'b4qty' . $index ?>" id="<?php echo 'b4qty' . $index ?>" value="<?php echo $record->Quantity; ?>" /> <input align="right" type="hidden" name="<?php echo 'b4qty' . $index ?>" id="<?php echo 'b4qty' . $index ?>" value="<?php echo $record->Quantity; ?>" />
<input type="hidden" name="<?php echo 'itemRate' . $index ?>" id="<?php echo 'itemRate' . $index ?>" value="<?php echo $record->Rate; ?>" /> <input type="hidden" name="<?php echo 'itemRate' . $index ?>" id="<?php echo 'itemRate' . $index ?>" value="<?php echo $record->Rate; ?>" />
<input align="right" type="hidden" name="<?php echo 'b4rate' . $index ?>" id="<?php echo 'b4rate' . $index ?>" value="<?php echo $record->Rate; ?>" /> <input align="right" type="hidden" name="<?php echo 'b4rate' . $index ?>" id="<?php echo 'b4rate' . $index ?>" value="<?php echo $record->Rate; ?>" />
<input type="hidden" name="<?php echo 'LandingCharge' . $index ?>" id="<?php echo 'LandingCharge' . $index ?>" value="<?php echo $record->LandingCharge; ?>" /> <input type="hidden" name="<?php echo 'LandingCharge' . $index ?>" id="<?php echo 'LandingCharge' . $index ?>" value="<?php echo $record->LandingCharge; ?>" />
<input type="hidden" name="<?php echo 'AfterLandingCharge' . $index ?>" id="<?php echo 'AfterLandingCharge' . $index ?>" value="<?php echo $record->AfterLandingCharge; ?>" /> <input type="hidden" name="<?php echo 'AfterLandingCharge' . $index ?>" id="<?php echo 'AfterLandingCharge' . $index ?>" value="<?php echo $record->AfterLandingCharge; ?>" />
<input type="hidden" name="<?php echo 'CustomDuty' . $index ?>" id="<?php echo 'CustomDuty' . $index ?>" value="<?php echo $record->CustomDuty; ?>" /> <input type="hidden" name="<?php echo 'CustomDuty' . $index ?>" id="<?php echo 'CustomDuty' . $index ?>" value="<?php echo $record->CustomDuty; ?>" />
<input type="hidden" name="<?php echo 'AfterCustomDuty' . $index ?>" id="<?php echo 'AfterCustomDuty' . $index ?>" value="<?php echo $record->AfterCustomDuty; ?>" /> <input type="hidden" name="<?php echo 'AfterCustomDuty' . $index ?>" id="<?php echo 'AfterCustomDuty' . $index ?>" value="<?php echo $record->AfterCustomDuty; ?>" />
<input type="hidden" name="<?php echo 'ExchangeRate' . $index ?>" id="<?php echo 'ExchangeRate' . $index ?>" value="<?php echo $record->ExchangeRate; ?>" /> <input type="hidden" name="<?php echo 'ExchangeRate' . $index ?>" id="<?php echo 'ExchangeRate' . $index ?>" value="<?php echo $record->ExchangeRate; ?>" />
<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 'CustomDutyExpensesPerKG' . $index ?>" id="<?php echo 'CustomDutyExpensesPerKG' . $index ?>" value="<?php echo $record->CustomDutyExpensesPerKG; ?>" /> <input type="hidden" name="<?php echo 'CustomDutyExpensesPerKG' . $index ?>" id="<?php echo 'CustomDutyExpensesPerKG' . $index ?>" value="<?php echo $record->CustomDutyExpensesPerKG; ?>" />
<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 'BasicPriceInMTon' . $index ?>" value="<?php echo $record->BasicPriceInMTon; ?>" /> <input type="hidden" name="<?php echo 'BasicPriceInMTon' . $index ?>" id="<?php echo 'BasicPriceInMTon' . $index ?>" value="<?php echo $record->BasicPriceInMTon; ?>" />
<input type="hidden" name="<?php echo 'ProductPrice' . $index ?>" id="<?php echo 'ProductPrice' . $index ?>" value="<?php echo $record->ProductPrice; ?>" /> <input type="hidden" name="<?php echo 'ProductPrice' . $index ?>" id="<?php echo 'ProductPrice' . $index ?>" value="<?php echo $record->ProductPrice; ?>" />
<input type="hidden" name="<?php echo 'CustomSHCess' . $index ?>" id="<?php echo 'CustomSHCess' . $index ?>" value="<?php echo $record->CustomSHCess; ?>" /> <input type="hidden" name="<?php echo 'CustomSHCess' . $index ?>" id="<?php echo 'CustomSHCess' . $index ?>" value="<?php echo $record->CustomSHCess; ?>" />
<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; ?>" />
<input type="hidden" name="<?php echo 'ProductPrice' . $index ?>" id="<?php echo 'ProductPrice' . $index ?>" value="<?php echo $record->ProductPrice; ?>" /> <input type="hidden" name="<?php echo 'ProductPrice' . $index ?>" id="<?php echo 'ProductPrice' . $index ?>" value="<?php echo $record->ProductPrice; ?>" />
<input type="hidden" name="<?php echo 'CustomEdCess' . $index ?>" id="<?php echo 'CustomEdCess' . $index ?>" value="<?php echo $record->CustomEdCess; ?>" /> <input type="hidden" name="<?php echo 'CustomEdCess' . $index ?>" id="<?php echo 'CustomEdCess' . $index ?>" value="<?php echo $record->CustomEdCess; ?>" />
<!-- <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; ?>" />
<input type="hidden" name="<?php echo 'TotalValue' . $index ?>" id="<?php echo 'TotalValue' . $index ?>" value="<?php echo $record->ProductPrice; ?>" /> <input type="hidden" name="<?php echo 'TotalValue' . $index ?>" id="<?php echo 'TotalValue' . $index ?>" value="<?php echo $record->ProductPrice; ?>" />
<input type="hidden" name="<?php echo 'ExchangeRate' . $index ?>" id="<?php echo 'ExchangeRate' . $index ?>" value="<?php echo $record->ExchangeRate; ?>" /> <input type="hidden" name="<?php echo 'ExchangeRate' . $index ?>" id="<?php echo 'ExchangeRate' . $index ?>" value="<?php echo $record->ExchangeRate; ?>" />
<!-- <input type="hidden" name="<?php echo 'AfterCustomEDcess' . $index ?>" id="<?php echo 'AfterCustomEDcess' . $index ?>" value="<?php echo $record->AfterCustomEdCess; ?>" /> --> <!-- <input type="hidden" name="<?php echo 'AfterCustomEDcess' . $index ?>" id="<?php echo 'AfterCustomEDcess' . $index ?>" value="<?php echo $record->AfterCustomEdCess; ?>" /> -->
<!-- <input type="hidden" name="<?php echo 'CustomEDcess' . $index ?>" id="<?php echo 'CustomEDcess' . $index ?>" value="<?php echo $record->CustomEdCess; ?>" /> --> <!-- <input type="hidden" name="<?php echo 'CustomEDcess' . $index ?>" id="<?php echo 'CustomEDcess' . $index ?>" value="<?php echo $record->CustomEdCess; ?>" /> -->
<input type="hidden" name="<?php echo 'FreightType' . $index ?>" id="<?php echo 'FreightType' . $index ?>" value="<?php echo $record->FreightType; ?>" /> <input type="hidden" name="<?php echo 'FreightType' . $index ?>" id="<?php echo 'FreightType' . $index ?>" value="<?php echo $record->FreightType; ?>" />
<input type="hidden" name="<?php echo 'NoOfTrip' . $index ?>" id="<?php echo 'NoOfTrip' . $index ?>" value="<?php echo $record->NoOfTrip; ?>" /> <input type="hidden" name="<?php echo 'NoOfTrip' . $index ?>" id="<?php echo 'NoOfTrip' . $index ?>" value="<?php echo $record->NoOfTrip; ?>" />
<input type="hidden" name="<?php echo 'FreightValue' . $index ?>" id="<?php echo 'FreightValue' . $index ?>" value="<?php echo $record->FreightValue; ?>" /> <input type="hidden" name="<?php echo 'FreightValue' . $index ?>" id="<?php echo 'FreightValue' . $index ?>" value="<?php echo $record->FreightValue; ?>" />
<input type="hidden" name="<?php echo 'AfterFreightValue' . $index ?>" id="<?php echo 'AfterFreightValue' . $index ?>" value="<?php echo $record->AfterFreightValue; ?>" /> <input type="hidden" name="<?php echo 'AfterFreightValue' . $index ?>" id="<?php echo 'AfterFreightValue' . $index ?>" value="<?php echo $record->AfterFreightValue; ?>" />
<input type="hidden" name="<?php echo 'Per' . $index ?>" id="<?php echo 'Per' . $index ?>" value="<?php echo $record->Per; ?>" /> <input type="hidden" name="<?php echo 'Per' . $index ?>" id="<?php echo 'Per' . $index ?>" value="<?php echo $record->Per; ?>" />
<input type="hidden" name="<?php echo 'Addinstruction' . $index ?>" id="<?php echo 'Addinstruction' . $index ?>" value="<?php echo $record->ServiceMaterialDescription; ?>" /> <input type="hidden" name="<?php echo 'Addinstruction' . $index ?>" id="<?php echo 'Addinstruction' . $index ?>" value="<?php echo $record->ServiceMaterialDescription; ?>" />
<!-- <input type="hidden" name="<?php echo 'AfterFreightValue' . $index ?>" id="<?php echo 'AfterFreightValue' . $index ?>" value="<?php echo $record->AfterFreightValue; ?>" /> --> <!-- <input type="hidden" name="<?php echo 'AfterFreightValue' . $index ?>" id="<?php echo 'AfterFreightValue' . $index ?>" value="<?php echo $record->AfterFreightValue; ?>" /> -->
<input type="hidden" name="<?php echo 'AssessableValue' . $index ?>" id="<?php echo 'AssessableValue' . $index ?>" value="<?php echo $record->AssessableValue; ?>" /> <input type="hidden" name="<?php echo 'AssessableValue' . $index ?>" id="<?php echo 'AssessableValue' . $index ?>" value="<?php echo $record->AssessableValue; ?>" />
<input type="hidden" name="<?php echo 'SubTotal' . $index ?>" id="<?php echo 'SubTotal' . $index ?>" value="<?php echo $record->SubTotal; ?>" /> <input type="hidden" name="<?php echo 'SubTotal' . $index ?>" id="<?php echo 'SubTotal' . $index ?>" value="<?php echo $record->SubTotal; ?>" />
<input type="hidden" name="<?php echo 'IGST' . $index ?>" id="<?php echo 'IGST' . $index ?>" value="<?php echo $record->IGST; ?>" /> <input type="hidden" name="<?php echo 'IGST' . $index ?>" id="<?php echo 'IGST' . $index ?>" value="<?php echo $record->IGST; ?>" />
<input type="hidden" name="<?php echo 'AfterIGST' . $index ?>" id="<?php echo 'AfterIGST' . $index ?>" value="<?php echo $record->AfterIGST; ?>" /> <input type="hidden" name="<?php echo 'AfterIGST' . $index ?>" id="<?php echo 'AfterIGST' . $index ?>" value="<?php echo $record->AfterIGST; ?>" />
<input type="hidden" name="<?php echo 'DutyImpact' . $index ?>" id="<?php echo 'DutyImpact' . $index ?>" value="<?php echo $record->DutyImpact; ?>" /> <input type="hidden" name="<?php echo 'DutyImpact' . $index ?>" id="<?php echo 'DutyImpact' . $index ?>" value="<?php echo $record->DutyImpact; ?>" />
<input type="hidden" name="<?php echo 'ClearingCharge' . $index ?>" id="<?php echo 'ClearingCharge' . $index ?>" value="<?php echo $record->ClearingCharge; ?>" /> <input type="hidden" name="<?php echo 'ClearingCharge' . $index ?>" id="<?php echo 'ClearingCharge' . $index ?>" value="<?php echo $record->ClearingCharge; ?>" />
<input type="hidden" name="<?php echo 'NetValue' . $index ?>" id="<?php echo 'NetValue' . $index ?>" value="<?php echo $record->NetValue; ?>" /> <input type="hidden" name="<?php echo 'NetValue' . $index ?>" id="<?php echo 'NetValue' . $index ?>" value="<?php echo $record->NetValue; ?>" />
<input type="hidden" name="<?php echo 'AfterCustomEdCess1' . $index ?>" id="<?php echo 'AfterCustomEdCess1' . $index ?>" value="<?php echo $record->AfterCustomEdCess; ?>" /> <input type="hidden" name="<?php echo 'AfterCustomEdCess1' . $index ?>" id="<?php echo 'AfterCustomEdCess1' . $index ?>" value="<?php echo $record->AfterCustomEdCess; ?>" />
<input type="hidden" name="<?php echo 'LineItemNoteForAuditor' . $index ?>" id="<?php echo 'LineItemNoteForAuditor' . $index ?>" value="<?php echo $record->LineitemAuditorNotes; ?>" /> <input type="hidden" name="<?php echo 'LineItemNoteForAuditor' . $index ?>" id="<?php echo 'LineItemNoteForAuditor' . $index ?>" value="<?php echo $record->LineitemAuditorNotes; ?>" />
<?php <?php
if ($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == REQITEM_Emergency_PO_CREATED || $PONOStatus == PO_APPROVED) { ?> if ($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == REQITEM_Emergency_PO_CREATED || $PONOStatus == PO_APPROVED) { ?>
<td> <a data-target='#editimportpomodel' data-id="<?php echo $index; ?>" data-userid="<?php echo $index; ?>" data-toggle="modal" href="#editimportpomodel"><i class="ri-pencil-fill" data-toggle="tooltip"></i>&nbsp;&nbsp;&nbsp;</a> <a href='#' onclick="DeleteRow(<?php echo $index; ?>)" class="link" data-id="<?php echo $index; ?>" data-userid="<?php echo $index; ?>" id="Del"><span class="ri-delete-bin-7-fill"></span></a> <td> <a data-target='#editimportpomodel' data-id="<?php echo $index; ?>" data-userid="<?php echo $index; ?>" data-toggle="modal" href="#editimportpomodel"><i class="ri-pencil-fill" data-toggle="tooltip"></i>&nbsp;&nbsp;&nbsp;</a> <a href='#' onclick="DeleteRow(<?php echo $index; ?>)" class="link" data-id="<?php echo $index; ?>" data-userid="<?php echo $index; ?>" id="Del"><span class="ri-delete-bin-7-fill"></span></a>
<?php <?php
} else { ?> } else { ?>
<td> <a data-target='#viewimportmodal' data-id="<?php echo $index; ?>" data-userid="<?php echo $index; ?>" data-toggle="modal" href="#viewimportmodal"><i class="fa fa-eye" data-toggle="tooltip" title="Click here to view the <?php echo $record->ReqNo; ?>Click here to view Requisition details"></i>&nbsp;&nbsp;&nbsp;</a> </td> <td> <a data-target='#viewimportmodal' data-id="<?php echo $index; ?>" data-userid="<?php echo $index; ?>" data-toggle="modal" href="#viewimportmodal"><i class="fa fa-eye" data-toggle="tooltip" title="Click here to view the <?php echo $record->ReqNo; ?>Click here to view Requisition details"></i>&nbsp;&nbsp;&nbsp;</a> </td>
<?php <?php
} ?> } ?>
</tr> <?php </tr> <?php
//echo $record->AfterLandingCharge + $TotalLanding; //echo $record->AfterLandingCharge + $TotalLanding;
$TotalLanding = $TotalLanding + ($record->AfterLandingCharge); $TotalLanding = $TotalLanding + ($record->AfterLandingCharge);
$tothighseas = $tothighseas + $record->AfterHighSeasSalesCharge; $tothighseas = $tothighseas + $record->AfterHighSeasSalesCharge;
$totcustom = $totcustom + $record->AfterCustomDuty; $totcustom = $totcustom + $record->AfterCustomDuty;
$totexciseduty = $totexciseduty + $record->AfterExciseDuty; $totexciseduty = $totexciseduty + $record->AfterExciseDuty;
$totexcisedutyED = $totexcisedutyED + $record->AfterExciseDutyEdCess; $totexcisedutyED = $totexcisedutyED + $record->AfterExciseDutyEdCess;
$totexciseSH = $totexciseSH + $record->AfterExciseDutySHCess; $totexciseSH = $totexciseSH + $record->AfterExciseDutySHCess;
$totcustomED = $totcustomED + $record->AfterCustomEdCess; $totcustomED = $totcustomED + $record->AfterCustomEdCess;
$totcustomSH = $totcustomSH + $record->AfterCustomSHCess; $totcustomSH = $totcustomSH + $record->AfterCustomSHCess;
$totaddtnlexcise = $totaddtnlexcise + $record->AfterAddlExciseDuty; $totaddtnlexcise = $totaddtnlexcise + $record->AfterAddlExciseDuty;
$totgrossduty = $totgrossduty + $record->Grossdutypayable; $totgrossduty = $totgrossduty + $record->Grossdutypayable;
// $totavlmodvat = $totavlmodvat +$record->AvailableModvat; // $totavlmodvat = $totavlmodvat +$record->AvailableModvat;
//$totgrossduty=$totgrossduty+$record->Grossdutypayable; //$totgrossduty=$totgrossduty+$record->Grossdutypayable;
$totavlmodvat = $totavlmodvat + $record->AvailableModvat; $totavlmodvat = $totavlmodvat + $record->AvailableModvat;
$totgrossexpense = $totgrossexpense + $record->Grossexpensesduetocustomduty; $totgrossexpense = $totgrossexpense + $record->Grossexpensesduetocustomduty;
$ExchangeRate = $record->ExchangeRate; $ExchangeRate = $record->ExchangeRate;
//echo $totorder; //echo $totorder;
$totorder = $totorder + $record->TotalOrderValue; $totorder = $totorder + $record->TotalOrderValue;
//echo $totorder; //echo $totorder;
$totfreight = $totfreight + $record->AfterFreightValue; $totfreight = $totfreight + $record->AfterFreightValue;
$totassesable = $totassesable + $record->AssessableValue; $totassesable = $totassesable + $record->AssessableValue;
$totSubtotal = $totSubtotal + $record->SubTotal; $totSubtotal = $totSubtotal + $record->SubTotal;
$totigst = $totigst + $record->AfterIGST; $totigst = $totigst + $record->AfterIGST;
//echo $totcustomED; //echo $totcustomED;
// $totorder=$record->TotalOrderValue; // $totorder=$record->TotalOrderValue;
// //$ServiceDescription=$record->ServiceDescription; // //$ServiceDescription=$record->ServiceDescription;
// echo $totorder; // echo $totorder;
//alert($totorder); //alert($totorder);
} }
?> ?>
<input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $index; ?>"> <input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $index; ?>">
<?php <?php
//echo $totcustomED; //echo $totcustomED;
$totalhidden = $totorder; $totalhidden = $totorder;
$totorder = number_format($totorder, 2, '.', ''); $totorder = number_format($totorder, 2, '.', '');
//echo $to; //echo $to;
$TotalLanding = number_format($TotalLanding, 2, '.', ''); $TotalLanding = number_format($TotalLanding, 2, '.', '');
$tothighseas = number_format($tothighseas, 2, '.', ''); $tothighseas = number_format($tothighseas, 2, '.', '');
$totcustom = number_format($totcustom, 2, '.', ''); $totcustom = number_format($totcustom, 2, '.', '');
$totexciseduty = number_format($totexciseduty, 2, '.', ''); $totexciseduty = number_format($totexciseduty, 2, '.', '');
$totexcisedutyED = number_format($totexcisedutyED, 2, '.', ''); $totexcisedutyED = number_format($totexcisedutyED, 2, '.', '');
$totexciseSH = number_format($totexciseSH, 2, '.', ''); $totexciseSH = number_format($totexciseSH, 2, '.', '');
$totcustomED = number_format($totcustomED, 2, '.', ''); $totcustomED = number_format($totcustomED, 2, '.', '');
$totcustomSH = number_format($totcustomSH, 2, '.', ''); $totcustomSH = number_format($totcustomSH, 2, '.', '');
$totaddtnlexcise = number_format($totaddtnlexcise, 2, '.', ''); $totaddtnlexcise = number_format($totaddtnlexcise, 2, '.', '');
$totgrossduty = number_format($totgrossduty, 2, '.', ''); $totgrossduty = number_format($totgrossduty, 2, '.', '');
$totavlmodvat = number_format($totavlmodvat, 2, '.', ''); $totavlmodvat = number_format($totavlmodvat, 2, '.', '');
$totgrossexpense = number_format($totgrossexpense, 2, '.', ''); $totgrossexpense = number_format($totgrossexpense, 2, '.', '');
$totfreight = number_format($totfreight, 2, '.', ''); $totfreight = number_format($totfreight, 2, '.', '');
$totassesable = number_format($totassesable, 2, '.', ''); $totassesable = number_format($totassesable, 2, '.', '');
$totSubtotal = number_format($totSubtotal, 2, '.', ''); $totSubtotal = number_format($totSubtotal, 2, '.', '');
$totigst = number_format($totigst, 2, '.', ''); $totigst = number_format($totigst, 2, '.', '');
} }
?> ?>
</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>
@ -847,6 +848,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">
@ -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);
} }