diff --git a/pinaxcon/settings.py b/pinaxcon/settings.py index 9811345eb40a8c72bdedf7585082292cd53187c2..6352f523ab07a70cfec52d919fb0c0d109bdb8f1 100644 --- a/pinaxcon/settings.py +++ b/pinaxcon/settings.py @@ -1,6 +1,7 @@ import os import dj_database_url +from decimal import Decimal PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__)) @@ -315,6 +316,13 @@ TICKET_PRODUCT_CATEGORY = 1 INVOICE_CURRENCY = "USD" +# VAT rate is 21% +# When PINAX_VAT_RATE is set, this percentage of the invoice total is +# displayed as a line item as the amount of VAT paid. +INVOICE_VAT_RATE = Decimal(os.environ.get('PINAX_VAT_RATE') or 0) +if INVOICE_VAT_RATE > 1: + INVOICE_VAT_RATE /= 100 + MARKDOWN_DEUX_STYLES = { "default": { "safe_mode": False, diff --git a/pinaxcon/templates/registrasion/invoice/details.html b/pinaxcon/templates/registrasion/invoice/details.html index 29e55d0bd2772d1624fa5e4f70cd0e8f1787fa1b..464057020909a5e15f0597fa21512a45211fcb15 100644 --- a/pinaxcon/templates/registrasion/invoice/details.html +++ b/pinaxcon/templates/registrasion/invoice/details.html @@ -38,6 +38,13 @@ {% endblock %} {% block extra_line_items_after_total %} + {% vat_amount(invoice) as vat %} + {% if vat %} +