From c436d933038033b71baa8a648d19c0e02e793cce Mon Sep 17 00:00:00 2001 From: Mangesh-Khairnar Date: Tue, 19 Nov 2019 18:21:53 +0530 Subject: [PATCH] fix: reset pos profile when default doesn't exists --- erpnext/selling/page/point_of_sale/point_of_sale.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 9ade4c1893..b213a29ae7 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.js +++ b/erpnext/selling/page/point_of_sale/point_of_sale.js @@ -483,9 +483,7 @@ erpnext.pos.PointOfSale = class PointOfSale { reqd: 1, onchange: function(e) { me.get_default_pos_profile(this.value).then((r) => { - if (r && r.name) { - dialog.set_value('pos_profile', r.name); - } + dialog.set_value('pos_profile', (r && r.name)? r.name : ''); }); } },