mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-16 08:05:00 +00:00
Merge pull request #46733 from rohitwaghchaure/fixed-support-34788
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):
|
||||
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():
|
||||
if flt(batch_qty, precision) <= 0:
|
||||
continue
|
||||
|
||||
qty_to_consumed = 0
|
||||
if qty > 0:
|
||||
if batch_qty >= qty:
|
||||
|
||||
Reference in New Issue
Block a user