diff --git a/app/Controllers/Emergencypurchaseorder.php b/app/Controllers/Emergencypurchaseorder.php
index d4a143a2..62ba5781 100755
--- a/app/Controllers/Emergencypurchaseorder.php
+++ b/app/Controllers/Emergencypurchaseorder.php
@@ -125,7 +125,7 @@ class Emergencypurchaseorder extends BaseController
// print_r($this->request->getPost());die;
$txtRowCount = $this->request->getPost('txtRowCount');
$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');
$DeliveryAddr = $this->request->getPost('DeliveryAddr');
$CostCenterName = $this->request->getPost('CostCenterName');
@@ -369,7 +369,7 @@ class Emergencypurchaseorder extends BaseController
$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');
$DeliveryAddr = $this->request->getPost('DeliveryAddr');
$dt = $this->request->getPost('Deliverydt');
diff --git a/app/Controllers/Payslip.php b/app/Controllers/Payslip.php
index f790bb11..977045c3 100755
--- a/app/Controllers/Payslip.php
+++ b/app/Controllers/Payslip.php
@@ -1168,6 +1168,7 @@ class Payslip extends BaseController
$EmpID = $j['Emp ID'];
$is_driver = $this->driver_model->getDriverName($EmpID,1);
$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 ;
$ActualSalary = isset($j['Basic Salary']) ? $j['Basic Salary'] : 0.00 ;
$WorkedSalary = isset($j['Worked Salary']) ? $j['Worked Salary'] : 0.00 ;
@@ -1228,7 +1229,8 @@ class Payslip extends BaseController
$drivermonthlypaydata = array(
'month_year'=>$month,
'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,
'total_diesel_amount'=>$Diesel,
'total_shed_amount'=>$Shed,
diff --git a/app/Views/EditservicePurchaseorder.php b/app/Views/EditservicePurchaseorder.php
index f9bd28b4..8b2aa672 100755
--- a/app/Views/EditservicePurchaseorder.php
+++ b/app/Views/EditservicePurchaseorder.php
@@ -1274,10 +1274,8 @@ if (!empty($getlogpodtl)) {
|
ReqNo ?> |
MaterialCode ?> |
-
- MaterialName, 0, 13, "...");
- echo $shortName; ?> |
-
+ MaterialName, 0, 13, "..."); echo $shortName; ?> |
+
@@ -1288,8 +1286,7 @@ if (!empty($getlogpodtl)) {
- LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-"; } ?>
- |
+ LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-"; } ?>
Quantity ?> |
UOM ?> |
@@ -3190,7 +3187,7 @@ if (!empty($getlogpodtl)) {
// $('#content').loader('show');
var formData = new FormData($('.ServicePO')[0]);
$('#loader').show();
- disableButtons();
+ // disableButtons();
$.ajax({
// data: $('.ServicePO').serialize(),
type: "POST",
@@ -3218,10 +3215,10 @@ if (!empty($getlogpodtl)) {
$('#SpcialInstruction').val('');
$('#txtDeliveryAddress').val('')
window.location = "purchaseorderListing";
- setTimeout(function() { enableButtons(); }, 2000);
+ // setTimeout(function() { enableButtons(); }, 2000);
} else {
$('#loader').hide();
- setTimeout(function() { enableButtons(); }, 2000);
+ // setTimeout(function() { enableButtons(); }, 2000);
alert("Error");
}
@@ -3229,7 +3226,7 @@ if (!empty($getlogpodtl)) {
error: function(jqXHR, textStatus, errorThrown) {
console.error("AJAX Error: " + textStatus + ": " + errorThrown);
alert("Error: " + textStatus);
- setTimeout(function() { enableButtons(); }, 2000);
+ // setTimeout(function() { enableButtons(); }, 2000);
}
});
diff --git a/app/Views/addconfig.php b/app/Views/addconfig.php
index e7c24fd3..9dd7f9bc 100755
--- a/app/Views/addconfig.php
+++ b/app/Views/addconfig.php
@@ -244,8 +244,7 @@
$('#ConfigValue').show();
var temp = index;
- var ConfigValue = $("#ConfigValue").val();
-
+ var ConfigValue = $.trim($("#ConfigValue").val());
$('#ConfigValue').val('');
diff --git a/app/Views/alterpurchaseorder.php b/app/Views/alterpurchaseorder.php
index 13a8efbc..02eac8c8 100755
--- a/app/Views/alterpurchaseorder.php
+++ b/app/Views/alterpurchaseorder.php
@@ -1875,6 +1875,28 @@ if (!empty($INRSYMBOL)) {
} else if ($('#drpSupplier').val() == "0") {
alert('Please Select the Supplier details');
$('#drpSupplier').focus();
+ 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") {
@@ -1891,40 +1913,19 @@ if (!empty($INRSYMBOL)) {
return false;
}
-
-
- } else if ($('#DepartmentName').val() == "0") {
- alert('Please Select Department Name ')
+ }else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
+ alert('Please Enter Payable Terms Description');
+ $('#Otherpayment').focus();
+ return false;
+ }else if($('#insuranceStatus').val() == "1" && $('#InsuranceNumber').val().trim() == ''){
+ alert('Please Enter the Insurance No / Insurance Details');
+ $('#InsuranceNumber').focus();
return false;
- }
- else if ($('#CostCenterName').val() == "0") {
- alert('Please Select Cost Center Name ')
- }
-
-
-
- else if ($('#BudgetType').val() == "0") {
+ }else if ($('#BudgetType').val() == "0") {
alert('Please Select Budget Type');
$('#BudgetType').focus();
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 ($('#Otherpayment').length > 0 && $('#Otherpayment').is(':visible') && $('#Otherpayment').val() == '') {
-
- alert('Please Enter the Description of payable terms');
- $('#Otherpayment').focus();
- return false;
- }
- else {
+ } else {
$("#" + input).modal('show');
$('#isEdit').val(0);
if (StateTaxCheck == "0") {
@@ -2634,21 +2635,21 @@ if (!empty($INRSYMBOL)) {
format('Y-m-d');
- $data = array(
- 'type' => 'date',
- 'name' => 'PODate',
- 'value' => set_value('PODate', $formattedDate),
- 'min' => $formattedDate,
- 'id' => 'PODate',
- 'class' => 'form-control',
- 'required' => 'true',
- 'onkeypress' => 'return false;'
- );
- echo form_input($data);
+ // $poDt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
+ // $formattedDate = $poDt->format('d-m-Y');
+ // $data = array(
+ // 'type' => 'text',
+ // 'name' => 'PODate',
+ // 'value' => set_value('PODate', $formattedDate),
+ // 'min' => $formattedDate,
+ // 'id' => 'PODate',
+ // 'class' => 'form-control num',
+ // 'required' => 'true',
+ // 'onkeypress' => 'return false;'
+ // );
+ // echo form_input($data);
?>
+
@@ -7259,7 +7260,7 @@ if (!empty($INRSYMBOL)) {
// } else {
// Submit the form using AJAX
$('#loader').show();
- disableButtons();
+ // disableButtons();
$.ajax({
url: "emergencypurchaseorder/addNewServicePurchaseOrder",
type: "POST",
@@ -7278,13 +7279,13 @@ if (!empty($INRSYMBOL)) {
$('#SpcialInstruction').val('');
$('#txtDeliveryAddress').val('');
window.location = "purchaseorderListing";
- setTimeout(function() { enableButtons(); }, 2000);
+ // setTimeout(function() { enableButtons(); }, 2000);
},
error: function (xhr, status, error) {
// Handle errors
$('#loader').hide();
alert("Error: " + error);
- setTimeout(function() { enableButtons(); }, 2000);
+ // setTimeout(function() { enableButtons(); }, 2000);
}
});
// }
@@ -7369,7 +7370,7 @@ if (!empty($INRSYMBOL)) {
// } else {
// Submit the form using AJAX
$('#loader').show();
- disableButtons();
+ // disableButtons();
$.ajax({
url: "emergencypurchaseorder/addNewRevenuePurchaseOrder",
type: "POST",
@@ -7384,12 +7385,12 @@ if (!empty($INRSYMBOL)) {
$('#SpcialInstruction').val('');
$('#txtDeliveryAddress').val('');
window.location = "purchaseorderListing";
- setTimeout(function() { enableButtons(); }, 2000);
+ // setTimeout(function() { enableButtons(); }, 2000);
},
error: function (xhr, status, error) {
// Handle errors
alert("Error: " + error);
- setTimeout(function() { enableButtons(); }, 2000);
+ // setTimeout(function() { enableButtons(); }, 2000);
}
});
// }
diff --git a/app/Views/capitalpurchaseorder.php b/app/Views/capitalpurchaseorder.php
index a2143c63..a170aa5d 100755
--- a/app/Views/capitalpurchaseorder.php
+++ b/app/Views/capitalpurchaseorder.php
@@ -783,7 +783,8 @@ if (!empty($INRSYMBOL)) {