fix: use serial and batch bundle to fetch incoming rate (backport #51119) (#51146)

Co-authored-by: NaviN <118178330+Navin-S-R@users.noreply.github.com>
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
fix: use serial and batch bundle to fetch incoming rate (#51119)
This commit is contained in:
mergify[bot]
2025-12-16 18:24:39 +01:00
committed by GitHub
parent 53bb2cf7c0
commit 2d42904bfb
2 changed files with 10 additions and 0 deletions

View File

@@ -197,6 +197,13 @@ erpnext.assets.AssetCapitalization = class AssetCapitalization extends erpnext.s
}
}
serial_and_batch_bundle(doc, cdt, cdn) {
var row = frappe.get_doc(cdt, cdn);
if (cdt === "Asset Capitalization Stock Item") {
this.get_warehouse_details(row);
}
}
asset(doc, cdt, cdn) {
var row = frappe.get_doc(cdt, cdn);
if (cdt === "Asset Capitalization Asset Item") {
@@ -410,6 +417,7 @@ erpnext.assets.AssetCapitalization = class AssetCapitalization extends erpnext.s
voucher_type: me.frm.doc.doctype,
voucher_no: me.frm.doc.name,
allow_zero_valuation: 1,
serial_and_batch_bundle: item.serial_and_batch_bundle,
},
},
callback: function (r) {

View File

@@ -363,6 +363,7 @@ class AssetCapitalization(StockController):
"voucher_no": self.name,
"company": self.company,
"allow_zero_valuation": cint(item.get("allow_zero_valuation_rate")),
"serial_and_batch_bundle": item.serial_and_batch_bundle,
}
)
@@ -763,6 +764,7 @@ def get_consumed_stock_item_details(args):
"company": args.company,
"serial_no": args.serial_no,
"batch_no": args.batch_no,
"serial_and_batch_bundle": args.serial_and_batch_bundle,
}
)
out.update(get_warehouse_details(incoming_rate_args))