{{ t('client_sales_report') }}

Created On: {{ created_on }}
Created By: {{ created_by }}
{% if company_logo is not empty %} {{ img(company_logo, 'max-height: 80px; width: auto; object-fit: contain;') }} {% endif %}
{% if client_groups is defined and client_groups is not empty %} {% for group in client_groups %}
{% if client_groups|length > 1 %}

{{ t('currency') }}: {{ group.currency }}

{% endif %} {% for client in group.clients %} {% endfor %}
{{ t('name') }} {{ t('number') }} {{ t('id_number') }} {{ t('invoices') }} {{ t('amount') }} {{ t('balance') }} {{ t('total_taxes') }} {{ t('amount_paid') }}
{{ client[0]|slice(0,25) }} {{ client[1] }} {{ client[2]|slice(0, 14) }} {{ client[3] }} {{ client[4] }} {{ client[5] }} {{ client[6] }} {{ client[7] }}
{% endfor %} {% else %}
{% if clients is defined and clients is not empty %} {% for client in clients %} {% endfor %} {% endif %}
{{ t('name') }} {{ t('number') }} {{ t('id_number') }} {{ t('invoices') }} {{ t('amount') }} {{ t('balance') }} {{ t('total_taxes') }} {{ t('amount_paid') }}
{{ client[0]|slice(0,25) }} {{ client[1] }} {{ client[2]|slice(0, 14) }} {{ client[3] }} {{ client[4] }} {{ client[5] }} {{ client[6] }} {{ client[7] }}
{% endif %} {% if monthly_skipped is defined and monthly_skipped %}
{{ t('monthly_breakdown_skipped') }}
{% else %} {% if monthly_invoice_groups is defined and monthly_invoice_groups is not empty %}

{{ t('invoices_by_month') }}

{% for group in monthly_invoice_groups %}
{% if monthly_invoice_groups|length > 1 %}

{{ t('currency') }}: {{ group.currency }}

{% endif %} {% for label in monthly_invoice_header|default(monthly_header) %} {% endfor %} {% for label in monthly_invoice_header|default(monthly_header) %} {% endfor %} {% for row in group.rows %} {% for cell in row %} {% if loop.first %} {{ cell|slice(0,25) }} {% else %} {{ cell }} {% endif %} {% endfor %} {% endfor %}
{{ t('name') }}{{ label }}
{% endfor %} {% elseif monthly_invoices is defined and monthly_invoices is not empty %}

{{ t('invoices_by_month') }}

{% for label in monthly_invoice_header|default(monthly_header) %} {% endfor %} {% for label in monthly_invoice_header|default(monthly_header) %} {% endfor %} {% for row in monthly_invoices %} {% for cell in row %} {% if loop.first %} {{ cell|slice(0,25) }} {% else %} {{ cell }} {% endif %} {% endfor %} {% endfor %}
{{ t('name') }}{{ label }}
{% endif %} {% if monthly_payment_groups is defined and monthly_payment_groups is not empty %}

{{ t('payments_by_month') }}

{% for group in monthly_payment_groups %}
{% if monthly_payment_groups|length > 1 %}

{{ t('currency') }}: {{ group.currency }}

{% endif %} {% for label in monthly_payment_header|default(monthly_header) %} {% endfor %} {% for label in monthly_payment_header|default(monthly_header) %} {% endfor %} {% for row in group.rows %} {% for cell in row %} {% if loop.first %} {{ cell|slice(0,25) }} {% else %} {{ cell }} {% endif %} {% endfor %} {% endfor %}
{{ t('name') }}{{ label }}
{% endfor %} {% elseif monthly_payments is defined and monthly_payments is not empty %}

{{ t('payments_by_month') }}

{% for label in monthly_payment_header|default(monthly_header) %} {% endfor %} {% for label in monthly_payment_header|default(monthly_header) %} {% endfor %} {% for row in monthly_payments %} {% for cell in row %} {% if loop.first %} {{ cell|slice(0,25) }} {% else %} {{ cell }} {% endif %} {% endfor %} {% endfor %}
{{ t('name') }}{{ label }}
{% endif %} {% endif %}