Skip to content

Commit

Permalink
fix: select doctype as payment_document
Browse files Browse the repository at this point in the history
(cherry picked from commit 3d0e68a)
  • Loading branch information
deepeshgarg007 authored and mergify-bot committed Apr 24, 2022
1 parent e69c715 commit 44f0b69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion erpnext/accounts/doctype/bank_clearance/bank_clearance.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def get_payment_entries(self):
loan_repayments = (
frappe.qb.from_(loan_repayment)
.select(
ConstantColumn("Loan Repayment").as_("doctype"),
ConstantColumn("Loan Repayment").as_("payment_document"),
loan_repayment.name.as_("payment_entry"),
loan_repayment.amount_paid.as_("debit"),
ConstantColumn(0).as_("credit"),
Expand Down Expand Up @@ -185,6 +185,7 @@ def get_payment_entries(self):

formatted_amount = fmt_money(abs(amount), 2, d.account_currency)
d.amount = formatted_amount + " " + (_("Dr") if amount > 0 else _("Cr"))
d.posting_date = getdate(d.posting_date)

d.pop("credit")
d.pop("debit")
Expand Down

0 comments on commit 44f0b69

Please sign in to comment.