Show additional optional prices including VAT if one is specified
authorMagnus Hagander <magnus@hagander.net>
Mon, 17 Jul 2017 19:41:53 +0000 (21:41 +0200)
committerMagnus Hagander <magnus@hagander.net>
Mon, 17 Jul 2017 19:41:53 +0000 (21:41 +0200)
In the forms we should always show prices inclusive of VAT.

postgresqleu/confreg/models.py

index 1e05e586b0d9967b68640bf0dd1abd2b75cd88d6..6bda9c1f1a706a4d3b8239dec6c38db4ac8f5a3b 100644 (file)
@@ -307,7 +307,10 @@ class ConferenceAdditionalOption(models.Model):
                # This is what renders in the multichoice checkboxes, so make
                # it nice for the end user.
                if self.cost > 0:
-                       coststr = " (%s %s)" % (settings.CURRENCY_ABBREV, self.cost)
+                       if self.conference.vat_registrations:
+                               coststr = " (%s %.2f)" % (settings.CURRENCY_ABBREV, self.cost * (1+self.conference.vat_registrations.vatpercent/Decimal(100.0)))
+                       else:
+                               coststr = " (%s %s)" % (settings.CURRENCY_ABBREV, self.cost)
                else:
                        coststr = ""
                if self.maxcount == -1: