Skip to content

Commit

Permalink
fix: Wrong allocated_amount for sales_team in gross_profit report (#4…
Browse files Browse the repository at this point in the history
…2989)

* fix: Wrong allocated_amount for sales_team in gross_profit report

* style: Removes whitespaces

---------

Co-authored-by: ruthra kumar <ruthra@erpnext.com>
  • Loading branch information
devdiogenes and ruthra-kumar committed Dec 13, 2024
1 parent bdb60a5 commit 328b9e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion erpnext/accounts/report/gross_profit/gross_profit.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,10 @@ def load_invoice_items(self):
"""

if self.filters.group_by == "Sales Person":
sales_person_cols = ", sales.sales_person, sales.allocated_amount, sales.incentives"
sales_person_cols = """, sales.sales_person,
sales.allocated_percentage * `tabSales Invoice Item`.base_net_amount / 100 as allocated_amount,
sales.incentives
"""
sales_team_table = "left join `tabSales Team` sales on sales.parent = `tabSales Invoice`.name"
else:
sales_person_cols = ""
Expand Down

0 comments on commit 328b9e7

Please sign in to comment.