fix(gp): wrong allocated_amount on multi sales person invoice

This commit is contained in:
Dany Robert 2023-10-10 10:30:09 +00:00
parent 788df14ae8
commit bda82bf1e9

View File

@ -544,6 +544,8 @@ class GrossProfitGenerator(object):
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)