diff --git a/erpnext/stock/dashboard/item_dashboard.js b/erpnext/stock/dashboard/item_dashboard.js index e9499895fe..113a2efb50 100644 --- a/erpnext/stock/dashboard/item_dashboard.js +++ b/erpnext/stock/dashboard/item_dashboard.js @@ -75,8 +75,13 @@ erpnext.stock.ItemDashboard = Class.extend({ this.content.find('.more').addClass('hidden'); } - $(frappe.render_template('item_dashboard_list', context)).appendTo(this.result); - + // If not any stock in any warehouses provide a message to end user + if (context.data.length > 0) { + $(frappe.render_template('item_dashboard_list', context)).appendTo(this.result); + } else { + var message = __(" Currently no stock available in any warehouse") + $(" "+message+"").appendTo(this.result); + } }, get_item_dashboard_data: function(data, max_count, show_item) { if(!max_count) max_count = 0; @@ -182,4 +187,4 @@ erpnext.stock.move_item = function(item, source, target, actual_qty, rate, callb frappe.set_route('Form', doc.doctype, doc.name); }) }); -} \ No newline at end of file +}