mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 03:39:11 +00:00
chore: Update test case
This commit is contained in:
@@ -897,3 +897,18 @@ def get_default_contact(doctype, name):
|
||||
return None
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
def add_party_account(party_type, party, company, account):
|
||||
doc = frappe.get_doc(party_type, party)
|
||||
account_exists = False
|
||||
for d in doc.get("accounts"):
|
||||
if d.account == account:
|
||||
account_exists = True
|
||||
|
||||
if not account_exists:
|
||||
accounts = {"company": company, "account": account}
|
||||
|
||||
doc.append("accounts", accounts)
|
||||
|
||||
doc.save()
|
||||
|
||||
Reference in New Issue
Block a user