2.2 KiB
2.2 KiB
{% set nc = namespace(before_invoice_id=None) %}
{%for l in record %}
{% if nc.before_invoice_id != l.invoice.raw.id %}
{{ l.invoice.move.render.date }}
{{ l.account.render.code}}
{{ l.invoice.party.render.rec_name}}
{% if l.invoice.party.raw.tax_identifier %}{{ l.invoice.party.tax_identifier.render.code}}{% endif %}
{% if l.invoice.raw.state == 'cancel' %}*{% endif %}{{ l.invoice.render.number }}
{{ l.invoice.render.invoice_date }}
{% if l.render.base %}{{l.raw.company_base | render(digits=l.invoice.company.currency.raw.digits)}}{% else %}0.0{% endif %}
{% if l.tax %}{{ l.tax.raw.name }}{% else %} --- {% endif %}
{% if l.render.amount %}{{ l.raw.company_amount | render(digits=l.invoice.company.currency.raw.digits)}}{% else %}0.0{% endif %}
{% set total = l.raw.company_base + l.raw.company_amount %}
{{ total | render(l.invoice.company.currency.raw.digits) }}
{{ l.invoice.raw.company_total_amount | render(digits=l.invoice.company.currency.raw.digits)}}
{% else %}
{% if l.render.base %}{{l.raw.company_base | render(digits=l.invoice.company.currency.raw.digits)}}{% else %}0.0{% endif %}
{% if l.tax %}{{ l.tax.raw.name }}{% else %} --- {% endif %}
{% if l.render.amount %}{{ l.raw.company_amount | render(digits=l.invoice.company.currency.raw.digits)}}{% else %}0.0{% endif %}
{% set total = l.raw.company_base + l.raw.company_amount %}
{{ total | render(l.invoice.company.currency.raw.digits) }}
{% endif %}
{% set nc.before_invoice_id = l.invoice.raw.id %}
{% endfor %}