From 543b4e96a5f7166f28817291c11f9b1e757582d4 Mon Sep 17 00:00:00 2001 From: nareshkannasln Date: Fri, 7 Aug 2026 12:20:20 +0530 Subject: [PATCH 01/11] feat(expense_claim): add partially paid status --- hrms/hr/doctype/expense_claim/expense_claim.json | 6 +++++- hrms/hr/doctype/expense_claim/expense_claim.py | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/hrms/hr/doctype/expense_claim/expense_claim.json b/hrms/hr/doctype/expense_claim/expense_claim.json index 792e5e42a0d..7b50ca34b67 100644 --- a/hrms/hr/doctype/expense_claim/expense_claim.json +++ b/hrms/hr/doctype/expense_claim/expense_claim.json @@ -283,7 +283,7 @@ "in_list_view": 1, "label": "Status", "no_copy": 1, - "options": "Draft\nPaid\nUnpaid\nRejected\nSubmitted\nCancelled", + "options": "Draft\nPaid\nPartially Paid\nUnpaid\nRejected\nSubmitted\nCancelled", "print_hide": 1, "read_only": 1 }, @@ -624,6 +624,10 @@ "color": "Green", "title": "Paid" }, + { + "color": "Blue", + "title": "Partially Paid" + }, { "color": "Yellow", "title": "Unpaid" diff --git a/hrms/hr/doctype/expense_claim/expense_claim.py b/hrms/hr/doctype/expense_claim/expense_claim.py index 926888de432..ee82069c5ea 100644 --- a/hrms/hr/doctype/expense_claim/expense_claim.py +++ b/hrms/hr/doctype/expense_claim/expense_claim.py @@ -81,7 +81,7 @@ class ExpenseClaim(AccountsController, PWANotificationsMixin): posting_date: DF.Date project: DF.Link | None remark: DF.SmallText | None - status: DF.Literal["Draft", "Paid", "Unpaid", "Rejected", "Submitted", "Cancelled"] + status: DF.Literal["Draft", "Paid", "Partially Paid", "Unpaid", "Rejected", "Submitted", "Cancelled"] task: DF.Link | None taxes: DF.Table[ExpenseTaxesandCharges] total_advance_amount: DF.Currency @@ -141,7 +141,10 @@ def set_status(self, update=False): ): status = "Paid" elif flt(self.total_sanctioned_amount) > 0: - status = "Unpaid" + if flt(self.total_amount_reimbursed, precision) > 0: + status = "Partially Paid" + else: + status = "Unpaid" elif self.approval_status == "Rejected": status = "Rejected" From 5dea6f7e4017b501167a1d11a30df578e9b91d92 Mon Sep 17 00:00:00 2001 From: nareshkannasln Date: Fri, 7 Aug 2026 12:20:53 +0530 Subject: [PATCH 02/11] chore(expense_claim): backfill partially paid status for existing claims --- hrms/patches.txt | 1 + ...pdate_partially_paid_expense_claim_status.py | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 hrms/patches/v16_0/update_partially_paid_expense_claim_status.py diff --git a/hrms/patches.txt b/hrms/patches.txt index 03b7e093e9a..60ab99521db 100644 --- a/hrms/patches.txt +++ b/hrms/patches.txt @@ -49,3 +49,4 @@ hrms.patches.v16_0.add_default_hr_role_permissions #2026-05-28 hrms.patches.v16_0.set_reference_fields_in_expense_claim_advance hrms.patches.v16_0.update_partially_paid_employee_advance_status hrms.patches.v16_0.delete_upload_attendance_doctype #2026-07-16 +hrms.patches.v16_0.update_partially_paid_expense_claim_status diff --git a/hrms/patches/v16_0/update_partially_paid_expense_claim_status.py b/hrms/patches/v16_0/update_partially_paid_expense_claim_status.py new file mode 100644 index 00000000000..e764b335939 --- /dev/null +++ b/hrms/patches/v16_0/update_partially_paid_expense_claim_status.py @@ -0,0 +1,17 @@ +import frappe + + +def execute(): + frappe.reload_doc("hr", "doctype", "expense_claim") + + claim = frappe.qb.DocType("Expense Claim") + ( + frappe.qb.update(claim) + .set(claim.status, "Partially Paid") + .where( + (claim.docstatus == 1) + & (claim.total_amount_reimbursed > 0) + & (claim.total_amount_reimbursed < claim.grand_total) + & (claim.status == "Unpaid") + ) + ).run() From ec1da288f909e841b74bed8becacf75cd1197f09 Mon Sep 17 00:00:00 2001 From: nareshkannasln Date: Fri, 7 Aug 2026 12:21:00 +0530 Subject: [PATCH 03/11] test(expense_claim): assert status across multiple payment entries --- hrms/hr/doctype/expense_claim/test_expense_claim.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hrms/hr/doctype/expense_claim/test_expense_claim.py b/hrms/hr/doctype/expense_claim/test_expense_claim.py index ceac2e473ae..a4eb7a574e1 100644 --- a/hrms/hr/doctype/expense_claim/test_expense_claim.py +++ b/hrms/hr/doctype/expense_claim/test_expense_claim.py @@ -549,6 +549,7 @@ def test_multiple_payment_entries_against_expense(self): outstanding_amount = get_outstanding_amount_for_claim(expense_claim) self.assertEqual(outstanding_amount, 5000) self.assertEqual(expense_claim.total_amount_reimbursed, 500) + self.assertEqual(expense_claim.status, "Partially Paid") # Payment entry 2: paying 2000 pe2 = make_claim_payment_entry(expense_claim, 2000) @@ -559,6 +560,7 @@ def test_multiple_payment_entries_against_expense(self): outstanding_amount = get_outstanding_amount_for_claim(expense_claim) self.assertEqual(outstanding_amount, 3000) self.assertEqual(expense_claim.total_amount_reimbursed, 2500) + self.assertEqual(expense_claim.status, "Partially Paid") # Payment entry 3: paying 3000 pe3 = make_claim_payment_entry(expense_claim, 3000) @@ -569,6 +571,7 @@ def test_multiple_payment_entries_against_expense(self): outstanding_amount = get_outstanding_amount_for_claim(expense_claim) self.assertEqual(outstanding_amount, 0) self.assertEqual(expense_claim.total_amount_reimbursed, 5500) + self.assertEqual(expense_claim.status, "Paid") def test_expense_claim_against_delivery_trip(self): from erpnext.stock.doctype.delivery_trip.test_delivery_trip import ( From 7bca13413800987dd4faf18c4acb24cf3c087fee Mon Sep 17 00:00:00 2001 From: nareshkannasln Date: Fri, 28 Aug 2026 12:37:20 +0530 Subject: [PATCH 04/11] fix: handle zero payment days in payroll correction --- .../doctype/payroll_correction/payroll_correction.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hrms/payroll/doctype/payroll_correction/payroll_correction.py b/hrms/payroll/doctype/payroll_correction/payroll_correction.py index b7831cd631d..ad52dc6b3a6 100644 --- a/hrms/payroll/doctype/payroll_correction/payroll_correction.py +++ b/hrms/payroll/doctype/payroll_correction/payroll_correction.py @@ -203,6 +203,17 @@ def populate_breakup_table(self): else: total_working_days = salary_slip.get("total_working_days", 1) + if not total_working_days: + frappe.throw( + _( + "Cannot calculate payroll correction for salary component {0} because salary slip {1} has zero {2}." + ).format( + frappe.bold(component), + frappe.bold(salary_slip.name), + _("payment days") if component_data.get("accrual_component") else _("working days"), + ) + ) + per_day_amount = flt(component_data["default_amount"] / total_working_days) arrear_amount = flt(per_day_amount * self.days_to_reverse) From bb16b90242088b19a2fbf90dddf404b23ae16ee0 Mon Sep 17 00:00:00 2001 From: nareshkannasln Date: Fri, 28 Aug 2026 12:37:39 +0530 Subject: [PATCH 05/11] test: cover payroll correction with full lwp salary slip --- .../test_payroll_correction.py | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/hrms/payroll/doctype/payroll_correction/test_payroll_correction.py b/hrms/payroll/doctype/payroll_correction/test_payroll_correction.py index 925856346e9..0107477c338 100644 --- a/hrms/payroll/doctype/payroll_correction/test_payroll_correction.py +++ b/hrms/payroll/doctype/payroll_correction/test_payroll_correction.py @@ -1,8 +1,10 @@ # Copyright (c) 2025, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt import calendar +from unittest.mock import patch import frappe +from frappe import ValidationError from frappe.utils import add_days, flt from erpnext.setup.doctype.employee.test_employee import make_employee @@ -103,3 +105,38 @@ def test_payroll_correction(self): }, ) ) + + def test_payroll_correction_with_zero_payment_days(self): + payroll_correction_doc = frappe.get_doc( + { + "doctype": "Payroll Correction", + "employee": "EMP-0001", + "payroll_period": "Test Payroll Period", + "payroll_date": "2025-02-01", + "company": "_Test Company", + "days_to_reverse": 1, + "month_for_lwp_reversal": "January", + "salary_slip_reference": "SAL-SLIP-ZERO-PAYMENT-DAYS", + } + ) + + salary_slip = frappe._dict( + { + "name": "SAL-SLIP-ZERO-PAYMENT-DAYS", + "payment_days": 0, + "total_working_days": 30, + "earnings": [], + "deductions": [], + "accrued_benefits": [ + frappe._dict({"salary_component": "Mediclaim Allowance", "amount": 2000}) + ], + } + ) + salary_slip.precision = lambda fieldname: 2 + + with ( + patch("frappe.get_doc", return_value=salary_slip), + patch("frappe.db.get_list", return_value=["Mediclaim Allowance"]), + self.assertRaisesRegex(ValidationError, "zero payment days"), + ): + payroll_correction_doc.populate_breakup_table() From bda8d06105d4c1f7f9737fabcccb2d547b3792b2 Mon Sep 17 00:00:00 2001 From: nareshkannasln Date: Fri, 4 Sep 2026 17:01:51 +0530 Subject: [PATCH 06/11] fix: validate salary structure for timesheet salaries --- .../doctype/salary_slip/salary_slip.py | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/hrms/payroll/doctype/salary_slip/salary_slip.py b/hrms/payroll/doctype/salary_slip/salary_slip.py index c09e4de1382..d1534de8348 100644 --- a/hrms/payroll/doctype/salary_slip/salary_slip.py +++ b/hrms/payroll/doctype/salary_slip/salary_slip.py @@ -2662,10 +2662,30 @@ def get_lwp_or_ppl_for_date_range(employee, start_date, end_date): @frappe.whitelist() -def make_salary_slip_from_timesheet(source_name: str, target_doc: str | Document | None = None) -> Document: +def make_salary_slip_from_timesheet(source_name: str | Document | None = None) -> Document: frappe.has_permission("Timesheet", "read", source_name, throw=True) target = frappe.new_doc("Salary Slip") set_missing_values(source_name, target) + if not target.check_sal_struct(): + frappe.throw( + _("Cannot create Salary Slip: no active Salary Structure is assigned to employee {0}.").format( + frappe.bold(target.employee_name) + ) + ) + + timesheet_config = frappe.get_cached_value( + "Salary Structure", + target.salary_structure, + ["salary_slip_based_on_timesheet", "salary_component"], + as_dict=True, + ) + if not timesheet_config or not timesheet_config.salary_slip_based_on_timesheet: + frappe.throw( + _( + "The Assigned Salary Structure {0} for the employee {1} is not configured for Salary Slip based on Timesheet." + ).format(frappe.bold(target.salary_structure), frappe.bold(target.employee_name)) + ) + target.run_method("get_emp_and_working_day_details") return target From 038e0854360407f1190bd1c5e1a1727d7efb58c9 Mon Sep 17 00:00:00 2001 From: nareshkannasln Date: Fri, 4 Sep 2026 17:28:19 +0530 Subject: [PATCH 07/11] chore: update parameter --- 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 d1534de8348..9fc094ff383 100644 --- a/hrms/payroll/doctype/salary_slip/salary_slip.py +++ b/hrms/payroll/doctype/salary_slip/salary_slip.py @@ -2662,7 +2662,7 @@ def get_lwp_or_ppl_for_date_range(employee, start_date, end_date): @frappe.whitelist() -def make_salary_slip_from_timesheet(source_name: str | Document | None = None) -> Document: +def make_salary_slip_from_timesheet(source_name: str, target_doc: str | Document | None = None) -> Document: frappe.has_permission("Timesheet", "read", source_name, throw=True) target = frappe.new_doc("Salary Slip") set_missing_values(source_name, target) From 0f81d7c1f33537f29d773f969168270360f63fcf Mon Sep 17 00:00:00 2001 From: nareshkannasln Date: Fri, 4 Sep 2026 17:35:54 +0530 Subject: [PATCH 08/11] fix: validate based on salary component --- hrms/payroll/doctype/salary_slip/salary_slip.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hrms/payroll/doctype/salary_slip/salary_slip.py b/hrms/payroll/doctype/salary_slip/salary_slip.py index 9fc094ff383..975e6c30fb4 100644 --- a/hrms/payroll/doctype/salary_slip/salary_slip.py +++ b/hrms/payroll/doctype/salary_slip/salary_slip.py @@ -2685,7 +2685,12 @@ def make_salary_slip_from_timesheet(source_name: str, target_doc: str | Document "The Assigned Salary Structure {0} for the employee {1} is not configured for Salary Slip based on Timesheet." ).format(frappe.bold(target.salary_structure), frappe.bold(target.employee_name)) ) - + if not timesheet_config.salary_component: + frappe.throw( + _( + "The Assigned Salary Structure {0} for the employee {1} does not have a Salary Component configured for Salary Slip based on Timesheet." + ).format(frappe.bold(target.salary_structure), frappe.bold(target.employee_name)) + ) target.run_method("get_emp_and_working_day_details") return target From 89f03692f267f0477c45cbbdbb00315872965ed1 Mon Sep 17 00:00:00 2001 From: nareshkannasln Date: Mon, 7 Sep 2026 13:58:15 +0530 Subject: [PATCH 09/11] fix(salary-slip): show loan repayment in salary slip print formats --- .../print_format/salary_slip_classic/salary_slip_classic.json | 4 ++-- .../print_format/salary_slip_compact/salary_slip_compact.json | 4 ++-- .../salary_slip_detailed/salary_slip_detailed.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hrms/payroll/print_format/salary_slip_classic/salary_slip_classic.json b/hrms/payroll/print_format/salary_slip_classic/salary_slip_classic.json index 828dedf241d..6da7fbc5920 100644 --- a/hrms/payroll/print_format/salary_slip_classic/salary_slip_classic.json +++ b/hrms/payroll/print_format/salary_slip_classic/salary_slip_classic.json @@ -10,14 +10,14 @@ "docstatus": 0, "doctype": "Print Format", "font_size": 0, - "format_data": "{\"header\": {\"columns\": [{\"label\": \"\", \"fields\": []}]}, \"sections\": [{\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Header\", \"fieldname\": \"custom_html_header\", \"fieldtype\": \"HTML\", \"html\": \"
\\n\\t
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t

{{ _(\\\"Salary Slip\\\") }}

\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t{{ _(\\\"For the period\\\") }} {{ frappe.format(doc.start_date, {\\\"fieldtype\\\": \\\"Date\\\"}) }}\\n\\t\\t\\t\\t\\t{{ _(\\\"to\\\") }} {{ frappe.format(doc.end_date, {\\\"fieldtype\\\": \\\"Date\\\"}) }}\\n\\t\\t\\t\\t
\\n\\t\\t\\t
\\n\\t\\t\\t\\t{{ doc.name }}\\n\\t\\t\\t\\t{{ _(\\\"Issued\\\") }} {{ frappe.format(doc.posting_date, {\\\"fieldtype\\\": \\\"Date\\\"}) }}\\n\\t\\t\\t
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Employee Details\", \"fieldname\": \"custom_html_employee\", \"fieldtype\": \"HTML\", \"html\": \"
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t{% if doc.designation %}{% endif %}\\n\\t\\t\\t\\t\\t{% if doc.department %}{% endif %}\\n\\t\\t\\t\\t\\t{% if doc.branch %}{% endif %}\\n\\t\\t\\t\\t
{{ _(\\\"Employee Name\\\") }}{{ doc.employee_name }}
{{ _(\\\"Employee ID\\\") }}{{ doc.employee }}
{{ _(\\\"Designation\\\") }}{{ doc.designation }}
{{ _(\\\"Department\\\") }}{{ doc.department }}
{{ _(\\\"Branch\\\") }}{{ doc.branch }}
\\n\\t\\t\\t
\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t{% if doc.payroll_frequency %}{% endif %}\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t{% if doc.salary_structure %}{% endif %}\\n\\t\\t\\t\\t
{{ _(\\\"Payroll Frequency\\\") }}{{ _(doc.payroll_frequency) }}
{{ _(\\\"Working Days\\\") }}{{ doc.total_working_days | int }}
{{ _(\\\"Leave Without Pay\\\") }}{{ doc.leave_without_pay }}
{{ _(\\\"Payment Days\\\") }}{{ doc.payment_days }}
{{ _(\\\"Salary Structure\\\") }}{{ doc.salary_structure }}
\\n\\t\\t\\t
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Earnings & Deductions\", \"fieldname\": \"custom_html_ledgers\", \"fieldtype\": \"HTML\", \"html\": \"{%- macro money(value) -%}{{ frappe.utils.fmt_money(value or 0, currency=doc.currency) }}{%- endmacro -%}\\n{%- set earnings = doc.earnings | rejectattr(\\\"do_not_include_in_total\\\") | selectattr(\\\"amount\\\") | list -%}\\n{%- set deductions = doc.deductions | rejectattr(\\\"do_not_include_in_total\\\") | selectattr(\\\"amount\\\") | list -%}\\n{%- set row_count = [earnings | length, deductions | length] | max -%}\\n
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t{% for row in earnings %}\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t{% endfor %}\\n\\t\\t\\t\\t\\t\\t{% for i in range(row_count - (earnings | length)) %}\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t{% endfor %}\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t
{{ _(\\\"Earnings\\\") }}{{ _(\\\"Amount\\\") }}
{{ _(row.salary_component) }}{{ money(row.amount) }}
 
{{ _(\\\"Gross Pay\\\") }}{{ money(doc.gross_pay) }}
\\n\\t\\t\\t
\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t{% for row in deductions %}\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t{% endfor %}\\n\\t\\t\\t\\t\\t\\t{% for i in range(row_count - (deductions | length)) %}\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t{% endfor %}\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t
{{ _(\\\"Deductions\\\") }}{{ _(\\\"Amount\\\") }}
{{ _(row.salary_component) }}{{ money(row.amount) }}
 
{{ _(\\\"Total Deduction\\\") }}{{ money(doc.total_deduction) }}
\\n\\t\\t\\t
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Net Pay\", \"fieldname\": \"custom_html_net_pay\", \"fieldtype\": \"HTML\", \"html\": \"{%- macro money(value) -%}{{ frappe.utils.fmt_money(value or 0, currency=doc.currency) }}{%- endmacro -%}\\n{%- set disable_rounded_total = frappe.db.get_single_value(\\\"Payroll Settings\\\", \\\"disable_rounded_total\\\") -%}\\n{%- set net_total = doc.net_pay if disable_rounded_total else doc.rounded_total -%}\\n
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t
{{ _(\\\"Net Pay\\\") }}
\\n\\t\\t\\t\\t
{{ doc.total_in_words }}
\\n\\t\\t\\t
{{ money(net_total) }}
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Footer\", \"fieldname\": \"custom_html_footer\", \"fieldtype\": \"HTML\", \"html\": \"
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t{%- if doc.bank_name -%}\\n\\t\\t\\t\\t\\t{{ doc.bank_name }}\\n\\t\\t\\t\\t\\t{%- if doc.bank_account_no %} • {{ _(\\\"A/C\\\") }} {{ doc.bank_account_no }}{% endif -%}\\n\\t\\t\\t\\t\\t{%- if doc.mode_of_payment %} • {{ _(doc.mode_of_payment) }}{% endif -%}\\n\\t\\t\\t\\t{%- elif doc.mode_of_payment -%}\\n\\t\\t\\t\\t\\t{{ _(\\\"Paid by\\\") }} {{ _(doc.mode_of_payment) }}\\n\\t\\t\\t\\t{%- endif -%}\\n\\t\\t\\t{{ _(\\\"This is a computer generated document and does not require a signature.\\\") }}
\\n
\", \"custom\": 1}]}]}], \"footer\": {\"columns\": [{\"label\": \"\", \"fields\": []}], \"show_label\": \"hide\"}}", + "format_data": "{\"header\": {\"columns\": [{\"label\": \"\", \"fields\": []}]}, \"sections\": [{\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Header\", \"fieldname\": \"custom_html_header\", \"fieldtype\": \"HTML\", \"html\": \"
\\n\\t
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t

{{ _(\\\"Salary Slip\\\") }}

\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t{{ _(\\\"For the period\\\") }} {{ frappe.format(doc.start_date, {\\\"fieldtype\\\": \\\"Date\\\"}) }}\\n\\t\\t\\t\\t\\t{{ _(\\\"to\\\") }} {{ frappe.format(doc.end_date, {\\\"fieldtype\\\": \\\"Date\\\"}) }}\\n\\t\\t\\t\\t
\\n\\t\\t\\t
\\n\\t\\t\\t\\t{{ doc.name }}\\n\\t\\t\\t\\t{{ _(\\\"Issued\\\") }} {{ frappe.format(doc.posting_date, {\\\"fieldtype\\\": \\\"Date\\\"}) }}\\n\\t\\t\\t
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Employee Details\", \"fieldname\": \"custom_html_employee\", \"fieldtype\": \"HTML\", \"html\": \"
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t{% if doc.designation %}{% endif %}\\n\\t\\t\\t\\t\\t{% if doc.department %}{% endif %}\\n\\t\\t\\t\\t\\t{% if doc.branch %}{% endif %}\\n\\t\\t\\t\\t
{{ _(\\\"Employee Name\\\") }}{{ doc.employee_name }}
{{ _(\\\"Employee ID\\\") }}{{ doc.employee }}
{{ _(\\\"Designation\\\") }}{{ doc.designation }}
{{ _(\\\"Department\\\") }}{{ doc.department }}
{{ _(\\\"Branch\\\") }}{{ doc.branch }}
\\n\\t\\t\\t
\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t{% if doc.payroll_frequency %}{% endif %}\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t{% if doc.salary_structure %}{% endif %}\\n\\t\\t\\t\\t
{{ _(\\\"Payroll Frequency\\\") }}{{ _(doc.payroll_frequency) }}
{{ _(\\\"Working Days\\\") }}{{ doc.total_working_days | int }}
{{ _(\\\"Leave Without Pay\\\") }}{{ doc.leave_without_pay }}
{{ _(\\\"Payment Days\\\") }}{{ doc.payment_days }}
{{ _(\\\"Salary Structure\\\") }}{{ doc.salary_structure }}
\\n\\t\\t\\t
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Earnings & Deductions\", \"fieldname\": \"custom_html_ledgers\", \"fieldtype\": \"HTML\", \"html\": \"{%- macro money(value) -%}{{ frappe.utils.fmt_money(value or 0, currency=doc.currency) }}{%- endmacro -%}\\n{%- set earnings = doc.earnings | rejectattr(\\\"do_not_include_in_total\\\") | selectattr(\\\"amount\\\") | list -%}\\n{%- set deductions = doc.deductions | rejectattr(\\\"do_not_include_in_total\\\") | selectattr(\\\"amount\\\") | list -%}\\n{%- set row_count = [earnings | length, deductions | length] | max -%}\\n
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t{% for row in earnings %}\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t{% endfor %}\\n\\t\\t\\t\\t\\t\\t{% for i in range(row_count - (earnings | length)) %}\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t{% endfor %}\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t
{{ _(\\\"Earnings\\\") }}{{ _(\\\"Amount\\\") }}
{{ _(row.salary_component) }}{{ money(row.amount) }}
 
{{ _(\\\"Gross Pay\\\") }}{{ money(doc.gross_pay) }}
\\n\\t\\t\\t
\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t{% for row in deductions %}\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t{% endfor %}\\n\\t\\t\\t\\t\\t\\t{% for i in range(row_count - (deductions | length)) %}\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t{% endfor %}\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t{% if doc.get(\\\"total_loan_repayment\\\") %}\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t{% endif %}\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t
{{ _(\\\"Deductions\\\") }}{{ _(\\\"Amount\\\") }}
{{ _(row.salary_component) }}{{ money(row.amount) }}
 
{{ _(\\\"Total Deduction\\\") }}{{ money(doc.total_deduction) }}
{{ _(\\\"Total Loan Repayment\\\") }}{{ money(doc.total_loan_repayment) }}
\\n\\t\\t\\t
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Net Pay\", \"fieldname\": \"custom_html_net_pay\", \"fieldtype\": \"HTML\", \"html\": \"{%- macro money(value) -%}{{ frappe.utils.fmt_money(value or 0, currency=doc.currency) }}{%- endmacro -%}\\n{%- set disable_rounded_total = frappe.db.get_single_value(\\\"Payroll Settings\\\", \\\"disable_rounded_total\\\") -%}\\n{%- set net_total = doc.net_pay if disable_rounded_total else doc.rounded_total -%}\\n
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t
{{ _(\\\"Net Pay\\\") }}
\\n\\t\\t\\t\\t
{{ doc.total_in_words }}
\\n\\t\\t\\t
{{ money(net_total) }}
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Footer\", \"fieldname\": \"custom_html_footer\", \"fieldtype\": \"HTML\", \"html\": \"
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t{%- if doc.bank_name -%}\\n\\t\\t\\t\\t\\t{{ doc.bank_name }}\\n\\t\\t\\t\\t\\t{%- if doc.bank_account_no %} • {{ _(\\\"A/C\\\") }} {{ doc.bank_account_no }}{% endif -%}\\n\\t\\t\\t\\t\\t{%- if doc.mode_of_payment %} • {{ _(doc.mode_of_payment) }}{% endif -%}\\n\\t\\t\\t\\t{%- elif doc.mode_of_payment -%}\\n\\t\\t\\t\\t\\t{{ _(\\\"Paid by\\\") }} {{ _(doc.mode_of_payment) }}\\n\\t\\t\\t\\t{%- endif -%}\\n\\t\\t\\t{{ _(\\\"This is a computer generated document and does not require a signature.\\\") }}
\\n
\", \"custom\": 1}]}]}], \"footer\": {\"columns\": [{\"label\": \"\", \"fields\": []}], \"show_label\": \"hide\"}}", "idx": 0, "line_breaks": 0, "margin_bottom": 15.0, "margin_left": 15.0, "margin_right": 15.0, "margin_top": 15.0, - "modified": "2026-09-03 12:30:00.000000", + "modified": "2026-09-07 14:18:03.657459", "modified_by": "Administrator", "module": "Payroll", "name": "Salary Slip Classic", diff --git a/hrms/payroll/print_format/salary_slip_compact/salary_slip_compact.json b/hrms/payroll/print_format/salary_slip_compact/salary_slip_compact.json index c53118c8544..64aa3898209 100644 --- a/hrms/payroll/print_format/salary_slip_compact/salary_slip_compact.json +++ b/hrms/payroll/print_format/salary_slip_compact/salary_slip_compact.json @@ -10,14 +10,14 @@ "docstatus": 0, "doctype": "Print Format", "font_size": 0, - "format_data": "{\"header\": {\"columns\": [{\"label\": \"\", \"fields\": []}]}, \"sections\": [{\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Header\", \"fieldname\": \"custom_html_header\", \"fieldtype\": \"HTML\", \"html\": \"
\\n\\t
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t
{{ doc.employee_name }}
\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t{%- if doc.designation %}{{ doc.designation }} • {% endif -%}\\n\\t\\t\\t\\t\\t{%- if doc.department %}{{ doc.department }} • {% endif -%}\\n\\t\\t\\t\\t\\t{{ doc.employee }}\\n\\t\\t\\t\\t
\\n\\t\\t\\t
\\n\\t\\t\\t\\t
{{ _(\\\"Payslip for\\\") }}
\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t{{ frappe.format(doc.start_date, {\\\"fieldtype\\\": \\\"Date\\\"}) }}\\n\\t\\t\\t\\t\\t{{ _(\\\"to\\\") }} {{ frappe.format(doc.end_date, {\\\"fieldtype\\\": \\\"Date\\\"}) }}\\n\\t\\t\\t\\t
\\n\\t\\t\\t
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Net Pay\", \"fieldname\": \"custom_html_net_pay\", \"fieldtype\": \"HTML\", \"html\": \"{%- macro money(value) -%}{{ frappe.utils.fmt_money(value or 0, currency=doc.currency) }}{%- endmacro -%}\\n{%- set disable_rounded_total = frappe.db.get_single_value(\\\"Payroll Settings\\\", \\\"disable_rounded_total\\\") -%}\\n{%- set net_total = doc.net_pay if disable_rounded_total else doc.rounded_total -%}\\n
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t
{{ _(\\\"Net Pay\\\") }}
\\n\\t\\t\\t\\t
{{ money(net_total) }}
\\n\\t\\t\\t\\t
{{ doc.total_in_words }}
\\n\\t\\t\\t
\\n\\t\\t\\t\\t{%- if doc.bank_name or doc.mode_of_payment %}\\n\\t\\t\\t\\t
{{ _(\\\"Credited to\\\") }}
\\n\\t\\t\\t\\t{%- if doc.bank_name -%}\\n\\t\\t\\t\\t\\t
{{ doc.bank_name }}
\\n\\t\\t\\t\\t\\t{%- if doc.bank_account_no %}
{{ _(\\\"A/C\\\") }} {{ doc.bank_account_no }}
{% endif -%}\\n\\t\\t\\t\\t{%- else -%}\\n\\t\\t\\t\\t\\t
{{ _(doc.mode_of_payment) }}
\\n\\t\\t\\t\\t{%- endif -%}\\n\\t\\t\\t\\t{% endif -%}\\n\\t\\t\\t
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Earnings & Deductions\", \"fieldname\": \"custom_html_ledger\", \"fieldtype\": \"HTML\", \"html\": \"{%- macro money(value) -%}{{ frappe.utils.fmt_money(value or 0, currency=doc.currency) }}{%- endmacro -%}\\n{%- set earnings = doc.earnings | rejectattr(\\\"do_not_include_in_total\\\") | selectattr(\\\"amount\\\") | list -%}\\n{%- set deductions = doc.deductions | rejectattr(\\\"do_not_include_in_total\\\") | selectattr(\\\"amount\\\") | list -%}\\n
\\n\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t{% for row in earnings %}\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t{% endfor %}\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t{% for row in deductions %}\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t{% endfor %}\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
{{ _(\\\"Earnings\\\") }}{{ _(\\\"Amount\\\") }}
{{ _(row.salary_component) }}{{ money(row.amount) }}
{{ _(\\\"Gross Pay\\\") }}{{ money(doc.gross_pay) }}
{{ _(\\\"Deductions\\\") }}{{ _(\\\"Amount\\\") }}
{{ _(row.salary_component) }}{{ money(row.amount) }}
{{ _(\\\"Total Deduction\\\") }}{{ money(doc.total_deduction) }}
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Footer\", \"fieldname\": \"custom_html_footer\", \"fieldtype\": \"HTML\", \"html\": \"
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
{{ _(\\\"Working days\\\") }} {{ doc.total_working_days }}{{ _(\\\"Payment days\\\") }} {{ doc.payment_days }}{{ _(\\\"Leave without pay\\\") }} {{ doc.leave_without_pay }}{{ doc.name }}
\\n
\", \"custom\": 1}]}]}], \"footer\": {\"columns\": [{\"label\": \"\", \"fields\": []}], \"show_label\": \"hide\"}}", + "format_data": "{\"header\": {\"columns\": [{\"label\": \"\", \"fields\": []}]}, \"sections\": [{\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Header\", \"fieldname\": \"custom_html_header\", \"fieldtype\": \"HTML\", \"html\": \"
\\n\\t
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t
{{ doc.employee_name }}
\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t{%- if doc.designation %}{{ doc.designation }} • {% endif -%}\\n\\t\\t\\t\\t\\t{%- if doc.department %}{{ doc.department }} • {% endif -%}\\n\\t\\t\\t\\t\\t{{ doc.employee }}\\n\\t\\t\\t\\t
\\n\\t\\t\\t
\\n\\t\\t\\t\\t
{{ _(\\\"Payslip for\\\") }}
\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t{{ frappe.format(doc.start_date, {\\\"fieldtype\\\": \\\"Date\\\"}) }}\\n\\t\\t\\t\\t\\t{{ _(\\\"to\\\") }} {{ frappe.format(doc.end_date, {\\\"fieldtype\\\": \\\"Date\\\"}) }}\\n\\t\\t\\t\\t
\\n\\t\\t\\t
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Net Pay\", \"fieldname\": \"custom_html_net_pay\", \"fieldtype\": \"HTML\", \"html\": \"{%- macro money(value) -%}{{ frappe.utils.fmt_money(value or 0, currency=doc.currency) }}{%- endmacro -%}\\n{%- set disable_rounded_total = frappe.db.get_single_value(\\\"Payroll Settings\\\", \\\"disable_rounded_total\\\") -%}\\n{%- set net_total = doc.net_pay if disable_rounded_total else doc.rounded_total -%}\\n
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t
{{ _(\\\"Net Pay\\\") }}
\\n\\t\\t\\t\\t
{{ money(net_total) }}
\\n\\t\\t\\t\\t
{{ doc.total_in_words }}
\\n\\t\\t\\t
\\n\\t\\t\\t\\t{%- if doc.bank_name or doc.mode_of_payment %}\\n\\t\\t\\t\\t
{{ _(\\\"Credited to\\\") }}
\\n\\t\\t\\t\\t{%- if doc.bank_name -%}\\n\\t\\t\\t\\t\\t
{{ doc.bank_name }}
\\n\\t\\t\\t\\t\\t{%- if doc.bank_account_no %}
{{ _(\\\"A/C\\\") }} {{ doc.bank_account_no }}
{% endif -%}\\n\\t\\t\\t\\t{%- else -%}\\n\\t\\t\\t\\t\\t
{{ _(doc.mode_of_payment) }}
\\n\\t\\t\\t\\t{%- endif -%}\\n\\t\\t\\t\\t{% endif -%}\\n\\t\\t\\t
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Earnings & Deductions\", \"fieldname\": \"custom_html_ledger\", \"fieldtype\": \"HTML\", \"html\": \"{%- macro money(value) -%}{{ frappe.utils.fmt_money(value or 0, currency=doc.currency) }}{%- endmacro -%}\\n{%- set earnings = doc.earnings | rejectattr(\\\"do_not_include_in_total\\\") | selectattr(\\\"amount\\\") | list -%}\\n{%- set deductions = doc.deductions | rejectattr(\\\"do_not_include_in_total\\\") | selectattr(\\\"amount\\\") | list -%}\\n
\\n\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t{% for row in earnings %}\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t{% endfor %}\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t{% for row in deductions %}\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t{% endfor %}\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t{% if doc.get(\\\"total_loan_repayment\\\") %}\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t{% endif %}\\n\\t\\t\\n\\t
{{ _(\\\"Earnings\\\") }}{{ _(\\\"Amount\\\") }}
{{ _(row.salary_component) }}{{ money(row.amount) }}
{{ _(\\\"Gross Pay\\\") }}{{ money(doc.gross_pay) }}
{{ _(\\\"Deductions\\\") }}{{ _(\\\"Amount\\\") }}
{{ _(row.salary_component) }}{{ money(row.amount) }}
{{ _(\\\"Total Deduction\\\") }}{{ money(doc.total_deduction) }}
{{ _(\\\"Total Loan Repayment\\\") }}{{ money(doc.total_loan_repayment) }}
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Footer\", \"fieldname\": \"custom_html_footer\", \"fieldtype\": \"HTML\", \"html\": \"
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
{{ _(\\\"Working days\\\") }} {{ doc.total_working_days }}{{ _(\\\"Payment days\\\") }} {{ doc.payment_days }}{{ _(\\\"Leave without pay\\\") }} {{ doc.leave_without_pay }}{{ doc.name }}
\\n
\", \"custom\": 1}]}]}], \"footer\": {\"columns\": [{\"label\": \"\", \"fields\": []}], \"show_label\": \"hide\"}}", "idx": 0, "line_breaks": 0, "margin_bottom": 15.0, "margin_left": 15.0, "margin_right": 15.0, "margin_top": 15.0, - "modified": "2026-09-03 12:30:00.000000", + "modified": "2026-09-07 14:18:03.657459", "modified_by": "Administrator", "module": "Payroll", "name": "Salary Slip Compact", diff --git a/hrms/payroll/print_format/salary_slip_detailed/salary_slip_detailed.json b/hrms/payroll/print_format/salary_slip_detailed/salary_slip_detailed.json index 86cba978f72..753c883e7ee 100644 --- a/hrms/payroll/print_format/salary_slip_detailed/salary_slip_detailed.json +++ b/hrms/payroll/print_format/salary_slip_detailed/salary_slip_detailed.json @@ -10,14 +10,14 @@ "docstatus": 0, "doctype": "Print Format", "font_size": 0, - "format_data": "{\"header\": {\"columns\": [{\"label\": \"\", \"fields\": []}]}, \"sections\": [{\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Header\", \"fieldname\": \"custom_html_header\", \"fieldtype\": \"HTML\", \"html\": \"
\\n\\t
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t

{{ _(\\\"Salary Statement\\\") }}

\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t{{ frappe.format(doc.start_date, {\\\"fieldtype\\\": \\\"Date\\\"}) }}\\n\\t\\t\\t\\t\\t{{ _(\\\"to\\\") }} {{ frappe.format(doc.end_date, {\\\"fieldtype\\\": \\\"Date\\\"}) }}\\n\\t\\t\\t\\t\\t{%- if doc.current_payroll_period %} • {{ _(\\\"Payroll Period\\\") }} {{ doc.current_payroll_period }}{% endif %}\\n\\t\\t\\t\\t
\\n\\t\\t\\t
\\n\\t\\t\\t\\t{{ doc.name }}\\n\\t\\t\\t\\t{{ _(\\\"Issued\\\") }} {{ frappe.format(doc.posting_date, {\\\"fieldtype\\\": \\\"Date\\\"}) }}\\n\\t\\t\\t
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Employee Details\", \"fieldname\": \"custom_html_employee\", \"fieldtype\": \"HTML\", \"html\": \"
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t{% if doc.designation %}{% endif %}\\n\\t\\t\\t\\t\\t{% if doc.department %}{% endif %}\\n\\t\\t\\t\\t
{{ _(\\\"Employee Name\\\") }}{{ doc.employee_name }}
{{ _(\\\"Employee ID\\\") }}{{ doc.employee }}
{{ _(\\\"Designation\\\") }}{{ doc.designation }}
{{ _(\\\"Department\\\") }}{{ doc.department }}
\\n\\t\\t\\t
\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t{% if doc.branch %}{% endif %}\\n\\t\\t\\t\\t\\t{% if doc.salary_structure %}{% endif %}\\n\\t\\t\\t\\t\\t{% if doc.payroll_frequency %}{% endif %}\\n\\t\\t\\t\\t\\t{% if doc.exchange_rate and doc.exchange_rate != 1 %}{% endif %}\\n\\t\\t\\t\\t
{{ _(\\\"Branch\\\") }}{{ doc.branch }}
{{ _(\\\"Salary Structure\\\") }}{{ doc.salary_structure }}
{{ _(\\\"Payroll Frequency\\\") }}{{ _(doc.payroll_frequency) }}
{{ _(\\\"Exchange Rate\\\") }}{{ doc.exchange_rate }}
\\n\\t\\t\\t
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Attendance\", \"fieldname\": \"custom_html_attendance\", \"fieldtype\": \"HTML\", \"html\": \"
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t
{{ _(\\\"Working Days\\\") }}
\\n\\t\\t\\t\\t
{{ doc.total_working_days }}
\\n\\t\\t\\t
\\n\\t\\t\\t\\t
{{ _(\\\"Payment Days\\\") }}
\\n\\t\\t\\t\\t
{{ doc.payment_days }}
\\n\\t\\t\\t
\\n\\t\\t\\t\\t
{{ _(\\\"Leave Without Pay\\\") }}
\\n\\t\\t\\t\\t
{{ doc.leave_without_pay }}
\\n\\t\\t\\t
\\n\\t\\t\\t\\t
{{ _(\\\"Absent Days\\\") }}
\\n\\t\\t\\t\\t
{{ doc.absent_days }}
\\n\\t\\t\\t
\\n\\t\\t\\t\\t
{{ _(\\\"Unmarked Days\\\") }}
\\n\\t\\t\\t\\t
{{ doc.unmarked_days }}
\\n\\t\\t\\t
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Earnings\", \"fieldname\": \"custom_html_earnings\", \"fieldtype\": \"HTML\", \"html\": \"{%- macro money(value) -%}{{ frappe.utils.fmt_money(value or 0, currency=doc.currency) }}{%- endmacro -%}\\n{%- set earnings = doc.earnings | rejectattr(\\\"do_not_include_in_total\\\") | selectattr(\\\"amount\\\") | list -%}\\n
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
{{ _(\\\"Earnings\\\") }}
\\n\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t{% for row in earnings %}\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t{% endfor %}\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
{{ _(\\\"Component\\\") }}{{ _(\\\"This Period\\\") }}{{ _(\\\"Year to Date\\\") }}
{{ _(row.salary_component) }}{{ money(row.amount) }}{{ money(row.year_to_date) }}
{{ _(\\\"Gross Pay\\\") }}{{ money(doc.gross_pay) }}{{ money(doc.gross_year_to_date) }}
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Deductions\", \"fieldname\": \"custom_html_deductions\", \"fieldtype\": \"HTML\", \"html\": \"{%- macro money(value) -%}{{ frappe.utils.fmt_money(value or 0, currency=doc.currency) }}{%- endmacro -%}\\n{%- set deductions = doc.deductions | rejectattr(\\\"do_not_include_in_total\\\") | selectattr(\\\"amount\\\") | list -%}\\n
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
{{ _(\\\"Deductions\\\") }}
\\n\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t{% for row in deductions %}\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t{% endfor %}\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
{{ _(\\\"Component\\\") }}{{ _(\\\"This Period\\\") }}{{ _(\\\"Year to Date\\\") }}
{{ _(row.salary_component) }}{{ money(row.amount) }}{{ money(row.year_to_date) }}
{{ _(\\\"Total Deduction\\\") }}{{ money(doc.total_deduction) }}{{ money(deductions | sum(attribute=\\\"year_to_date\\\")) }}
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Net Pay\", \"fieldname\": \"custom_html_net_pay\", \"fieldtype\": \"HTML\", \"html\": \"{%- macro money(value) -%}{{ frappe.utils.fmt_money(value or 0, currency=doc.currency) }}{%- endmacro -%}\\n{%- set disable_rounded_total = frappe.db.get_single_value(\\\"Payroll Settings\\\", \\\"disable_rounded_total\\\") -%}\\n{%- set net_total = doc.net_pay if disable_rounded_total else doc.rounded_total -%}\\n
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t
{{ _(\\\"Net Pay\\\") }}
\\n\\t\\t\\t\\t
{{ doc.total_in_words }}
\\n\\t\\t\\t
\\n\\t\\t\\t\\t
{{ money(net_total) }}
\\n\\t\\t\\t\\t
{{ _(\\\"Net paid year to date\\\") }} {{ money(doc.year_to_date) }}
\\n\\t\\t\\t
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Leave Balances & Income Tax\", \"fieldname\": \"custom_html_leave_tax\", \"fieldtype\": \"HTML\", \"html\": \"{%- macro money(value) -%}{{ frappe.utils.fmt_money(value or 0, currency=doc.currency) }}{%- endmacro -%}\\n{%- set show_tax = doc.annual_taxable_amount or doc.total_income_tax or doc.ctc -%}\\n{% if doc.leave_details or show_tax %}\\n
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t{% if doc.leave_details %}\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t{% for row in doc.leave_details %}\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t{% endfor %}\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t
{{ _(\\\"Leave Type\\\") }}{{ _(\\\"Used\\\") }}{{ _(\\\"Available\\\") }}
{{ _(row.leave_type) }}{{ row.used_leaves }}{{ row.available_leaves }}
\\n\\t\\t\\t\\t{% endif %}\\n\\t\\t\\t
\\n\\t\\t\\t\\t{% if show_tax %}\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t{% if doc.ctc %}{% endif %}\\n\\t\\t\\t\\t\\t\\t{% if doc.total_earnings %}{% endif %}\\n\\t\\t\\t\\t\\t\\t{% if doc.tax_exemption_declaration %}{% endif %}\\n\\t\\t\\t\\t\\t\\t{% if doc.standard_tax_exemption_amount %}{% endif %}\\n\\t\\t\\t\\t\\t\\t{% if doc.annual_taxable_amount %}{% endif %}\\n\\t\\t\\t\\t\\t\\t{% if doc.total_income_tax %}\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t{% endif %}\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t
{{ _(\\\"Income Tax Working\\\") }}{{ _(\\\"Annual\\\") }}
{{ _(\\\"CTC\\\") }}{{ money(doc.ctc) }}
{{ _(\\\"Total Earnings\\\") }}{{ money(doc.total_earnings) }}
{{ _(\\\"Tax Exemption Declaration\\\") }}{{ money(doc.tax_exemption_declaration) }}
{{ _(\\\"Standard Tax Exemption\\\") }}{{ money(doc.standard_tax_exemption_amount) }}
{{ _(\\\"Annual Taxable Amount\\\") }}{{ money(doc.annual_taxable_amount) }}
{{ _(\\\"Total Income Tax\\\") }}{{ money(doc.total_income_tax) }}
\\n\\t\\t\\t\\t{% endif %}\\n\\t\\t\\t
\\n
\\n{% endif %}\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Footer\", \"fieldname\": \"custom_html_footer\", \"fieldtype\": \"HTML\", \"html\": \"
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t{%- if doc.bank_name -%}\\n\\t\\t\\t\\t\\t{{ doc.bank_name }}\\n\\t\\t\\t\\t\\t{%- if doc.bank_account_no %} • {{ _(\\\"A/C\\\") }} {{ doc.bank_account_no }}{% endif -%}\\n\\t\\t\\t\\t\\t{%- if doc.mode_of_payment %} • {{ _(doc.mode_of_payment) }}{% endif -%}\\n\\t\\t\\t\\t{%- elif doc.mode_of_payment -%}\\n\\t\\t\\t\\t\\t{{ _(\\\"Paid by\\\") }} {{ _(doc.mode_of_payment) }}\\n\\t\\t\\t\\t{%- endif -%}\\n\\t\\t\\t{{ _(\\\"This is a computer generated document and does not require a signature.\\\") }}
\\n
\", \"custom\": 1}]}]}], \"footer\": {\"columns\": [{\"label\": \"\", \"fields\": []}], \"show_label\": \"hide\"}}", + "format_data": "{\"header\": {\"columns\": [{\"label\": \"\", \"fields\": []}]}, \"sections\": [{\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Header\", \"fieldname\": \"custom_html_header\", \"fieldtype\": \"HTML\", \"html\": \"
\\n\\t
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t

{{ _(\\\"Salary Statement\\\") }}

\\n\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t{{ frappe.format(doc.start_date, {\\\"fieldtype\\\": \\\"Date\\\"}) }}\\n\\t\\t\\t\\t\\t{{ _(\\\"to\\\") }} {{ frappe.format(doc.end_date, {\\\"fieldtype\\\": \\\"Date\\\"}) }}\\n\\t\\t\\t\\t\\t{%- if doc.current_payroll_period %} • {{ _(\\\"Payroll Period\\\") }} {{ doc.current_payroll_period }}{% endif %}\\n\\t\\t\\t\\t
\\n\\t\\t\\t
\\n\\t\\t\\t\\t{{ doc.name }}\\n\\t\\t\\t\\t{{ _(\\\"Issued\\\") }} {{ frappe.format(doc.posting_date, {\\\"fieldtype\\\": \\\"Date\\\"}) }}\\n\\t\\t\\t
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Employee Details\", \"fieldname\": \"custom_html_employee\", \"fieldtype\": \"HTML\", \"html\": \"
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t{% if doc.designation %}{% endif %}\\n\\t\\t\\t\\t\\t{% if doc.department %}{% endif %}\\n\\t\\t\\t\\t
{{ _(\\\"Employee Name\\\") }}{{ doc.employee_name }}
{{ _(\\\"Employee ID\\\") }}{{ doc.employee }}
{{ _(\\\"Designation\\\") }}{{ doc.designation }}
{{ _(\\\"Department\\\") }}{{ doc.department }}
\\n\\t\\t\\t
\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t{% if doc.branch %}{% endif %}\\n\\t\\t\\t\\t\\t{% if doc.salary_structure %}{% endif %}\\n\\t\\t\\t\\t\\t{% if doc.payroll_frequency %}{% endif %}\\n\\t\\t\\t\\t\\t{% if doc.exchange_rate and doc.exchange_rate != 1 %}{% endif %}\\n\\t\\t\\t\\t
{{ _(\\\"Branch\\\") }}{{ doc.branch }}
{{ _(\\\"Salary Structure\\\") }}{{ doc.salary_structure }}
{{ _(\\\"Payroll Frequency\\\") }}{{ _(doc.payroll_frequency) }}
{{ _(\\\"Exchange Rate\\\") }}{{ doc.exchange_rate }}
\\n\\t\\t\\t
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Attendance\", \"fieldname\": \"custom_html_attendance\", \"fieldtype\": \"HTML\", \"html\": \"
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t
{{ _(\\\"Working Days\\\") }}
\\n\\t\\t\\t\\t
{{ doc.total_working_days }}
\\n\\t\\t\\t
\\n\\t\\t\\t\\t
{{ _(\\\"Payment Days\\\") }}
\\n\\t\\t\\t\\t
{{ doc.payment_days }}
\\n\\t\\t\\t
\\n\\t\\t\\t\\t
{{ _(\\\"Leave Without Pay\\\") }}
\\n\\t\\t\\t\\t
{{ doc.leave_without_pay }}
\\n\\t\\t\\t
\\n\\t\\t\\t\\t
{{ _(\\\"Absent Days\\\") }}
\\n\\t\\t\\t\\t
{{ doc.absent_days }}
\\n\\t\\t\\t
\\n\\t\\t\\t\\t
{{ _(\\\"Unmarked Days\\\") }}
\\n\\t\\t\\t\\t
{{ doc.unmarked_days }}
\\n\\t\\t\\t
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Earnings\", \"fieldname\": \"custom_html_earnings\", \"fieldtype\": \"HTML\", \"html\": \"{%- macro money(value) -%}{{ frappe.utils.fmt_money(value or 0, currency=doc.currency) }}{%- endmacro -%}\\n{%- set earnings = doc.earnings | rejectattr(\\\"do_not_include_in_total\\\") | selectattr(\\\"amount\\\") | list -%}\\n
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
{{ _(\\\"Earnings\\\") }}
\\n\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t{% for row in earnings %}\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t{% endfor %}\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
{{ _(\\\"Component\\\") }}{{ _(\\\"This Period\\\") }}{{ _(\\\"Year to Date\\\") }}
{{ _(row.salary_component) }}{{ money(row.amount) }}{{ money(row.year_to_date) }}
{{ _(\\\"Gross Pay\\\") }}{{ money(doc.gross_pay) }}{{ money(doc.gross_year_to_date) }}
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Deductions\", \"fieldname\": \"custom_html_deductions\", \"fieldtype\": \"HTML\", \"html\": \"{%- macro money(value) -%}{{ frappe.utils.fmt_money(value or 0, currency=doc.currency) }}{%- endmacro -%}\\n{%- set deductions = doc.deductions | rejectattr(\\\"do_not_include_in_total\\\") | selectattr(\\\"amount\\\") | list -%}\\n
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
{{ _(\\\"Deductions\\\") }}
\\n\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t{% for row in deductions %}\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t{% endfor %}\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t{% if doc.get(\\\"total_loan_repayment\\\") %}\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t{% endif %}\\n\\t\\t\\n\\t
{{ _(\\\"Component\\\") }}{{ _(\\\"This Period\\\") }}{{ _(\\\"Year to Date\\\") }}
{{ _(row.salary_component) }}{{ money(row.amount) }}{{ money(row.year_to_date) }}
{{ _(\\\"Total Deduction\\\") }}{{ money(doc.total_deduction) }}{{ money(deductions | sum(attribute=\\\"year_to_date\\\")) }}
{{ _(\\\"Total Loan Repayment\\\") }}{{ money(doc.total_loan_repayment) }}
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Net Pay\", \"fieldname\": \"custom_html_net_pay\", \"fieldtype\": \"HTML\", \"html\": \"{%- macro money(value) -%}{{ frappe.utils.fmt_money(value or 0, currency=doc.currency) }}{%- endmacro -%}\\n{%- set disable_rounded_total = frappe.db.get_single_value(\\\"Payroll Settings\\\", \\\"disable_rounded_total\\\") -%}\\n{%- set net_total = doc.net_pay if disable_rounded_total else doc.rounded_total -%}\\n
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t
{{ _(\\\"Net Pay\\\") }}
\\n\\t\\t\\t\\t
{{ doc.total_in_words }}
\\n\\t\\t\\t
\\n\\t\\t\\t\\t
{{ money(net_total) }}
\\n\\t\\t\\t\\t
{{ _(\\\"Net paid year to date\\\") }} {{ money(doc.year_to_date) }}
\\n\\t\\t\\t
\\n
\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Leave Balances & Income Tax\", \"fieldname\": \"custom_html_leave_tax\", \"fieldtype\": \"HTML\", \"html\": \"{%- macro money(value) -%}{{ frappe.utils.fmt_money(value or 0, currency=doc.currency) }}{%- endmacro -%}\\n{%- set show_tax = doc.annual_taxable_amount or doc.total_income_tax or doc.ctc -%}\\n{% if doc.leave_details or show_tax %}\\n
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t{% if doc.leave_details %}\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t{% for row in doc.leave_details %}\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t{% endfor %}\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t
{{ _(\\\"Leave Type\\\") }}{{ _(\\\"Used\\\") }}{{ _(\\\"Available\\\") }}
{{ _(row.leave_type) }}{{ row.used_leaves }}{{ row.available_leaves }}
\\n\\t\\t\\t\\t{% endif %}\\n\\t\\t\\t
\\n\\t\\t\\t\\t{% if show_tax %}\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t{% if doc.ctc %}{% endif %}\\n\\t\\t\\t\\t\\t\\t{% if doc.total_earnings %}{% endif %}\\n\\t\\t\\t\\t\\t\\t{% if doc.tax_exemption_declaration %}{% endif %}\\n\\t\\t\\t\\t\\t\\t{% if doc.standard_tax_exemption_amount %}{% endif %}\\n\\t\\t\\t\\t\\t\\t{% if doc.annual_taxable_amount %}{% endif %}\\n\\t\\t\\t\\t\\t\\t{% if doc.total_income_tax %}\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t{% endif %}\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t
{{ _(\\\"Income Tax Working\\\") }}{{ _(\\\"Annual\\\") }}
{{ _(\\\"CTC\\\") }}{{ money(doc.ctc) }}
{{ _(\\\"Total Earnings\\\") }}{{ money(doc.total_earnings) }}
{{ _(\\\"Tax Exemption Declaration\\\") }}{{ money(doc.tax_exemption_declaration) }}
{{ _(\\\"Standard Tax Exemption\\\") }}{{ money(doc.standard_tax_exemption_amount) }}
{{ _(\\\"Annual Taxable Amount\\\") }}{{ money(doc.annual_taxable_amount) }}
{{ _(\\\"Total Income Tax\\\") }}{{ money(doc.total_income_tax) }}
\\n\\t\\t\\t\\t{% endif %}\\n\\t\\t\\t
\\n
\\n{% endif %}\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Footer\", \"fieldname\": \"custom_html_footer\", \"fieldtype\": \"HTML\", \"html\": \"
\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t
\\n\\t\\t\\t\\t{%- if doc.bank_name -%}\\n\\t\\t\\t\\t\\t{{ doc.bank_name }}\\n\\t\\t\\t\\t\\t{%- if doc.bank_account_no %} • {{ _(\\\"A/C\\\") }} {{ doc.bank_account_no }}{% endif -%}\\n\\t\\t\\t\\t\\t{%- if doc.mode_of_payment %} • {{ _(doc.mode_of_payment) }}{% endif -%}\\n\\t\\t\\t\\t{%- elif doc.mode_of_payment -%}\\n\\t\\t\\t\\t\\t{{ _(\\\"Paid by\\\") }} {{ _(doc.mode_of_payment) }}\\n\\t\\t\\t\\t{%- endif -%}\\n\\t\\t\\t{{ _(\\\"This is a computer generated document and does not require a signature.\\\") }}
\\n
\", \"custom\": 1}]}]}], \"footer\": {\"columns\": [{\"label\": \"\", \"fields\": []}], \"show_label\": \"hide\"}}", "idx": 0, "line_breaks": 0, "margin_bottom": 15.0, "margin_left": 15.0, "margin_right": 15.0, "margin_top": 15.0, - "modified": "2026-09-03 12:30:00.000000", + "modified": "2026-09-07 14:18:03.657459", "modified_by": "Administrator", "module": "Payroll", "name": "Salary Slip Detailed", From 68dd57aa10e0dd6ebcbd2b7ec1fea5def8b12885 Mon Sep 17 00:00:00 2001 From: iamkhanraheel Date: Mon, 7 Sep 2026 16:07:09 +0530 Subject: [PATCH 10/11] fix(api): check read permission on parent document --- hrms/api/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/hrms/api/__init__.py b/hrms/api/__init__.py index 14ee5ba48eb..bede52b20ea 100644 --- a/hrms/api/__init__.py +++ b/hrms/api/__init__.py @@ -742,6 +742,7 @@ def get_doctype_states(doctype: str) -> dict: # File @frappe.whitelist() def get_attachments(dt: str, dn: str): + frappe.has_permission(dt, "read", dn, throw=True) return frappe.get_list( "File", fields=["name", "file_name", "file_url", "is_private"], From 4ec082c8424a449af35992e2e3a7ce1b368d1fee Mon Sep 17 00:00:00 2001 From: iamkhanraheel Date: Tue, 8 Sep 2026 17:25:20 +0530 Subject: [PATCH 11/11] fix(shift_type): enforce write permission --- hrms/hr/doctype/shift_type/shift_type.py | 1 + 1 file changed, 1 insertion(+) diff --git a/hrms/hr/doctype/shift_type/shift_type.py b/hrms/hr/doctype/shift_type/shift_type.py index d93468fe377..567c9a80abc 100644 --- a/hrms/hr/doctype/shift_type/shift_type.py +++ b/hrms/hr/doctype/shift_type/shift_type.py @@ -147,6 +147,7 @@ def unlinked_checkins_exist(self): @frappe.whitelist() def process_auto_attendance(self, is_manually_triggered: int | bool = False) -> None | str: + self.check_permission("write") if self.has_incorrect_shift_config(): return