fix(POS): local variable 'customer_currency' referenced before assignment (#25137)

This commit is contained in:
Rucha Mahabal 2021-04-01 17:47:19 +05:30 committed by GitHub
parent f4e7e72f67
commit 0773d6772d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,7 @@ class POSInvoice(SalesInvoice):
self.apply_loyalty_points() self.apply_loyalty_points()
self.check_phone_payments() self.check_phone_payments()
self.set_status(update=True) self.set_status(update=True)
def before_cancel(self): def before_cancel(self):
if self.consolidated_invoice and frappe.db.get_value('Sales Invoice', self.consolidated_invoice, 'docstatus') == 1: if self.consolidated_invoice and frappe.db.get_value('Sales Invoice', self.consolidated_invoice, 'docstatus') == 1:
pos_closing_entry = frappe.get_all( pos_closing_entry = frappe.get_all(
@ -332,8 +332,6 @@ class POSInvoice(SalesInvoice):
if selling_price_list: if selling_price_list:
self.set('selling_price_list', selling_price_list) self.set('selling_price_list', selling_price_list)
if customer_currency != profile.get('currency'):
self.set('currency', customer_currency)
# set pos values in items # set pos values in items
for item in self.get("items"): for item in self.get("items"):
@ -401,7 +399,7 @@ class POSInvoice(SalesInvoice):
pay_req.request_phone_payment() pay_req.request_phone_payment()
return pay_req return pay_req
def get_new_payment_request(self, mop): def get_new_payment_request(self, mop):
payment_gateway_account = frappe.db.get_value("Payment Gateway Account", { payment_gateway_account = frappe.db.get_value("Payment Gateway Account", {
"payment_account": mop.account, "payment_account": mop.account,