From 895aa7b7ac8aeccccb59f9ebd0e81d5bab617d6c Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Mon, 30 Oct 2017 17:12:50 +0530 Subject: [PATCH] fix codacy --- .../doctype/pos_profile_user/pos_profile_user.js | 2 -- .../doctype/pos_profile_user/pos_profile_user.py | 1 - .../selling/page/point_of_sale/point_of_sale.js | 16 +++++++--------- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.js b/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.js index 2f482d6952..f0884ebef5 100644 --- a/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.js +++ b/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.js @@ -2,7 +2,5 @@ // For license information, please see license.txt frappe.ui.form.on('POS Profile User', { - refresh: function(frm) { - } }); diff --git a/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.py b/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.py index 755b1e99ff..d77cddea61 100644 --- a/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.py +++ b/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.py @@ -3,7 +3,6 @@ # For license information, please see license.txt from __future__ import unicode_literals -import frappe from frappe.model.document import Document class POSProfileUser(Document): 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 6f1cd9ff5e..ee6a633fac 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.js +++ b/erpnext/selling/page/point_of_sale/point_of_sale.js @@ -290,21 +290,19 @@ erpnext.pos.PointOfSale = class PointOfSale { this.pos_profile = doc; if (!this.pos_profile) { - this.pos_profile = { - company: this.company, - currency: frappe.defaults.get_default('currency'), - selling_price_list: frappe.defaults.get_default('selling_price_list') - }; - } - + this.pos_profile = { + company: this.company, + currency: frappe.defaults.get_default('currency'), + selling_price_list: frappe.defaults.get_default('selling_price_list') + }; + } resolve(); }); } frappe.call({ method: 'erpnext.accounts.doctype.pos_profile.pos_profile.get_pos_profiles_for_user' - }) - .then((r) => { + }).then((r) => { if (r && r.message) { const pos_profiles = r.message;