Skip to content

Commit c9e8547

Browse files
committed
πŸ› FIX: κ΄€λ¦¬μž λŒ€μ‹œλ³΄λ“œ 결제 λ‚΄μ—­μ˜ μ™„λ£Œλœ 거래 값이 μ•ˆ λ‚˜μ˜€λŠ” 문제 ν•΄κ²°
1 parent 4dfceee commit c9e8547

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

β€Žadmin_portal/templates/admin_portal/payments/payment_list.htmlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ <h2 class="text-lg font-semibold text-gray-800 mb-4">총 맀좜</h2>
2424

2525
<div class="bg-white rounded-lg shadow-md p-6">
2626
<h2 class="text-lg font-semibold text-gray-800 mb-4">μ™„λ£Œλœ 거래</h2>
27-
<p class="text-3xl font-bold text-blue-600">{{ payments.paginator.count }}건</p>
27+
<p class="text-3xl font-bold text-blue-600">{{ completed_count }}건</p>
2828
</div>
2929
</div>
3030

β€Žadmin_portal/views.pyβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,6 +1538,7 @@ def get_context_data(self, **kwargs):
15381538

15391539
# 톡계 데이터
15401540
payments = Payment.objects.all()
1541+
context["completed_count"] = payments.filter(payment_status="completed").count()
15411542
context["total_sales"] = (
15421543
payments.filter(payment_status="completed").aggregate(Sum("amount"))[
15431544
"amount__sum"

0 commit comments

Comments
Β (0)