Skip to content

Commit

Permalink
fix(Batch): reload doc after splitting
Browse files Browse the repository at this point in the history
to show updated qty
  • Loading branch information
barredterra committed Jan 23, 2024
1 parent f3628c7 commit c759406
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions erpnext/stock/doctype/batch/batch.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,19 +128,16 @@ frappe.ui.form.on('Batch', {
fieldtype: 'Data',
}],
(data) => {
frappe.call({
method: 'erpnext.stock.doctype.batch.batch.split_batch',
args: {
frappe.xcall(
'erpnext.stock.doctype.batch.batch.split_batch',
{
item_code: frm.doc.item,
batch_no: frm.doc.name,
qty: data.qty,
warehouse: $btn.attr('data-warehouse'),
new_batch_id: data.new_batch_id
},
callback: (r) => {
frm.refresh();
},
});
}
).then(() => frm.reload_doc());
},
__('Split Batch'),
__('Split')
Expand Down

0 comments on commit c759406

Please sign in to comment.