Show product name if line description is not available

This commit is contained in:
Fritz Grimpen 2024-10-09 20:45:46 +00:00
parent 76c1c40362
commit 3bc150c088

View file

@ -8,7 +8,7 @@ Wir berechnen dir daher die folgenden Mitgliedsbeiträge:
Wir werden dir daher die folgenden Mitgliedsbeiträge berechnen:
{%- endif %}
{% for line in invoice.lines %}
{{ line.description.ljust(39) }} {{ (line.quantity|format_quantity).rjust(5) }} × {{ (line.unit_price|format_currency(currency=line.currency.code)).rjust(9) }} = {{ (line.amount|format_currency(currency=line.currency.code)).rjust(12) }}
{% if line.description %}{{ line.description.ljust(39) }}{% elif line.product %}{{ line.product.name.ljust(39) }}{% else %}{{ " ".ljust(39) }}{% endif %} {{ (line.quantity|format_quantity).rjust(5) }} × {{ (line.unit_price|format_currency(currency=line.currency.code)).rjust(9) }} = {{ (line.amount|format_currency(currency=line.currency.code)).rjust(12) }}
{%- endfor %}
{{ "".ljust(72, '-') }}
{{ "Summe".ljust(59) }} {{ (invoice.total_amount|format_currency).rjust(12) }}