Document Number |
Waybills |
Document |
Statement |
|
Sub Total |
Vat |
Total |
Sub Total |
Vat |
Total |
|
{% set waybill_total = 0 %}
{% set invoice_total = 0 %}
{% set credit_total = 0 %}
{% for stat in stats %}
{% set waybill_total = waybill_total + stat['waybill']['total'] %}
{% set invoice_total = invoice_total + stat['invoice']['total'] %}
{% if (stat['waybill']['total']|round(2) != stat['invoice']['total']|round(2)) %}
{% set alert_color = '#F2DEDE' %}
{% else %}
{% set alert_color = '#FFFFFF' %}
{% endif %}
{{ stat['invoice_number'] }} |
{{ stat['waybill']['sub_total']|number_format(2, '.', ' ') }} |
{{ stat['waybill']['vat']|number_format(2, '.', ' ') }} |
{{ stat['waybill']['total']|number_format(2, '.', ' ') }} |
{{ stat['invoice']['sub_total']|number_format(2, '.', ' ') }} |
{{ stat['invoice']['vat']|number_format(2, '.', ' ') }} |
{{ stat['invoice']['total']|number_format(2, '.', ' ') }} |
{% if stat['statement_amount'] is not null %}
{{ stat['statement_amount']|number_format(2, '.', ' ') }} |
{% else %}
|
{% endif %}
{% endfor %}
{% if credit_stats|length > 0 %}
|
{{ waybill_total|number_format(2, '.', ' ') }} |
|
{{ invoice_total|number_format(2, '.', ' ') }} |
|
|
{% for credit_stat in credit_stats %}
{% set credit_total = credit_total + credit_stat['credit']['total'] %}
{{ credit_stat['credit_number'] }} |
|
|
|
-{{ credit_stat['credit']['sub_total']|number_format(2, '.', ' ') }} |
-{{ credit_stat['credit']['vat']|number_format(2, '.', ' ') }} |
-{{ credit_stat['credit']['total']|number_format(2, '.', ' ') }} |
{% if credit_stat['statement_amount'] is not null %}
-{{ credit_stat['statement_amount']|number_format(2, '.', ' ') }} |
{% else %}
|
{% endif %}
{% endfor %}
|
|
|
-{{ credit_total|number_format(2, '.', ' ') }} |
|
|
{% endif %}
|
{{ waybill_total|number_format(2, '.', ' ') }} |
|
{{ (invoice_total - credit_total)|number_format(2, '.', ' ') }} |
{% if statement is not null %}{{ statement.amountIncVat|number_format(2, '.', ' ') }} {% else %} NO STATEMENT {% endif %} |