git.schokokeks.org
Repositories
Help
Report an Issue
invoice.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
32416ff
Branches
Tags
factur-x_localdata
master
invoice.git
src
rechnung
Invoice
custom_elements.py
Python-3-Migration
Bernd Wurst
commited
32416ff
at 2018-07-05 23:01:26
custom_elements.py
Blame
History
Raw
# -* coding: utf8 *- from __future__ import division from .metrics import * address_header = 'schokokeks.org · Köchersberg 32 · 71540 Murrhardt' def FoldingMarkers(canvas): """Setzt Falzmarken""" from reportlab.lib.units import cm canvas.setStrokeColorRGB(0, 0, 0) canvas.setLineWidth(0.01 * cm) canvas.lines( [(0.3 * cm, page_height - 10.5 * cm, 0.65 * cm, page_height - 10.5 * cm), (0.3 * cm, page_height - 21.0 * cm, 0.65 * cm, page_height - 21.0 * cm), (0.3 * cm, page_height - 14.85 * cm, 0.7 * cm, page_height - 14.85 * cm)]) def Footer(canvas): canvas.line(leftcontent, bottomcontent, rightcontent, bottomcontent) canvas.setFont(font, 7) canvas.drawString(leftcontent, bottomcontent - 10, 'schokokeks.org GbR') canvas.drawString(leftcontent, bottomcontent - 20, 'Bernd Wurst / Johannes Böck') canvas.drawString(leftcontent, bottomcontent - 30, 'www.schokokeks.org') canvas.drawString(leftcontent, bottomcontent - 40, 'root@schokokeks.org') canvas.drawString(leftcontent + ((rightcontent - leftcontent) // 3), bottomcontent - 10, 'Steuernummer 51072/01109') canvas.drawString(leftcontent + ((rightcontent - leftcontent) // 3), bottomcontent - 20, 'Finanzamt Backnang') canvas.drawString(leftcontent + ((rightcontent - leftcontent) // 3), bottomcontent - 30, 'USt-ID: DE255720588') canvas.setFont(font, 7) canvas.drawString(leftcontent + ((rightcontent - leftcontent) // 3) * 2, bottomcontent - 10, 'Volksbank Backnang') canvas.drawString(leftcontent + ((rightcontent - leftcontent) // 3) * 2, bottomcontent - 20, 'IBAN: DE91 6029 1120 0041 5120 06') canvas.drawString(leftcontent + ((rightcontent - leftcontent) // 3) * 2, bottomcontent - 30, 'BIC: GENODES1VBK') canvas.drawString(leftcontent + ((rightcontent - leftcontent) // 3) * 2, bottomcontent - 40, '(Kto: 41512 006 / BLZ: 602 911 20)') def basicPage(canvas): FoldingMarkers(canvas) Footer(canvas) return topcontent def firstPage(canvas): basicPage(canvas) font_size = default_font_size y = topcontent canvas.drawInlineImage("logo.png", rightcolumn, topcontent - (3 * cm), width=4.08 * cm, height=3 * cm) y -= (3.5 * cm) canvas.setFont(font + "-Bold", font_size) # canvas.drawString(rightcolumn, y, "schokokeks.org Webhosting") # y -= (font_size + 5 + 0.2*cm) canvas.drawString(rightcolumn, y, "schokokeks.org GbR") y -= (font_size + 5) canvas.setFont(font, font_size) canvas.drawString(rightcolumn, y, "Bernd Wurst / Johannes Böck") y -= (font_size + 5) canvas.drawString(rightcolumn, y, "Köchersberg 32") y -= (font_size + 5) canvas.drawString(rightcolumn, y, "71540 Murrhardt") y -= (font_size + 10) canvas.drawString(rightcolumn, y, "Tel: 07192-936432") y -= (font_size + 5) canvas.drawString(rightcolumn, y, "Fax: 07192-936431") y -= (font_size + 5) canvas.drawString(rightcolumn, y, "E-Mail: root@schokokeks.org") y -= (font_size + 10) return topcontent - 7.5 * cm