first try

This commit is contained in:
Torsten Ueberschar
2024-02-07 17:05:53 +01:00
parent 17346d5197
commit 2c2066450c
15 changed files with 556 additions and 162 deletions

21
test_data/RG004711.yaml Normal file
View File

@@ -0,0 +1,21 @@
CustomerId: KD01234
#InvoiceDate: 2023-12-23
Positions:
- Title: "Zuckerwatte fressen"
SubTitle: "Leistungszeitraum: 11/2022"
PricePerUnit:
Quantity: 123.45
- Title: "Aschlecken"
SubTitle: "Leistungszeitraum: 11/2022"
PricePerUnit: 99.99
Quantity: 12
- Title: "Aschkriechen"
SubTitle: "Leistungszeitraum: 10/2022"
PricePerUnit: 77.88
Quantity: 3

50
test_data/envelope.yaml Normal file
View File

@@ -0,0 +1,50 @@
Config:
DefaultFont: Barlow Semi Condensed
MonoFont: Barlow Semi Condensed
AddressContent:
LogoFile: Images/logo.svg
AddressBoxSender: Torsten Ueberschar - Pfarrweg 1 - 57439 Attendorn
Contents:
- Head:
Text: |
Torsten Ueberschar
Pfarrweg 1
57439 Attendorn
- Head: Kontakt
Text: |
tu@uesome.de
+49 2734 4239271
- Head: Steuern
Text: |
St.-Nr.: 02/178/51224
USt-IdNr.: DE313460724
- Head: Bankverbindung
Text: |
Torsten Ueberschar
DE67 1001 1001 2626 8627 86
NTSBDEB1XXX
N26 Bank GmbH
Invoice:
Vat: 19.0
Salutation: Sehr geehrte Damen und Herren,
Introduction: >
für folgende in Ihrem Auftrag ausgeführten Leistungen erlaube ich mir zu berechnen
Footer: >
Bitte überweisen Sie den Rechnungsbetrag unter Angabe der Rechnungsnummer auf mein Konto bis zum {ZahlungsZiel}.
Mit freundlichen Grüßen
Customers:
- Id: KD01234
PricePerUnit: 88.88
DueDate: 30
AddressField: |
Klaus Peter Klausen
Am Klausenhof 1
04711 Klausenhausen

View File

@@ -0,0 +1,107 @@
<html>
<head>
<style>
@page {
size: a4 portrait;
margin: 1cm 1cm 1cm 2cm;
font-size: 12pt;
font-family: "Barlow Semi Condensed";
@frame address_frame {
/* Static Frame */
-pdf-frame-content: address_frame_content;
left: 2.5cm;
width: 8.5cm;
top: 5.5cm;
height: 4cm;
-pdf-frame-border: 1;
}
@frame letter_head_frame {
/* Another static Frame */
-pdf-frame-content: letter_head_content;
left: 15.5cm;
width: 4cm;
top: 1cm;
}
@frame content_first_page_frame {
/* Content Frame */
left: 2cm;
width: 13cm;
top: 11cm;
bottom: 1cm;
-pdf-frame-border: 1;
}
}
#address_frame_content {
background-color: lightcoral;
}
#letter_head_content {
background-color: lightblue;
}
</style>
</head>
<body>
<!-- Content for Static Frame 'header_frame' -->
<div id="address_frame_content">
<p>Absender</p>
<address>Anschrift
in
mehreren
Zeilen
</address>
</div>
<div id="letter_head_content">
{% for address in envelope.AddressContent.Contents %}
{% if address.Head %}
<p><strong>{{ address.Head }}</strong></p>
{% endif %}
<p>{{ address.Text | replace('\n', '<br>') }}</p>
{% endfor %}
</div>
<!-- HTML Content -->
To PDF or not to PDF
<section>
<h2>About Us</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
laborum.</p>
</section>
<section>
<h2>Our Services</h2>
<ul>
<li>Service 1</li>
<li>Service 2</li>
<li>Service 3</li>
</ul>
</section>
<section>
<h2>About Us</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
laborum.</p>
</section>
<section>
<h2>Our Services</h2>
<ul>
<li>Service 1</li>
<li>Service 2</li>
<li>Service 3</li>
</ul>
</section>
</body>
</html>