Skip to content

Commit

Permalink
fix: consider field precision while setting sle actual_qty (backport #…
Browse files Browse the repository at this point in the history
…35717) (#35720)

* fix: consider field precision while setting sle actual_qty (#35717)

(cherry picked from commit 3f62e85)

# Conflicts:
#	erpnext/controllers/buying_controller.py

* chore: `conflicts`

---------

Co-authored-by: Sagar Sharma <sagarsharma.s312@gmail.com>
  • Loading branch information
mergify[bot] and s-aga-r authored Jun 15, 2023
1 parent 6dd5117 commit 50f8385
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 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,7 @@ def update_stock_ledger(self, allow_negative_stock=False, via_landed_cost_vouche
d,
{
"warehouse": d.rejected_warehouse,
"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")),
"incoming_rate": 0.0,
"serial_and_batch_bundle": d.rejected_serial_and_batch_bundle,
},
Expand Down

0 comments on commit 50f8385

Please sign in to comment.