diff --git a/shop/management/commands/invoice-worker.py b/shop/management/commands/invoice-worker.py index cc33be91..784cd449 100644 --- a/shop/management/commands/invoice-worker.py +++ b/shop/management/commands/invoice-worker.py @@ -36,7 +36,7 @@ class Command(BaseCommand): try: pdffile = generate_pdf_letter( filename=invoice.filename, - template='invoice.html', + template='pdf/invoice.html', formatdict=formatdict, ) self.output('Generated pdf for invoice %s' % invoice) diff --git a/shop/models.py b/shop/models.py index 814d3f36..201b1eda 100644 --- a/shop/models.py +++ b/shop/models.py @@ -271,6 +271,8 @@ class Invoice(CreatedUpdatedModel): def filename(self): return 'bornhack_invoice_%s.pdf' % self.pk + def regretdate(self): + return inv.created+timedelta(days=14) class CoinifyAPIInvoice(CreatedUpdatedModel): invoicejson = JSONField() diff --git a/shop/templates/invoice.html b/shop/templates/invoice.html deleted file mode 100644 index 72836f1a..00000000 --- a/shop/templates/invoice.html +++ /dev/null @@ -1,52 +0,0 @@ -{% load shop_tags %} - - -
Order number: {{ invoice.order.pk }} | -
Invoice number: {{ invoice.pk }} | -
Date: {% now "j/n-Y" %} | -
- Name - | - Quantity - | - Price - |
- Total
-{% for order_product in invoice.order.orderproductrelation_set.all %}
-
- {{ order_product.product.name }}
- |
- {{ order_product.quantity }}
- |
- {{ order_product.product.price|currency }}
- |
- {{ order_product.total|currency }}
-{% endfor %}
-
- |
- |
- Danish VAT (25%)
- |
- {{ order.vat|currency }}
-
- |
- |
- Total
- |
- {{ order.total|currency }}
-
- | |
BornHack IVS |
+ + | Invoice {{ invoice.pk }} |
+
+ | + |
+ Order number: {{ invoice.order.pk }} + Invoice number: {{ invoice.pk }} + Invoice date: {% now "b js, Y" %} + |
+
+ Name + | + Quantity + | + Price + |
+ Total
+{% for order_product in invoice.order.orderproductrelation_set.all %}
+
+ {{ order_product.product.name }}
+ |
+ {{ order_product.quantity }}
+ |
+ {{ order_product.product.price|currency }}
+ |
+ {{ order_product.total|currency }}
+{% endfor %}
+
+ |
+ |
+ Danish VAT (25%)
+ |
+ {{ order.vat|currency }}
+
+ |
+ |
+ Total
+ |
+ {{ order.total|currency }}
+
+ | |
+
Note: Danish law grants everyone a 14 days 'cooling-off' period for +internet purchases, in which the customer can regret the purchase for any +reason (including just changing your mind). In case you regret this purchase +please contact us on info@bornhack.org for a full refund. This is possible until +{{ invoice.regretdate|date:"b js, Y" }}