fix
This commit is contained in:
@@ -347,7 +347,6 @@ class CounterpartyAKTApiView(views.APIView):
|
|||||||
return Response(response, status=200)
|
return Response(response, status=200)
|
||||||
|
|
||||||
def _group_by_date(self, parties, expences, incomes):
|
def _group_by_date(self, parties, expences, incomes):
|
||||||
"""Kun boyicha guruhlash"""
|
|
||||||
daily_data = defaultdict(lambda: {
|
daily_data = defaultdict(lambda: {
|
||||||
'parties': [],
|
'parties': [],
|
||||||
'expences': [],
|
'expences': [],
|
||||||
@@ -360,7 +359,7 @@ class CounterpartyAKTApiView(views.APIView):
|
|||||||
})
|
})
|
||||||
|
|
||||||
for party in parties:
|
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)
|
daily_data[date_key]['parties'].append(party)
|
||||||
|
|
||||||
party_total = getattr(party, 'total_price', 0) or 0
|
party_total = getattr(party, 'total_price', 0) or 0
|
||||||
|
|||||||
Reference in New Issue
Block a user