fix: select doctype as payment_document
(cherry picked from commit 3d0e68acaa)
This commit is contained in:
committed by
mergify-bot
parent
e69c71576d
commit
44f0b69152
@@ -107,7 +107,7 @@ class BankClearance(Document):
|
|||||||
loan_repayments = (
|
loan_repayments = (
|
||||||
frappe.qb.from_(loan_repayment)
|
frappe.qb.from_(loan_repayment)
|
||||||
.select(
|
.select(
|
||||||
ConstantColumn("Loan Repayment").as_("doctype"),
|
ConstantColumn("Loan Repayment").as_("payment_document"),
|
||||||
loan_repayment.name.as_("payment_entry"),
|
loan_repayment.name.as_("payment_entry"),
|
||||||
loan_repayment.amount_paid.as_("debit"),
|
loan_repayment.amount_paid.as_("debit"),
|
||||||
ConstantColumn(0).as_("credit"),
|
ConstantColumn(0).as_("credit"),
|
||||||
@@ -185,6 +185,7 @@ class BankClearance(Document):
|
|||||||
|
|
||||||
formatted_amount = fmt_money(abs(amount), 2, d.account_currency)
|
formatted_amount = fmt_money(abs(amount), 2, d.account_currency)
|
||||||
d.amount = formatted_amount + " " + (_("Dr") if amount > 0 else _("Cr"))
|
d.amount = formatted_amount + " " + (_("Dr") if amount > 0 else _("Cr"))
|
||||||
|
d.posting_date = getdate(d.posting_date)
|
||||||
|
|
||||||
d.pop("credit")
|
d.pop("credit")
|
||||||
d.pop("debit")
|
d.pop("debit")
|
||||||
|
|||||||
Reference in New Issue
Block a user