Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
543b4e9
feat(expense_claim): add partially paid status
nareshkannasln Aug 7, 2026
5dea6f7
chore(expense_claim): backfill partially paid status for existing claims
nareshkannasln Aug 7, 2026
ec1da28
test(expense_claim): assert status across multiple payment entries
nareshkannasln Aug 7, 2026
5fe92b2
Merge branch 'develop' into feat/expense-claim-partially-paid-status
nareshkannasln Aug 7, 2026
7bca134
fix: handle zero payment days in payroll correction
nareshkannasln Aug 28, 2026
bb16b90
test: cover payroll correction with full lwp salary slip
nareshkannasln Aug 28, 2026
bda8d06
fix: validate salary structure for timesheet salaries
nareshkannasln Sep 4, 2026
038e085
chore: update parameter
nareshkannasln Sep 4, 2026
0f81d7c
fix: validate based on salary component
nareshkannasln Sep 4, 2026
89f0369
fix(salary-slip): show loan repayment in salary slip print formats
nareshkannasln Sep 7, 2026
68dd57a
fix(api): check read permission on parent document
iamkhanraheel Sep 7, 2026
4ec082c
fix(shift_type): enforce write permission
iamkhanraheel Sep 8, 2026
31f4bf6
Merge pull request #5220 from aerele/loan-repayment-print-format
deepeshgarg007 Sep 9, 2026
2ed8a0f
Merge pull request #5212 from aerele/timesheet-salary-slip-validtion
deepeshgarg007 Sep 9, 2026
a35ba07
Merge pull request #5161 from aerele/zero-div-payroll-correction
deepeshgarg007 Sep 9, 2026
fa0d40a
Merge pull request #5071 from aerele/feat/expense-claim-partially-pai…
deepeshgarg007 Sep 9, 2026
eb7c8a6
Merge pull request #5221 from iamkhanraheel/fix/permission_and_render…
deepeshgarg007 Sep 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions hrms/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
6 changes: 5 additions & 1 deletion hrms/hr/doctype/expense_claim/expense_claim.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down Expand Up @@ -624,6 +624,10 @@
"color": "Green",
"title": "Paid"
},
{
"color": "Blue",
"title": "Partially Paid"
},
{
"color": "Yellow",
"title": "Unpaid"
Expand Down
7 changes: 5 additions & 2 deletions hrms/hr/doctype/expense_claim/expense_claim.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -142,7 +142,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"

Expand Down
3 changes: 3 additions & 0 deletions hrms/hr/doctype/expense_claim/test_expense_claim.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,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)
Expand All @@ -669,6 +670,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)
Expand All @@ -679,6 +681,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 (
Expand Down
1 change: 1 addition & 0 deletions hrms/hr/doctype/shift_type/shift_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ def unlinked_checkins_exist(self):

@frappe.whitelist(methods=["POST"])
def process_auto_attendance(self, is_manually_triggered: int | bool = False) -> None | str:
self.check_permission("write")
if self.has_incorrect_shift_config():
return

Expand Down
1 change: 1 addition & 0 deletions hrms/patches.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ 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
hrms.patches.v16_0.set_leave_approver_name_in_leave_application #2026-08-05
hrms.patches.v16_0.enable_multi_currency_expense_claim_for_existing_users
hrms.patches.v16_0.set_job_applicant_kanban_column_indicators #2026-08-12
Expand Down
17 changes: 17 additions & 0 deletions hrms/patches/v16_0/update_partially_paid_expense_claim_status.py
Original file line number Diff line number Diff line change
@@ -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()
11 changes: 11 additions & 0 deletions hrms/payroll/doctype/payroll_correction/payroll_correction.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
37 changes: 37 additions & 0 deletions hrms/payroll/doctype/payroll_correction/test_payroll_correction.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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()
25 changes: 25 additions & 0 deletions hrms/payroll/doctype/salary_slip/salary_slip.py
Original file line number Diff line number Diff line change
Expand Up @@ -2666,6 +2666,31 @@ def make_salary_slip_from_timesheet(source_name: str, target_doc: str | 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))
)
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
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -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\": \"<div class=\\\"ss-doc ss-compact\\\">\\n\\t<div class=\\\"ss-head-rule\\\"></div>\\n\\t<table class=\\\"ss-who\\\">\\n\\t\\t<tr>\\n\\t\\t\\t<td>\\n\\t\\t\\t\\t<div class=\\\"name\\\">{{ doc.employee_name }}</div>\\n\\t\\t\\t\\t<div class=\\\"sub\\\">\\n\\t\\t\\t\\t\\t{%- if doc.designation %}{{ doc.designation }} &bull; {% endif -%}\\n\\t\\t\\t\\t\\t{%- if doc.department %}{{ doc.department }} &bull; {% endif -%}\\n\\t\\t\\t\\t\\t{{ doc.employee }}\\n\\t\\t\\t\\t</div>\\n\\t\\t\\t</td>\\n\\t\\t\\t<td class=\\\"ss-right\\\">\\n\\t\\t\\t\\t<div class=\\\"ss-label\\\">{{ _(\\\"Payslip for\\\") }}</div>\\n\\t\\t\\t\\t<div class=\\\"period ss-num\\\">\\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</div>\\n\\t\\t\\t</td>\\n\\t\\t</tr>\\n\\t</table>\\n</div>\", \"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<div class=\\\"ss-doc ss-compact\\\">\\n\\t<table class=\\\"ss-hero\\\">\\n\\t\\t<tr>\\n\\t\\t\\t<td>\\n\\t\\t\\t\\t<div class=\\\"ss-label\\\">{{ _(\\\"Net Pay\\\") }}</div>\\n\\t\\t\\t\\t<div class=\\\"amt ss-num\\\">{{ money(net_total) }}</div>\\n\\t\\t\\t\\t<div class=\\\"words\\\">{{ doc.total_in_words }}</div>\\n\\t\\t\\t</td>\\n\\t\\t\\t<td class=\\\"pay\\\">\\n\\t\\t\\t\\t{%- if doc.bank_name or doc.mode_of_payment %}\\n\\t\\t\\t\\t<div class=\\\"ss-label\\\">{{ _(\\\"Credited to\\\") }}</div>\\n\\t\\t\\t\\t{%- if doc.bank_name -%}\\n\\t\\t\\t\\t\\t<div>{{ doc.bank_name }}</div>\\n\\t\\t\\t\\t\\t{%- if doc.bank_account_no %}<div>{{ _(\\\"A/C\\\") }} {{ doc.bank_account_no }}</div>{% endif -%}\\n\\t\\t\\t\\t{%- else -%}\\n\\t\\t\\t\\t\\t<div>{{ _(doc.mode_of_payment) }}</div>\\n\\t\\t\\t\\t{%- endif -%}\\n\\t\\t\\t\\t{% endif -%}\\n\\t\\t\\t</td>\\n\\t\\t</tr>\\n\\t</table>\\n</div>\", \"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<div class=\\\"ss-doc ss-compact\\\">\\n\\t<table class=\\\"ss-ledger\\\">\\n\\t\\t<colgroup><col><col class=\\\"amt\\\"></colgroup>\\n\\t\\t<tbody>\\n\\t\\t\\t<tr class=\\\"ss-sec first\\\">\\n\\t\\t\\t\\t<td class=\\\"c\\\">{{ _(\\\"Earnings\\\") }}</td>\\n\\t\\t\\t\\t<td>{{ _(\\\"Amount\\\") }}</td>\\n\\t\\t\\t</tr>\\n\\t\\t\\t{% for row in earnings %}\\n\\t\\t\\t<tr>\\n\\t\\t\\t\\t<td class=\\\"c\\\">{{ _(row.salary_component) }}</td>\\n\\t\\t\\t\\t<td class=\\\"ss-num\\\">{{ money(row.amount) }}</td>\\n\\t\\t\\t</tr>\\n\\t\\t\\t{% endfor %}\\n\\t\\t\\t<tr class=\\\"ss-sub\\\">\\n\\t\\t\\t\\t<td class=\\\"c\\\">{{ _(\\\"Gross Pay\\\") }}</td>\\n\\t\\t\\t\\t<td class=\\\"ss-num\\\">{{ money(doc.gross_pay) }}</td>\\n\\t\\t\\t</tr>\\n\\n\\t\\t\\t<tr class=\\\"ss-sec\\\">\\n\\t\\t\\t\\t<td class=\\\"c\\\">{{ _(\\\"Deductions\\\") }}</td>\\n\\t\\t\\t\\t<td>{{ _(\\\"Amount\\\") }}</td>\\n\\t\\t\\t</tr>\\n\\t\\t\\t{% for row in deductions %}\\n\\t\\t\\t<tr>\\n\\t\\t\\t\\t<td class=\\\"c\\\">{{ _(row.salary_component) }}</td>\\n\\t\\t\\t\\t<td class=\\\"ss-num\\\">{{ money(row.amount) }}</td>\\n\\t\\t\\t</tr>\\n\\t\\t\\t{% endfor %}\\n\\t\\t\\t<tr class=\\\"ss-sub last\\\">\\n\\t\\t\\t\\t<td class=\\\"c\\\">{{ _(\\\"Total Deduction\\\") }}</td>\\n\\t\\t\\t\\t<td class=\\\"ss-num\\\">{{ money(doc.total_deduction) }}</td>\\n\\t\\t\\t</tr>\\n\\t\\t</tbody>\\n\\t</table>\\n</div>\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Footer\", \"fieldname\": \"custom_html_footer\", \"fieldtype\": \"HTML\", \"html\": \"<div class=\\\"ss-doc ss-compact\\\">\\n\\t<table class=\\\"ss-foot\\\">\\n\\t\\t<tr>\\n\\t\\t\\t<td><strong>{{ _(\\\"Working days\\\") }}</strong> {{ doc.total_working_days }}</td>\\n\\t\\t\\t<td><strong>{{ _(\\\"Payment days\\\") }}</strong> {{ doc.payment_days }}</td>\\n\\t\\t\\t<td><strong>{{ _(\\\"Leave without pay\\\") }}</strong> {{ doc.leave_without_pay }}</td>\\n\\t\\t\\t<td class=\\\"ref\\\">{{ doc.name }}</td>\\n\\t\\t</tr>\\n\\t</table>\\n</div>\", \"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\": \"<div class=\\\"ss-doc ss-compact\\\">\\n\\t<div class=\\\"ss-head-rule\\\"></div>\\n\\t<table class=\\\"ss-who\\\">\\n\\t\\t<tr>\\n\\t\\t\\t<td>\\n\\t\\t\\t\\t<div class=\\\"name\\\">{{ doc.employee_name }}</div>\\n\\t\\t\\t\\t<div class=\\\"sub\\\">\\n\\t\\t\\t\\t\\t{%- if doc.designation %}{{ doc.designation }} &bull; {% endif -%}\\n\\t\\t\\t\\t\\t{%- if doc.department %}{{ doc.department }} &bull; {% endif -%}\\n\\t\\t\\t\\t\\t{{ doc.employee }}\\n\\t\\t\\t\\t</div>\\n\\t\\t\\t</td>\\n\\t\\t\\t<td class=\\\"ss-right\\\">\\n\\t\\t\\t\\t<div class=\\\"ss-label\\\">{{ _(\\\"Payslip for\\\") }}</div>\\n\\t\\t\\t\\t<div class=\\\"period ss-num\\\">\\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</div>\\n\\t\\t\\t</td>\\n\\t\\t</tr>\\n\\t</table>\\n</div>\", \"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<div class=\\\"ss-doc ss-compact\\\">\\n\\t<table class=\\\"ss-hero\\\">\\n\\t\\t<tr>\\n\\t\\t\\t<td>\\n\\t\\t\\t\\t<div class=\\\"ss-label\\\">{{ _(\\\"Net Pay\\\") }}</div>\\n\\t\\t\\t\\t<div class=\\\"amt ss-num\\\">{{ money(net_total) }}</div>\\n\\t\\t\\t\\t<div class=\\\"words\\\">{{ doc.total_in_words }}</div>\\n\\t\\t\\t</td>\\n\\t\\t\\t<td class=\\\"pay\\\">\\n\\t\\t\\t\\t{%- if doc.bank_name or doc.mode_of_payment %}\\n\\t\\t\\t\\t<div class=\\\"ss-label\\\">{{ _(\\\"Credited to\\\") }}</div>\\n\\t\\t\\t\\t{%- if doc.bank_name -%}\\n\\t\\t\\t\\t\\t<div>{{ doc.bank_name }}</div>\\n\\t\\t\\t\\t\\t{%- if doc.bank_account_no %}<div>{{ _(\\\"A/C\\\") }} {{ doc.bank_account_no }}</div>{% endif -%}\\n\\t\\t\\t\\t{%- else -%}\\n\\t\\t\\t\\t\\t<div>{{ _(doc.mode_of_payment) }}</div>\\n\\t\\t\\t\\t{%- endif -%}\\n\\t\\t\\t\\t{% endif -%}\\n\\t\\t\\t</td>\\n\\t\\t</tr>\\n\\t</table>\\n</div>\", \"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<div class=\\\"ss-doc ss-compact\\\">\\n\\t<table class=\\\"ss-ledger\\\">\\n\\t\\t<colgroup><col><col class=\\\"amt\\\"></colgroup>\\n\\t\\t<tbody>\\n\\t\\t\\t<tr class=\\\"ss-sec first\\\">\\n\\t\\t\\t\\t<td class=\\\"c\\\">{{ _(\\\"Earnings\\\") }}</td>\\n\\t\\t\\t\\t<td>{{ _(\\\"Amount\\\") }}</td>\\n\\t\\t\\t</tr>\\n\\t\\t\\t{% for row in earnings %}\\n\\t\\t\\t<tr>\\n\\t\\t\\t\\t<td class=\\\"c\\\">{{ _(row.salary_component) }}</td>\\n\\t\\t\\t\\t<td class=\\\"ss-num\\\">{{ money(row.amount) }}</td>\\n\\t\\t\\t</tr>\\n\\t\\t\\t{% endfor %}\\n\\t\\t\\t<tr class=\\\"ss-sub\\\">\\n\\t\\t\\t\\t<td class=\\\"c\\\">{{ _(\\\"Gross Pay\\\") }}</td>\\n\\t\\t\\t\\t<td class=\\\"ss-num\\\">{{ money(doc.gross_pay) }}</td>\\n\\t\\t\\t</tr>\\n\\n\\t\\t\\t<tr class=\\\"ss-sec\\\">\\n\\t\\t\\t\\t<td class=\\\"c\\\">{{ _(\\\"Deductions\\\") }}</td>\\n\\t\\t\\t\\t<td>{{ _(\\\"Amount\\\") }}</td>\\n\\t\\t\\t</tr>\\n\\t\\t\\t{% for row in deductions %}\\n\\t\\t\\t<tr>\\n\\t\\t\\t\\t<td class=\\\"c\\\">{{ _(row.salary_component) }}</td>\\n\\t\\t\\t\\t<td class=\\\"ss-num\\\">{{ money(row.amount) }}</td>\\n\\t\\t\\t</tr>\\n\\t\\t\\t{% endfor %}\\n\\t\\t\\t<tr class=\\\"ss-sub last\\\">\\n\\t\\t\\t\\t<td class=\\\"c\\\">{{ _(\\\"Total Deduction\\\") }}</td>\\n\\t\\t\\t\\t<td class=\\\"ss-num\\\">{{ money(doc.total_deduction) }}</td>\\n\\t\\t\\t</tr>\\n\\t\\t\\t{% if doc.get(\\\"total_loan_repayment\\\") %}\\n\\t\\t\\t<tr class=\\\"ss-sub last\\\">\\n\\t\\t\\t\\t<td class=\\\"c\\\">{{ _(\\\"Total Loan Repayment\\\") }}</td>\\n\\t\\t\\t\\t<td class=\\\"ss-num\\\">{{ money(doc.total_loan_repayment) }}</td>\\n\\t\\t\\t</tr>\\n\\t\\t\\t{% endif %}\\n\\t\\t</tbody>\\n\\t</table>\\n</div>\", \"custom\": 1}]}]}, {\"label\": \"\", \"columns\": [{\"label\": \"\", \"fields\": [{\"label\": \"Footer\", \"fieldname\": \"custom_html_footer\", \"fieldtype\": \"HTML\", \"html\": \"<div class=\\\"ss-doc ss-compact\\\">\\n\\t<table class=\\\"ss-foot\\\">\\n\\t\\t<tr>\\n\\t\\t\\t<td><strong>{{ _(\\\"Working days\\\") }}</strong> {{ doc.total_working_days }}</td>\\n\\t\\t\\t<td><strong>{{ _(\\\"Payment days\\\") }}</strong> {{ doc.payment_days }}</td>\\n\\t\\t\\t<td><strong>{{ _(\\\"Leave without pay\\\") }}</strong> {{ doc.leave_without_pay }}</td>\\n\\t\\t\\t<td class=\\\"ref\\\">{{ doc.name }}</td>\\n\\t\\t</tr>\\n\\t</table>\\n</div>\", \"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",
Expand Down
Loading
Loading