fix(sales_invoice): switch parent and child doctype

Switch the parent and child doctype in sales_invoice.py
This commit is contained in:
Loïc Oberle
2026-06-02 10:42:19 +02:00
parent 2c0f6c50df
commit 7ee7c4253b

View File

@@ -3154,8 +3154,8 @@ def get_mode_of_payment_info(mode_of_payment, company):
ModeOfPayment = frappe.qb.DocType("Mode of Payment")
query = (
frappe.qb.from_(ModeOfPaymentAccount)
.join(ModeOfPayment)
frappe.qb.from_(ModeOfPayment)
.join(ModeOfPaymentAccount)
.on(ModeOfPaymentAccount.parent == ModeOfPayment.name)
.select(
ModeOfPaymentAccount.default_account, ModeOfPaymentAccount.parent, ModeOfPayment.type.as_("type")