Skip to content

Commit

Permalink
fix: invalid gp calculation
Browse files Browse the repository at this point in the history
(cherry picked from commit c798512)
  • Loading branch information
rtdany10 authored and mergify[bot] committed Sep 17, 2024
1 parent 9c4eaa2 commit 291f0a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/controllers/selling_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ def set_gross_profit(self):
if self.doctype in ["Sales Order", "Quotation"]:
for item in self.items:
item.gross_profit = flt(
((item.base_rate - flt(item.valuation_rate)) * item.stock_qty),
((flt(item.stock_uom_rate) - flt(item.valuation_rate)) * item.stock_qty),
self.precision("amount", item),
)

Expand Down

0 comments on commit 291f0a5

Please sign in to comment.