Skip to content

Commit

Permalink
fix: precision issue (#45013)
Browse files Browse the repository at this point in the history
(cherry picked from commit 7db9bca)
  • Loading branch information
rohitwaghchaure authored and mergify[bot] committed Jan 1, 2025
1 parent 8d650e5 commit 2b4375e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions erpnext/stock/doctype/stock_entry/stock_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -3289,8 +3289,10 @@ def create_serial_and_batch_bundle(parent_doc, row, child, type_of_transaction=N
doc.append("entries", {"serial_no": serial_no, "warehouse": row.warehouse, "qty": -1})

elif row.batches_to_be_consume:
precision = frappe.get_precision("Serial and Batch Entry", "qty")
doc.has_batch_no = 1
for batch_no, qty in row.batches_to_be_consume.items():
qty = flt(qty, precision)
doc.append("entries", {"batch_no": batch_no, "warehouse": row.warehouse, "qty": qty * -1})

if not doc.entries:
Expand Down

0 comments on commit 2b4375e

Please sign in to comment.