{% if payments is defined and payments is not empty %} {%set payment = payments|first %} {%set pivot = payment.paymentables|filter(pivot => pivot.refunded_raw > 0)|first %}
$refund_label{{ pivot.refunded }} $date_label {{ pivot.updated_at }}
{{ img('$company.logo','') }}
$refund_label #$number
 
{%set payment = payments|first %} {%if payment.transaction_reference %}
  $reference_label: {{ payment.transaction_reference }}  
{% endif %}
 
 
 
$refunded_label
{{ payment.refunded }}
 
$refund_label $date_label
{{ payment.updated_at}}
 
$method_label
{% if payment.method %} {{ payment.method }} {% else %} - {% endif %}
 
 
 
 
 
 
 
 
 
 
{% set totalInvoices = 0 %} {% set totalRefunds = 0 %} {% for pivot in payment.paymentables|filter((pivot) => (pivot.is_credit == '0' and pivot.refunded_raw > 0)) %} {% set totalInvoices = totalInvoices + pivot.amount_raw %} {% set totalRefunds = totalRefunds + pivot.refunded_raw %} {% endfor %}
Invoice: #{{ pivot.invoice }} ({{ pivot.amount }})   $refunded_label {{ pivot.refunded }}
 
 
 
 
$total_label $invoices_label   {{ totalInvoices|format_currency(currency_code) }}
 
$total_label $refunded_label   {{ payment.refunded }}
 
 
 
 
 
 
{% if payment.refund_activity %}
 
 
History
 
 
 
 
 
 
{% for activity in payment.refund_activity %} {% endfor %}
{{ activity }}  
 
 
 
 
{% endif %}
{% endif %}