Skip to content
Snippets Groups Projects
Verified Commit 971146fa authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Fix total amount calculation for event registrations with donations

parent e681bf0d
No related branches found
No related tags found
No related merge requests found
......@@ -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}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment