Skip to content

Commit

Permalink
Merge pull request #43188 from rtdany10/gp_so_issue
Browse files Browse the repository at this point in the history
fix: invalid gp calculation
  • Loading branch information
ruthra-kumar authored Sep 17, 2024
2 parents 891d383 + c798512 commit e29e1e4
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 @@ -637,7 +637,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 e29e1e4

Please sign in to comment.