From 03995bfd36866893b987c76cd2995c9ae79353e8 Mon Sep 17 00:00:00 2001 From: Kerolles Fathy Date: Tue, 26 Mar 2024 08:33:54 +0200 Subject: [PATCH 1/6] fix: calculate lwp based on LA for leave types including holidays on salary slip (#1574) --- hrms/payroll/doctype/salary_slip/salary_slip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hrms/payroll/doctype/salary_slip/salary_slip.py b/hrms/payroll/doctype/salary_slip/salary_slip.py index 112d9122d7..2c119fef24 100644 --- a/hrms/payroll/doctype/salary_slip/salary_slip.py +++ b/hrms/payroll/doctype/salary_slip/salary_slip.py @@ -605,7 +605,7 @@ def calculate_lwp_or_ppl_based_on_leave_application( if not leave: continue - if not leave.include_holidays and getdate(d) in holidays: + if not leave.include_holiday and getdate(d) in holidays: continue equivalent_lwp_count = 0 From 5f917ce962b93c94070fb6fd746145396ee75fd3 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 26 Mar 2024 12:34:58 +0530 Subject: [PATCH 2/6] fix: bold in group by and options mapping (backport #1564) (#1580) * fix: bold in group by and options mapping * fix: bold in group by and options mapping (cherry picked from commit f1c3de24356a1a3f488802e5e4cff9bdf54da301) Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com> --- .../monthly_attendance_sheet.js | 4 ++++ .../monthly_attendance_sheet.py | 11 +++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/hrms/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js b/hrms/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js index f9d57b3cef..277eaf4e56 100644 --- a/hrms/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js +++ b/hrms/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js @@ -83,6 +83,10 @@ frappe.query_reports["Monthly Attendance Sheet"] = { const summarized_view = frappe.query_report.get_filter_value('summarized_view'); const group_by = frappe.query_report.get_filter_value('group_by'); + if (group_by && column.colIndex === 1) { + value = "" + value + ""; + } + if (!summarized_view) { if ((group_by && column.colIndex > 3) || (!group_by && column.colIndex > 2)) { if (value == 'P' || value == 'WFH') diff --git a/hrms/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py b/hrms/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py index cf6a8cc97b..3337c5c184 100644 --- a/hrms/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py +++ b/hrms/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py @@ -72,12 +72,19 @@ def get_columns(filters: Filters) -> List[Dict]: columns = [] if filters.group_by: + options_mapping = { + "Branch": "Branch", + "Grade": "Employee Grade", + "Department": "Department", + "Designation": "Designation", + } + options = options_mapping.get(filters.group_by) columns.append( { "label": _(filters.group_by), "fieldname": frappe.scrub(filters.group_by), "fieldtype": "Link", - "options": "Branch", + "options": options, "width": 120, } ) @@ -191,7 +198,7 @@ def get_data(filters: Filters, attendance_map: Dict) -> List[Dict]: records = get_rows(employee_details[value], filters, holiday_map, attendance_map) if records: - data.append({group_by_column: frappe.bold(value)}) + data.append({group_by_column: value}) data.extend(records) else: data = get_rows(employee_details, filters, holiday_map, attendance_map) From 3d6f333d435ca37dbe0aee4cde5f046108651190 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 26 Mar 2024 12:40:16 +0530 Subject: [PATCH 3/6] fix: add filter for employee in vehicle log (backport #1571) (#1582) * add filter for employee * chore: fix formatting --------- Co-authored-by: Rucha Mahabal (cherry picked from commit 04433332d8c2e3b6136cd07d46f5329b1715ee42) Co-authored-by: NandhiniDevi <95607404+Nandhinidevi123@users.noreply.github.com> --- hrms/hr/doctype/vehicle_log/vehicle_log.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hrms/hr/doctype/vehicle_log/vehicle_log.js b/hrms/hr/doctype/vehicle_log/vehicle_log.js index fa0dfad808..25e6f937df 100644 --- a/hrms/hr/doctype/vehicle_log/vehicle_log.js +++ b/hrms/hr/doctype/vehicle_log/vehicle_log.js @@ -2,6 +2,15 @@ // For license information, please see license.txt frappe.ui.form.on("Vehicle Log", { + setup: function (frm) { + frm.set_query("employee", function() { + return { + filters: { + status: "Active", + }, + }; + }); + }, refresh: function(frm) { if(frm.doc.docstatus == 1) { frm.add_custom_button(__('Expense Claim'), function() { From 920e8f415a311b805da1c2bcfa3da399f4773e55 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 26 Mar 2024 13:24:05 +0530 Subject: [PATCH 4/6] fix: incorrect IFSC codes in bank remittance report (backport #1538) (#1584) * fix: faulty ifsc codes in bank remittance report * refactor(payroll): bank remittance report * refactor: format bank_remittance.py (cherry picked from commit 2b3904a99262cba7711d7eec8475fcef1e07c529) Co-authored-by: Viny Selopal <52369157+vinyselopal@users.noreply.github.com> --- .../report/bank_remittance/bank_remittance.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/hrms/payroll/report/bank_remittance/bank_remittance.py b/hrms/payroll/report/bank_remittance/bank_remittance.py index 9d8efff821..dbcb6d6501 100644 --- a/hrms/payroll/report/bank_remittance/bank_remittance.py +++ b/hrms/payroll/report/bank_remittance/bank_remittance.py @@ -22,7 +22,12 @@ def execute(filters=None): "hidden": 1, "width": 200, }, - {"label": _("Payment Date"), "fieldtype": "Data", "fieldname": "payment_date", "width": 100}, + { + "label": _("Payment Date"), + "fieldtype": "Data", + "fieldname": "payment_date", + "width": 100, + }, { "label": _("Employee Name"), "fieldtype": "Link", @@ -146,12 +151,10 @@ def get_emp_bank_ifsc_code(salary_slips): emp_names = [d.employee for d in salary_slips] ifsc_codes = get_all("Employee", [("name", "IN", emp_names)], ["ifsc_code", "name"]) - ifsc_codes_map = {} - for code in ifsc_codes: - ifsc_codes_map[code.name] = code + ifsc_codes_map = {code.name: code.ifsc_code for code in ifsc_codes} for slip in salary_slips: - slip["ifsc_code"] = ifsc_codes_map[code.name]["ifsc_code"] + slip["ifsc_code"] = ifsc_codes_map[slip.employee] return salary_slips From 05d58447c7526b95a56774447466eb2a64d44e0c Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 27 Mar 2024 14:49:57 +0530 Subject: [PATCH 5/6] feat(PWA): allow adding attachments in Leave & Advances (backport #1591) (#1592) (cherry picked from commit 5e749bb85348b7aecd42e6fcd9704e3fc1468b2d) Co-authored-by: Rucha Mahabal --- frontend/src/views/employee_advance/Form.vue | 1 + frontend/src/views/leave/Form.vue | 1 + 2 files changed, 2 insertions(+) diff --git a/frontend/src/views/employee_advance/Form.vue b/frontend/src/views/employee_advance/Form.vue index 6e937ff7b7..978225d87c 100644 --- a/frontend/src/views/employee_advance/Form.vue +++ b/frontend/src/views/employee_advance/Form.vue @@ -8,6 +8,7 @@ :isSubmittable="true" :fields="formFields.data" :id="props.id" + :showAttachmentView="true" @validateForm="validateForm" /> diff --git a/frontend/src/views/leave/Form.vue b/frontend/src/views/leave/Form.vue index 61e6f3b620..e6f7a1d3dc 100644 --- a/frontend/src/views/leave/Form.vue +++ b/frontend/src/views/leave/Form.vue @@ -8,6 +8,7 @@ :isSubmittable="true" :fields="formFields.data" :id="props.id" + :showAttachmentView="true" @validateForm="validateForm" /> From affdd4ef41a8f51fb4ec65fd5c2e4d8ede345af8 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 27 Mar 2024 17:17:01 +0530 Subject: [PATCH 6/6] fix: blue color tap highlighting (backport #1589) (#1593) * fix: blue color tap highlighting * chore: apply style on body --------- Co-authored-by: Rucha Mahabal (cherry picked from commit b48cdccc45139eb69144987ebf57b8fa2985b379) Co-authored-by: Akash Tom <61287991+krantheman@users.noreply.github.com> --- frontend/src/main.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/main.css b/frontend/src/main.css index d4e7977f23..0fd4c4a269 100644 --- a/frontend/src/main.css +++ b/frontend/src/main.css @@ -11,6 +11,11 @@ input:disabled { color: var(--tw-text-color); } +/* For Webkit-based browsers */ +body { + -webkit-tap-highlight-color: transparent; +} + /* For Webkit-based browsers (Chrome, Safari and Opera) */ .hide-scrollbar::-webkit-scrollbar { display: none;