From f60d2bfdaebea1fbb1a7334238bdead02f8f8ede Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Tue, 12 Jul 2016 23:16:45 +0200 Subject: [PATCH] add customer field to customorder model, change template a bit --- shop/models.py | 8 +++++++- shop/templates/pdf/custominvoice.html | 16 +++------------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/shop/models.py b/shop/models.py index 97ee9128..0ed28d3b 100644 --- a/shop/models.py +++ b/shop/models.py @@ -22,7 +22,13 @@ class CustomOrder(CreatedUpdatedModel): help_text=_('The camp this custom order is for.'), ) - text = models.TextField() + text = models.TextField( + help_text=_('The invoice text') + ) + + customer = models.TextField( + help_text=_('The customer info for this order, use
for newlines') + ) amount = models.IntegerField( help_text=_('Amount of this custom order (in DKK, including VAT).') diff --git a/shop/templates/pdf/custominvoice.html b/shop/templates/pdf/custominvoice.html index 31df124f..389508e3 100644 --- a/shop/templates/pdf/custominvoice.html +++ b/shop/templates/pdf/custominvoice.html @@ -21,37 +21,27 @@ Text - - Quantity Price - - Total {{ invoice.customorder.text }} - - 1 - - {{ invoice.customorder.amount|currency }} {{ invoice.customorder.amount|currency }} - - + Danish VAT (25%) {{ invoice.customorder.vat|currency }} - - + Total {{ invoice.customorder.amount|currency }}

-Payment should be made by bank transfer to Arbejdernes Landsbank reg. 5371 account no. 0244504 within two weeks from {{ invoice.created|date:"b jS, Y" }} please. Thank you! +Payment should be made by bank transfer to our account in Arbejdernes Landsbank reg. 5371 account no. 0244504 within two weeks from {{ invoice.created|date:"b jS, Y" }} please. Thank you!