Add IBAN/SWIFT to custom invoices, bank name in settings - fixes #172 (#187)

This commit is contained in:
Benjamin Bach 2017-12-12 22:16:06 +01:00 committed by Thomas Steen Rasmussen
parent 93a827bf7e
commit ecdc62df7c
3 changed files with 15 additions and 1 deletions

View file

@ -61,6 +61,7 @@ COINIFY_CALLBACK_HOSTNAME='{{ coinify_callback_hostname | default('') }}' # leav
# shop settings
PDF_LETTERHEAD_FILENAME='{{ pdf_letterhead_filename }}'
BANKACCOUNT_BANK='{{ bank_name }}'
BANKACCOUNT_IBAN='{{ iban }}'
BANKACCOUNT_SWIFTBIC='{{ swiftbic }}'
BANKACCOUNT_REG='{{ regno }}'

View file

@ -1,3 +1,4 @@
from django.conf import settings
from django.core.files import File
from utils.pdf import generate_pdf_letter
from shop.email import add_invoice_email, add_creditnote_email
@ -39,6 +40,11 @@ def do_work():
template=template,
formatdict={
'invoice': invoice,
'bank': settings.BANKACCOUNT_BANK,
'bank_iban': settings.BANKACCOUNT_IBAN,
'bank_bic': settings.BANKACCOUNT_SWIFTBIC,
'bank_dk_reg': settings.BANKACCOUNT_REG,
'bank_dk_accno': settings.BANKACCOUNT_ACCOUNT,
},
)
logger.info('Generated pdf for invoice %s' % invoice)

View file

@ -51,5 +51,12 @@
<br>
<p class="lead">
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!
Payment should be made by bank transfer to our account in {{ bank }}:
</p>
<ul>
<li>Reg. {{ bank_dk_reg }}, account no. {{ bank_dk_accno }}</li>
<li>BIC: {{ bank_bic }}, IBAN: {{ bank_iban }}</li>
<li>Add invoice number in the transfer notes.</li>
<li>Within two weeks from: {{ invoice.created|date:"b jS, Y" }}</li>
<li>Thank you!</li>
</ul>