feat: set bank account of company to default company bank account from masters

(cherry picked from commit ce7702cc19)
This commit is contained in:
Mihir Kandoi
2025-01-30 12:50:01 +05:30
committed by Mergify
parent b6a6bced61
commit dac53074f2

View File

@@ -2481,6 +2481,7 @@ def get_payment_entry(
pe.paid_amount = paid_amount
pe.received_amount = received_amount
pe.letter_head = doc.get("letter_head")
pe.bank_account = frappe.db.get_value("Bank Account", {"is_company_account": 1, "is_default": 1}, "name")
if dt in ["Purchase Order", "Sales Order", "Sales Invoice", "Purchase Invoice"]:
pe.project = doc.get("project") or reduce(