mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-22 10:56:30 +00:00
fix: decimal values causing incorrect batch picking
(cherry picked from commit 7bfe703b04)
This commit is contained in:
committed by
Mergify
parent
2ed29d06d3
commit
c5efddae16
@@ -545,7 +545,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