From f5ff2a009a1b6dcbd161613922b813f047ad8743 Mon Sep 17 00:00:00 2001 From: aadhavan valli Date: Fri, 30 Aug 2024 09:07:49 +0530 Subject: [PATCH] CHANGE_PURCHASE_ORDER_EMERGE_PEND_HR --- app/Views/Report_pending_purchase.php | 901 +++++++------- app/Views/alterpurchaseorder.php | 878 +++++++------- app/Views/attendance.php | 1563 ++++++++++++------------- app/Views/createPOfromRequistion.php | 830 ++++++------- app/Views/employeeListing.php | 122 +- app/Views/includes/new_header.php | 38 +- app/Views/monthlypayinputs.php | 1362 +++++++++++---------- 7 files changed, 2870 insertions(+), 2824 deletions(-) diff --git a/app/Views/Report_pending_purchase.php b/app/Views/Report_pending_purchase.php index fb00a4d5..23008531 100644 --- a/app/Views/Report_pending_purchase.php +++ b/app/Views/Report_pending_purchase.php @@ -1,485 +1,478 @@ - - - - -
-
-
- -
- -
-
-
-

-

Report - Pending Purchase Order

-

-
-
- -
+ .dataTables_filter { + width: 50%; + float: right; + text-align: right; + } -
"> + .dataTables_paginate { + width: 50%; + float: right; + text-align: right; + } -
-
- -
- -
-
-
- -
- -
-
- -
- -
- -
-
-
- -
- -
-
-
- -
- - - - -
-
+ div.dt-buttons { + position: relative; + /* float: right; */ - -
- -
- - - - -
- + } + + +
+
+ +
+ +
+
+
+
+

Report - Pending Purchase Order

-

- - -
-
- - - - -
-
-
- - - - - - - - - - - - - - - - category; - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PO DatePO NoSupplier NameMaterial NameCategoryOrdered QuantityReceived QuantityPending Quantity
- pdate;?> - - po;?> - - - supplier;?> - - material;?> - - category;?> - quantity); - ?> - quantity);?> - received); - ?> - received);?> - pending); - ?> - pending);?> -
Total - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- +
+
+
+
+
+
+
+ + +
+ +
"> +
+
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ +
+
+
+
+
+ +
+ + +
+
+
+ +
+ +
+ +
+
+

+ +
+ +
+
+
+ +
+ + + + +
+ + + + + + + + + + + + + + + + + category; + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PO DatePO NoSupplier NameMaterial NameCategoryOrdered QuantityReceived QuantityPending Quantity
+ pdate; ?> + + po; ?> + + + supplier; ?> + + material; ?> + + category; ?> + quantity); + ?> + quantity); ?> + received); + ?> + received); ?> + pending); + ?> + pending); ?> +
Total + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
-
- -
- -
-
+
+ + - - - - - - - - - - + + + + + + + - - - \ No newline at end of file + }); + \ No newline at end of file diff --git a/app/Views/alterpurchaseorder.php b/app/Views/alterpurchaseorder.php index 9d688d81..886e6b22 100644 --- a/app/Views/alterpurchaseorder.php +++ b/app/Views/alterpurchaseorder.php @@ -1,6 +1,7 @@ "NO", "value" => "0"), array("name" => "YES", "value" => "1") + array("name" => "NO", "value" => "0"), + array("name" => "YES", "value" => "1") ); $ReqType = ''; $CompanyAddress = ''; @@ -172,40 +173,40 @@ if (!empty($INRSYMBOL)) { $(function() { - $("#PODate").datepicker({ - // minDate : 'now', - // maxDate : 'now', - dateFormat: 'dd-mm-yy', - changeMonth: true, - changeYear: true, - yearRange: '-100:+0' - }); - $("#Deliverydt").datepicker({ - minDate: 'now', - dateFormat: 'dd-mm-yy', - changeMonth: true, - changeYear: true, - yearRange: '0:+10' - }); + // $("#PODate").datepicker({ + // // minDate : 'now', + // // maxDate : 'now', + // dateFormat: 'dd-mm-yy', + // changeMonth: true, + // changeYear: true, + // yearRange: '-100:+0' + // }); + // $("#Deliverydt").datepicker({ + // minDate: 'now', + // dateFormat: 'dd-mm-yy', + // changeMonth: true, + // changeYear: true, + // yearRange: '0:+10' + // }); - $("#Date1").datepicker({ - // minDate : 'now', - dateFormat: 'dd-mm-yy', - changeMonth: true, - changeYear: true, - yearRange: '0:+10' - }); + // $("#Date1").datepicker({ + // // minDate : 'now', + // dateFormat: 'dd-mm-yy', + // changeMonth: true, + // changeYear: true, + // yearRange: '0:+10' + // }); - $("#MRC").datepicker({ - // minDate : 'now', - dateFormat: 'dd-mm-yy', - changeMonth: true, - changeYear: true, - yearRange: '0:+10' - }); + // $("#MRC").datepicker({ + // // minDate : 'now', + // dateFormat: 'dd-mm-yy', + // changeMonth: true, + // changeYear: true, + // yearRange: '0:+10' + // }); var SelectedMaterialList = { Mat: [] @@ -1910,10 +1911,11 @@ if (!empty($INRSYMBOL)) { $("#EditRevenueMaterialCode").select2(); $("#MaterialCode").select2(); $("#ServiceMaterialCode").select2(); + $("#emergency_itemcode").select2(); + }); - $("#emergency_itemcode").select2(); @@ -2020,140 +2022,146 @@ if (!empty($INRSYMBOL)) { .num { text-align: right; } + .header-container { - display: flex; - justify-content: space-between; - align-items: center; - padding: 25px; - } + display: flex; + justify-content: space-between; + align-items: center; + padding: 25px; + } - .header-container h2 { - flex: 1; - text-align: center; - margin: 0; - } + .header-container h2 { + flex: 1; + text-align: center; + margin: 0; + } - .centered { - display: flex; - /* justify-content: center; */ - align-items: center; - height: 10vh; - } + .centered { + display: flex; + /* justify-content: center; */ + align-items: center; + height: 10vh; + } - .centered label, - .centered input { - margin: 0 5px; - } + .centered label, + .centered input { + margin: 0 5px; + } - .mandatory { - color: red; - text-align: right; - background-color: white; - } + .mandatory { + color: red; + text-align: right; + background-color: white; + } -
- 'form-label-left CreatealterPO ', 'name' => 'CreatealterPO', 'id' => 'CreatealterPO'); + - echo form_open(base_url() . '/purchaseorder/addalterPO/', $attributes); ?> - -
-
-
-
-

Emergency Purchase Order

-
-
+
+
+
-
-
- - 'Select Request Type'); +
+
+

Emergency Purchase Order

+
+
+
- if (!empty($RequestType)) { + 'form-label-left CreatealterPO ', 'name' => 'CreatealterPO', 'id' => 'CreatealterPO'); - foreach ($RequestType as $RID) : - if ($RID->ConfigValue == "SERVICE" || $RID->ConfigValue == "REVENUE") { - $options[$RID->ConfigValue] = $RID->ConfigValue; - } - endforeach; - } - - echo form_dropdown('RequestType', $options, set_value('ConfigValue'), 'id="purpose"', 'class = "form-control select2"', 'required="true"'); - - ?> - -
-
- -
+ echo form_open(base_url() . '/purchaseorder/addalterPO/', $attributes); ?> +
+
+
+
+
+
+ 'POType', 'value' => set_value('POType', $ReqType), 'id' => 'POType', 'class' => 'form-control', 'readonly' => 'true'); - echo form_input($data); - ?> -
-
-
- -
- 'Select Supplier'); - //print_r( $options); + $options = array("-1" => 'Select Request Type'); - if (!empty($Suplist)) { - foreach ($Suplist as $SID) : - $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName; + if (!empty($RequestType)) { + + foreach ($RequestType as $RID) : + if ($RID->ConfigValue == "SERVICE" || $RID->ConfigValue == "REVENUE") { + $options[$RID->ConfigValue] = $RID->ConfigValue; + } endforeach; } - echo form_dropdown('drpSupplier', $options, set_value('drpSupplier'), 'id="drpSupplier"', 'required="true"', 'class="form-control select2"'); + echo form_dropdown('RequestType', $options, set_value('ConfigValue'), 'id="purpose"', 'class = "form-control select2"', 'required="true"'); ?>
-
-
- -
- 'SupAddress', 'value' => set_value('SupAddress'), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); - echo Form_textarea($data); - ?> +
+ +
+ + 'POType', 'value' => set_value('POType', $ReqType), 'id' => 'POType', 'class' => 'form-control', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+ +
+ 'Select Supplier'); + //print_r( $options); + + if (!empty($Suplist)) { + foreach ($Suplist as $SID) : + $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName; + endforeach; + } + + echo form_dropdown('drpSupplier', $options, set_value('drpSupplier'), 'id="drpSupplier"', 'required="true"', 'class="form-control select2"'); + + ?> +
+
+
+ +
+ 'SupAddress', 'value' => set_value('SupAddress'), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); + echo Form_textarea($data); + ?> +
-
-
-
-
-
-
+ + - - + + \ No newline at end of file diff --git a/app/Views/createPOfromRequistion.php b/app/Views/createPOfromRequistion.php index b467baf5..0bfda90c 100644 --- a/app/Views/createPOfromRequistion.php +++ b/app/Views/createPOfromRequistion.php @@ -1,14 +1,16 @@ + .Date-filter-form { + display: flex; + align-items: center; + gap: 10px; + /* Adjust the gap as needed */ + } + + .Date-filter-form input, + .Date-filter-form button { + padding: 5px; + font-size: 14px; + } + + .Date-filter-form button { + background-color: #007bff; + color: white; + border: none; + cursor: pointer; + } + + .Date-filter-form button:hover { + background-color: #0056b3; + } + + .icon-button { + background: none; + border: none; + cursor: pointer; + color: #007bff; + font-size: 18px; + } + + .icon-button:hover { + color: #0056b3; + } +
-
+
'form-label-left CreatePO ', 'name' => 'CreatePO', 'id' => 'CreatePO', 'method' => 'post', 'role' => 'form'); echo form_open(base_url() . 'purchaseOrder', $attributes); ?> - -
- + + +
+ + + + + +
-
-
-

Create Purchase Order from Requistion

-
-
-
+
+
+

Create Purchase Order from Requistion

+
+
+
- getFlashdata('error'); - if ($error) { - ?> -
- - getFlashdata('error'); ?> -
+ getFlashdata('error'); + if ($error) { + ?> +
+ + getFlashdata('error'); ?> +
getFlashdata('success'); if ($success) { ?> -
- +
+ getFlashdata('success'); ?> -
+
listErrors('
', '
'); - ?> + ?>
getFlashdata('listErrors'); if ($listErrors) { ?> -
-
-
- +
+
+
+ getFlashdata('listErrors'); ?> +
-

-

- - - - Create Purchase Order - - -
+
+ + + + Create Purchase Order + + +

- -
- - - - - - +
+ + + + + + + + + + +
+
+
- - -
- -
- @@ -291,9 +343,9 @@ span.highlight { - - - + + + @@ -305,85 +357,179 @@ span.highlight { $index = 1; foreach ($ReqList as $record) { ?> - - - - - - - - - - - - - - + + + + + + + + + + + + + +
Requistion Number Requistion Type Requested ByTot. No. Of Line ItemsPo Created Line ItemsPartial PO Created Line ItemsTot Line ItemsPo Line ItemsPartial PO Line Items New Line Items Status Department
  - ReqDate); - $RequestedDate = $dt->format('d-m-Y'); - echo $RequestedDate; - ?> - ReqNo; ?> ReqType; ?>FirstName; ?>TotalNoofLineItems; ?>PolineItems; ?>PartilallyLineItems; ?>newLineItem; ?>StatusName; ?>DepartmentName; ?>Designation; ?>
  + ReqDate); + $RequestedDate = $dt->format('d-m-Y'); + echo $RequestedDate; + ?> + ReqNo; ?> ReqType; ?>FirstName; ?>TotalNoofLineItems; ?>PolineItems; ?>PartilallyLineItems; ?>newLineItem; ?>StatusName; ?>DepartmentName; ?>Designation; ?>
- +
-
-
+
+
+ + + + + - - \ No newline at end of file diff --git a/app/Views/employeeListing.php b/app/Views/employeeListing.php index 5ce3392d..b57abb59 100644 --- a/app/Views/employeeListing.php +++ b/app/Views/employeeListing.php @@ -63,12 +63,18 @@ color: #0056b3; } -
-
-
-
- +
+ +
+ +
+ getFlashdata('error'); if ($error) { @@ -81,50 +87,39 @@ echo show_alert($type, $success); } ?> -
-
- listErrors('
', '
'); - ?>
-
-
-
-
-
-
-

Employee Details

-
-
-
-
-
-
- - - - - - - - - -
-
-
-
-
- +
+
+
+ + + + + + + + + +
+ +
+ +
- + @@ -155,18 +150,18 @@ } } ?> +
Created DateEmp IDEmp ID Employee Name Contact Number Designation
- - - -
+
+
+
-
-
- +
+
+ - + + - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - -

-
Employee Monthly Payment Listing
+

- +
-
+ +
+
+
+
+ + +
+
+ +
+ +
+
+
+
+

Employee Monthly Payment Listing

+
+
+
+
+
+
+
+ +
@@ -78,81 +95,72 @@ $('html').bind('keypress', function(e) {
- "Jan", "2" => "Feb","3" => "Mar","4" => "Apr","5" => "May","6" => "June","7"=> "July","8"=> "Aug","9" => "Sep","10"=> "Oct","11" => "Nov","12"=>"Dec"); - - $currentmontharray = array(array($month."-".$year => $monthsoptions[$month]."-".$year)); - // For find out Next and previous month and year from current year - $aftersix = array(); - for ($i = 0; $i <3;$i++){ - - $month++; - if($month > 12) - { - $month = 1; - $year = $year +1; - } - - $aftersix[]=array($month."-".$year => $monthsoptions[$month]."-".$year); - - } - - $year = date("Y"); - $month = date("m"); - - $beforesix = array(); - for ($i = 3; $i >0;$i--){ - - $month--; - if($month < 1 ) - { - $month = 12; - $year = $year - 1; - } - - $beforesix[]=array($month."-".$year => $monthsoptions[$month]."-".$year); - - } - - $beforesix = array_reverse($beforesix); - - - $options = array_merge($options,$beforesix); - //echo count($options); - - $options = array_merge($options,$currentmontharray); - $options = array_merge($options,$aftersix); - - $ot = array(); - foreach($options as $o) - { - - foreach($o as $key => $value) - { - - $ot[$key] = $value; - - } - - } - ?> + //echo $current; + $month = date("m"); + if ($month < 10) { + $month = substr($month, 1); + } + $currentselection = $month . "-" . $year; + $options = array(); + $monthsoptions = array("1" => "Jan", "2" => "Feb", "3" => "Mar", "4" => "Apr", "5" => "May", "6" => "June", "7" => "July", "8" => "Aug", "9" => "Sep", "10" => "Oct", "11" => "Nov", "12" => "Dec"); + + $currentmontharray = array(array($month . "-" . $year => $monthsoptions[$month] . "-" . $year)); + // For find out Next and previous month and year from current year + $aftersix = array(); + for ($i = 0; $i < 3; $i++) { + + $month++; + if ($month > 12) { + $month = 1; + $year = $year + 1; + } + + $aftersix[] = array($month . "-" . $year => $monthsoptions[$month] . "-" . $year); + } + + $year = date("Y"); + $month = date("m"); + + $beforesix = array(); + for ($i = 3; $i > 0; $i--) { + + $month--; + if ($month < 1) { + $month = 12; + $year = $year - 1; + } + + $beforesix[] = array($month . "-" . $year => $monthsoptions[$month] . "-" . $year); + } + + $beforesix = array_reverse($beforesix); + + + $options = array_merge($options, $beforesix); + //echo count($options); + + $options = array_merge($options, $currentmontharray); + $options = array_merge($options, $aftersix); + + $ot = array(); + foreach ($options as $o) { + + foreach ($o as $key => $value) { + + $ot[$key] = $value; + } + } + ?>
-
+
- +
@@ -202,98 +210,135 @@ $('html').bind('keypress', function(e) { $record) - { - $index++; - if(in_array($record->EmpID,$testarray)) { $index--; }else{ array_push($testarray,$record->EmpID); - ?> + if (!empty($sample)) { - - - - EmpID ; ?> - FirstName; ?> - - DateofJoining); - $newDateFormat = $date->format('d-m-Y'); - echo $newDateFormat; - ?> - - Designation; ?> - NoofDays; ?> - Key)){echo "contenteditable='false';"; } ?> - Key)){?> title="Payslip Calculated" - style="text-align:right;color:blue;" - style="text-align:right;" > - Days_worked)){echo $record->Days_worked+$record->sunday_count;}else{echo "0.00";}?> - - Key)){echo "contenteditable='false';"; } ?> - Key)){?> title="Payslip Calculated" - style="text-align:right;color:blue;" - style="text-align:right;" > - LOP_Days)){echo $record->LOP_Days;}else{echo "0.00";}?> - - Key)){echo "contenteditable='false';"; } ?> - Key)){?> title="Payslip Calculated" - style="text-align:right;color:blue;" - style="text-align:right;" > - Paid_leave)){echo number_format($record->Paid_leave,2,'.','');}else { echo number_format(0.00,2,'.','');} ?> - - Key)){echo "contenteditable='false';"; } ?> - Key)){?> title="Payslip Calculated" - style="text-align:right;color:blue;" - style="text-align:right;" > - OT_Hrs_Worked)){echo $record->OT_Hrs_Worked;}else { echo number_format(0.00,2,'.','');} ?> - - TotalSalary; ?> - - TotalSalary / $record->NoofDays; echo number_format($perDaySalary, 2); ?> - - - Days_worked+$record->sunday_count); echo number_format($workedSalary, 2); ?> - - - - - - - - - - - - - - - - + $index = 0; + $i = 0; + foreach ($sample as $i => $record) { + $index++; + if (in_array($record->EmpID, $testarray)) { + $index--; + } else { + array_push($testarray, $record->EmpID); + ?> + + + + + EmpID; ?> + FirstName; ?> + + DateofJoining); + $newDateFormat = $date->format('d-m-Y'); + echo $newDateFormat; + ?> + + Designation; ?> + NoofDays; ?> + Key)) { + echo "contenteditable='false';"; + } ?> + Key)) { ?> title="Payslip Calculated" + style="text-align:right;color:blue;" + style="text-align:right;" > + Days_worked)) { + echo $record->Days_worked + $record->sunday_count; + } else { + echo "0.00"; + } ?> + + Key)) { + echo "contenteditable='false';"; + } ?> + Key)) { ?> title="Payslip Calculated" + style="text-align:right;color:blue;" + style="text-align:right;" > + LOP_Days)) { + echo $record->LOP_Days; + } else { + echo "0.00"; + } ?> + + Key)) { + echo "contenteditable='false';"; + } ?> + Key)) { ?> title="Payslip Calculated" + style="text-align:right;color:blue;" + style="text-align:right;" > + Paid_leave)) { + echo number_format($record->Paid_leave, 2, '.', ''); + } else { + echo number_format(0.00, 2, '.', ''); + } ?> + + Key)) { + echo "contenteditable='false';"; + } ?> + Key)) { ?> title="Payslip Calculated" + style="text-align:right;color:blue;" + style="text-align:right;" > + OT_Hrs_Worked)) { + echo $record->OT_Hrs_Worked; + } else { + echo number_format(0.00, 2, '.', ''); + } ?> + + + TotalSalary; ?> + + TotalSalary / $record->NoofDays; + echo number_format($perDaySalary, 2); ?> + + + Days_worked + $record->sunday_count); + echo number_format($workedSalary, 2); ?> + + + + + + + + + + + + + + + + - 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='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, '.', ''); + } ?> + @@ -304,41 +349,59 @@ $('html').bind('keypress', function(e) { - - + + - Key)){echo "contenteditable='true';"; } ?> - Key)){?> title="Payslip Calculated" - style="text-align:right;color:blue;" - style="text-align:right;" > - - Other_Deductions)){echo $record->Other_Deductions;$totalotherDet [] = $record->Other_Deductions;}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;" > - - Key)){echo "contenteditable='true';"; } ?> - Key)){?> title="Payslip Calculated" - style="text-align:right;color:blue;" - style="text-align:right;" > - Festival_Bonus)){echo $record->Festival_Bonus;$totalfestival [] = $record->Festival_Bonus;}else{ echo number_format(0.00,2,'.','');;} ?> - + Other_Deductions)) { + echo $record->Other_Deductions; + $totalotherDet[] = $record->Other_Deductions; + } 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;" > + Festival_Bonus)) { + echo $record->Festival_Bonus; + $totalfestival[] = $record->Festival_Bonus; + } else { + echo number_format(0.00, 2, '.', '');; + } ?> + - Key)){echo "contenteditable='false';"; } ?> - Key)){?> title="Payslip Calculated" - style="text-align:right;color:blue;" > - Estimate)){ - echo $record->Estimate; $estTotal [] = $record->Estimate; - }else { - echo $empSalary[$i]; $estTotal [] = $empSalary[$i]; - } - ?> - + + + Key)) { + echo "contenteditable='false';"; + } ?> + Key)) { ?> title="Payslip Calculated" + style="text-align:right;color:blue;" > + Estimate)) { + echo $record->Estimate; + $estTotal[] = $record->Estimate; + } else { + echo $empSalary[$i]; + $estTotal[] = $empSalary[$i]; + } + ?> + @@ -347,52 +410,51 @@ $('html').bind('keypress', function(e) { - - - - - - - - - - - + + + + + + + + + + + - - + + - + - + + + } + } + } + + + ?> @@ -403,14 +465,14 @@ $('html').bind('keypress', function(e) { Total - + - + - - + + @@ -418,7 +480,7 @@ $('html').bind('keypress', function(e) {

 

-
+
@@ -428,479 +490,491 @@ $('html').bind('keypress', function(e) {
-->
-
-
- -
+
+
+
+
+
+
+
+
+ + + \ No newline at end of file