diff options
| author | Magnus Hagander | 2018-12-14 14:43:56 +0000 |
|---|---|---|
| committer | Magnus Hagander | 2018-12-14 15:31:28 +0000 |
| commit | 7dea97f90b534f71cbec6d0e5dfbdf237403b1f1 (patch) | |
| tree | 48c53ef74987f68c05f12fb1e97b02f25a13e45a /postgresqleu/util/misc | |
| parent | e0bfd4f892e43db89bc996c1474f59c2dd6a8dc6 (diff) | |
Fix blankline related warnings
Diffstat (limited to 'postgresqleu/util/misc')
| -rwxr-xr-x | postgresqleu/util/misc/pgeuinvoice.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/postgresqleu/util/misc/pgeuinvoice.py b/postgresqleu/util/misc/pgeuinvoice.py index a72edeec..6331b8fa 100755 --- a/postgresqleu/util/misc/pgeuinvoice.py +++ b/postgresqleu/util/misc/pgeuinvoice.py @@ -16,6 +16,7 @@ from reportlab.pdfbase.ttfonts import TTFont import qrencode import cStringIO as StringIO + class PDFBase(object): def __init__(self, recipient, invoicenum, imagedir, currency): self.pdfdata = StringIO.StringIO() @@ -118,12 +119,11 @@ class PDFInvoice(PDFBase): # Never include bank info on receipts self.bankinfo = False - def addrow(self, title, cost, count, vatrate): self.rows.append((title, cost, count, vatrate, vatrate and vatrate.vatpercent or 0)) - ROWS_PER_PAGE = 14 + def save(self): # We can fit ROWS_PER_PAGE rows on one page. We might want to do something # cute to avoid a single row on it's own page in the future, but @@ -218,7 +218,6 @@ class PDFInvoice(PDFBase): else: self.canvas.drawCentredString(10.5*cm, 17.3*cm-h, "This invoice is due: %s" % self.duedate.strftime("%B %d, %Y")) - if islastpage: if not self.receipt: t = self.canvas.beginText() @@ -277,7 +276,6 @@ BIC: CMCIFR2A return self.pdfdata - class PDFRefund(PDFBase): def __init__(self, recipient, invoicedate, refunddate, invoicenum, invoiceamount, invoicevat, refundamount, refundvat, imagedir, currency, paymentmethod): self.recipient = recipient |
