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

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
This commit is contained in:
mergify[bot]
2026-08-28 12:06:38 +00:00
committed by GitHub
parent 629bc20e90
commit eb4c327a2b
2 changed files with 2 additions and 1 deletions

View File

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

@@ -344,6 +344,7 @@ class TransactionBase(StatusUpdater):
"child_doctype": item.get("doctype"),
"child_docname": item.get("name"),
"is_old_subcontracting_flow": self.get("is_old_subcontracting_flow"),
"use_serial_batch_fields": item.get("use_serial_batch_fields"),
}
),
self,