Skip to content

Commit

Permalink
fix: consider field precision while setting sle actual_qty (#35717)
Browse files Browse the repository at this point in the history
(cherry picked from commit 3f62e85)

# Conflicts:
#	erpnext/controllers/buying_controller.py
  • Loading branch information
s-aga-r authored and mergify[bot] committed Jun 15, 2023
1 parent 6dd5117 commit b577ee2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion erpnext/controllers/buying_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def update_stock_ledger(self, allow_negative_stock=False, via_landed_cost_vouche
continue

if d.warehouse:
pr_qty = flt(d.qty) * flt(d.conversion_factor)
pr_qty = flt(flt(d.qty) * flt(d.conversion_factor), d.precision("stock_qty"))

if pr_qty:

Expand Down Expand Up @@ -574,7 +574,12 @@ def update_stock_ledger(self, allow_negative_stock=False, via_landed_cost_vouche
d,
{
"warehouse": d.rejected_warehouse,
<<<<<<< HEAD
"actual_qty": flt(d.rejected_qty) * flt(d.conversion_factor),
=======
"actual_qty": flt(flt(d.rejected_qty) * flt(d.conversion_factor), d.precision("stock_qty")),
"serial_no": cstr(d.rejected_serial_no).strip(),
>>>>>>> 3f62e854e5 (fix: consider field precision while setting sle actual_qty (#35717))
"incoming_rate": 0.0,
"serial_and_batch_bundle": d.rejected_serial_and_batch_bundle,
},
Expand Down

0 comments on commit b577ee2

Please sign in to comment.