This commit is contained in:
behruz-dev
2025-11-14 16:09:09 +05:00
parent e39efc5300
commit cbcfa7893a

View File

@@ -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)