From 5380a510d53c86b88487c4bd5bf0e02aa7b8cd9a Mon Sep 17 00:00:00 2001 From: Joel Addison Date: Sun, 13 Oct 2019 21:30:27 +1000 Subject: [PATCH] Fix display of GST amount Move GST rate to settings. Set to Australian GST rate. --- pinaxcon/settings.py | 1 + pinaxcon/templatetags/lca2018_tags.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pinaxcon/settings.py b/pinaxcon/settings.py index 32c35c2e..4216a869 100644 --- a/pinaxcon/settings.py +++ b/pinaxcon/settings.py @@ -367,6 +367,7 @@ PROPOSAL_FORMS = { ATTENDEE_PROFILE_MODEL = "pinaxcon.registrasion.models.AttendeeProfile" ATTENDEE_PROFILE_FORM = "pinaxcon.registrasion.forms.ProfileForm" INVOICE_CURRENCY = "AUD" +GST_RATE = Decimal('0.1') TICKET_PRODUCT_CATEGORY = 1 TERMS_PRODUCT_CATEGORY = 2 ATTENDEE_PROFILE_FORM = "pinaxcon.registrasion.forms.ProfileForm" diff --git a/pinaxcon/templatetags/lca2018_tags.py b/pinaxcon/templatetags/lca2018_tags.py index c2e27d99..e6effd5f 100644 --- a/pinaxcon/templatetags/lca2018_tags.py +++ b/pinaxcon/templatetags/lca2018_tags.py @@ -10,6 +10,7 @@ from symposion.conference import models as conference_models from symposion.schedule.models import Track CONFERENCE_ID = settings.CONFERENCE_ID +GST_RATE = settings.GST_RATE register = template.Library() @@ -71,7 +72,6 @@ def presentation_bg_number(presentation, count): @register.filter() def gst(amount): - GST_RATE = Decimal('0.15') value_no_gst = Decimal(amount / (1 + GST_RATE)) return Decimal(amount - value_no_gst).quantize(Decimal('0.01')) @@ -80,6 +80,7 @@ def gst(amount): def conference_name(): return conference_models.Conference.objects.get(id=CONFERENCE_ID).title + @register.filter() def day_has_tracks(timetable, day): try: @@ -89,6 +90,7 @@ def day_has_tracks(timetable, day): has_tracks = False return len(track_names) + @register.filter() def trackname(room, day): try: @@ -97,6 +99,7 @@ def trackname(room, day): track_name = None return track_name + @register.simple_tag(takes_context=True) def ticket_type(context):