small fix #255

Merged
ismail merged 3 commits from frontend into main 2025-09-11 20:55:37 +03:00
2 changed files with 1 additions and 1 deletions
Showing only changes of commit d38958c089 - Show all commits

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