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
5b0f3345
Commit
5b0f3345
authored
2 years ago
by
Tom Teichler
Browse files
Options
Downloads
Plain Diff
Merge branch 'fix-invoice-view' into sepaxml
parents
8220c85f
7d4387f9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!16
Sepaxml
Pipeline
#82370
failed
2 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
-12
13 additions, 12 deletions
aleksis/apps/tezor/models/invoice.py
aleksis/apps/tezor/templates/tezor/invoice/full.html
+3
-1
3 additions, 1 deletion
aleksis/apps/tezor/templates/tezor/invoice/full.html
with
16 additions
and
13 deletions
aleksis/apps/tezor/models/invoice.py
+
13
−
12
View file @
5b0f3345
...
...
@@ -157,19 +157,20 @@ class Invoice(BasePayment, PureDjangoModel):
@property
def
totals_table
(
self
):
tax_amounts
=
{}
for
item
in
self
.
get_purchased_items
():
tax_amounts
.
setdefault
(
item
.
tax_rate
,
0
)
tax_amounts
[
item
.
tax_rate
]
+=
item
.
price
*
item
.
tax_rate
/
100
values
=
[]
for
tax_rate
,
total
in
tax_amounts
.
items
():
values
.
append
(
{
"
name
"
:
_
(
"
VAT {} %
"
).
format
(
tax_rate
),
"
value
"
:
total
,
"
currency
"
:
self
.
currency
,
}
)
if
self
.
for_object
:
for
item
in
self
.
get_purchased_items
():
tax_amounts
.
setdefault
(
item
.
tax_rate
,
0
)
tax_amounts
[
item
.
tax_rate
]
+=
item
.
price
*
item
.
tax_rate
/
100
for
tax_rate
,
total
in
tax_amounts
.
items
():
values
.
append
(
{
"
name
"
:
_
(
"
VAT {} %
"
).
format
(
tax_rate
),
"
value
"
:
total
,
"
currency
"
:
self
.
currency
,
}
)
values
.
append
(
{
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/tezor/templates/tezor/invoice/full.html
+
3
−
1
View file @
5b0f3345
...
...
@@ -112,7 +112,9 @@
</div>
{% if can_view_purchased_items %}
{% render_table object.purchased_items_table %}
{% if object.for_object %}
{% render_table object.purchased_items_table %}
{% endif %}
{% render_table object.totals_table %}
{% endif %}
...
...
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