Skip to content

Commit

Permalink
perf enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalfox committed Apr 13, 2024
1 parent 3dbb9b9 commit 39744af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion billing/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def get_client_billing_control_pivotable_data(filter_on_subsidiary=None, filter_
mission_month_consultant_data[_("type")] = _("Done work")
data.append(mission_month_consultant_data)
if mission.billing_mode == "TIME_SPENT": # Add bills for time spent mission
for billed_detail in BillDetail.objects.filter(mission=mission, bill__state__in=bill_state):
for billed_detail in BillDetail.objects.filter(mission=mission, bill__state__in=bill_state).select_related("consultant"):
mission_month_bill_data = mission_data.copy()
mission_month_bill_data[_("month")] = billed_detail.month.isoformat()
mission_month_bill_data[_("amount")] = -float(billed_detail.amount or 0)
Expand Down

0 comments on commit 39744af

Please sign in to comment.