Meta-fields for InvoiceTemplate, structured Customer address (#5519)
This commit is contained in:
@@ -48,6 +48,10 @@ mpdf-->
|
||||
<strong>{{ invoice['customer.company']|default(invoice['customer.name']) }}</strong>
|
||||
<br>
|
||||
{{ invoice['customer.address']|nl2br }}
|
||||
{% set country = invoice['customer.country']|country_name(invoice['invoice.language']) %}
|
||||
{% if country not in invoice['customer.address'] %}
|
||||
<br> {{ country }}
|
||||
{% endif %}
|
||||
{% if invoice['customer.vat_id'] is not empty %}
|
||||
<br>
|
||||
{{ 'vat_id'|trans }}: {{ invoice['customer.vat_id'] }}
|
||||
@@ -59,6 +63,12 @@ mpdf-->
|
||||
<strong>{{ invoice['template.company'] }}</strong>
|
||||
<br>
|
||||
{{ invoice['template.address']|trim|nl2br }}
|
||||
{% if invoice['template.country'] is not null %}
|
||||
{% set country = invoice['template.country']|country_name(invoice['invoice.language']) %}
|
||||
{% if country not in invoice['template.address'] %}
|
||||
<br> {{ country }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if invoice['template.vat_id'] is not empty %}
|
||||
<br>
|
||||
{{ 'vat_id'|trans }}:
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
<address contenteditable="true">
|
||||
<strong>{{ invoice['customer.company']|default(invoice['customer.name']) }}</strong><br>
|
||||
{{ invoice['customer.address']|nl2br }}
|
||||
{% set country = invoice['customer.country']|country_name(invoice['invoice.language']) %}
|
||||
{% if country not in invoice['customer.address'] %}
|
||||
<br> {{ country }}
|
||||
{% endif %}
|
||||
{% if invoice['customer.vat_id'] is not empty %}
|
||||
<br>
|
||||
{{ 'vat_id'|trans }}: {{ invoice['customer.vat_id'] }}
|
||||
@@ -45,6 +49,12 @@
|
||||
<address contenteditable="true">
|
||||
<strong>{{ invoice['template.company'] }}</strong><br>
|
||||
{{ invoice['template.address']|trim|nl2br }}
|
||||
{% if invoice['template.country'] is not null %}
|
||||
{% set country = invoice['template.country']|country_name(invoice['invoice.language']) %}
|
||||
{% if country not in invoice['template.address'] %}
|
||||
<br> {{ country }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if invoice['template.vat_id'] is not empty %}
|
||||
<br>
|
||||
{{ 'vat_id'|trans }}:
|
||||
|
||||
@@ -14,6 +14,12 @@
|
||||
<tr>
|
||||
<td class="text-small">
|
||||
{{ invoice['template.company'] }} – {{ invoice['template.address']|nl2str(' – ') }}
|
||||
{% if invoice['template.country'] is not null %}
|
||||
{% set country = invoice['template.country']|country_name(invoice['invoice.language']) %}
|
||||
{% if country not in invoice['template.address'] %}
|
||||
– {{ country }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if invoice['template.vat_id'] is not empty %}
|
||||
– {{ 'vat_id'|trans }}: {{ invoice['template.vat_id'] }}
|
||||
{% endif %}
|
||||
@@ -33,6 +39,12 @@
|
||||
<br>
|
||||
{{ invoice['template.company'] }}<br>
|
||||
{{ invoice['template.address']|nl2br }}
|
||||
{% if invoice['template.country'] is not null %}
|
||||
{% set country = invoice['template.country']|country_name(invoice['invoice.language']) %}
|
||||
{% if country not in invoice['template.address'] %}
|
||||
<br> {{ country }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<strong>{{ 'invoice_bank_account'|trans }}</strong>
|
||||
@@ -54,6 +66,10 @@ mpdf-->
|
||||
<td>
|
||||
<strong>{{ invoice['customer.company']|default(invoice['customer.name']) }}</strong><br>
|
||||
{{ invoice['customer.address']|nl2br }}
|
||||
{% set country = invoice['customer.country']|country_name(invoice['invoice.language']) %}
|
||||
{% if country not in invoice['customer.address'] %}
|
||||
<br> {{ country }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{% set classLeft = 'text-left' %}
|
||||
|
||||
@@ -18,25 +18,19 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{{ form_row(form.company) }}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{{ form_row(form.vatId) }}
|
||||
<div class="col-md-12">
|
||||
{{ form_row(form.customer) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{{ form_row(form.address) }}
|
||||
<div class="col-md-12">
|
||||
{{ form_row(form.paymentTerms) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{{ form_row(form.contact) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{{ form_row(form.paymentTerms) }}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{{ form_row(form.paymentDetails) }}
|
||||
</div>
|
||||
@@ -70,6 +64,15 @@
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
{% if form.metaFields is defined and form.metaFields is not empty %}
|
||||
<fieldset class="form-fieldset pb-0">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
{{ form_row(form.metaFields) }}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
{% endif %}
|
||||
{{ form_rest(form) }}
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
|
||||
Reference in New Issue
Block a user