Skip to content

Commit

Permalink
fix: consider qty field precision while setting sle actual_qty
Browse files Browse the repository at this point in the history
  • Loading branch information
s-aga-r committed Jun 15, 2023
1 parent 9d1fac1 commit 4b00ddd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions erpnext/controllers/buying_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,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 @@ -507,7 +507,9 @@ 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("rejected_qty")
),
"serial_no": cstr(d.rejected_serial_no).strip(),
"incoming_rate": 0.0,
},
Expand Down

0 comments on commit 4b00ddd

Please sign in to comment.