Changeset - 5380a510d53c
[Not reviewed]
0 2 0
Joel Addison - 5 years ago 2019-10-13 11:34:08
joel@addison.net.au
Fix display of GST amount

Move GST rate to settings. Set to Australian GST rate.
2 files changed with 5 insertions and 1 deletions:
0 comments (0 inline, 0 general)
pinaxcon/settings.py
Show inline comments
...
 
@@ -364,12 +364,13 @@ PROPOSAL_FORMS = {
 
}
 

	
 
# Registrasion bits:
 
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"
 

	
 
#REGIDESK
 
REGIDESK_BOARDING_GROUP = "Ready For Boarding"
pinaxcon/templatetags/lca2018_tags.py
Show inline comments
...
 
@@ -7,12 +7,13 @@ from django.contrib.staticfiles.templatetags import staticfiles
 
from easy_thumbnails.files import get_thumbnailer
 
from registrasion.templatetags import registrasion_tags
 
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()
 

	
 

	
 
@register.assignment_tag()
 
def classname(ob):
...
 
@@ -68,38 +69,40 @@ def define(value):
 
def presentation_bg_number(presentation, count):
 
    return sum(ord(i) for i in presentation.title) % 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'))
 

	
 

	
 
@register.simple_tag()
 
def conference_name():
 
    return conference_models.Conference.objects.get(id=CONFERENCE_ID).title
 

	
 

	
 
@register.filter()
 
def day_has_tracks(timetable, day):
 
    try:
 
        track_names = day.track_set.all()
 
        has_tracks = True
 
    except Track.DoesNotExist:
 
        has_tracks = False
 
    return len(track_names)
 

	
 

	
 
@register.filter()
 
def trackname(room, day):
 
    try:
 
        track_name = room.track_set.get(day=day).name
 
    except Track.DoesNotExist:
 
        track_name = None
 
    return track_name
 

	
 

	
 
@register.simple_tag(takes_context=True)
 
def ticket_type(context):
 

	
 
    # Default to purchased ticket type (only item from category 1)
 
    items = registrasion_tags.items_purchased(context, 1)
 

	
0 comments (0 inline, 0 general)