diff --git a/app/Controllers/Driver.php b/app/Controllers/Driver.php
index f77d1622..bdfedb2a 100755
--- a/app/Controllers/Driver.php
+++ b/app/Controllers/Driver.php
@@ -186,7 +186,9 @@ class Driver extends BaseController
$where_arr = ['DATE_FORMAT(t_driver_attendance.date, "%Y-%m")' =>$to_mysql_date,'t_driver_attendance.driver_id' =>$arr['empid']];
$data = $this->driver_model->updateDieselAndShedValuesBasedonEmpID($where_arr,$update_arr);
- return $data;
+ return $this->response->setJSON($data);
+
+ // return $data;
// [column] => shed_amount
// [value] => 400
// [date] => 21-02-2025
diff --git a/app/Controllers/Emergencypurchaseorder.php b/app/Controllers/Emergencypurchaseorder.php
index 62ba5781..cdf762e2 100755
--- a/app/Controllers/Emergencypurchaseorder.php
+++ b/app/Controllers/Emergencypurchaseorder.php
@@ -1249,7 +1249,7 @@ class Emergencypurchaseorder extends BaseController
}
}
if ($SkipInsert == "False") {
- $POLineItemList = array('PONO' => $PONO, 'ReqNo' => $Reqnumber, 'MaterialCode' => $MaterialCode, 'Quantity' => $Quantity, 'Rate' => $itemRate, 'Status' => $LineItemStatus, 'CreatedBy' => $CreateBy, 'CreatedDate' => $createddt, 'CostCenterCode' => $CostCenter);
+ $POLineItemList = array('PONO' => $PONO, 'ReqNo' => $Reqnumber, 'MaterialCode' => $MaterialCode, 'Quantity' => $Quantity, 'Rate' => $itemRate, 'Status' => $LineItemStatus, 'CreatedBy' => $CreateBy, 'CreatedDate' => $createddt, 'CostCenterCode' => $CostCenter,'LineitemAuditorNotes' => $LineitemAuditorNotes);
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
@@ -1419,7 +1419,7 @@ class Emergencypurchaseorder extends BaseController
}
if ($SkipInsert == "False") {
if (strlen((string)$POLineItemNo) == 0) {
- $POLineItemList = array('PONO' => $PONO, 'ReqNo' => $Reqnumber, 'MaterialCode' => $MaterialCode, 'Quantity' => $Quantity, 'Rate' => $itemRate, 'Status' => $LineItemStatus, 'CreatedBy' => $updatedBy, 'CreatedDate' => $updateddt, 'CostCenterCode' => $CostCenter);
+ $POLineItemList = array('PONO' => $PONO, 'ReqNo' => $Reqnumber, 'MaterialCode' => $MaterialCode, 'Quantity' => $Quantity, 'Rate' => $itemRate, 'Status' => $LineItemStatus, 'CreatedBy' => $updatedBy, 'CreatedDate' => $updateddt, 'CostCenterCode' => $CostCenter,'LineitemAuditorNotes' => $LineitemAuditorNotes);
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
if (count($POLineItem) > 0) {
$LineItemNo = $POLineItem[0]['LineItemNo'];
@@ -1427,7 +1427,7 @@ class Emergencypurchaseorder extends BaseController
} else {
$LineItemNo = $POLineItemNo;
- $POLineItemList = array('PONO' => $PONO, 'ReqNo' => $Reqnumber, 'MaterialCode' => $MaterialCode, 'Quantity' => $Quantity, 'Rate' => $itemRate, 'Status' => $LineItemStatus, 'UpdateBY' => $updatedBy, 'UpdatedOn' => $updateddt, 'CostCenterCode' => $CostCenter);
+ $POLineItemList = array('PONO' => $PONO, 'ReqNo' => $Reqnumber, 'MaterialCode' => $MaterialCode, 'Quantity' => $Quantity, 'Rate' => $itemRate, 'Status' => $LineItemStatus, 'UpdateBY' => $updatedBy, 'UpdatedOn' => $updateddt, 'CostCenterCode' => $CostCenter,'LineitemAuditorNotes' => $LineitemAuditorNotes);
$POLineItem = $this->purchaseorder_model->updatePOLineItem($PONO, $POLineItemNo, $POLineItemList);
}
$isExists = $this->purchaseorder_model->LineItemExistsinRevenueTax($LineItemNo);
diff --git a/app/Controllers/Purchaseorder.php b/app/Controllers/Purchaseorder.php
index 3ef446ad..adbadd41 100755
--- a/app/Controllers/Purchaseorder.php
+++ b/app/Controllers/Purchaseorder.php
@@ -429,7 +429,7 @@ class Purchaseorder extends BaseController
// $html = view('pdf_view', $data);
// $mpdf->WriteHTML($html); // Use WriteHTML() method to add body content
$html = view('po_pdf', $data);
- // echo $html;die;
+ // echo $html;die;
$mpdf->WriteHTML($html); // Use WriteHTML() method to add body content
// Set HTML footer
@@ -3461,7 +3461,7 @@ class Purchaseorder extends BaseController
$mpdf->use_kwt = true;
$html = view('po_pdf', $data);
- // echo $html;die;
+ // echo $html;die;
$mpdf->WriteHTML($html); // Use WriteHTML() method to add body content
diff --git a/app/Controllers/Requisitionform.php b/app/Controllers/Requisitionform.php
index a81be6c8..03557737 100755
--- a/app/Controllers/Requisitionform.php
+++ b/app/Controllers/Requisitionform.php
@@ -130,19 +130,21 @@ class Requisitionform extends BaseController
// echo 'ReqType'.$ReqPOType;
$data['ReqPOType'] = $ReqPOType == '' ? $ReqType : $ReqPOType;
$data['LineItem'] = $this->requistion_model->getEditRequistItemList($ReqNo);
- // print_r($data['LineItem']);die;
+
$data['description'] = '';
- foreach ($data['LineItem'] as $line) {
-
+ foreach ($data['LineItem'] as $key => $line) {
$description = isset($line->MaterialDescription) ? $line->MaterialDescription : null;
- //echo $description;
-
+
+ $data['LineItem'][$key]->CategoryName = $line->MaterialCode
+ ? $this->requistion_model->getCategoryName($line->MaterialCode)
+ : "";
}
$data['CostCenter'] = $this->requistion_model->getCostCenterUserID($userID);
- $data['MaterialCode'] = $this->requistion_model->EditMaterialCode($ReqNo, $ReqType);
+ // $data['MaterialCode'] = $this->requistion_model->EditMaterialCode($ReqNo, $ReqType); // Old Based on Type..
+ $data['MaterialCode'] = $this->requistion_model->EditMaterialCode($ReqNo);
$data['ServiceOption'] = $this->requistion_model->getConfigValue('C022');
$this->loadViews("editrequisitionform", $this->global, $data, NULL);
}
diff --git a/app/Controllers/StockController.php b/app/Controllers/StockController.php
index da65cc4a..e300fe57 100644
--- a/app/Controllers/StockController.php
+++ b/app/Controllers/StockController.php
@@ -36,6 +36,7 @@ use CodeIgniter\HTTP\ResponseInterface;
use DateTime;
use DatePeriod;
use DateInterval;
+use Directory;
class StockController extends BaseController
{
@@ -661,8 +662,14 @@ class StockController extends BaseController
if ($file->isValid() && !$file->hasMoved()) {
$clientGivenName = $file->getClientName(); // Original filename
$newName = $file->getRandomName();
+
+ $path = WRITEPATH . 'uploads' . DIRECTORY_SEPARATOR . 'batchcard';
+
+ if (!is_dir($path)) {
+ mkdir($path, 0777, true);
+ }
- if ($file->move(WRITEPATH . 'uploads/batchcard', $newName)) {
+ if ($file->move($path, $newName)) {
// Insert file details into the database
$db = \Config\Database::connect();
$builder = $db->table('t_batchcard_files');
@@ -735,8 +742,13 @@ class StockController extends BaseController
$clientGivenName = $file->getClientName(); // User-given filename
$newName = $file->getRandomName(); // Randomized unique filename
- // Move the new file to storage
- if ($file->move(WRITEPATH . 'uploads/batchcard', $newName)) {
+ $path = WRITEPATH . 'uploads' . DIRECTORY_SEPARATOR . 'batchcard';
+
+ if (!is_dir($path)) {
+ mkdir($path, 0777, true);
+ }
+
+ if ($file->move($path, $newName)) {
// Insert new file record into the database
$data = [
'client_file_name' => $clientGivenName,
@@ -817,7 +829,12 @@ class StockController extends BaseController
$fileRecord = $builder->select('filename')->where('id', $batchId)->get()->getRow();
if ($fileRecord) {
- $filePath = WRITEPATH . 'uploads/batchcard/' . $fileRecord->filename;
+ $path = WRITEPATH . 'uploads' . DIRECTORY_SEPARATOR . 'batchcard';
+
+ if (!is_dir($path)) {
+ mkdir($path, 0777, true);
+ }
+ $filePath = $path . DIRECTORY_SEPARATOR . $fileRecord->filename;
// Step 2: Delete the file from storage
if (file_exists($filePath)) {
@@ -856,8 +873,11 @@ class StockController extends BaseController
public function downloadBatchcardZip()
{
+
$coatingId = $this->request->getGet('coating_id');
+
$date = $this->request->getGet('date');
+
$batchCardFiles = $this->getBatchCardFiles($coatingId); // Fetch files from DB
if (empty($batchCardFiles)) {
@@ -865,16 +885,34 @@ class StockController extends BaseController
}
$zipFileName = 'batchcard_files_' . $date . '.zip';
- $zipFilePath = WRITEPATH . 'uploads/batchcard' . $zipFileName; // CI4 WRITEPATH safe directory
-
+
+ $zipPath = WRITEPATH . 'uploads' . DIRECTORY_SEPARATOR . 'batchcard';
+
+ if (!is_dir($zipPath))
+ {
+ mkdir($zipPath, 0777, true);
+ }
+
+ $zipFilePath = $zipPath . DIRECTORY_SEPARATOR . $zipFileName; // CI4 WRITEPATH safe directory
+
+
+
+
+
+
$zip = new \ZipArchive();
if ($zip->open($zipFilePath, \ZipArchive::CREATE | \ZipArchive::OVERWRITE) === true) {
+
foreach ($batchCardFiles as $file) {
- $originalFilePath = WRITEPATH . 'uploads/batchcard/' . $file['filename']; // Actual stored file
+
+ $originalFilePath = $zipPath . DIRECTORY_SEPARATOR . $file['filename']; // Actual stored file
+
$clientFileName = $file['client_file_name'] ?? $file['filename']; // Use client name if available
if (file_exists($originalFilePath)) {
+
$zip->addFile($originalFilePath, $clientFileName); // Rename inside ZIP
+
}
}
$zip->close();
diff --git a/app/Models/Requistion_model.php b/app/Models/Requistion_model.php
index 28af2c0d..b5d7879d 100755
--- a/app/Models/Requistion_model.php
+++ b/app/Models/Requistion_model.php
@@ -153,19 +153,19 @@ class Requistion_model extends Model
return $query->getResultArray();
}
- function EditMaterialCode($ReqNo,$ReqType)
- {
- $subQuery ='SELECT Mat.MaterialCode,Mat.MaterialName,Mat.UOM
- from t_materialmaster Mat where Mat.MaterialCode not in (select Req.MaterialCode from t_requestion_details Req
- join t_requestion_master mast on Req.ReqNo = mast.ReqNo where mast.ReqNo=? and mast.ReqType=?
- ) and Mat.MaterialType=?';
-
- $query = $this->db->query($subQuery, [$ReqNo,$ReqType,$ReqType]);
-
-
- return $query->getResult();
-
- }
+ // This function also called in store req. also $reqType not removed.....
+ function EditMaterialCode($ReqNo, $ReqType = NULL){
+ $subQuery = 'SELECT Mat.MaterialCode, Mat.MaterialName, Mat.UOM FROM t_materialmaster Mat
+ WHERE Mat.MaterialCode NOT IN (
+ SELECT Req.MaterialCode FROM t_requestion_details Req
+ JOIN t_requestion_master mast ON Req.ReqNo = mast.ReqNo
+ WHERE mast.ReqNo = ?' . ($ReqType ? ' AND mast.ReqType = ?' : '') .')'
+ . ($ReqType ? ' AND Mat.MaterialType = ?' : '');
+
+ $params = $ReqType ? [$ReqNo, $ReqType, $ReqType] : [$ReqNo];
+ $query = $this->db->query($subQuery, $params);
+ return $query->getResult();
+ }
/**
@@ -582,7 +582,18 @@ class Requistion_model extends Model
return $query->getResult();
}
-
+
+
+ function getCategoryName($materialCode){
+ $subQuery ='SELECT MM.MaterialCode,MM.MaterialName,MM.MaterialType,MM.Category,MM.IsActive,CD.ConfigValue
+ from t_materialmaster as MM
+ left join t_configdetails as CD on CD.Key = MM.Category
+ where MM.MaterialCode = '.$materialCode;
+
+ $categoryName = $this->db->query($subQuery)->getRow()->ConfigValue;
+ return $categoryName;
+ }
+
}
\ No newline at end of file
diff --git a/app/Views/EditservicePurchaseorder.php b/app/Views/EditservicePurchaseorder.php
index a7071e59..00cb718f 100755
--- a/app/Views/EditservicePurchaseorder.php
+++ b/app/Views/EditservicePurchaseorder.php
@@ -1251,8 +1251,8 @@ if (!empty($getlogpodtl)) {
Item Code |
Item Description |
Line Item Specs |
- UOM |
Quantity |
+ UOM |
Rate |
Basic Amount |
Tax Amount |
@@ -1607,28 +1607,41 @@ if (!empty($getlogpodtl)) {
- -->
-
-
-
-
-
-
-
-
+
-->
+
-
+
+
+
+
+
+
+
+
-
+
+
+
+
+
-
+
+
+
+
-
+
-
-
+
+
+
-
-
+
+
+
+
@@ -839,28 +828,28 @@ if (!empty($INRSYMBOL)) {
echo form_input($data);
?>
-
+
'txtTotCgst', 'value' => set_value('txtTotCgst'), 'id' => 'txtTotCgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
-
+
'txtTotSgst', 'value' => set_value('txtTotSgst'), 'id' => 'txtTotSgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
-
+
'txtTotIgst', 'value' => set_value('txtTotIgst'), 'id' => 'txtTotIgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
-
+
-
+
-
-
+
+
@@ -888,7 +877,7 @@ if (!empty($INRSYMBOL)) {
$data = array('name' => 'txttotallanding', 'value' => set_value('txttotallanding'), 'id' => 'txttotallanding', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
-
+
@@ -897,7 +886,7 @@ if (!empty($INRSYMBOL)) {
$data = array('name' => 'txttotalAssessable', 'value' => set_value('txttotalAssessable'), 'id' => 'txttotalAssessable', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
-
+
@@ -906,7 +895,7 @@ if (!empty($INRSYMBOL)) {
$data = array('name' => 'txttotalcustom', 'value' => set_value('txttotalcustom'), 'id' => 'txttotalcustom', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
-
+
@@ -915,7 +904,7 @@ if (!empty($INRSYMBOL)) {
$data = array('name' => 'txttotalSubtotal', 'value' => set_value('txttotalSubtotal'), 'id' => 'txttotalSubtotal', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
-
+
@@ -924,7 +913,7 @@ if (!empty($INRSYMBOL)) {
$data = array('name' => 'txttotalIgst', 'value' => set_value('txttotalIgst'), 'id' => 'txttotalIgst', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
-
+
@@ -933,7 +922,7 @@ if (!empty($INRSYMBOL)) {
$data = array('name' => 'txttotalcustomED', 'value' => set_value('txttotalcustomED'), 'id' => 'txttotalcustomED', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
-
+
@@ -942,7 +931,7 @@ if (!empty($INRSYMBOL)) {
$data = array('name' => 'txttotalcustomSH', 'value' => set_value('txttotalcustomSH'), 'id' => 'txttotalcustomSH', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
-
+
@@ -951,7 +940,7 @@ if (!empty($INRSYMBOL)) {
$data = array('name' => 'txttotalgrossduty', 'value' => set_value('txttotalgrossduty'), 'id' => 'txttotalgrossduty', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
-
+
@@ -961,9 +950,9 @@ if (!empty($INRSYMBOL)) {
echo form_input($data);
?>
-
+
-
+
+
+
+
+
-
+
-
+
+
+
@@ -1048,6 +1040,8 @@ if (!empty($INRSYMBOL)) {
+
+
@@ -1076,121 +1070,122 @@ if (!empty($INRSYMBOL)) {
+
-
+
'txtFreightlocedit', 'value' => set_value('txtFreightlocedit'), 'id' => 'txtFreightlocedit', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'calculateFreightloceditper();');
echo form_input($data);
?>
-
+
@@ -1925,9 +1911,9 @@ if (!empty($INRSYMBOL)) {
$data = array('name' => 'txtAfterFreightlocedit', 'value' => set_value('txtAfterFreightlocedit'), 'id' => 'txtAfterFreightlocedit', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
-
+
-
+
-
+
+
+
+
+
+
+
-
+
+
+
+
-
+
+
+
+
-
-
+
-
+
+
+
-
-
-
+
+
-
+
+
-
-
-
+
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
+
+
-
+
-
+
-
-
-
-
-
+
+
+
-
+
@@ -2728,11 +2694,11 @@ if (!empty($INRSYMBOL)) {
RequistQuantity = obj.Quantity;
$('#RateIn').html('Rate(in' + " " + DisplayCurrencySymbol + '/' + CPUOMDisplay + ')');
$('#EditRateIn').html('Rate(in' + " " + DisplayCurrencySymbol + '/Ton)');
- if(obj.material_rate != 0){
+ if (obj.material_rate != 0) {
Ratechange();
calculateFreight(3);
- calculateFreightlocaddper();
- }
+ calculateFreightlocaddper();
+ }
}
@@ -3522,7 +3488,7 @@ if (!empty($INRSYMBOL)) {
// Taxvalue: TotalTaxValue,
// TotalValue: Total
// }));
- var shorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName;
+ var shorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName;
var rowHtml = `
| ${temp} |
@@ -3636,7 +3602,7 @@ if (!empty($INRSYMBOL)) {
addHidden(theForm, "NoofTriploc" + temp, Nooftriploc);
addHidden(theForm, "FreightRateloc" + temp, Freightrateloc);
addHidden(theForm, "AfterFreightRateloc" + temp, AfterFreightAmountloc);
- addHidden(theForm, "LineItemNoteForAuditor" + temp, '-');
+ addHidden(theForm, "LineItemNoteForAuditor" + temp, '-');
// var a=parseFloat($('#NoofTriploc'+temp).val());
// console.log(Nooftriploc);
@@ -4386,10 +4352,10 @@ if (!empty($INRSYMBOL)) {
if (FreightTypeloc == '') {
$('#TripsValuelocedit').show();
-
+
} else {
$('#TripsValuelocedit').hide();
-
+
}
@@ -4545,50 +4511,50 @@ if (!empty($INRSYMBOL)) {
// return false;
// } else {
- // $('#content').loader('show');
- var formData = new FormData($('.CapitalPO')[0]);
- formData.append('ExchangeRateOn', ExchangeRateOn);
- formData.append('PaymentMethod', PaymentMethod);
- $('#loader').show();
- // disableButtons();
- $.ajax({
- data: formData,
- processData: false,
- contentType: false,
- // data:$('.CapitalPO').serialize()+"&ExchangeRateOn="+ExchangeRateOn+"&PaymentMethod="+PaymentMethod,
- type: "POST",
- url: "purchaseorder/addNewCapitalPurchaseOrder",
- success: function(data) {
- alert(data);
+ // $('#content').loader('show');
+ var formData = new FormData($('.CapitalPO')[0]);
+ formData.append('ExchangeRateOn', ExchangeRateOn);
+ formData.append('PaymentMethod', PaymentMethod);
+ $('#loader').show();
+ // disableButtons();
+ $.ajax({
+ data: formData,
+ processData: false,
+ contentType: false,
+ // data:$('.CapitalPO').serialize()+"&ExchangeRateOn="+ExchangeRateOn+"&PaymentMethod="+PaymentMethod,
+ type: "POST",
+ url: "purchaseorder/addNewCapitalPurchaseOrder",
+ success: function(data) {
+ alert(data);
+ $('#loader').hide();
+ if (data) {
+ // $('#content').loader('hide');
+
+ $('#txtRowCount').val('');
+ $('#txtDeletedRow').val('');
+ $('#SpcialInstruction').val('');
+ $('#txtDeliveryAddress').val('');
+ $('#CapitalToatlOrder').val('');
+
+ clearAfterAddLineItemAdd();
+ window.location = "purchaseorderListing";
+ // setTimeout(function() { enableButtons(); }, 2000);
+ } else {
$('#loader').hide();
- if (data) {
- // $('#content').loader('hide');
+ // $('#content').loader('hide');
+ alert("Error");
+ // setTimeout(function() { enableButtons(); }, 2000);
+ }
- $('#txtRowCount').val('');
- $('#txtDeletedRow').val('');
- $('#SpcialInstruction').val('');
- $('#txtDeliveryAddress').val('');
- $('#CapitalToatlOrder').val('');
+ },
+ error: function(jqXHR, textStatus, errorThrown) {
+ $('#loader').hide();
+ console.error("AJAX Error: " + textStatus + ": " + errorThrown);
+ alert("Error: " + textStatus);
+ // setTimeout(function() { enableButtons(); }, 2000);
+ }
- clearAfterAddLineItemAdd();
- window.location = "purchaseorderListing";
- // setTimeout(function() { enableButtons(); }, 2000);
- } else {
- $('#loader').hide();
- // $('#content').loader('hide');
- alert("Error");
- // setTimeout(function() { enableButtons(); }, 2000);
- }
-
- },
- error: function(jqXHR, textStatus, errorThrown) {
- $('#loader').hide();
- console.error("AJAX Error: " + textStatus + ": " + errorThrown);
- alert("Error: " + textStatus);
- // setTimeout(function() { enableButtons(); }, 2000);
- }
-
- });
+ });
// }
}
@@ -5423,12 +5389,12 @@ if (!empty($INRSYMBOL)) {
function Reset() {
- // disableButtons();
- location.reload();
- // setTimeout(function() {
- // enableButtons();
- // }, 2000);
- }
+ // disableButtons();
+ location.reload();
+ // setTimeout(function() {
+ // enableButtons();
+ // }, 2000);
+ }
$('#insuranceTxtDiv').hide();
$("#insuranceStatus").change(function() {
@@ -5956,7 +5922,7 @@ if (!empty($INRSYMBOL)) {
$('#editpackagingcalmodel').on('hidden.bs.modal', function() {
$('#EDITCAPITAL').modal('show');
- // $('.modal-backdrop').remove();
+ // $('.modal-backdrop').remove();
// console.log($('#edit'+tempUserId));
@@ -6053,14 +6019,14 @@ if (!empty($INRSYMBOL)) {
if (FreightType == "PER TRIP") {
$('#TripsValuelocedit').show();
-
+
// $(this).parent().removeClass('col-md-3').addClass('col-md-2');
// $('#NOOfTripslocedit').parent().removeClass('col-md-3').addClass('col-md-2');
// $('#txtFreightlocedit').parent().removeClass('col-md-3').addClass('col-md-2');
// $('#txtAfterFreightlocedit').parent().removeClass('col-md-3').addClass('col-md-2');
} else {
$('#TripsValuelocedit').hide();
-
+
// $(this).parent().removeClass('col-md-2').addClass('col-md-3');
// $('#NOOfTripslocedit').parent().removeClass('col-md-2').addClass('col-md-3');
// $('#txtFreightlocedit').parent().removeClass('col-md-2').addClass('col-md-3');
@@ -6112,25 +6078,25 @@ if (!empty($INRSYMBOL)) {
var Calculation = document.querySelector('input[name = "editoptPackaging"]:checked').value;
var FreightType = $("#drpFreighteditloc").val();
$('#editpackagingcalmodel').modal('hide');
- // $('.modal-backdrop').remove();
+ // $('.modal-backdrop').remove();
$('#EDITCAPITAL').modal('show');
$('#EDITCAPITAL').modal({
backdrop: 'static',
keyboard: false
});
- // if (!document.getElementById('modalScrollCSS')) {
- // var style = document.createElement('style');
- // style.id = 'modalScrollCSS'; // Assign an ID to the style tag to avoid duplicates
- // style.innerHTML = `
- // /* Force scroll by setting a max height */
- // .modal-body {
- // max-height: 540px;
- // overflow-y: auto;
- // }
- // `;
- // document.head.appendChild(style); // Append the CSS to the head
- // }
+ // if (!document.getElementById('modalScrollCSS')) {
+ // var style = document.createElement('style');
+ // style.id = 'modalScrollCSS'; // Assign an ID to the style tag to avoid duplicates
+ // style.innerHTML = `
+ // /* Force scroll by setting a max height */
+ // .modal-body {
+ // max-height: 540px;
+ // overflow-y: auto;
+ // }
+ // `;
+ // document.head.appendChild(style); // Append the CSS to the head
+ // }
if (FreightType == '') {
$('#txtAfterFreightlocedit').val('');
diff --git a/app/Views/driverAttendance.php b/app/Views/driverAttendance.php
index 25d9846d..0ad9393a 100755
--- a/app/Views/driverAttendance.php
+++ b/app/Views/driverAttendance.php
@@ -553,7 +553,19 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
var column = $(this).data('column'); // Get the column name (diesel or shed)
var value = $(this).val(); // Get the updated value
let gobal_driver_id = urlParams.get("gobal_driver_id");
- let gobal_date = urlParams.get("date");
+ let gobal_date = '';
+
+
+ if(gobal_date == ""){
+ let inputDate = urlParams.get("month_year");
+ let monthMap = {"Jan": "01", "Feb": "02", "Mar": "03", "Apr": "04","May": "05", "Jun": "06", "Jul": "07", "Aug": "08","Sep": "09", "Oct": "10", "Nov": "11", "Dec": "12"};
+
+ let [month, year] = inputDate.split('-');
+ gobal_date = `01-${monthMap[month]}-${year}`;
+
+ }else{
+ gobal_date = urlParams.get("date");
+ }
// Send data to the server using AJAX
$.ajax({
diff --git a/app/Views/editCapitalAmendPO.php b/app/Views/editCapitalAmendPO.php
index b2f8eabb..88dd00ae 100755
--- a/app/Views/editCapitalAmendPO.php
+++ b/app/Views/editCapitalAmendPO.php
@@ -1544,7 +1544,7 @@ if (!empty($POItem) && $CapitalRange == '1') {