diff --git a/erpnext/stock/dashboard/item_dashboard.js b/erpnext/stock/dashboard/item_dashboard.js index 1bfa2cf56c6..97f5494c5f3 100644 --- a/erpnext/stock/dashboard/item_dashboard.js +++ b/erpnext/stock/dashboard/item_dashboard.js @@ -156,7 +156,8 @@ erpnext.stock.move_item = function(item, source, target, actual_qty, rate, callb fieldtype: 'Float', description: __('Available {0}', [actual_qty]) }, {fieldname: 'rate', label: __('Rate'), fieldtype: 'Currency', hidden: 1 }, ], - }) + }); + var submitted = false; dialog.show(); dialog.get_field('item_code').set_input(item); @@ -180,6 +181,7 @@ erpnext.stock.move_item = function(item, source, target, actual_qty, rate, callb } dialog.set_primary_action(__('Submit'), function() { + if(submitted) return; var values = dialog.get_values(); if(!values) { return; @@ -192,6 +194,7 @@ erpnext.stock.move_item = function(item, source, target, actual_qty, rate, callb frappe.msgprint(__('Source and target warehouse must be different')); } + submitted = true; frappe.call({ method: 'erpnext.stock.doctype.stock_entry.stock_entry_utils.make_stock_entry', args: values,