mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 10:11:20 +00:00
fix: decimal values causing incorrect batch picking
This commit is contained in:
@@ -551,7 +551,11 @@ class SubcontractingController(StockController):
|
|||||||
def __get_batch_nos_for_bundle(self, qty, key):
|
def __get_batch_nos_for_bundle(self, qty, key):
|
||||||
available_batches = defaultdict(float)
|
available_batches = defaultdict(float)
|
||||||
|
|
||||||
|
precision = frappe.get_precision("Subcontracting Receipt Supplied Item", "consumed_qty")
|
||||||
for batch_no, batch_qty in self.available_materials[key]["batch_no"].items():
|
for batch_no, batch_qty in self.available_materials[key]["batch_no"].items():
|
||||||
|
if flt(batch_qty, precision) <= 0:
|
||||||
|
continue
|
||||||
|
|
||||||
qty_to_consumed = 0
|
qty_to_consumed = 0
|
||||||
if qty > 0:
|
if qty > 0:
|
||||||
if batch_qty >= qty:
|
if batch_qty >= qty:
|
||||||
|
|||||||
Reference in New Issue
Block a user