From a8ccd0137f7b7926d6e9f7f764edb7ecf70818fb Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Fri, 28 Mar 2025 13:01:06 +0000 Subject: [PATCH] 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);