Skip to content

Commit

Permalink
fix(gp): wrong allocated_amount on multi sales person invoice
Browse files Browse the repository at this point in the history
(cherry picked from commit bda82bf)
  • Loading branch information
rtdany10 authored and mergify[bot] committed Oct 14, 2023
1 parent d2b22db commit d266423
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 @@ -544,6 +544,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)

Expand Down

0 comments on commit d266423

Please sign in to comment.