mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 04:39:11 +00:00
[fix] frappe.require in stock_entry.js
This commit is contained in:
@@ -124,7 +124,7 @@ erpnext.stock.move_item = function(item, source, target, actual_qty, rate, callb
|
||||
}
|
||||
|
||||
if(rate) {
|
||||
dialog.get_field('rate').set_value('rate');
|
||||
dialog.get_field('rate').set_value(rate);
|
||||
dialog.get_field('rate').df.hidden = 0;
|
||||
dialog.get_field('rate').refresh();
|
||||
}
|
||||
@@ -136,7 +136,7 @@ erpnext.stock.move_item = function(item, source, target, actual_qty, rate, callb
|
||||
}
|
||||
|
||||
dialog.set_primary_action(__('Submit'), function() {
|
||||
values = dialog.get_values();
|
||||
var values = dialog.get_values();
|
||||
if(!values) {
|
||||
return;
|
||||
}
|
||||
@@ -159,4 +159,18 @@ erpnext.stock.move_item = function(item, source, target, actual_qty, rate, callb
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
$('<p><a class="link-open">' + __("Add more items or open form") + '</a></p>')
|
||||
.appendTo(dialog.body)
|
||||
.find('.link-open')
|
||||
.on('click', function() {
|
||||
var doc = frappe.new_doc('Stock Entry');
|
||||
doc.from_warehouse = dialog.get_value('source');
|
||||
doc.to_warehouse = dialog.get_value('target');
|
||||
row = frappe.model.add_child(doc, 'items');
|
||||
row.item_code = dialog.get_value('item_code');
|
||||
row.qty = dialog.get_value('qty');
|
||||
row.basic_rate = dialog.get_value('rate');
|
||||
frappe.set_route('Form', doc.doctype, doc.name);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user