Skip to content

Commit

Permalink
feat: set bank account of company to default company bank account fro…
Browse files Browse the repository at this point in the history
…m masters
  • Loading branch information
mihir-kandoi committed Jan 30, 2025
1 parent 9a34c4c commit ce7702c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions erpnext/accounts/doctype/payment_entry/payment_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -2935,6 +2935,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(
Expand Down

0 comments on commit ce7702c

Please sign in to comment.