From fd6ff62bdb8d63c6a5f938f9aeb1e02f71dd8588 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Tue, 16 Jul 2019 12:32:50 +0530 Subject: [PATCH] style: code styling fixes --- erpnext/stock/dashboard/item_dashboard.js | 8 +++++--- erpnext/stock/dashboard/item_dashboard.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/erpnext/stock/dashboard/item_dashboard.js b/erpnext/stock/dashboard/item_dashboard.js index c84acc54b3..3bca883ab4 100644 --- a/erpnext/stock/dashboard/item_dashboard.js +++ b/erpnext/stock/dashboard/item_dashboard.js @@ -34,9 +34,11 @@ erpnext.stock.ItemDashboard = Class.extend({ let disable_quick_entry = Number(unescape($(this).attr('data-disable_quick_entry'))); let rate = unescape($(this).attr('data-rate')); - if (disable_quick_entry) open_stock_entry(item, warehouse); - - else erpnext.stock.move_item(item, null, warehouse, actual_qty, rate, function() { me.refresh(); }) + if (disable_quick_entry) { + open_stock_entry(item, warehouse); + } else { + erpnext.stock.move_item(item, null, warehouse, actual_qty, rate, function() { me.refresh(); }) + } }); function open_stock_entry(item, warehouse, entry_type) { diff --git a/erpnext/stock/dashboard/item_dashboard.py b/erpnext/stock/dashboard/item_dashboard.py index 7634ff0a28..cafb5c3a0a 100644 --- a/erpnext/stock/dashboard/item_dashboard.py +++ b/erpnext/stock/dashboard/item_dashboard.py @@ -46,7 +46,7 @@ def get_data(item_code=None, warehouse=None, item_group=None, item.update({ 'item_name': frappe.get_cached_value("Item", item.item_code, 'item_name'), 'disable_quick_entry': frappe.get_cached_value("Item", item.item_code, 'has_batch_no') - or frappe.get_cached_value("Item", item.item_code, 'has_serial_no'), + or frappe.get_cached_value("Item", item.item_code, 'has_serial_no'), }) return items