fi
This commit is contained in:
@@ -144,7 +144,6 @@ class CounterpartyStatisticsApiView(views.APIView):
|
|||||||
total_kredit_usd=Sum('kredit_usd'),
|
total_kredit_usd=Sum('kredit_usd'),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
counterparty_stats = queryset.aggregate(
|
counterparty_stats = queryset.aggregate(
|
||||||
total_counterparties=Count('id'),
|
total_counterparties=Count('id'),
|
||||||
total_creditors=Count('id', filter=Q(status='CREDITOR')),
|
total_creditors=Count('id', filter=Q(status='CREDITOR')),
|
||||||
@@ -160,6 +159,9 @@ class CounterpartyStatisticsApiView(views.APIView):
|
|||||||
if value is None:
|
if value is None:
|
||||||
result[key] = 0
|
result[key] = 0
|
||||||
|
|
||||||
|
result['total_debit_uzs'] = abs(Decimal(result['total_debit_uzs']))
|
||||||
|
result['total_debit_usd'] = abs(Decimal(result['total_debit_usd']))
|
||||||
|
|
||||||
return Response(result)
|
return Response(result)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user