From a8ccd0137f7b7926d6e9f7f764edb7ecf70818fb Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Fri, 28 Mar 2025 13:01:06 +0000 Subject: [PATCH 1/4] service po and pending po reports --- app/Controllers/Report.php | 9 +- app/Views/EditservicePurchaseorder.php | 153 +++++++++++-------------- app/Views/Report_pending_purchase.php | 37 ++---- app/Views/alterpurchaseorder.php | 2 - app/Views/editRevenuepurchaseorder.php | 1 - app/Views/editServiceAmendPO.php | 107 +++++++++-------- app/Views/purchaseorder.php | 1 - app/Views/requisitionlisting.php | 8 +- app/Views/servicePurchaseorder.php | 65 ++++++----- 9 files changed, 179 insertions(+), 204 deletions(-) diff --git a/app/Controllers/Report.php b/app/Controllers/Report.php index 366c643c..36f1c166 100755 --- a/app/Controllers/Report.php +++ b/app/Controllers/Report.php @@ -984,14 +984,19 @@ class Report extends BaseController if ($this->request->getMethod(true) === 'POST' && $this->request->getPost('btn_submit')) { $cname = $this->request->getPost('client_name'); + $data['client_name'] = $cname; $prod = $this->request->getPost('item_name'); + $data['item_name'] = $prod; $frm = $this->request->getPost('from_date'); + $data['from_date'] = $frm; $t = $this->request->getPost('to_date'); + $data['to_date'] = $t; $m = $this->request->getPost('month'); + $data['month'] = $m; $purchaseorder_number = $this->request->getPost('purchaseorder_number'); - - + $data['purchaseorder_number'] = $purchaseorder_number; $ab = $this->request->getPost('financialyear'); + $data['financialyear'] = $ab; $fa = substr((string)$ab, 0, -5); $aa = substr((string)$ab, 5, 5); diff --git a/app/Views/EditservicePurchaseorder.php b/app/Views/EditservicePurchaseorder.php index 713769ef..9de4bb53 100755 --- a/app/Views/EditservicePurchaseorder.php +++ b/app/Views/EditservicePurchaseorder.php @@ -1301,8 +1301,8 @@ if (!empty($getlogpodtl)) { Quantity ?> UOM ?> - - Rate ?> + + Rate, 2); ?> BasicValue * $FrequencyNo, 2, '.', ''); ?> @@ -1612,98 +1612,80 @@ if (!empty($getlogpodtl)) { --> + - -
-
+ +
+
+
+
-
-
+
     - -
+ +
+
- - - -
- - - -

-
- -
- - - - - - - -   Cancel - -   Save As Draft +
    
+ + +
+ +
+ + + + + +
+ + +
+
+
+
+ +
-   Submit -   Approve - -   OK -   Submit - -   OK - - - -
- -
- -
-
-
- -
- - - 'AWAITING APPROVE', - 'AWAITING RELEASE' => 'AWAITING APPROVE', - 'RELEASER ONHOLD' => 'APPROVER ONHOLD', - 'PO RELEASED' => 'PO APPROVED', - ]; - - if (isset($StatusName) && !empty($StatusName)) { - if (isset($statusMappings[$StatusName])) { - echo $statusMappings[$StatusName]; - } else { - echo $StatusName; - } - } else { - echo "Status not provided"; - } - ?> - - + + 'AWAITING APPROVE', + 'AWAITING RELEASE' => 'AWAITING APPROVE', + 'RELEASER ONHOLD' => 'APPROVER ONHOLD', + 'PO RELEASED' => 'PO APPROVED', + ]; + echo isset($StatusName) && !empty($StatusName) ? ($statusMappings[$StatusName] ?? $StatusName) : "Status not provided"; + ?> +
+
- +
@@ -1948,7 +1930,7 @@ if (!empty($getlogpodtl)) {
@@ -2567,7 +2549,6 @@ if (!empty($getlogpodtl)) { tinyMCE.triggerSave(); if (validateServiceTax()) { - // alert('inside Addservice'); var temp = parseInt(index) + 1; var Reqnumber = $('#ReqNo').val(); var departmentName = $('#deptName').val(); @@ -2656,7 +2637,7 @@ if (!empty($getlogpodtl)) { } else { rowHtml += `-`; } - rowHtml += `${quantity} + rowHtml += `${quantity} ${uom} ${itemRate} ${basicval} @@ -3478,7 +3459,9 @@ if (!empty($getlogpodtl)) { $('#EditPer').val($('#per' + userid).val()); $('#EditQuantity').val($('#quantity' + userid).val()); RequistQuantity = $('#quantity' + userid).val(); - $('#EditRate').val($('#itemRate' + userid).val()); + RateValue = $('#itemRate' + userid).val(); + RateValue = parseFloat(RateValue).toFixed(2) + $('#EditRate').val(RateValue); $('#txtEditBasicValue').val(cellval[8].innerHTML); $('#EditCgst').val($('#Cgst' + userid).val()); $('#EditSgst').val($('#Sgst' + userid).val()); @@ -3589,7 +3572,9 @@ if (!empty($getlogpodtl)) { $('#ViewUOM').val($('#uom' + userid).val()); $('#ViewQuantity').val($('#quantity' + userid).val()); RequistQuantity = $('#quantity' + userid).val(); - $('#ViewRate').val($('#itemRate' + userid).val()); + RateValue = $('#itemRate' + userid).val(); + RateValue = parseFloat(RateValue).toFixed(2) + $('#ViewRate').val(RateValue); $('#txtViewBasicValue').val(cellval[8].innerHTML); $('#ViewCgst').val($('#Cgst' + userid).val()); $('#ViewSgst').val($('#Sgst' + userid).val()); diff --git a/app/Views/Report_pending_purchase.php b/app/Views/Report_pending_purchase.php index bc2f926f..a4c5eafd 100755 --- a/app/Views/Report_pending_purchase.php +++ b/app/Views/Report_pending_purchase.php @@ -60,14 +60,6 @@
- - -
-
- Result filter by :

-
-
-
@@ -87,7 +79,7 @@ - + @@ -100,7 +92,7 @@ - + @@ -113,7 +105,7 @@ - + @@ -125,18 +117,10 @@
@@ -147,8 +131,7 @@
- - +
@@ -156,7 +139,7 @@
- +
@@ -168,7 +151,7 @@ - + diff --git a/app/Views/alterpurchaseorder.php b/app/Views/alterpurchaseorder.php index 01011b4b..d6f6bc21 100755 --- a/app/Views/alterpurchaseorder.php +++ b/app/Views/alterpurchaseorder.php @@ -6719,7 +6719,6 @@ if (!empty($INRSYMBOL)) { $('.AddService').click(function () { tinyMCE.triggerSave(); if (validateServiceTax()) { - // alert('inside Addservice'); var temp = index; console.log('temp = ' + temp); var Reqnumber = $('#purpose').val(); @@ -7741,7 +7740,6 @@ return; tinyMCE.triggerSave(); if (validateEditRevenueTax()) { - //alert('inside Add'); var CostCode = $("#EditRevenueCostCenter").val(); var AvilBudget = $('#EditRevenueAvlBudAmt').val(); var editMaterialCode = $("#EditRevenueMaterialCode").val(); diff --git a/app/Views/editRevenuepurchaseorder.php b/app/Views/editRevenuepurchaseorder.php index 2ef5bd63..46e1acb9 100755 --- a/app/Views/editRevenuepurchaseorder.php +++ b/app/Views/editRevenuepurchaseorder.php @@ -4611,7 +4611,6 @@ if (!empty($getlogpodtl)) { tinyMCE.triggerSave(); if (validateEditRevenueTax() && validateEditExceedLimit() && ExceedEditQuantityCheck()) { - //alert('inside Add'); var CostCode = $("#EditCostCenter").val(); var AvilBudget = $('#EditAvlBudAmt').val(); var editMaterialCode = $("#EditMaterialCode").val(); diff --git a/app/Views/editServiceAmendPO.php b/app/Views/editServiceAmendPO.php index 29bbd089..53719fbd 100755 --- a/app/Views/editServiceAmendPO.php +++ b/app/Views/editServiceAmendPO.php @@ -1147,7 +1147,7 @@ foreach ($PaymentTerms as $TER) { Quantity ?> UOM ?> - Rate ?> + Rate, 2); ?> BasicValue * $FrequencyNo, 2, '.', ''); ?> Taxamount ?> TotalValue ?> @@ -1353,66 +1353,52 @@ foreach ($PaymentTerms as $TER) {
- -
-
-
- -
-
- - - -
-
-
- + + +
+
+
+
+ +
+ +
     - +
-
+ +
+ +
- - - - - - - - -
-

-
- +
    
+ + +
+ + -
-
- -
- -
- -
- format('d-m-Y'); ?> -
-
- + +
+
+
+ format('d-m-Y'); ?> +
+
+ 'AWAITING APPROVE', 'AWAITING RELEASE' => 'AWAITING APPROVE', @@ -1430,13 +1416,20 @@ foreach ($PaymentTerms as $TER) { echo "Status not provided"; } ?> +
- +
-
- +
+
+
+
@@ -1738,7 +1731,7 @@ foreach ($PaymentTerms as $TER) {
- + 'EdittxtSpcialInstruction', 'value' => set_value('EdittxtSpcialInstruction', $ServiceMaterialDescription), @@ -1883,7 +1876,9 @@ foreach ($PaymentTerms as $TER) { $('#EditAmendPer').val($('#per' + userid).val()); $('#EditQuantity').val($('#quantity' + userid).val()); RequistQuantity = $('#quantity' + userid).val(); - $('#EditRate').val($('#itemRate' + userid).val()); + RateValue = $('#itemRate' + userid).val(); + RateValue = parseFloat(RateValue).toFixed(2); + $('#EditRate').val(RateValue); $('#txtEditBasicValue').val(cellval[8].innerHTML); $('#EditCgst').val($('#Cgst' + userid).val()); $('#EditSgst').val($('#Sgst' + userid).val()); @@ -2330,6 +2325,10 @@ foreach ($PaymentTerms as $TER) { else if (ExceedBudget($('#txtEditBasicValue').val(), $('#EditAvlBudAmt').val()) == false) { $('#EditRate').focus(); return false; + } else if ($('#EdittxtSpcialInstruction').val() == '') { + alert('Please Enter the Service Description'); + $('#EdittxtSpcialInstruction').focus(); + return false; } else { return true; } diff --git a/app/Views/purchaseorder.php b/app/Views/purchaseorder.php index b61334fd..8cd6ec81 100755 --- a/app/Views/purchaseorder.php +++ b/app/Views/purchaseorder.php @@ -3549,7 +3549,6 @@ if (!empty($INRSYMBOL)) { $('.EditRevenue').click(function() { tinyMCE.triggerSave(); if (validateEditRevenueTax() && validateEditExceedLimit() && ExceedEditQuantityCheck()) { - // alert('inside Add'); var CostCode = $("#EditCostCenter").val(); var AvilBudget = $('#EditAvlBudAmt').val(); var editMaterialCode = $("#EditMaterialCode").val(); diff --git a/app/Views/requisitionlisting.php b/app/Views/requisitionlisting.php index 2971264f..8cc36bac 100755 --- a/app/Views/requisitionlisting.php +++ b/app/Views/requisitionlisting.php @@ -144,10 +144,10 @@ if (!empty($Status)) { Requisted Date Requisition No Requisition Type - Tot No.OfLineItem - Po CreatedLineItem - Partially PoCreatedLineItem - NewLine Item + Total Line Items + PO Created + Partial PO + New Status Action diff --git a/app/Views/servicePurchaseorder.php b/app/Views/servicePurchaseorder.php index c76b0563..089c25a4 100755 --- a/app/Views/servicePurchaseorder.php +++ b/app/Views/servicePurchaseorder.php @@ -672,7 +672,6 @@ if (!empty($INRSYMBOL)) { console.log("2222222222222222"); if (validateEditServiceTax()) { - alert('inside Add'); var CostCode = $("#EditCostCenter").val(); var AvilBudget = $('#EditAvlBudAmt').val(); var editMaterialCode = $("#EditMaterialCode").val(); @@ -1153,34 +1152,38 @@ if (!empty($INRSYMBOL)) {
-
-
- -
-
-
- - -
-
-
-
- + +
+
+
+ + +
+
+
+
+ + +
-
-
+
+ + + +
@@ -1465,9 +1468,7 @@ if (!empty($INRSYMBOL)) {
- - - + 'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction'), 'id' => 'txtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40'); echo form_textarea($data); ?> @@ -1747,7 +1748,7 @@ if (!empty($INRSYMBOL)) {
- + 'EdittxtSpcialInstruction', 'value' => set_value('EdittxtSpcialInstruction'), 'id' => 'EdittxtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40'); echo form_textarea($data); ?> @@ -1901,7 +1902,6 @@ if (!empty($INRSYMBOL)) { tinyMCE.triggerSave(); if (validateServiceTax()) { - // alert('inside Addservice'); var temp = index; var Reqnumber = $('#ReqNo').val(); var departmentName = $('#deptName').val(); @@ -2291,6 +2291,10 @@ if (!empty($INRSYMBOL)) { } else if (ExceedBudget($('#txtBasicValue').val(), $('#AvlBudAmt').val()) == false) { $('#Rate').focus(); return false; + } else if ($('#txtSpcialInstruction').val() == '') { + alert('Please Enter the Service Description'); + $('#txtSpcialInstruction').focus(); + return false; } else { return true; } @@ -2328,6 +2332,10 @@ if (!empty($INRSYMBOL)) { } else if (ExceedBudget($('#txtEditBasicValue').val(), $('#EditAvlBudAmt').val()) == false) { $('#EditRate').focus(); return false; + } else if ($('#EdittxtSpcialInstruction').val() == '') { + alert('Please Enter the Service Description'); + $('#EdittxtSpcialInstruction').focus(); + return false; } else { return true; } @@ -2399,7 +2407,6 @@ if (!empty($INRSYMBOL)) { } else { var formData = new FormData($('.ServicePO')[0]); $('#loader').show(); - console.log("inside add service purchase order view page"); console.log(formData); From b2b6e788b2cb570d9b0823cdd0702428341c298c Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Sat, 29 Mar 2025 07:28:32 +0000 Subject: [PATCH 2/4] po reopened issues solved --- app/Views/EditservicePurchaseorder.php | 1 + app/Views/alterpurchaseorder.php | 1 - app/Views/capitalpurchaseorder.php | 58 +-- app/Views/editCapitalAmendPO.php | 147 +++---- app/Views/editCapitalPo.php | 564 +++++++++++++------------ app/Views/editRevenueAmendPO.php | 115 +++-- app/Views/editRevenuepurchaseorder.php | 184 ++++---- app/Views/editServiceAmendPO.php | 14 +- app/Views/purchaseorder.php | 45 +- 9 files changed, 575 insertions(+), 554 deletions(-) diff --git a/app/Views/EditservicePurchaseorder.php b/app/Views/EditservicePurchaseorder.php index 9de4bb53..749509f5 100755 --- a/app/Views/EditservicePurchaseorder.php +++ b/app/Views/EditservicePurchaseorder.php @@ -1631,6 +1631,7 @@ if (!empty($getlogpodtl)) {
+
    
diff --git a/app/Views/alterpurchaseorder.php b/app/Views/alterpurchaseorder.php index d6f6bc21..574d1695 100755 --- a/app/Views/alterpurchaseorder.php +++ b/app/Views/alterpurchaseorder.php @@ -7424,7 +7424,6 @@ if (!empty($INRSYMBOL)) { } }); console.log("Data before AJAX call:", Object.fromEntries(formData)); -return; // Perform form validation if (validate()) { diff --git a/app/Views/capitalpurchaseorder.php b/app/Views/capitalpurchaseorder.php index 6bb5e4d3..d68b4185 100755 --- a/app/Views/capitalpurchaseorder.php +++ b/app/Views/capitalpurchaseorder.php @@ -977,31 +977,40 @@ if (!empty($INRSYMBOL)) {
-
-
-
-
-
-
+ +
+
+
+
+
+
+
+
+ + +
+ + + + + + + +
+ + + + -
- - - - - - - - - - - - -   Cancel -   Save as Draft -   Submit - -

@@ -4504,6 +4513,7 @@ if (!empty($INRSYMBOL)) { var formData = new FormData($('.CapitalPO')[0]); formData.append('ExchangeRateOn', ExchangeRateOn); formData.append('PaymentMethod', PaymentMethod); + // console.log("Data before AJAX call:", Object.fromEntries(formData)); $('#loader').show(); // disableButtons(); $.ajax({ diff --git a/app/Views/editCapitalAmendPO.php b/app/Views/editCapitalAmendPO.php index dd753064..c7086cad 100755 --- a/app/Views/editCapitalAmendPO.php +++ b/app/Views/editCapitalAmendPO.php @@ -4,7 +4,6 @@ align-items: center; gap: 10px; } - $CapitalRange .edit-input-field { padding: 2px; font-size: 14px; @@ -1663,96 +1662,86 @@ if (!empty($POItem) && $CapitalRange == '1') { - -
-
-
- -
-
- - -
-
-
- -
- - - - - - - - -
-

-
+
    
+ + +
+ +
+
+ + +
+
+
+ format('d-m-Y'); ?> +
+ +
+ + + 'AWAITING APPROVE', + 'AWAITING RELEASE' => 'AWAITING APPROVE', + 'RELEASER ONHOLD' => 'APPROVER ONHOLD', + 'PO RELEASED' => 'PO APPROVED', + ]; + if (isset($PoStatusName) && !empty($PoStatusName)) { + if (isset($statusMappings[$PoStatusName])) { + echo $statusMappings[$PoStatusName]; + } else { + echo $PoStatusName; + } + } else { + echo "Status not provided"; + } + ?> +
- -   Save as Draft -   Approve + +
-
- - -
-
- - -
-
- format('d-m-Y'); ?> -
- -
- - - 'AWAITING APPROVE', - 'AWAITING RELEASE' => 'AWAITING APPROVE', - 'RELEASER ONHOLD' => 'APPROVER ONHOLD', - 'PO RELEASED' => 'PO APPROVED', - ]; - - if (isset($PoStatusName) && !empty($PoStatusName)) { - if (isset($statusMappings[$PoStatusName])) { - echo $statusMappings[$PoStatusName]; - } else { - echo $PoStatusName; - } - } else { - echo "Status not provided"; - } - ?> -
- -
-
- +
+
diff --git a/app/Views/editCapitalPo.php b/app/Views/editCapitalPo.php index 5dd4d777..ce8e19ec 100755 --- a/app/Views/editCapitalPo.php +++ b/app/Views/editCapitalPo.php @@ -301,10 +301,6 @@ if (!empty($getlogpodtl)) { text-align: right; } - - - - .centered { display: flex; /* justify-content: center; */ @@ -886,7 +882,7 @@ if (!empty($getlogpodtl)) {
- +
@@ -906,8 +902,8 @@ if (!empty($getlogpodtl)) { Tax Amount Total Order Amount + Received Quantity + Pending Quantity --> Action @@ -967,8 +963,8 @@ if (!empty($getlogpodtl)) { + ReceivedQuantity ?> + Quantity - $record->ReceivedQuantity, 2, '.', ''); ?> --> $record->MaterialCode, "ReqNo" => $record->ReqNo); array_push($res_arr_values, $row); @@ -1227,10 +1223,11 @@ if (!empty($getlogpodtl)) { data-userid="" id="Del"> - +     + class="fa fa-eye" data-toggle="tooltip">    + -
-
- - - - - - - + + +
@@ -1363,7 +1354,7 @@ if (!empty($getlogpodtl)) { ?>
-
+
@@ -1451,7 +1442,7 @@ if (!empty($getlogpodtl)) { -
+
@@ -1462,9 +1453,7 @@ if (!empty($getlogpodtl)) { echo form_input($data); ?>
-
- - + @@ -1546,6 +1535,7 @@ if (!empty($getlogpodtl)) { +
-
+ -
- -
-
+
+ +
+
+
- - -
-
-
-
-
+
+ +
+
- -      - +
+ +      + + + +
+ +
    
-
-
- - -
-
+
+ +
- - - - -   Cancel - -   Save as Draft - -   Submit -   Approve - - OK - - OK - -   Submit -   OK - -   Submit -   OK - - - -
+ -
-
- - 'AWAITING APPROVE', - 'AWAITING RELEASE' => 'AWAITING APPROVE', - 'RELEASER ONHOLD' => 'APPROVER ONHOLD', - 'PO RELEASED' => 'PO APPROVED', - ]; + +
+
+
+
+
+ 'AWAITING APPROVE', + 'AWAITING RELEASE' => 'AWAITING APPROVE', + 'RELEASER ONHOLD' => 'APPROVER ONHOLD', + 'PO RELEASED' => 'PO APPROVED', + ]; - if (isset($PoStatusName) && !empty($PoStatusName)) { - if (isset($statusMappings[$PoStatusName])) { - echo $statusMappings[$PoStatusName]; - } else { - echo $PoStatusName; - } - } else { - echo "Status not provided"; - } - ?> + if (isset($PoStatusName) && !empty($PoStatusName)) { + if (isset($statusMappings[$PoStatusName])) { + echo $statusMappings[$PoStatusName]; + } else { + echo $PoStatusName; + } + } else { + echo "Status not provided"; + } + ?> +
+ +
+
+ - - -
-
-
- - - - - - + + + + + + + - -
+ + +
+
@@ -3726,19 +3739,16 @@ if (!empty($getlogpodtl)) { $data = array('name' => 'ViewItemDescription', 'value' => set_value('ViewItemDescription'), 'id' => 'ViewItemDescription', 'class' => 'form-control', 'rows' => '3', 'cols' => '40'); echo form_textarea($data); ?>
-
- + + + Cancel + - + - - + + @@ -5096,12 +5106,12 @@ if (!empty($getlogpodtl)) { function calculateTaxValue() { var Cgst = $('#AfterCgst').val() == '' ? '0.00' : $('#AfterCgst').val(); var Sgst = $('#AfterSgst').val() == '' ? '0.00' : $('#AfterSgst').val(); - + var Igst = 0.00; if (capitalType == 'Domestic') { Igst = $('#AfterIgst').val() == '' ? '0.00' : $('#AfterIgst').val(); - } - if(capitalType == 'International') { + } + if (capitalType == 'International') { Igst = $('#AfterIgstInt').val() == '' ? '0.00' : $('#AfterIgstInt').val(); // caps interna } var landingCharge = $('#AfterLandingCharge').val() == '' ? '0.00' : $('#AfterLandingCharge').val(); @@ -5142,7 +5152,7 @@ if (!empty($getlogpodtl)) { var OtherAmt = $('#OtherAllowances').val() == '' ? '0.00' : $('#OtherAllowances').val(); var landingCharge = $('#AfterLandingCharge').val() == '' ? '0.00' : $('#AfterLandingCharge').val(); - console.log("$('#AfterLandingCharge').val()",$('#AfterLandingCharge').val()); + console.log("$('#AfterLandingCharge').val()", $('#AfterLandingCharge').val()); var CustomDuty = $('#AfterCustomduty').val() == '' ? '0.00' : $('#AfterCustomduty').val(); @@ -5470,7 +5480,7 @@ if (!empty($getlogpodtl)) { */ function populateValueMainFormForDeleteServiceTax(deletedRow) { - var rows = document.getElementById('serviceTax').rows.length; + var rows = document.getElementById('serviceTax').rows.length; var capital = ; var TotalOrderValueSummary = 0; @@ -6118,6 +6128,7 @@ if (!empty($getlogpodtl)) { console.log(fileInput.vlaue); console.log(prePOFileInput.value); + // console.log("Data before AJAX call:", Object.fromEntries(formData)); if (fileInput && fileInput.vlaue && fileInput.files.length > 0) { formData.append('POFile', fileInput.files[0]); @@ -6134,6 +6145,7 @@ if (!empty($getlogpodtl)) { formData.append(inputID, input.val()); }); + // console.log("Data before AJAX call:", Object.fromEntries(formData)); $.ajax({ data: formData, processData: false, @@ -6479,8 +6491,8 @@ if (!empty($getlogpodtl)) { var AfterCgst = $("#EditAfterCgst").val(); var Sgst = $("#EditSgst").val(); var AfterSgst = $("#EditAfterSgst").val(); - var Igst = $("#EditIgst").val();//Dom Caps - var AfterIgst = $("#EditAfterIgst").val();//Dom Caps + var Igst = $("#EditIgst").val(); //Dom Caps + var AfterIgst = $("#EditAfterIgst").val(); //Dom Caps var OtherAmt = parseFloat($("#EditOtherAllowances").val() == '' ? "0.00" : $('#EditOtherAllowances').val()).toFixed(2); var TotalTaxValue = EditcalculateTaxValue(); @@ -6638,7 +6650,7 @@ if (!empty($getlogpodtl)) { $('#ClearingCharge' + userid).val(ClearingCharges); - var shorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName; + var shorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName; cellval[2].innerHTML = materialCode; cellval[3].innerHTML = shorten; @@ -6647,7 +6659,7 @@ if (!empty($getlogpodtl)) { cellval[6].innerHTML = uom; cellval[7].innerHTML = parseFloat(itemRate).toFixed(2); cellval[8].innerHTML = parseFloat(basicval).toFixed(2); - cellval[9].innerHTML = parseFloat(TotalTaxValue).toFixed(2);// what should i display here ?? if international means + cellval[9].innerHTML = parseFloat(TotalTaxValue).toFixed(2); // what should i display here ?? if international means cellval[10].innerHTML = parseFloat(Total).toFixed(2); @@ -6808,8 +6820,8 @@ if (!empty($getlogpodtl)) { var Igst = 0.00; if (capitalType == 'Domestic') { Igst = $('#EditAfterIgst').val() == '' ? '0.00' : $('#EditAfterIgst').val(); // caps dom - } - if(capitalType == 'International') { + } + if (capitalType == 'International') { Igst = $('#EditAfterIgstInt').val() == '' ? '0.00' : $('#EditAfterIgstInt').val(); // caps interna } console.log(Igst); @@ -6867,8 +6879,8 @@ if (!empty($getlogpodtl)) { */ function populateValueMainFormForEditCapitalTax() { - var rows = document.getElementById('serviceTax').rows.length; - console.log("rr",rows); + var rows = document.getElementById('serviceTax').rows.length; + console.log("rr", rows); var capital = ; var TotalOrderValueSummary = 0; @@ -6911,7 +6923,7 @@ if (!empty($getlogpodtl)) { var discountedRateValue = $('#AfterDisVal' + i).val() == '' ? '0.00' : $('#AfterDisVal' + i).val(); var TotLandingI = $('#landingCharge' + i).val() == '' ? '0.00' : $('#landingCharge' + i).val(); - console.log(TotLandingI,"TotLandingI"); + console.log(TotLandingI, "TotLandingI"); var TotCustomI = $('#CustomDuty' + i).val() == '' ? '0.00' : $('#CustomDuty' + i).val(); @@ -7019,7 +7031,7 @@ if (!empty($getlogpodtl)) { function populateValueMainFormForViewCapitalTax() { - var rows = document.getElementById('serviceTax').rows.length; + var rows = document.getElementById('serviceTax').rows.length; var capital = ; var TotalOrderValueSummary = 0; @@ -8210,8 +8222,8 @@ if (!empty($getlogpodtl)) { function populateValueMainFormForupdateCapitalTax() { - - var rows = document.getElementById('serviceTax').rows.length; + + var rows = document.getElementById('serviceTax').rows.length; var TotalFreight = 0; var i = 0; do { diff --git a/app/Views/editRevenueAmendPO.php b/app/Views/editRevenueAmendPO.php index c4f4e758..19c36ff6 100755 --- a/app/Views/editRevenueAmendPO.php +++ b/app/Views/editRevenueAmendPO.php @@ -1657,11 +1657,37 @@ if (!empty($INRSYMBOL)) { - -
-

-
+ +
+
+
+
+ +
+ +
+ +      + +
+ +
+ +
+
+
    
+ + +
+ +
@@ -1670,51 +1696,50 @@ if (!empty($INRSYMBOL)) { - - -   Save as Draft -   Approve - -
-
-
- + + +
+
+
+ format('d-m-Y'); ?> +
+ +
+ + 'AWAITING APPROVE', + 'AWAITING RELEASE' => 'AWAITING APPROVE', + 'RELEASER ONHOLD' => 'APPROVER ONHOLD', + 'PO RELEASED' => 'PO APPROVED', + ]; - -
-
- format('d-m-Y'); ?> -
- -
- - 'AWAITING APPROVE', - 'AWAITING RELEASE' => 'AWAITING APPROVE', - 'RELEASER ONHOLD' => 'APPROVER ONHOLD', - 'PO RELEASED' => 'PO APPROVED', - ]; + if (isset($POStatus) && !empty($POStatus)) { + if (isset($statusMappings[$POStatus])) { + echo $statusMappings[$POStatus]; + } else { + echo $POStatus; + } + } else { + echo "Status not provided"; + } + ?> +
- if (isset($POStatus) && !empty($POStatus)) { - if (isset($statusMappings[$POStatus])) { - echo $statusMappings[$POStatus]; - } else { - echo $POStatus; - } - } else { - echo "Status not provided"; - } - ?> -
-
- + +
+
+
diff --git a/app/Views/editRevenuepurchaseorder.php b/app/Views/editRevenuepurchaseorder.php index 46e1acb9..3cd5d4ca 100755 --- a/app/Views/editRevenuepurchaseorder.php +++ b/app/Views/editRevenuepurchaseorder.php @@ -2898,21 +2898,17 @@ if (!empty($getlogpodtl)) { -
-
-
- -
-
- - - -
-
-
+ + +
    
+ + +
+ +
+ + + + + + + + +
+ + +
- - - - - - - -
-

-
- - -
- - - - - - - - - - - - -

-
- - - - - - -
-
- -
- -
- - 'AWAITING APPROVE', - 'AWAITING RELEASE' => 'AWAITING APPROVE', - 'RELEASER ONHOLD' => 'APPROVER ONHOLD', - 'PO RELEASED' => 'PO APPROVED', - ]; - - if (isset($StatusName) && !empty($StatusName)) { - if (isset($statusMappings[$StatusName])) { - echo $statusMappings[$StatusName]; - } else { - echo $StatusName; - } - } else { - echo "Status not provided"; - } - ?> -
-
+
diff --git a/app/Views/editServiceAmendPO.php b/app/Views/editServiceAmendPO.php index 53719fbd..d47fd7e1 100755 --- a/app/Views/editServiceAmendPO.php +++ b/app/Views/editServiceAmendPO.php @@ -1355,7 +1355,7 @@ foreach ($PaymentTerms as $TER) { -
+

@@ -1372,13 +1372,12 @@ foreach ($PaymentTerms as $TER) {      - -
+
-
+
    
@@ -1422,12 +1421,9 @@ foreach ($PaymentTerms as $TER) {   Save as Draft   Approve - - + + - - - diff --git a/app/Views/purchaseorder.php b/app/Views/purchaseorder.php index 8cd6ec81..54639ecf 100755 --- a/app/Views/purchaseorder.php +++ b/app/Views/purchaseorder.php @@ -2291,35 +2291,38 @@ if (!empty($INRSYMBOL)) { - -
- -
- -
-
- - -
- -
-
-
- + +
+
+
+
+
+
+
+
+ + +
-
+ +
From 1b411b0e63882180b7d032abbcb92a93975dcfa2 Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Mon, 31 Mar 2025 09:19:06 +0000 Subject: [PATCH 3/4] igr live fixes --- app/Controllers/Inwardgateregister.php | 30 ++++++++++++++------ app/Models/Inwardgateregister_model.php | 2 +- app/Views/editOldemppay.php | 37 +++++++++++++++++++------ app/Views/publicholidays.php | 6 ++-- app/Views/rawmaterialListing.php | 16 ++++++++--- app/Views/viewinwardgateregister.php | 2 +- 6 files changed, 67 insertions(+), 26 deletions(-) diff --git a/app/Controllers/Inwardgateregister.php b/app/Controllers/Inwardgateregister.php index a680ad47..4fa4fd29 100755 --- a/app/Controllers/Inwardgateregister.php +++ b/app/Controllers/Inwardgateregister.php @@ -658,7 +658,8 @@ class Inwardgateregister extends BaseController if ($fileupdated_count > 0) { $finalstatement .= "Number of files updated: $fileupdated_count \n"; - $finalstatement .= "Files: \n" . implode(PHP_EOL, $fileupdated_name); + // $finalstatement .= "Files: \n" . implode(PHP_EOL, $fileupdated_name); + $finalstatement .= "Files: \n" . implode(PHP_EOL, array_map(fn($file) => "• " . $file, $fileupdated_name)); } else { $finalstatement .= "No files to update"; } @@ -811,21 +812,23 @@ function viewIGRDetails() $igrarr = array('DeliveryChellanDate' => $DeliveryChellanDate, 'MaterialRcvdDate' => $MaterialRcvdDt,'VehicleNo'=>$VehicleNo,'TransporterId'=>$TransporterId,'DriverMobileNumber'=>$DriverMobileNumber,'DriverName'=>$DriverName, 'IGRStatus' => $IGRStatus,'UpdateBY' => $updateby,'DeliveryChellanOrInvoiceNo'=>$DeliveryChellanOrInvoiceNo,'Remark'=>$MasterRemarks); $MasterFile = $this->request->getfile('MasterFile'); + $fileupdated_count = 0; + $fileupdated_name = []; - if ($MasterFile) { + if (!empty($MasterFile)) { $requestMasterFileName = $MasterFile->getName(); if ($MasterFile && $MasterFile->isValid() && !$MasterFile->hasMoved()) { if (!empty($this->inwardgateregister_model->isFileExistsInIGRmaster($requestMasterFileName))) { log_message('error', 'File already exists in the database'.$requestMasterFileName); } else{ - $MasterFile->move($path, $requestMasterFileName); + $MasterFile->move($path, $requestMasterFileName); + $fileupdated_count++; + $fileupdated_name[] = $requestMasterFileName; $igrarr['MasterFile'] = $requestMasterFileName; } } } - $fileupdated_count = 0; - $fileupdated_name = []; $fileNames = $this->request->getPost('file_name'); $files = $this->request->getFileMultiple('emp_file'); @@ -913,9 +916,16 @@ function viewIGRDetails() } if ($getigrstatus == 'ST027' && ($updateigrmaster > 0 || $updateigrlineitem > 0)) { - - - $result_for_email = $this->inwardgateregister_model->getDetailsforEmail($this->session->get('userId')); + + if(session()->get('roleText') == 'System Administrator') // id is 1 + { + $roleId = 2; + } + else if(session()->get('roleText') == 'Auditor') // id is 2 + { + $roleId = 1; + } + $result_for_email = $this->inwardgateregister_model->getDetailsforEmail($this->session->get('userId'),$roleId); $result_for_history = $this->inwardgateregister_model->getHistoryDetailsforEmail($IGRNo); @@ -982,6 +992,7 @@ function viewIGRDetails() $email_response = $notification->sendEmail([ 'recipient_email' => $email, 'subject' => $result_for_email['company'].' - IGR Notification', + // 'carboncopy'=>Sales@resicoindustries.com,Factory@resicoindustries.com,Invoice@resicoindustries.com, // 'description' => 'IGR Number : '.$IGRNo.' is Edited By '.($result_for_email['full_name'] ?? $this->session->get('name'))." On ".date('d-m-Y H:i A', strtotime(get_current_date_time() . ' +30 seconds')). $history_content, 'description' => $result_for_history['first_line']."
" .$history_content, 'company' => $result_for_email['company'], @@ -1016,7 +1027,8 @@ function viewIGRDetails() if ($fileupdated_count > 0) { $finalstatement .= "Number of files updated: $fileupdated_count \n"; - $finalstatement .= "Files: \n" . implode(PHP_EOL, $fileupdated_name); + // $finalstatement .= "Files: \n" . implode(PHP_EOL, $fileupdated_name); + $finalstatement .= "Files: \n" . implode(PHP_EOL, array_map(fn($file) => "• " . $file, $fileupdated_name)); } else { $finalstatement .= "No files to update"; } diff --git a/app/Models/Inwardgateregister_model.php b/app/Models/Inwardgateregister_model.php index 57eba79c..e8c54b66 100755 --- a/app/Models/Inwardgateregister_model.php +++ b/app/Models/Inwardgateregister_model.php @@ -1300,7 +1300,7 @@ $builder = $this->db->table('t_igr_history') ]; } - public function getDetailsforEmail($userId,$roleId = 2) + public function getDetailsforEmail($userId,$roleId) { $query0 = $this->db->query(" SELECT CompanyName,EmailAddress diff --git a/app/Views/editOldemppay.php b/app/Views/editOldemppay.php index c368285c..7e92e7b8 100755 --- a/app/Views/editOldemppay.php +++ b/app/Views/editOldemppay.php @@ -127,6 +127,16 @@ if (!empty($emppay)) { .num { text-align: right; } + .btn-soft-primary { + color: white; + background-color: rgb(42, 206, 150); + border-color: rgb(42, 206, 150); + } + + .btn-soft-primary:hover { + background-color: rgb(32, 176, 130); /* Slightly darker shade for hover */ + border-color: rgb(32, 176, 130); + }
@@ -253,7 +263,12 @@ if (!empty($emppay)) {
- +
@@ -271,17 +286,23 @@ if (!empty($emppay)) {
- +
- - - - Previous Upload - - - + + +
diff --git a/app/Views/publicholidays.php b/app/Views/publicholidays.php index 7dcc8b83..117e9d85 100755 --- a/app/Views/publicholidays.php +++ b/app/Views/publicholidays.php @@ -31,15 +31,15 @@
- Holiday Name : +
- Date : +
- +
diff --git a/app/Views/rawmaterialListing.php b/app/Views/rawmaterialListing.php index bd30793f..10b57846 100755 --- a/app/Views/rawmaterialListing.php +++ b/app/Views/rawmaterialListing.php @@ -235,7 +235,7 @@ +
+
+
@@ -1553,10 +1602,9 @@ if (!empty($getlogpodtl)) {
-
-
+
     @@ -1565,6 +1613,7 @@ if (!empty($getlogpodtl)) {
+
@@ -1608,34 +1657,23 @@ if (!empty($getlogpodtl)) {
@@ -1643,13 +1681,13 @@ if (!empty($getlogpodtl)) { - - - - - - + + + + + + + + - - - - - - + - + + - + + -
@@ -1858,7 +1885,15 @@ if (!empty($getlogpodtl)) {
-
+
+
+ + 'ExchangeRtModal', 'value' => set_value('ExchangeRtModal'), 'id' => 'ExchangeRtModal', 'class' => 'form-control num', 'readonly' => 'true'); + + echo form_input($data); + ?> +
*
@@ -2323,7 +2358,7 @@ if (!empty($getlogpodtl)) {
-

Cost Of The Product Per UOM

+

Product Cost / UOM



@@ -2419,11 +2454,10 @@ if (!empty($getlogpodtl)) {
-
+
- -