This commit is contained in:
behruz-dev
2025-11-14 15:28:44 +05:00
parent 58ba6c3f58
commit 5337656005

View File

@@ -347,7 +347,6 @@ class CounterpartyAKTApiView(views.APIView):
return Response(response, status=200)
def _group_by_date(self, parties, expences, incomes):
"""Kun boyicha guruhlash"""
daily_data = defaultdict(lambda: {
'parties': [],
'expences': [],
@@ -360,7 +359,7 @@ class CounterpartyAKTApiView(views.APIView):
})
for party in parties:
date_key = party.close_date.strftime('%Y-%m-%d')
date_key = party.closed_date.strftime('%Y-%m-%d')
daily_data[date_key]['parties'].append(party)
party_total = getattr(party, 'total_price', 0) or 0