From 5603467cee69b51b3d8017cba95507afe833ec97 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 13 Oct 2025 19:26:34 +0530 Subject: [PATCH] refactor: move value inline (cherry picked from commit 1717a7c983d79602da02db5ad125288076400870) --- erpnext/stock/doctype/batch/batch.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/batch/batch.py b/erpnext/stock/doctype/batch/batch.py index 6b3aa422772..699b7a9562d 100644 --- a/erpnext/stock/doctype/batch/batch.py +++ b/erpnext/stock/doctype/batch/batch.py @@ -253,7 +253,6 @@ def get_batch_qty( get_auto_batch_nos, ) - based_on = frappe.get_single_value("Stock Settings", "pick_serial_and_batch_based_on") batchwise_qty = defaultdict(float) kwargs = frappe._dict( { @@ -263,7 +262,7 @@ def get_batch_qty( "posting_date": posting_date, "posting_time": posting_time, "batch_no": batch_no, - "based_on": based_on, + "based_on": frappe.get_single_value("Stock Settings", "pick_serial_and_batch_based_on"), "ignore_voucher_nos": ignore_voucher_nos, "for_stock_levels": for_stock_levels, "consider_negative_batches": consider_negative_batches,