From 2e62d518e8f9cd253b1002da871922a73f896e6f Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 29 Apr 2022 14:27:03 +0530 Subject: [PATCH] fix: Multi currency opening invoices (cherry picked from commit a8452c2ba241a943f99ca3856985f728e11d47b1) --- .../opening_invoice_creation_tool.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py index 735ab301aba0..0f0ab68dcb84 100644 --- a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py +++ b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py @@ -114,10 +114,13 @@ def get_invoices(self): ) or {} ) + + default_currency = frappe.db.get_value(row.party_type, row.party, "default_currency") + if company_details: invoice.update( { - "currency": company_details.get("default_currency"), + "currency": default_currency or company_details.get("default_currency"), "letter_head": company_details.get("default_letter_head"), } )