From d4c2d77bba2152acf7bcf144a987559c3abe405a Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 26 Sep 2017 13:27:06 +0530 Subject: [PATCH] [fix] POS not working if user clicks on back button from form view (#10912) --- erpnext/selling/page/point_of_sale/point_of_sale.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.js b/erpnext/selling/page/point_of_sale/point_of_sale.js index d4b7eba107a..ec1a2926218 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.js +++ b/erpnext/selling/page/point_of_sale/point_of_sale.js @@ -20,6 +20,10 @@ frappe.pages['point-of-sale'].on_page_load = function(wrapper) { }); }; +frappe.pages['point-of-sale'].refresh = function(wrapper) { + cur_frm = wrapper.pos.frm; +} + erpnext.pos.PointOfSale = class PointOfSale { constructor(wrapper) { this.wrapper = $(wrapper).find('.layout-main-section'); @@ -478,6 +482,8 @@ class POSCart { } update_taxes_and_totals() { + if (!this.frm.doc.taxes) { return; } + const currency = this.frm.doc.currency; this.frm.refresh_field('taxes');