From e0da8d261f7b0f73f898bc80f51788843cae6051 Mon Sep 17 00:00:00 2001 From: milanpethani Date: Wed, 20 Sep 2023 11:58:46 +0530 Subject: [PATCH] fix: set customer currency in pos_invoice if exists if currency exists in the profile and customer currency doesn't exists still it will update currency to None, so update customer currency only if exists (cherry picked from commit 041d52e82880610a99903ecf4c459e98bd1fff76) --- erpnext/accounts/doctype/pos_invoice/pos_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py index 7c013b6abef..d3058e44509 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py @@ -518,7 +518,7 @@ class POSInvoice(SalesInvoice): selling_price_list = ( customer_price_list or customer_group_price_list or profile.get("selling_price_list") ) - if customer_currency != profile.get("currency"): + if customer_currency and customer_currency != profile.get("currency"): self.set("currency", customer_currency) else: