From 7984c18133eb7609542856144b8de4f2eff2b0af Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Sat, 19 Apr 2025 05:47:28 +0000 Subject: [PATCH 1/3] tracker issues --- app/Controllers/Monthlypay.php | 2 +- app/Views/EditservicePurchaseorder.php | 34 +++++++-------- app/Views/POlist.php | 6 +-- app/Views/accountsDashboard.php | 14 +++--- app/Views/assetListing.php | 3 +- app/Views/attendance.php | 2 +- app/Views/costListing.php | 6 +-- app/Views/departmentListing.php | 4 +- app/Views/driverAttendance.php | 50 ++++++++++----------- app/Views/editCapitalAmendPO.php | 10 ++--- app/Views/editCapitalPo.php | 26 +++++------ app/Views/editEmployeenew.php | 2 +- app/Views/editImportAmendPO.php | 10 ++--- app/Views/editOld.php | 6 +-- app/Views/editOldasset.php | 2 +- app/Views/editRawmaterial.php | 2 +- app/Views/editRevenueAmendPO.php | 10 ++--- app/Views/editRevenuepurchaseorder.php | 34 +++++++-------- app/Views/editServiceAmendPO.php | 10 ++--- app/Views/editSupplier.php | 2 +- app/Views/editconfig.php | 7 +-- app/Views/editimportpo.php | 24 +++++----- app/Views/editrequisitionform.php | 20 ++++----- app/Views/employeeLeaveApplicationForm.php | 24 +++++----- app/Views/employeeListing.php | 2 +- app/Views/includes/new_footer.php | 33 ++++++++++++++ app/Views/includes/new_header.php | 51 +++++++++++++++------- app/Views/monthlypayinputs.php | 2 +- app/Views/publicholidays.php | 6 +-- app/Views/rawmaterialListing.php | 4 +- app/Views/requisitionlisting.php | 6 +-- app/Views/supplierListing.php | 1 + app/Views/userListing.php | 4 +- app/Views/viewinwardgateregister.php | 28 ++++++------ 34 files changed, 256 insertions(+), 191 deletions(-) diff --git a/app/Controllers/Monthlypay.php b/app/Controllers/Monthlypay.php index e29aba2e..469b535f 100755 --- a/app/Controllers/Monthlypay.php +++ b/app/Controllers/Monthlypay.php @@ -970,7 +970,7 @@ class Monthlypay extends BaseController $this->global['pageTitle'] = 'Employee Leave Application Form'; $data['leave_info'] = $this->monthlypay_model->getheringleaveApplicationForm(); $data['employee_info'] = $this->monthlypay_model->getheringemployeeinformation(); - $data['status_info'] = ["Draft","Approved"]; + $data['status_info'] = ["Draft","Approved","Cancel"]; $this->loadviews('employeeLeaveApplicationForm', $this->global, $data, NULL); } diff --git a/app/Views/EditservicePurchaseorder.php b/app/Views/EditservicePurchaseorder.php index df60b841..7471ca43 100755 --- a/app/Views/EditservicePurchaseorder.php +++ b/app/Views/EditservicePurchaseorder.php @@ -1256,7 +1256,7 @@ if (!empty($getlogpodtl)) { > IS THIS OPEN ORDER FORMAT - + @@ -1395,7 +1395,7 @@ if (!empty($getlogpodtl)) { if ($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == REQITEM_Emergency_PO_CREATED || $PONOStatus == PO_APPROVED || $PONOStatus == SPECIAL_PO) { ?> - +     @@ -1659,7 +1659,7 @@ if (!empty($getlogpodtl)) {      - + @@ -1701,21 +1701,21 @@ if (!empty($getlogpodtl)) {
-   Reset -   Save as Draft -   Submit -   Approve +   Reset +   Save as Draft +   Submit +   Approve -   Reset -   Submit -   Approve +   Reset +   Submit +   Approve -   OK -   Submit +   OK +   Submit -   Reset -   Submit -   Approve +   Reset +   Submit +   Approve   OK @@ -1968,7 +1968,7 @@ if (!empty($getlogpodtl)) {
@@ -2262,7 +2262,7 @@ if (!empty($getlogpodtl)) { diff --git a/app/Views/POlist.php b/app/Views/POlist.php index 7f5f87b3..c6be2a09 100755 --- a/app/Views/POlist.php +++ b/app/Views/POlist.php @@ -193,13 +193,13 @@ ?> - get('roleText') == 'System Administrator'){ ?> -     - + diff --git a/app/Views/accountsDashboard.php b/app/Views/accountsDashboard.php index ea3bdd4a..afde5728 100644 --- a/app/Views/accountsDashboard.php +++ b/app/Views/accountsDashboard.php @@ -436,7 +436,7 @@ Tax (%) Taxable Amt Total Amt - Remarks + Remarks * @@ -812,8 +812,8 @@ '' + ((isOpenOrder) ? 0 : parseInt(item.Quantity - item.QuantityAsPerInvoice)) + '' + '' + Number(item.Rate).toFixed(2) + '' + '' + tax_percentage + '' + - '' + amount + '' + - '' + grand_total_amount + '' + + '' + Number(amount).toFixed(2) + '' + + '' + Number(grand_total_amount).toFixed(2) + ''; ' ' + ' ' + '' + @@ -852,8 +852,8 @@ '' + ((isOpenOrder) ? 0 : parseInt(item.Quantity - item.QuantityAsPerInvoice)) + '' + '' + Number(item.Rate).toFixed(2) + '' + '' + tax_percentage + '' + - '' + amount + '' + - '' + grand_total_amount + '' + + '' + Number(amount).toFixed(2) + '' + + '' + Number(grand_total_amount).toFixed(2) + ''; ' ' + ' ' + '' + @@ -887,8 +887,8 @@ '' + item.QuantityAsPerInvoice + '' + '' + Number(item.Rate).toFixed(2) + '' + '' + tax_percentage + '' + - '' + amount + '' + - '' + grand_total_amount + '' + + '' + Number(amount).toFixed(2) + '' + + '' + Number(grand_total_amount).toFixed(2) + ''; '' + item.Remarks + '' + ' ' + '' + diff --git a/app/Views/assetListing.php b/app/Views/assetListing.php index 58770a69..fe17cfe4 100755 --- a/app/Views/assetListing.php +++ b/app/Views/assetListing.php @@ -54,7 +54,7 @@ - Add New + Add New Asset @@ -171,6 +171,7 @@ diff --git a/app/Views/attendance.php b/app/Views/attendance.php index f476585e..d26ae34d 100755 --- a/app/Views/attendance.php +++ b/app/Views/attendance.php @@ -268,7 +268,7 @@ $currentday = date('d'); - + diff --git a/app/Views/costListing.php b/app/Views/costListing.php index 66baab6f..ad3e3e6d 100755 --- a/app/Views/costListing.php +++ b/app/Views/costListing.php @@ -53,7 +53,7 @@ - Add Cost + Add Cost Details @@ -137,7 +137,7 @@    -     @@ -187,7 +187,7 @@ diff --git a/app/Views/departmentListing.php b/app/Views/departmentListing.php index 2b36b420..f3f63c6f 100755 --- a/app/Views/departmentListing.php +++ b/app/Views/departmentListing.php @@ -60,7 +60,7 @@ - Add New department + Add New department @@ -159,6 +159,7 @@ diff --git a/app/Views/driverAttendance.php b/app/Views/driverAttendance.php index 7837df3c..88a55301 100755 --- a/app/Views/driverAttendance.php +++ b/app/Views/driverAttendance.php @@ -76,7 +76,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); - @@ -130,7 +130,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');     - +     @@ -165,7 +165,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); Diesel - > + > @@ -179,7 +179,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); Shed Amount - > + > @@ -234,32 +234,19 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); + modify('first day of this month')->format('Y-m-d');?> modify('last day of this month')->format('Y-m-d');?> modify('today')->format('Y-m-d');?>
-
- - -
-
- - - -
-
- - - -
@@ -271,11 +258,20 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); -->
+ + +
+
+ + + +
+
-
+
@@ -323,7 +319,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
@@ -385,16 +381,17 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); $("#attendanceModal").on("shown.bs.modal", function (e) { - + var dname = ""; var id = $(e.relatedTarget).data('id'); - let fields = ['invoice_number', 'vehicle_number', 'load_type', 'salary_amount', 'food_amount','customer','quantity','total_amount']; + let fields = ['invoice_number', 'vehicle_number', 'load_type', 'salary_amount', 'food_amount','customer','quantity','total_amount','category_type']; fields.forEach(function(field) { $("#" + field).val(""); + }); if (id == 0) { - $('#attendanceTitle').html("Add Driver Trip"); + $('#attendanceTitle').html("Add "+dname+" Trip Details"); $("#driver_attendance_id").val(0); } else { $("#driver_attendance_id").val(id); @@ -408,6 +405,9 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); if(field == 'driver_id'){ $("#driver_id").val(arr && arr['driver_id']); } + if(field == 'category_type'){ + $("#category_type").val(arr && arr['type']); + } var salary = arr['salary_amount'] ? parseFloat(arr['salary_amount']) : 0; var food = arr['food_amount'] ? parseFloat(arr['food_amount']) : 0; @@ -421,7 +421,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); $('#total_amount').val(ttl.toFixed(2)); }); - $('#attendanceTitle').html("Edit Driver Trip"); + $('#attendanceTitle').html("Edit "+dname+" Trip Details"); } }); $('#tempClick').click(function () { diff --git a/app/Views/editCapitalAmendPO.php b/app/Views/editCapitalAmendPO.php index 92e28978..a353d3cf 100755 --- a/app/Views/editCapitalAmendPO.php +++ b/app/Views/editCapitalAmendPO.php @@ -1759,9 +1759,9 @@ if (!empty($POItem) && $CapitalRange == '1') {
@@ -2446,8 +2446,8 @@ if (!empty($POItem) && $CapitalRange == '1') { diff --git a/app/Views/editCapitalPo.php b/app/Views/editCapitalPo.php index df550de9..cb24438d 100755 --- a/app/Views/editCapitalPo.php +++ b/app/Views/editCapitalPo.php @@ -926,7 +926,7 @@ $(document).ready(function () { @@ -1271,7 +1271,7 @@ $(document).ready(function () { data-userid="" data-toggle="modal" href="#EDITCAPITAL">    + data-userid="" id="Del"> @@ -1610,7 +1610,7 @@ $(document).ready(function () {      - + @@ -1660,17 +1660,17 @@ $(document).ready(function () { @@ -3098,7 +3098,7 @@ $(document).ready(function () { diff --git a/app/Views/editEmployeenew.php b/app/Views/editEmployeenew.php index bac2778f..843f654d 100755 --- a/app/Views/editEmployeenew.php +++ b/app/Views/editEmployeenew.php @@ -1307,7 +1307,7 @@ if (!empty($EmpDetails)) { diff --git a/app/Views/editImportAmendPO.php b/app/Views/editImportAmendPO.php index 4e38583b..8259b06e 100755 --- a/app/Views/editImportAmendPO.php +++ b/app/Views/editImportAmendPO.php @@ -1258,7 +1258,7 @@ if (!empty($RequistionDetails)) { @@ -1610,7 +1610,7 @@ if (!empty($RequistionDetails)) { Previous Upload -      - +
@@ -1665,9 +1665,9 @@ if (!empty($RequistionDetails)) { diff --git a/app/Views/editOld.php b/app/Views/editOld.php index d005134a..a9252156 100755 --- a/app/Views/editOld.php +++ b/app/Views/editOld.php @@ -92,8 +92,8 @@ if (!empty($EmpList)) {
- - + +
@@ -133,7 +133,7 @@ if (!empty($EmpList)) { -
+
diff --git a/app/Views/editOldasset.php b/app/Views/editOldasset.php index 35c903af..76d7c852 100755 --- a/app/Views/editOldasset.php +++ b/app/Views/editOldasset.php @@ -272,7 +272,7 @@ if (!empty($assetList)) {
Cancel - +
diff --git a/app/Views/editRawmaterial.php b/app/Views/editRawmaterial.php index e142d4b3..48b5e391 100755 --- a/app/Views/editRawmaterial.php +++ b/app/Views/editRawmaterial.php @@ -364,7 +364,7 @@ if ($total <= $reorder) { - +
diff --git a/app/Views/editRevenueAmendPO.php b/app/Views/editRevenueAmendPO.php index 91c73689..d230eafd 100755 --- a/app/Views/editRevenueAmendPO.php +++ b/app/Views/editRevenueAmendPO.php @@ -1681,7 +1681,7 @@ if (!empty($INRSYMBOL)) { Previous Upload -      - +
@@ -1735,9 +1735,9 @@ if (!empty($INRSYMBOL)) {
@@ -2165,7 +2165,7 @@ if (!empty($INRSYMBOL)) {
diff --git a/app/Views/editRevenuepurchaseorder.php b/app/Views/editRevenuepurchaseorder.php index 8888791f..aedc3008 100755 --- a/app/Views/editRevenuepurchaseorder.php +++ b/app/Views/editRevenuepurchaseorder.php @@ -2359,7 +2359,7 @@ if (!empty($getlogpodtl)) { + class="btn btn-success auditor-restricted-btn" id="abcd">Select Line Item @@ -2575,7 +2575,7 @@ if (!empty($getlogpodtl)) { data-userid="" data-toggle="modal" href="#EDITREVENUE"> - @@ -2947,7 +2947,7 @@ if (!empty($getlogpodtl)) { Previous Upload -      - + @@ -3002,21 +3002,21 @@ if (!empty($getlogpodtl)) {
-   Reset -   Save as Draft -   Submit -   Approve +   Reset +   Save as Draft +   Submit +   Approve -   Reset -   Submit -   Approve +   Reset +   Submit +   Approve   OK -   Submit +   Submit -   Reset -   Submit -   Approve +   Reset +   Submit +   Approve   OK @@ -3381,7 +3381,7 @@ if (!empty($getlogpodtl)) { @@ -3749,7 +3749,7 @@ if (!empty($getlogpodtl)) { @@ -4579,7 +4579,7 @@ if (!empty($getlogpodtl)) { - + diff --git a/app/Views/editServiceAmendPO.php b/app/Views/editServiceAmendPO.php index 2c7c4e5e..b3f41f9a 100755 --- a/app/Views/editServiceAmendPO.php +++ b/app/Views/editServiceAmendPO.php @@ -1404,7 +1404,7 @@ foreach ($PaymentTerms as $TER) { Previous Upload -      - +
@@ -1451,9 +1451,9 @@ foreach ($PaymentTerms as $TER) { @@ -1783,7 +1783,7 @@ foreach ($PaymentTerms as $TER) { diff --git a/app/Views/editSupplier.php b/app/Views/editSupplier.php index 1b8366f8..5e90c047 100755 --- a/app/Views/editSupplier.php +++ b/app/Views/editSupplier.php @@ -498,7 +498,7 @@ if (!empty($supplier)) { - + diff --git a/app/Views/editconfig.php b/app/Views/editconfig.php index 27bf6f70..1013c078 100755 --- a/app/Views/editconfig.php +++ b/app/Views/editconfig.php @@ -99,7 +99,7 @@ if (!empty($master)) { @@ -211,6 +211,7 @@ if (!empty($master)) {       configlisting?page=" class="btn btn-secondary" > Cancel - + @@ -361,7 +362,7 @@ if (!empty($master)) { data-dismiss="modal">Cancel diff --git a/app/Views/editimportpo.php b/app/Views/editimportpo.php index 4f881dbe..a2e23b74 100755 --- a/app/Views/editimportpo.php +++ b/app/Views/editimportpo.php @@ -836,7 +836,7 @@ if (!empty($getlogpodtl)) { @@ -1037,7 +1037,7 @@ if (!empty($getlogpodtl)) { if ($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == REQITEM_Emergency_PO_CREATED || $PONOStatus == PO_APPROVED) { ?>     - + @@ -1336,7 +1336,7 @@ if (!empty($getlogpodtl)) { Previous Upload -      - +
@@ -1389,17 +1389,17 @@ if (!empty($getlogpodtl)) { diff --git a/app/Views/editrequisitionform.php b/app/Views/editrequisitionform.php index 627eb3f9..64dcc3d3 100755 --- a/app/Views/editrequisitionform.php +++ b/app/Views/editrequisitionform.php @@ -208,7 +208,7 @@ td { @@ -251,7 +251,7 @@ td { StatusName; ?> -     +     CategoryName; ?> @@ -296,14 +296,14 @@ td {
-    -    -    -    +    +    +    +    -    -    -    +    +    +   
@@ -487,7 +487,7 @@ td { + class="btn btn-info waves-effect waves-light auditor-restricted-btn EditClick">Edit diff --git a/app/Views/employeeLeaveApplicationForm.php b/app/Views/employeeLeaveApplicationForm.php index 65974ac5..b7bcc8d6 100755 --- a/app/Views/employeeLeaveApplicationForm.php +++ b/app/Views/employeeLeaveApplicationForm.php @@ -82,7 +82,7 @@ From Date To Date Number Of Days - Status + Status Action @@ -105,7 +105,7 @@ - + -
+
@@ -241,6 +242,7 @@
+
@@ -256,8 +258,10 @@
@@ -349,10 +353,10 @@ alert('Please Enter the Reason'); return; } - if ($('#status_val').val() === '') { - alert('Please Select Status'); - return; - } + // if ($('#status_val').val() === '') { + // alert('Please Select Status'); + // return; + // } // validateDateRange(function(isValid) { // if (!isValid) { // alert("The selected date range overlaps with an existing approved leave."); @@ -366,7 +370,7 @@ end_date:$('#end_date').val(), no_of_days:$('#no_of_days').val(), reason:$('#reason').val(), - status:$('#status_val').val(), + status:$('#status_val').val() ? $('#status_val').val() : 'Draft', }; $('#loader').show(); diff --git a/app/Views/employeeListing.php b/app/Views/employeeListing.php index 9dcc2b9c..bdf32fc3 100755 --- a/app/Views/employeeListing.php +++ b/app/Views/employeeListing.php @@ -101,7 +101,7 @@
Export Excel - Add New Employee + Add New Employee
diff --git a/app/Views/includes/new_footer.php b/app/Views/includes/new_footer.php index 0d2c6d92..25454a4a 100755 --- a/app/Views/includes/new_footer.php +++ b/app/Views/includes/new_footer.php @@ -155,6 +155,39 @@ + + - From 505f66696b93e2c3a9753c86574c0b9ba1998654 Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Sat, 19 Apr 2025 13:32:35 +0000 Subject: [PATCH 3/3] tracker issues --- app/Config/Routes.php | 1 + app/Controllers/User.php | 40 +++++++----- app/Models/User_model.php | 16 +++++ app/Views/addUser.php | 93 +++++++++++++++------------- app/Views/editOld.php | 28 +++++++++ app/Views/monthlypayinputs.php | 17 ++++- app/Views/userListing.php | 7 +-- app/Views/viewinwardgateregister.php | 7 ++- 8 files changed, 144 insertions(+), 65 deletions(-) diff --git a/app/Config/Routes.php b/app/Config/Routes.php index c92e8115..2ec88ef2 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -41,6 +41,7 @@ $routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'editUser', 'User::editUser'); $routes->post('user/Deleteuserdepartment', 'User::Deleteuserdepartment'); $routes->get('user/deleteUser', 'User::deleteUser'); $routes->get('user/reActivateUser', 'User::reActivateUser'); +$routes->get('isEmailExists', 'User::isEmailExists'); // Supplier Routes $routes->match(["GET","POST"],'supplierlisting', 'Supplier::index'); // list supplier diff --git a/app/Controllers/User.php b/app/Controllers/User.php index 66466711..2f55a36d 100755 --- a/app/Controllers/User.php +++ b/app/Controllers/User.php @@ -1020,15 +1020,11 @@ class User extends BaseController // Validation passed $EmpID = $this->request->getPost('EmpList'); - $roleId = !empty($this->request->getPost('role')) ? $this->request->getPost('role') : '2' ; + $roleId = $this->request->getPost('role'); $password = (string)$this->request->getPost('password'); $Createddt = date('Y-m-d H:i:s'); $email = $this->request->getPost('MailID'); - $SelectedDepartment = (string)$this->request->getPost('txtSelectedDepartment'); - $comma_separated = explode(':', $SelectedDepartment); - if (count($comma_separated) == 1 && in_array('DEP27', $comma_separated)) { - $roleId = '6'; - } + $userInfo = [ 'email' => $email, 'EmpID' => $EmpID, @@ -1040,16 +1036,7 @@ class User extends BaseController $result = $this->user_model->addNewUser($userInfo); - if ($SelectedDepartment != '') { - foreach ($comma_separated as $DeptCode) { - $userdept = [ - 'EmpID' => $EmpID, - 'Departmentcode' => $DeptCode - ]; - $access = $this->user_model->addAccess($userdept); - } - } - + if ($result > 0) { // return redirect()->to('userListing')->with('success', 'New user created successfully!'); $this->session->setFlashdata('success', 'New user created successfully!'); @@ -1072,6 +1059,27 @@ class User extends BaseController }; } + function isEmailExists(){ + + + $MailID = $this->request->getPost('MailID'); + $empID = $this->request->getPost('EmpID'); + + + if (!$MailID) { + return $this->response->setJSON(['success' => false, 'message' => 'Mail ID not provided']); + } + + $isEmailExists = $this->user_model->isEmailExists($MailID,$empID); + + if ($isEmailExists) { + return $this->response->setJSON(['success' => true, 'message' => 'Email Already Exsiting']); + } else { + return $this->response->setJSON(['success' => false, 'message' => '']); + } + + } + function Deleteuserdepartment() { diff --git a/app/Models/User_model.php b/app/Models/User_model.php index ebafde7c..b0656cdf 100755 --- a/app/Models/User_model.php +++ b/app/Models/User_model.php @@ -340,4 +340,20 @@ GROUP BY financial_year "; return $query->getResult(); } + + + public function isEmailExists($email, $excludeEmpID = null) + { + $builder = $this->db->table('tbl_users'); + $builder->select('email'); + $builder->where('email', $email); + + if (!empty($excludeEmpID)) { + $builder->where('EmpID !=', $excludeEmpID); + } + + $query = $builder->get(); + return $query->getNumRows() > 0; + } + } \ No newline at end of file diff --git a/app/Views/addUser.php b/app/Views/addUser.php index d23d6733..e2c3a463 100755 --- a/app/Views/addUser.php +++ b/app/Views/addUser.php @@ -18,8 +18,8 @@
-
-
+ +
@@ -63,7 +63,7 @@
- +
-
+
@@ -181,58 +181,67 @@ $("#ContactNo").val(''); } }); + + $('#MailID').change(function() { + var mailID = $(this).val(); + var empID = ''// $('#EmpList').val(); + if (mailID) { + $('#loader').show(); + $.ajax({ + url: "isEmailExists", + type: 'POST', + data: { EmpID:empID,MailID:mailID }, + success: function(data) { + if (data.success) { + $('#loader').hide(); + alert(data.message); + $("#MailID").val(''); + } else { + $('#loader').hide(); + } + }, + error: function() { + $('#loader').hide(); + alert('An Error Occur in this email address'); + $("#MailID").val(''); + } + }); + }else{ + alert("Invalid email address"); + } + }); }); - $('#addPop').click(function() { - if ($('#distriList option:selected').val() != null) { - if ($('#distriList option:selected').val() == 0) {} else { - var tempSelect = $('#distriList option:selected').val(); - var tempText = $('#distriList option:selected').text(); - var o = new Option(tempText, tempSelect); - var hidval = tempSelect; - var Selectedval = '' - if (orgVal != '') { - Selectedval = orgVal + ':' + hidval; - } else { - Selectedval = hidval - } - $(o).html(tempText); - $("#selectDistriList").append(o); - $('#distriList option:selected').remove(); - $("#distriList").attr('selectedIndex', '-1').find("option:selected").removeAttr("selected"); - $("#selectDistriList").attr('selectedIndex', '-1').find("option:selected").removeAttr("selected"); - tempSelect = ''; - tempText = ''; - Selectedval = ''; - } - } else { - alert("Before add please select any position."); - } - }); > \ No newline at end of file diff --git a/app/Views/monthlypayinputs.php b/app/Views/monthlypayinputs.php index 4d2e8eef..73838c06 100755 --- a/app/Views/monthlypayinputs.php +++ b/app/Views/monthlypayinputs.php @@ -589,7 +589,6 @@ - @@ -819,6 +818,22 @@ $(document).ready(function () { let ws = XLSX.utils.table_to_sheet(table); // Convert modified table to sheet let wb = XLSX.utils.book_new(); // Create a new workbook + var range = XLSX.utils.decode_range(ws['!ref']); + + // Auto-size columns + let colWidths = []; + for (let R = range.s.r; R <= range.e.r; ++R) { + for (let C = range.s.c; C <= range.e.c; ++C) { + let cell_ref = XLSX.utils.encode_cell({ c: C, r: R }); + let cell = ws[cell_ref]; + if (cell) { + let val = cell.v ? cell.v.toString() : ''; + colWidths[C] = Math.max(colWidths[C] || 10, val.length); + } + } + } + + ws['!cols'] = colWidths.map(w => ({ wch: w + 2 })); XLSX.utils.book_append_sheet(wb, ws, 'Sheet1'); // Append sheet to workbook XLSX.writeFile(wb, filename || 'export.xlsx'); // Save the file } diff --git a/app/Views/userListing.php b/app/Views/userListing.php index 40309e9d..4dcfb81f 100755 --- a/app/Views/userListing.php +++ b/app/Views/userListing.php @@ -160,15 +160,14 @@ - +    - diff --git a/app/Views/viewinwardgateregister.php b/app/Views/viewinwardgateregister.php index edea47f4..2387b09e 100755 --- a/app/Views/viewinwardgateregister.php +++ b/app/Views/viewinwardgateregister.php @@ -1724,15 +1724,16 @@ // let fieldName = str.replace(/([a-z])([A-Z])/g, '$1 $2'); let sentence = " "; if (parseInt(record.is_add) === 1) { - // sentence += record.IGR_No + " was Created by "+record.FullName+ " on "+record.indian_date+" at "+record.indian_time; + sentence += record.IGR_No + " was Created by "+record.FullName+ " on "+record.indian_date+" at "+record.indian_time+"

"; if (record.field === "IGRStatus") { str1 = record.new_data; str2 = str1.replace(/\bIGR\b/i, '').trim(); + str2 = str2 == "CREATED" ? "GENERATED" : str2; sentence += record.IGR_No + " was ` " + str2 + " ` by " + record.FullName + " on " + record.indian_date + " at " + record.indian_time; } else { - sentence += record.IGR_No + " was ` CREATED ` by " + record.FullName + + sentence += record.IGR_No + " was ` GENERATED ` by " + record.FullName + " on " + record.indian_date + " at " + record.indian_time; } } else if (parseInt(record.is_edit) === 1) { @@ -1743,7 +1744,9 @@ let displayNewData = record.new_data === null || record.new_data === "" ? " " : record.new_data; if (record.field === "IGRStatus") { displayOldData = displayOldData.replace(/\bIGR\b/i, '').trim(); + displayOldData = displayOldData == "CREATED" ? "GENERATED" : displayOldData; displayNewData = displayNewData.replace(/\bIGR\b/i, '').trim(); + displayNewData = displayNewData == "CREATED" ? "GENERATED" : displayNewData; } if(displayNewData || displayOldData ){ sentence += ((record.IGRItem_No) ? record.MaterialName+" ( "+ record.MaterialCode + " ) - " : "")+fieldName+" ` "+ displayOldData + " ` was Updated into ` " + displayNewData + " ` by "+record.FullName+ " on "+record.indian_date+" at "+record.indian_time;