Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Tezor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Onboarding
AlekSIS-App-Tezor
Commits
6fa1899b
Commit
6fa1899b
authored
3 years ago
by
Nik | Klampfradler
Browse files
Options
Downloads
Plain Diff
Merge branch '9-move-payment-status-icon-to-invoice-method' into 'master'
Resolve "Move payment status icon to Invoice method" Closes
#9
See merge request
!12
parents
e0e17cec
065d3a3c
No related branches found
No related tags found
1 merge request
!12
Resolve "Move payment status icon to Invoice method"
Pipeline
#59363
canceled
3 years ago
Stage: prepare
Stage: test
Stage: build
Stage: publish
Stage: docker
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/apps/tezor/models/invoice.py
+13
-1
13 additions, 1 deletion
aleksis/apps/tezor/models/invoice.py
aleksis/apps/tezor/templates/tezor/invoice/full.html
+1
-11
1 addition, 11 deletions
aleksis/apps/tezor/templates/tezor/invoice/full.html
with
14 additions
and
12 deletions
aleksis/apps/tezor/models/invoice.py
+
13
−
1
View file @
6fa1899b
...
...
@@ -6,7 +6,7 @@ from django.shortcuts import reverse
from
django.utils.translation
import
gettext_lazy
as
_
from
djmoney.models.fields
import
CurrencyField
,
MoneyField
from
payments
import
PurchasedItem
from
payments
import
PaymentStatus
,
PurchasedItem
from
payments.models
import
BasePayment
from
aleksis.core.mixins
import
ExtensibleModel
,
PureDjangoModel
...
...
@@ -40,6 +40,15 @@ class Invoice(BasePayment, PureDjangoModel):
"
pledge
"
:
(
_
(
"
Payment pledge / manual payment
"
),
"
mdi:hand-coin
"
),
"
sdd
"
:
(
_
(
"
SEPA Direct Debit
"
),
"
mdi:bank-transfer
"
),
}
STATUS_ICONS
=
{
PaymentStatus
.
WAITING
:
"
mdi:cash-lock-open
"
,
PaymentStatus
.
INPUT
:
"
mdi:cash-lock-open
"
,
PaymentStatus
.
PREAUTH
:
"
mdi:cash-lock
"
,
PaymentStatus
.
CONFIRMED
:
"
mdi:cash-check
"
,
PaymentStatus
.
REFUNDED
:
"
mdi:cash-refund
"
,
PaymentStatus
.
REJECTED
:
"
mdi:cash-remove
"
,
PaymentStatus
.
ERROR
:
"
mdi:cash-remove
"
,
}
group
=
models
.
ForeignKey
(
InvoiceGroup
,
verbose_name
=
_
(
"
Invoice group
"
),
related_name
=
"
invoices
"
,
on_delete
=
models
.
SET_NULL
,
null
=
True
...
...
@@ -64,6 +73,9 @@ class Invoice(BasePayment, PureDjangoModel):
def
get_variant_icon
(
self
):
return
self
.
__class__
.
VARIANT_DISPLAY
[
self
.
variant
][
1
]
def
get_status_icon
(
self
):
return
self
.
__class__
.
STATUS_ICONS
[
self
.
status
]
def
get_purchased_items
(
self
):
return
self
.
for_object
.
get_purchased_items
()
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/tezor/templates/tezor/invoice/full.html
+
1
−
11
View file @
6fa1899b
...
...
@@ -72,17 +72,7 @@
</tr>
<tr>
<td>
{% if object.status == "waiting" or object.status == "input" %}
<i
class=
"material-icons iconify"
data-icon=
"mdi:cash-lock-open"
></i>
{% elif object.status == "rejected" or object.status == "error" %}
<i
class=
"material-icons iconify"
data-icon=
"mdi:cash-remove"
></i>
{% elif object.status == "preauth" %}
<i
class=
"material-icons iconify"
data-icon=
"mdi:cash-lock"
></i>
{% elif object.status == "confirmed" %}
<i
class=
"material-icons iconify"
data-icon=
"mdi:cash-check"
></i>
{% elif object.status == "refunded" %}
<i
class=
"material-icons iconify"
data-icon=
"mdi:cash-refund"
></i>
{% endif %}
<i
class=
"material-icons iconify"
data-icon=
"object.get_status_icon"
></i>
</td>
<td>
{{ object.get_status_display }}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment