mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-30 03:58:26 +00:00
fix: stock move dialog duplicate submit actions (#24859)
* fix: duplicate submit actions * fix sider errors.
This commit is contained in:
committed by
GitHub
parent
55d45532b4
commit
2e2f3f9578
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user