small fix

This commit is contained in:
Faheed 2025-09-11 19:02:05 +03:00
parent c3fe1817c3
commit d38958c089
2 changed files with 1 additions and 1 deletions

View File

@ -505,7 +505,7 @@ def general_dashboard(request,dealer_slug):
total_revenue_generated = total_revenue_from_cars + total_revenue_from_services
# total_expenses=sum([x.amount_paid for x in dealer.entity.get_bills().filter(bill_items__item_role="expense")])
total_expenses=dealer.entity.get_bills().filter(bill_items__item_role="expense").aggregate(total=Sum('amount_paid'))['total'] or 0
gross_profit = net_profit_from_cars - total_expenses
gross_profit = net_profit_from_cars+total_revenue_from_services - total_expenses
# ----------------------------------------------------
# 4. Chart Data Aggregation

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 KiB