mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-24 04:13:12 +00:00
fix: Deposits statistics headers
This commit is contained in:
parent
8138aa9af1
commit
5dd2625c4a
1 changed files with 4 additions and 4 deletions
|
@ -272,8 +272,8 @@ def index_stats(request):
|
||||||
"title": _("Deposits by payment method"),
|
"title": _("Deposits by payment method"),
|
||||||
"headers": [
|
"headers": [
|
||||||
_("Payment method"),
|
_("Payment method"),
|
||||||
_("Returned deposits"),
|
|
||||||
_("Unreturned deposits"),
|
_("Unreturned deposits"),
|
||||||
|
_("Returned deposits"),
|
||||||
_("Total"),
|
_("Total"),
|
||||||
_("Amount"),
|
_("Amount"),
|
||||||
],
|
],
|
||||||
|
@ -303,8 +303,8 @@ def index_stats(request):
|
||||||
"title": _("Deposits by item type"),
|
"title": _("Deposits by item type"),
|
||||||
"headers": [
|
"headers": [
|
||||||
_("Deposit item"),
|
_("Deposit item"),
|
||||||
_("Returned deposits"),
|
|
||||||
_("Unreturned deposits"),
|
_("Unreturned deposits"),
|
||||||
|
_("Returned deposits"),
|
||||||
_("Total"),
|
_("Total"),
|
||||||
_("Amount"),
|
_("Amount"),
|
||||||
],
|
],
|
||||||
|
@ -318,7 +318,7 @@ def index_stats(request):
|
||||||
.aggregate(Sum("deposit_amount"))
|
.aggregate(Sum("deposit_amount"))
|
||||||
.get("deposit_amount__sum", None)
|
.get("deposit_amount__sum", None)
|
||||||
)
|
)
|
||||||
reimbursed_amount = (
|
returned_amount = (
|
||||||
Deposit.objects.filter(returned=True)
|
Deposit.objects.filter(returned=True)
|
||||||
.aggregate(Sum("deposit_amount"))
|
.aggregate(Sum("deposit_amount"))
|
||||||
.get("deposit_amount__sum", None)
|
.get("deposit_amount__sum", None)
|
||||||
|
@ -333,7 +333,7 @@ def index_stats(request):
|
||||||
(
|
(
|
||||||
_("Already returned"),
|
_("Already returned"),
|
||||||
Deposit.objects.filter(returned=True).count(),
|
Deposit.objects.filter(returned=True).count(),
|
||||||
"{} €".format(reimbursed_amount or 0),
|
"{} €".format(returned_amount or 0),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue