Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Projekt+Hack-n-Fun
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
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
9sorneWpersma
Projekt+Hack-n-Fun
Commits
971146fa
Verified
Commit
971146fa
authored
2 years ago
by
Nik | Klampfradler
Browse files
Options
Downloads
Patches
Plain Diff
Fix total amount calculation for event registrations with donations
parent
e681bf0d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/paweljong/models.py
+4
-3
4 additions, 3 deletions
aleksis/apps/paweljong/models.py
with
4 additions
and
3 deletions
aleksis/apps/paweljong/models.py
+
4
−
3
View file @
971146fa
...
...
@@ -358,11 +358,12 @@ class EventRegistration(ExtensibleModel):
)
def
_get_total_amount
(
self
):
total
,
tax
=
0
,
0
total
,
total_
tax
=
0
,
0
for
item
in
self
.
get_purchased_items
():
tax
+
=
item
.
price
*
item
.
tax_rate
/
100
tax
=
item
.
price
*
item
.
tax_rate
/
100
total
+=
item
.
price
+
tax
return
total
,
tax
total_tax
+=
tax
return
total
,
total_tax
def
__str__
(
self
)
->
str
:
return
f
"
{
self
.
event
}
,
{
self
.
person
.
first_name
}
{
self
.
person
.
last_name
}
"
...
...
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