Bernd Wurst commited on 2018-07-05 14:34:21
Zeige 3 geänderte Dateien mit 4 Einfügungen und 4 Löschungen.
... | ... |
@@ -30,7 +31,7 @@ class Table(object): |
30 | 31 |
e = entry |
31 | 32 |
if not ('count' in e and 'subject' in e and 'price' in e and 'vat' in e): |
32 | 33 |
raise ValueError('Some data is missing!') |
33 |
- if not 'unit' in e: |
|
34 |
+ if 'unit' not in e: |
|
34 | 35 |
e['unit'] = None |
35 | 36 |
ret = {'count': e['count'], |
36 | 37 |
'unit': e['unit'], |
... | ... |
@@ -13,7 +13,7 @@ def FoldingMarkers(canvas): |
13 | 13 |
canvas.lines( |
14 | 14 |
[(0.3 * cm, page_height - 10.5 * cm, 0.65 * cm, page_height - 10.5 * cm), |
15 | 15 |
(0.3 * cm, page_height - 21.0 * cm, 0.65 * cm, page_height - 21.0 * cm), |
16 |
- (0.3*cm,page_height-14.85*cm,0.7*cm,page_height-14.85*cm)]); |
|
16 |
+ (0.3 * cm, page_height - 14.85 * cm, 0.7 * cm, page_height - 14.85 * cm)]) |
|
17 | 17 |
|
18 | 18 |
|
19 | 19 |
def Footer(canvas): |
... | ... |
@@ -62,7 +63,7 @@ def _drawJustifiedString(x, y, text, canvas, width, font, size): |
62 | 63 |
canvas.drawString(x, y, text) |
63 | 64 |
# too long line, I cannot handle this |
64 | 65 |
return |
65 |
- if not ' ' in text: |
|
66 |
+ if ' ' not in text: |
|
66 | 67 |
canvas.drawString(x, y, text) |
67 | 68 |
# no space in there, nothing to justify |
68 | 69 |
return |
... | ... |
@@ -210,7 +206,7 @@ def InvoiceToPDF(iv, bankdata=True): |
210 | 206 |
|
211 | 207 |
font_size = default_font_size |
212 | 208 |
y = firstPage(canvas) |
213 |
- if bankdata==False: |
|
209 |
+ if not bankdata: |
|
214 | 210 |
# Bankdaten überschreiben wenn Lastschrift |
215 | 211 |
canvas.setFillColor(Color(255, 255, 255, alpha=0.8)) |
216 | 212 |
canvas.rect(leftcontent + ((rightcontent - leftcontent) / 3) * 2 - 2, bottomcontent - 2, (rightcontent - leftcontent) / 3, -40, fill=True, stroke=False) |
217 | 213 |