diff options
| author | Magnus Hagander | 2013-05-06 11:34:08 +0000 |
|---|---|---|
| committer | Magnus Hagander | 2013-05-06 11:34:08 +0000 |
| commit | 81f47f20f7bda10963ca930388a5876c04eb4c42 (patch) | |
| tree | 9dad791609431338543f5f836bb57569c3a4a191 /postgresqleu/util/misc | |
| parent | be93c6b732c55b775708d7edad19e34a5f5efa4e (diff) | |
Create a flag for whether to show bank transfer info on invoices
Previously this was excluded from receipts but not from invoices. Turn
this into a specific flag, and make sure that autogenerated invoices
(for conference registrations and memberships) don't include is, so that
people won't pay to the bank even though we don't want it.
Diffstat (limited to 'postgresqleu/util/misc')
| -rwxr-xr-x | postgresqleu/util/misc/invoice.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/postgresqleu/util/misc/invoice.py b/postgresqleu/util/misc/invoice.py index 3095865e..ccf48219 100755 --- a/postgresqleu/util/misc/invoice.py +++ b/postgresqleu/util/misc/invoice.py @@ -12,7 +12,7 @@ from reportlab.platypus.flowables import Image import cStringIO as StringIO class PDFInvoice(object): - def __init__(self, recipient, invoicedate, duedate, invoicenum=None, imagedir=None, currency='€', preview=False, receipt=False): + def __init__(self, recipient, invoicedate, duedate, invoicenum=None, imagedir=None, currency='€', preview=False, receipt=False, bankinfo=True): self.pdfdata = StringIO.StringIO() self.canvas = Canvas(self.pdfdata) self.recipient = recipient @@ -23,8 +23,13 @@ class PDFInvoice(object): self.currency = currency or '€' self.preview = preview self.receipt = receipt + self.bankinfo = bankinfo self.rows = [] + if self.receipt: + # Never include bank info on receipts + self.bankinfo = False + self.canvas.setTitle("PostgreSQL Europe Invoice #%s" % self.invoicenum) self.canvas.setSubject("PostgreSQL Europe Invoice #%s" % self.invoicenum) self.canvas.setAuthor("PostgreSQL Europe") @@ -130,7 +135,7 @@ E-mail: treasurer@postgresql.eu t.textLine("PostgreSQL Europe is a French non-profit under the French 1901 Law.") t.textLine("") - if not self.receipt: + if self.bankinfo: t.setFont("Times-Bold", 10) t.textLine("Bank references / Références bancaires / Bankverbindungen / Referencias bancarias") |
