feat: expenses in statistics

This commit is contained in:
2024-11-24 19:22:38 +04:00
parent 0adc36827a
commit 81d5261af1
3 changed files with 146 additions and 79 deletions

View File

@@ -1,5 +1,6 @@
import datetime
from typing import List, Tuple
from optparse import Option
from typing import List, Tuple, Optional
from enums.profit_table_group_by import ProfitTableGroupBy
from schemas.base import BaseSchema
@@ -10,6 +11,7 @@ class ProfitChartDataItem(BaseSchema):
date: datetime.date
revenue: float
profit: float
expenses: float
deals_count: int
@@ -17,6 +19,7 @@ class ProfitTableDataItem(BaseSchema):
grouped_value: datetime.date | str | int
revenue: float
profit: float
expenses: Optional[float] = 0
deals_count: int
# endregion