fix: customer_currency referenced before assignment (#24607)

This commit is contained in:
Saqib 2021-02-11 13:10:52 +05:30 committed by Nabin Hait
parent a439d19917
commit 4fb547179d

View File

@ -299,6 +299,9 @@ class POSInvoice(SalesInvoice):
customer_price_list, customer_group = frappe.db.get_value("Customer", self.customer, ['default_price_list', 'customer_group'])
customer_group_price_list = frappe.db.get_value("Customer Group", customer_group, 'default_price_list')
selling_price_list = customer_price_list or customer_group_price_list or profile.get('selling_price_list')
if customer_currency != profile.get('currency'):
self.set('currency', customer_currency)
else:
selling_price_list = profile.get('selling_price_list')