PDF-Output: str/bytes handling fix
This commit is contained in:
5
app.py
5
app.py
@@ -399,8 +399,11 @@ def invoice_pdf():
|
||||
pdf.ln(6)
|
||||
pdf.cell(180, 4, "Zahlbar innerhalb von 14 Tagen ohne Abzug. Vielen Dank fur Ihren Auftrag!")
|
||||
|
||||
pdf_out = pdf.output(dest='S')
|
||||
if isinstance(pdf_out, str):
|
||||
pdf_out = pdf_out.encode('latin-1')
|
||||
return send_file(
|
||||
io.BytesIO(pdf.output(dest='S').encode('latin-1')),
|
||||
io.BytesIO(pdf_out),
|
||||
mimetype='application/pdf',
|
||||
as_attachment=True,
|
||||
download_name='rechnung.pdf'
|
||||
|
||||
27
druckkalkulation_config.yaml
Normal file
27
druckkalkulation_config.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
arbeitszeit: 1
|
||||
bankName: ''
|
||||
dark_mode: true
|
||||
datum: '2026-07-02'
|
||||
druckerAnschaffung: 1000
|
||||
druckerBetriebsstunden: 2000
|
||||
druckerNutzungsdauer: 3
|
||||
druckzeit: 44
|
||||
email: info@jet-design.shop
|
||||
firmenAdresse: ''
|
||||
firmenName: JET Design
|
||||
gewinnmarge: 20
|
||||
iban: ''
|
||||
kundenAdresse: ''
|
||||
kundenName: Klaus Treiber
|
||||
logo: logo.png
|
||||
materialGewicht: 20
|
||||
materialPreisProKg: 25
|
||||
mwst_ausweisen: false
|
||||
paypal: '@thieleerik'
|
||||
projektName: Rolladen Abdeckung klein
|
||||
rechnungsnummer: ''
|
||||
strompreis: 0.4
|
||||
stromverbrauch: 0.25
|
||||
stueckzahl: 11
|
||||
stundenlohn: 25
|
||||
telefon: 07940 4226
|
||||
BIN
static/logo.png
Normal file
BIN
static/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 484 KiB |
Reference in New Issue
Block a user