resources/views/pdf-designs/prime_statement.html
$start_date - $end_date
{% if invoices|e %}
| {{ t('invoice') }} # | {{ t('invoice_date') }} | {{ t('invoice_due_date') }} | {{ t('total') }} | {{ t('balance') }} |
|---|---|---|---|---|
| {% for invoice in invoices %} | {{ invoice.number }} | {{ invoice.date }} | {{ invoice.due_date }} | {{ invoice.amount }} |
| {% endfor %} {% set sum_balance = invoices | sum('balance_raw') %} {% if sum_balance > 0 %} | |||
| {% endif %} |
{% endif %} {% if invoices|e and show_payments %}
| {{ t('invoice') }} # | {{ t('payment_date') }} | {{ t('method') }} | {{ t('amount') }} | |
|---|---|---|---|---|
| {% set net_refunds = 0 %} {% set total_payments = 0%} {% for invoice in invoices %} {% if invoice.payments | e %} {% set parent_payment = invoice.payments | first %} {% for payment in invoice.payments %} {% set currency_code = payment.currency %} {% for pivot in payment.paymentables %} | {{ pivot.invoice }} | {{ pivot.created_at }} |
| {% if pivot.refunded_raw > 0 %} | {{ pivot.invoice }} | {{ pivot.updated_at }} | $refund_label | |
| {% set net_refunds = net_refunds + pivot.refunded_raw %} {% endif %} {% set total_payments = total_payments + pivot.amount_raw %} {% endfor %} {% endfor %} {% endif %} {% endfor %} | {{ currency_code }} | $payments_label | ||
| {% if net_refunds > 0 %} | $refunded_label | |||
| $net_label | **{{ (total_payments-net_refunds) | |||
| {% endif %} |
{% endif %} {% if credits|e and show_credits %}
| {{ t('credit') }} # | {{ t('credit_date') }} | {{ t('total') }} | {{ t('balance') }} |
|---|---|---|---|
| {% for credit in credits %} | {{ credit.number }} | {{ credit.date }} | {{ credit.amount }} |
| {% endfor %} |
{% endif %} {% if aging and show_aging %}
| {% for key, age in aging %} {{ key }} | {% endfor %} | --- | | {% for key, age in aging %} {{ age }} | {% endfor %}
{% endif %}