From b72cdb4bcaf366b2a7261eca98d01419d01ef1af Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 21 Jan 2022 18:00:35 +0530 Subject: [PATCH] fix: Previous document currency getting overriden (cherry picked from commit ef782fd35b0717e3f7c50dbb6c5dde7c96ae9ef6) --- erpnext/accounts/party.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 6b4b43d30b..c13bc23c15 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -58,7 +58,7 @@ def _get_party_details(party=None, account=None, party_type="Customer", company= frappe.throw(_("Not permitted for {0}").format(party), frappe.PermissionError) party = frappe.get_doc(party_type, party) - currency = party.default_currency if party.get("default_currency") else get_company_currency(company) + currency = party.get("default_currency") or currency or get_company_currency(company) party_address, shipping_address = set_address_details(party_details, party, party_type, doctype, company, party_address, company_address, shipping_address) set_contact_details(party_details, party, party_type)