fix(stock): auto-select batch no before saving transaction records (#58536)

This commit is contained in:
Diptanil Saha
2026-08-28 17:01:23 +05:30
committed by GitHub
parent 64186f229f
commit ca49de633f
2 changed files with 2 additions and 1 deletions

View File

@@ -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;

View File

@@ -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,