[fix] test
diff --git a/erpnext/stock/doctype/batch/batch.py b/erpnext/stock/doctype/batch/batch.py
index 2ee8c62..931f243 100644
--- a/erpnext/stock/doctype/batch/batch.py
+++ b/erpnext/stock/doctype/batch/batch.py
@@ -115,9 +115,8 @@
 				if flt(batch_qty) < flt(d.qty):
 					frappe.throw(_("Row #{0}: The batch {1} has only {2} qty. Please select another batch which has {3} qty available or split the row into multiple rows, to deliver/issue from multiple batches").format(d.idx, d.batch_no, batch_qty, d.qty))
 
-def get_batch_no(item_code, warehouse, qty):
-	'''get the batch number with for the given item_code, warehouse and qty if there
-		is only one batch'''
+def get_batch_no(item_code, warehouse, qty, throw=False):
+	'''get the smallest batch with for the given item_code, warehouse and qty'''
 
 	batch_no = None
 	batches = get_batch_qty(item_code = item_code, warehouse = warehouse)