git.schokokeks.org
Repositories
Help
Report an Issue
invoice.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
a763c4c
Branches
Tags
factur-x_localdata
master
invoice.git
src
rechnung
Invoice
custom_elements.py
URL ohne http://
Bernd Wurst
commited
a763c4c
at 2008-04-15 15:54:51
custom_elements.py
Blame
History
Raw
# -* coding: utf8 *- from metrics import * 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.drawString(leftcontent+((rightcontent-leftcontent)/3)*2, bottomcontent-10, 'Volksbank Backnang (BLZ: 602 911 20)') canvas.drawString(leftcontent+((rightcontent-leftcontent)/3)*2, bottomcontent-20, 'Konto: 671279 017') canvas.drawString(leftcontent+((rightcontent-leftcontent)/3)*2, bottomcontent-30, 'IBAN: DE78602911200671279017') canvas.drawString(leftcontent+((rightcontent-leftcontent)/3)*2, bottomcontent-40, 'BIC: GENODES1VBK') def address(canvas, lines): x = 2.0 * cm y = page_height - 4.5*cm canvas.setFont(font, 8) canvas.drawString(x+0.5*cm, y+0.1*cm, 'schokokeks.org · Köchersberg 25 · 71540 Murrhardt') canvas.line(x, y, x + address_width, y) y = y - 0.2*cm line_height = 11 + 0.1*cm y -= line_height canvas.setFont(font, 11) for line in lines: canvas.drawString(x+0.5*cm, y, line) y -= line_height 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 25") 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