From e4588fe6352e82d80f14d76fec8243e6d04b3dfd Mon Sep 17 00:00:00 2001 From: Smart Date: Thu, 19 Sep 2024 15:19:04 +0530 Subject: [PATCH 1/2] HR issue : GWM --- app/Controllers/Payslip.php | 12 ++++-- app/Views/attendance.php | 19 ++++------ app/Views/monthlypayinputs.php | 69 +++++++++++++++++++++------------- deletableFile.php | 0 4 files changed, 59 insertions(+), 41 deletions(-) mode change 100644 => 100755 deletableFile.php diff --git a/app/Controllers/Payslip.php b/app/Controllers/Payslip.php index 2560f3ff..edaec602 100755 --- a/app/Controllers/Payslip.php +++ b/app/Controllers/Payslip.php @@ -75,6 +75,7 @@ class Payslip extends BaseController $loan = []; $loanHistory = []; $loan_id = 0; + $BalanceAdvance = 0; if(is_null($result->Loan_ID)){ }else{ @@ -95,6 +96,7 @@ class Payslip extends BaseController 'Due_Date' => $PayOn, ]; + $BalanceAdvance = $result->Loan_Amount - ($result->Paid_Amount + $result->Loan_Recovered); } @@ -121,14 +123,18 @@ class Payslip extends BaseController 'Festival_Bonus' => $result->Festival_Bonus, 'TotalSalary' => $result->Estimate, 'Advance' => $result->Loan_Recovered, - 'BalanceAdvance' => 0, + 'BalanceAdvance' => $BalanceAdvance, 'LessAdvance' => 0, 'BankAccountNumber' => $result->BankAccountNo, 'PFNumber' => $result->PFNO, 'ESINumber' => $result->ESINO, 'UANNO' => $result->PFNO, ]; - + // print_r($result); + // print_r($loan); + // print_r($loanHistory); + // print_r($data); + // die; $insert = $this->payroll_model->insertPayroll($data); if($insert){ if(count($loan)){ @@ -697,7 +703,7 @@ class Payslip extends BaseController $data['pf'] = $pf; $data['over_time'] = $ot; -// dd($data); +// dd($data); $this->global['pageTitle'] = 'Payroll Monthly Inputs'; $this->loadViews("monthlypayinputs", $this->global, $data, NULL); } diff --git a/app/Views/attendance.php b/app/Views/attendance.php index 62779526..bbd5bdc7 100755 --- a/app/Views/attendance.php +++ b/app/Views/attendance.php @@ -244,12 +244,9 @@ $currentday = date('d'); - S.NO - Employee ID - Employee Name - - + S.NO + Employee ID + Employee Name + ; var alldata = $("#attendance").tableToJSON(); + alldata = JSON.stringify(alldata); @@ -544,7 +543,7 @@ $currentday = date('d'); } }); - //alert(totaldata+"-Employees attendance saved sucessfully..!"); + } else { alert('Plesae Provide Working Hrs and OT Hrs Correctly..!'); } @@ -897,7 +896,6 @@ $currentday = date('d'); var totaldays = ; console.log(totalrowcount); for (i = 1; i <= totalrowcount; i++) { - //alert('inside for'); // var a = parseFloat(document.getElementById(i+'PL').textContent); var b = parseFloat(document.getElementById(i + 'AB').textContent); @@ -906,10 +904,7 @@ $currentday = date('d'); //document.getElementById(i+'PL').textContent = '0.00'; document.getElementById(i + 'AB').textContent = '0.00'; } - - - - } } + \ No newline at end of file diff --git a/app/Views/monthlypayinputs.php b/app/Views/monthlypayinputs.php index 7e89f50d..2e838120 100755 --- a/app/Views/monthlypayinputs.php +++ b/app/Views/monthlypayinputs.php @@ -1,15 +1,21 @@ Key)) { - $show_hide_column_value = false; - } else { - $show_hide_column_value = true; - } - break; - } + // $sample = array_merge($month, $fresh); + // $show_hide_column_value = true; + // echo '
';
+    // print_r($month);
+    // print_r($fresh);
+    // print_r($sample);
+    // echo '
';
+
+    // foreach ($sample as $s) {
+    //     if (!empty($s->Key)) {
+    //         $show_hide_column_value = false;
+    //     } else {
+    //         $show_hide_column_value = true;
+    //     }
+    //     break;
+    // }
+    $sample = $fresh;
 
     $ex = explode('-', $dropdownvalue);
 
@@ -219,6 +225,7 @@
                                             $index = 0;
                                             $i = 0;
                                             foreach ($sample as $i => $record) {
+                                              
                                                 $index++;
                                                 if (in_array($record->EmpID, $testarray)) {
                                                     $index--;
@@ -233,9 +240,10 @@
                                                      FirstName; ?>
                                                      
                                                          DateofJoining);
-                                                            $newDateFormat = $date->format('d-m-Y');
-                                                            echo $newDateFormat;
+                                                         echo $record->DateofJoining;
+                                                            // $date = DateTime::createFromFormat('Y-m-d H:i:s', $record->DateofJoining);
+                                                            // $newDateFormat = $date->format('d-m-Y');
+                                                            // echo $newDateFormat;
                                                             ?>
                                                      
                                                      Designation; ?>
@@ -325,13 +333,32 @@
 
 
 
-                                                     Key)) {
                                                                 echo "contenteditable='false';";
                                                             } ?>
                                                          Key)) { ?> title="Payslip Calculated"
                                                          style="text-align:right;color:blue;"
                                                          style="text-align:right;" >
+
+                                                         Monthly_Due)) {
+                                                                echo $record->Monthly_Due;
+                                                                $totalmonthloan[] = $record->Monthly_Due;
+                                                            } else {
+                                                                echo number_format(0.00, 2, '.', '');
+                                                            } ?>
+
+                                                      -->
+
+
+                                                    Key)) {
+                                                                echo "contenteditable='true';";
+                                                            } ?>
+                                                         Key)) { ?> title="Payslip Calculated"
+                                                         style="text-align:right;color:blue;"
+                                                         style="text-align:right;" >
+
                                                          Monthly_Due)) {
                                                                 echo $record->Monthly_Due;
                                                                 $totalmonthloan[] = $record->Monthly_Due;
@@ -342,16 +369,6 @@
 
 
 
-
-
-
-
-
-
-
-                                                     
-                                                     
-
                                                      Key)) {
                                                                 echo "contenteditable='true';";
@@ -589,7 +606,7 @@
         alldata = JSON.stringify(alldata)
         // Parse the JSON string back into an array of objects
         alldata = JSON.parse(alldata);
-
+console.log(alldata);
         // Filter out objects where "Emp ID" is empty
         alldata = alldata.filter(function(item) {
             return item["Emp ID"].trim() !== "";
diff --git a/deletableFile.php b/deletableFile.php
old mode 100644
new mode 100755

From dcc27d262e978da86e0780b713c8474261fc2243 Mon Sep 17 00:00:00 2001
From: aadhavan valli 
Date: Thu, 19 Sep 2024 17:45:32 +0530
Subject: [PATCH 2/2] CHANGE_TRACKER_ISSUE_7

---
 app/Views/EditservicePurchaseorder.php | 4622 ++++++++++++------------
 app/Views/alterpurchaseorder.php       |    3 +-
 app/Views/capitalpurchaseorder.php     |    8 +-
 app/Views/createPOfromRequistion.php   |    2 +-
 app/Views/editCapitalPo.php            | 2069 ++++++-----
 app/Views/editRevenuepurchaseorder.php |   96 +-
 app/Views/editimportpo.php             |   54 +-
 app/Views/purchaseorder.php            |    9 +-
 app/Views/servicePurchaseorder.php     |  156 +-
 9 files changed, 3508 insertions(+), 3511 deletions(-)

diff --git a/app/Views/EditservicePurchaseorder.php b/app/Views/EditservicePurchaseorder.php
index 803ab4d6..86f4a1d4 100755
--- a/app/Views/EditservicePurchaseorder.php
+++ b/app/Views/EditservicePurchaseorder.php
@@ -1077,1249 +1077,1255 @@ if (!empty($getlogpodtl)) {
 								
- - > IS THIS OPEN ORDER FORMAT - - + + > IS THIS OPEN ORDER FORMAT + +
-
+
- - - - - - - - - - - - - - + + - - + Schedule_Type != 'Recurring') { - $FrequencyNo = intval(1); - $Frequency = 'One Time'; - } else { - $FrequencyNo = $record->NumberOfService; - $Frequency = $record->Service_Period; - } + 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; + } - ?> - - - - - - - + ?> + + + + + + + - + - + - - - - + - + - + - + - + - + - + - + - + - - + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - After_CGST; - $TotalSgst = $TotalSgst + $record->After_SGST; - $TotalIgst = $TotalIgst + $record->After_IGST; - $OtherAmt = $OtherAmt + $record->otherallowance; - $TotalSummary = $TotalSummary + $record->TotalValue; + + if ($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == REQITEM_Emergency_PO_CREATED || $PONOStatus == PO_APPROVED || $PONOStatus == SPECIAL_PO) { ?> + + + + After_CGST; + $TotalSgst = $TotalSgst + $record->After_SGST; + $TotalIgst = $TotalIgst + $record->After_IGST; + $OtherAmt = $OtherAmt + $record->otherallowance; + $TotalSummary = $TotalSummary + $record->TotalValue; - $TotalBasicAmount = $TotalBasicAmount + $record->BasicValue * $FrequencyNo; - } - ?> - BasicValue * $FrequencyNo; + } + ?> + - + } + ?> +
SNoRequisition NoItem CodeItem NameQuantityUOMRate Basic Amount Tax Amount Total Order Amount Action
Action
ReqNo ?>MaterialCode ?>MaterialName ?>Quantity ?>UOM ?>
ReqNo ?>MaterialCode ?>MaterialName ?>Quantity ?>UOM ?>Rate ?>Rate ?>BasicValue * $FrequencyNo, 2, '.', ''); ?>BasicValue * $FrequencyNo, 2, '.', ''); ?>Taxamount ?>TotalValue ?> - - -    
+ + +    
-
-
- - 'txtTotBasicAmount', 'value' => set_value('txtTotBasicAmount', number_format($TotalBasicAmount, 2, '.', '')), 'id' => 'txtTotBasicAmount', 'class' => 'form-control num', 'readonly' => 'true'); - echo form_input($data); - ?> -
-
- - 'txtTotCgst', 'value' => set_value('txtTotCgst', number_format($TotalCgst, 2, '.', '')), 'id' => 'txtTotCgst', 'class' => 'form-control num', 'readonly' => 'true'); - echo form_input($data); - ?> -
-
- - 'txtTotSgst', 'value' => set_value('txtTotSgst', number_format($TotalSgst, 2, '.', '')), 'id' => 'txtTotSgst', 'class' => 'form-control num', 'readonly' => 'true'); - echo form_input($data); - ?> -
-
- - 'txtTotIgst', 'value' => set_value('txtTotIgst', number_format($TotalIgst, 2, '.', '')), 'id' => 'txtTotIgst', 'class' => 'form-control num', 'readonly' => 'true'); - echo form_input($data); - ?> -
-
- - 'ToatalOtherAllowances', 'value' => set_value('ToatalOtherAllowances', number_format($OtherAmt, 2, '.', '')), 'id' => 'ToatalOtherAllowances', 'class' => 'form-control num', 'readonly' => 'true'); - echo form_input($data); - ?> +
+
+ + 'txtTotBasicAmount', 'value' => set_value('txtTotBasicAmount', number_format($TotalBasicAmount, 2, '.', '')), 'id' => 'txtTotBasicAmount', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+ + 'txtTotCgst', 'value' => set_value('txtTotCgst', number_format($TotalCgst, 2, '.', '')), 'id' => 'txtTotCgst', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+ + 'txtTotSgst', 'value' => set_value('txtTotSgst', number_format($TotalSgst, 2, '.', '')), 'id' => 'txtTotSgst', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+ + 'txtTotIgst', 'value' => set_value('txtTotIgst', number_format($TotalIgst, 2, '.', '')), 'id' => 'txtTotIgst', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+ + 'ToatalOtherAllowances', 'value' => set_value('ToatalOtherAllowances', number_format($OtherAmt, 2, '.', '')), 'id' => 'ToatalOtherAllowances', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+ + 'txtTotalOrderValueSummary', 'value' => set_value('txtTotalOrderValueSummary', number_format($TotalSummary, 2, '.', '')), 'id' => 'txtTotalOrderValueSummary', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+ +
+ + + 'editdescofpo', 'value' => set_value('editdescofpo', strip_tags($DescriptionOfPo)), 'id' => 'editdescofpo', 'class' => 'form-control', 'rows' => '3', 'cols' => '40'); + echo form_textarea($data); + ?> + +
+
+ +
+
+ + 'ScopeofWork', 'value' => set_value('ScopeofWork', strip_tags($ServiceDescription)), 'id' => 'ScopeofWork', 'class' => 'form-control', 'rows' => '10', 'cols' => '40'); + echo form_textarea($data); + ?> +
+
+
+
+ + + +
+ + +
+
-
- - 'txtTotalOrderValueSummary', 'value' => set_value('txtTotalOrderValueSummary', number_format($TotalSummary, 2, '.', '')), 'id' => 'txtTotalOrderValueSummary', 'class' => 'form-control num', 'readonly' => 'true'); - echo form_input($data); - ?> -
+ + +
+ + + +
-
- -
- - - 'editdescofpo', 'value' => set_value('editdescofpo', strip_tags($DescriptionOfPo)), 'id' => 'editdescofpo', 'class' => 'form-control', 'rows' => '3', 'cols' => '40'); - echo form_textarea($data); - ?> - -
-
- -
-
- - 'ScopeofWork', 'value' => set_value('ScopeofWork', strip_tags($ServiceDescription)), 'id' => 'ScopeofWork', 'class' => 'form-control', 'rows' => '10', 'cols' => '40'); - echo form_textarea($data); - ?> -
-
-
-
- -
- -
- - -
- -
- - -
- - - - -
- - - - - - + + - - + + - - - + + + - - $gd) { + + $gd) { - ?> - - - - - - - - - -
Bill No FileFileAction
Action
BillNo ?>FilePath)) ? $gd->FilePath : "No File"; ?> - FilePath)) { ?> - - -
-
+ ?> + + BillNo ?> + + + FilePath)) ? $gd->FilePath : "No File"; ?> + + FilePath)) { ?> + + + + + + + +
- -
-
- + +
+
+
- - - - - - - - - - - - + + + + + + + + + + + + - - + + - - - + + + - - + + - - - - entity == 'PO DateChanged') { - $oldValue = date('d-m-Y', strtotime($oldpo->oldValue)); - } else { - $oldValue = $oldpo->oldValue; - } ?> - + + + entity == 'PO DateChanged') { + $oldValue = date('d-m-Y', strtotime($oldpo->oldValue)); + } else { + $oldValue = $oldpo->oldValue; + } ?> + - entity == 'PO DateChanged') { - $newValue = date('d-m-Y', strtotime($oldpo->newValue)); - } else { - $newValue = $oldpo->newValue; - } ?> - - + entity == 'PO DateChanged') { + $newValue = date('d-m-Y', strtotime($oldpo->newValue)); + } else { + $newValue = $oldpo->newValue; + } ?> + + - + - - - - -
SnoPONOLineItemNoEntityOldValueNewValueUpdatedByUpdateOn
SnoPONOLineItemNoEntityOldValueNewValueUpdatedByUpdateOn
PONO ?>PONO ?>LineItemNos; ?>entity ?>SupplierName; ?>LineItemNos; ?>entity ?>SupplierName; ?>FirstName ?>FirstName ?>UpdatedOn); - echo $date->format('d-m-Y'); ?>UpdatedOn); + echo $date->format('d-m-Y'); ?>
-
-
- -
- -

- - - - - - - - -   Cancel - -   Save - -   Submit -   Approve - -   OK -   Submit - -   OK -   Submit - - -
- -
- -
- -
- - - '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"; - } - ?> + + + + +
-
-
- - - - - - - - + + - - - + + +