Compare commits
2 Commits
e8c8085a07
...
3c571bd4f9
| Author | SHA1 | Date | |
|---|---|---|---|
| 3c571bd4f9 | |||
| 4d18d1f0a8 |
@@ -15,10 +15,11 @@ classifiers = [
|
|||||||
|
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
'PyYAML',
|
'PyYAML==6.0.1',
|
||||||
'Jinja2',
|
'Jinja2==3.1.3',
|
||||||
'xhtml2pdf',
|
'xhtml2pdf==0.2.15',
|
||||||
'Markdown'
|
'Markdown==3.5.2',
|
||||||
|
'python-bidi==0.4.2'
|
||||||
]
|
]
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
|
|||||||
@@ -2,3 +2,4 @@ Jinja2==3.1.3
|
|||||||
Markdown==3.5.2
|
Markdown==3.5.2
|
||||||
PyYAML==6.0.1
|
PyYAML==6.0.1
|
||||||
xhtml2pdf==0.2.15
|
xhtml2pdf==0.2.15
|
||||||
|
python-bidi==0.4.2
|
||||||
|
|||||||
17
test_data/templates/invoice.html
Normal file → Executable file
17
test_data/templates/invoice.html
Normal file → Executable file
@@ -146,6 +146,9 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
{% macro format_number_de(value) -%}
|
||||||
|
{{ "{:,.2f}".format(value|float).replace(",", "X").replace(".", ",").replace("X", ".") }}
|
||||||
|
{%- endmacro %}
|
||||||
<!-- Content for Static Frame 'header_frame' -->
|
<!-- Content for Static Frame 'header_frame' -->
|
||||||
<div id="address_frame_content">
|
<div id="address_frame_content">
|
||||||
<p class="underline small center">{{ envelope.AddressContent.AddressBoxSender }}</p>
|
<p class="underline small center">{{ envelope.AddressContent.AddressBoxSender }}</p>
|
||||||
@@ -190,10 +193,10 @@
|
|||||||
{% for position in invoice.Positions %}
|
{% for position in invoice.Positions %}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="links position_top">{{ position.Title }}</td>
|
<td class="links position_top">{{ position.Title }}</td>
|
||||||
<td class="rechts" rowspan="2">{{ format_float(position.Quantity | float) }}</td>
|
<td class="rechts" rowspan="2">{{ format_number_de(position.Quantity) }}</td>
|
||||||
<td class="rechts" rowspan="2">{{ format_float((position.PricePerUnit or invoice.PricePerUnit) | float) }}
|
<td class="rechts" rowspan="2">{{ format_number_de(position.PricePerUnit or invoice.PricePerUnit) }}
|
||||||
</td>
|
</td>
|
||||||
<td class="rechts" rowspan="2">{{ format_float(position.Quantity * ( position.PricePerUnit or
|
<td class="rechts" rowspan="2">{{ format_number_de(position.Quantity * ( position.PricePerUnit or
|
||||||
invoice.PricePerUnit ))}}
|
invoice.PricePerUnit ))}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -204,17 +207,17 @@
|
|||||||
<tr class="summe">
|
<tr class="summe">
|
||||||
<td></td>
|
<td></td>
|
||||||
<td colspan="2" class="rechts">Nettosumme:</td>
|
<td colspan="2" class="rechts">Nettosumme:</td>
|
||||||
<td class="rechts">{{ format_float(calculate_total(invoice)) }}</td>
|
<td class="rechts">{{ format_number_de(calculate_total(invoice)) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td colspan="2" class="rechts">USt. ({{ format_float(invoice.Vat) }}%):</td>
|
<td colspan="2" class="rechts">USt. ({{ format_number_de(invoice.Vat) }}%):</td>
|
||||||
<td class="rechts">{{ format_float(calculate_total(invoice) * ((invoice.Vat / 100))) }}</td>
|
<td class="rechts">{{ format_number_de(calculate_total(invoice) * ((invoice.Vat / 100))) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td colspan="2" class="rechts bold overline">Gesamt Summe:</td>
|
<td colspan="2" class="rechts bold overline">Gesamt Summe:</td>
|
||||||
<td class="rechts bold overline">{{ format_float(calculate_total(invoice) * ((invoice.Vat / 100)+1)) }}</td>
|
<td class="rechts bold overline">{{ format_number_de(calculate_total(invoice) * ((invoice.Vat / 100)+1)) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
Reference in New Issue
Block a user