Skip to content

Commit 4f33f7b

Browse files
elshafei-developeriamkhanraheel
authored andcommitted
refactor: change voucher type logic for journal entry creation
1 parent 4e0722e commit 4f33f7b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hrms/payroll/doctype/payroll_entry/payroll_entry.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,9 +1134,9 @@ def set_accounting_entries_for_bank_entry(
11341134
return self.make_journal_entry(
11351135
accounts,
11361136
currencies,
1137-
voucher_type="Bank Entry"
1138-
if frappe.get_cached_value("Account", self.payment_account, "account_type") == "Bank"
1139-
else "Cash Entry",
1137+
voucher_type="Cash Entry"
1138+
if frappe.get_cached_value("Account", self.payment_account, "account_type") == "Cash"
1139+
else "Bank Entry",
11401140
user_remark=_("Payment of {0} from {1} to {2}").format(
11411141
_(user_remark), self.start_date, self.end_date
11421142
),

0 commit comments

Comments
 (0)