feat: Batch wise item pricing
diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py
index 08f7a83..a5f8e5f 100644
--- a/erpnext/stock/get_item_details.py
+++ b/erpnext/stock/get_item_details.py
@@ -680,6 +680,9 @@
else:
conditions += "and (customer is null or customer = '') and (supplier is null or supplier = '')"
+ if args.get('batch_no'):
+ conditions += "and batch_no = %(batch_no)s"
+
if args.get('transaction_date'):
conditions += """ and %(transaction_date)s between
ifnull(valid_from, '2000-01-01') and ifnull(valid_upto, '2500-12-31')"""
@@ -709,6 +712,7 @@
"uom": args.get('uom'),
"transaction_date": args.get('transaction_date'),
"posting_date": args.get('posting_date'),
+ "batch_no": args.get('batch_no')
}
item_price_data = 0