Skip to content

Commit

Permalink
Merge pull request #37509 from frappe/mergify/bp/version-13-hotfix/pr…
Browse files Browse the repository at this point in the history
…-37435

fix(gp): wrong `allocated_amount` when grouped by Sales Person (backport #37435)
  • Loading branch information
ruthra-kumar authored Oct 15, 2023
2 parents 8b4e692 + 7805c3a commit 1cfc6cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions erpnext/accounts/report/gross_profit/gross_profit.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,8 @@ def get_average_rate_based_on_group_by(self):
new_row.qty += flt(row.qty)
new_row.buying_amount += flt(row.buying_amount, self.currency_precision)
new_row.base_amount += flt(row.base_amount, self.currency_precision)
if self.filters.get("group_by") == "Sales Person":
new_row.allocated_amount += flt(row.allocated_amount, self.currency_precision)
new_row = self.set_average_rate(new_row)
self.grouped_data.append(new_row)
else:
Expand Down

0 comments on commit 1cfc6cf

Please sign in to comment.