mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-28 22:28:24 +00:00
fix(stock): auto-select batch no before saving transaction records (#58536)
This commit is contained in:
@@ -799,7 +799,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
||||
|
||||
process_item_selection(doc, cdt, cdn) {
|
||||
var item = frappe.get_doc(cdt, cdn);
|
||||
let update_stock = 0;
|
||||
let update_stock = ["Sales Invoice", "Purchase Invoice"].includes(doc.doctype) ? doc.update_stock : 0;
|
||||
var me = this;
|
||||
|
||||
item.weight_per_unit = 0;
|
||||
|
||||
@@ -343,6 +343,7 @@ class TransactionBase(StatusUpdater):
|
||||
"item_tax_template": item.get("item_tax_template"),
|
||||
"child_doctype": item.get("doctype"),
|
||||
"child_docname": item.get("name"),
|
||||
"use_serial_batch_fields": item.get("use_serial_batch_fields"),
|
||||
}
|
||||
),
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user