Skip to content
Snippets Groups Projects
Commit 2399f6a4 authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Merge branch 'master' of edugit.org:Teckids/hacknfun/AlekSIS-App-Paweljong

parents 87b53d93 1e5ef858
No related branches found
No related tags found
No related merge requests found
Pipeline #60051 failed
......@@ -6,6 +6,22 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog`_,
and this project adheres to `Semantic Versioning`_.
`1.4.2`_
--------
Changed
~~~~~~~
* Align with Tezor 1.1
* Add imaginary SKU to items
* Return net prices in items
* Fix decimal type for donatiosn and discounts
`1.4.1`_
--------
* Fix a predicate granting privileges to participants
`1.4`_
------
......@@ -102,3 +118,5 @@ Added
.. _1.3.1: https://edugit.org/Teckids/hacknfun//AlekSIS-App-Paweljong/-/tags/1.3.1
.. _1.3.2: https://edugit.org/Teckids/hacknfun//AlekSIS-App-Paweljong/-/tags/1.3.2
.. _1.4: https://edugit.org/Teckids/hacknfun//AlekSIS-App-Paweljong/-/tags/1.4
.. _1.4.1: https://edugit.org/Teckids/hacknfun//AlekSIS-App-Paweljong/-/tags/1.4.1
.. _1.4.2: https://edugit.org/Teckids/hacknfun//AlekSIS-App-Paweljong/-/tags/1.4.2
......@@ -311,9 +311,9 @@ class EventRegistration(ExtensibleModel):
yield PurchasedItem(
name=self.event.display_name,
quantity=1,
price=Decimal(self.event.cost),
price=Decimal(self.event.cost / 1.07),
currency="EUR",
sku="",
sku="EVENT",
tax_rate=7,
)
......@@ -322,9 +322,9 @@ class EventRegistration(ExtensibleModel):
yield PurchasedItem(
name=_("Social Sponsoring / Extra Donation"),
quantity=1,
price=self.donation,
price=Decimal(self.donation),
currency="EUR",
sku="",
sku="DONAT",
tax_rate=0,
)
......@@ -333,17 +333,17 @@ class EventRegistration(ExtensibleModel):
yield PurchasedItem(
name=_("Voucher / Granted discount"),
quantity=1,
price=-1 * self.voucher.discount * self.event.cost / 100,
price=Decimal(-1 * self.voucher.discount * (self.event.cost / 1.07) / 100),
currency="EUR",
sku="",
sku="DISCO",
tax_rate=7,
)
def _get_total_amount(self):
total, tax = 0, 0
for item in self.get_purchased_items():
total += item.price
tax += item.price / (item.tax_rate + 100) * item.tax_rate
tax += item.price * item.tax_rate / 100
total += item.price + tax
return total, tax
def __str__(self) -> str:
......
[tool.poetry]
name = "AlekSIS-App-Paweljong"
version = "1.4.1"
version = "1.4.2"
packages = [
{ include = "aleksis" }
]
......
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