{% extends 'email/base.html.twig' %} {% block title %}Account Statement - {{ customer.name }}{% endblock %} {% block content %}
📑

Account Statement

Account summary for {{ customer.name }} as of {{ statementDate|date('F d, Y') }}

{% if customer.contactPerson %} {% endif %}
Customer {{ customer.name }}
Contact {{ customer.contactPerson }}
Statement Period {{ periodStart|date('M d') }} - {{ periodEnd|date('M d, Y') }}
Statement Date {{ statementDate|date('F d, Y') }}
{# Account Summary #}

Account Summary

Opening Balance {{ currency.symbol }}{{ openingBalance|number_format(2, '.', ',') }}
New Charges {{ currency.symbol }}{{ totalCharges|number_format(2, '.', ',') }}
Payments Received - {{ currency.symbol }}{{ totalPayments|number_format(2, '.', ',') }}
Balance Due {{ currency.symbol }}{{ balanceDue|number_format(2, '.', ',') }}
{# Transaction History #}

Transaction History

{% set runningBalance = openingBalance %} {% for transaction in transactions %} {% if transaction.type == 'invoice' %} {% set runningBalance = runningBalance + transaction.amount %} {% else %} {% set runningBalance = runningBalance - transaction.amount %} {% endif %} {% endfor %}
Date Description Charges Payments Balance
{{ periodStart|date('M d') }} Opening Balance - - {{ currency.symbol }}{{ openingBalance|number_format(2, '.', ',') }}
{{ transaction.date|date('M d') }} {% if transaction.type == 'invoice' %} Invoice #{{ transaction.reference }} {% else %} Payment - {{ transaction.reference }} {% endif %} {% if transaction.type == 'invoice' %} {{ currency.symbol }}{{ transaction.amount|number_format(2, '.', ',') }} {% else %} - {% endif %} {% if transaction.type == 'payment' %} {{ currency.symbol }}{{ transaction.amount|number_format(2, '.', ',') }} {% else %} - {% endif %} {{ currency.symbol }}{{ runningBalance|number_format(2, '.', ',') }}
Closing Balance {{ currency.symbol }}{{ totalCharges|number_format(2, '.', ',') }} {{ currency.symbol }}{{ totalPayments|number_format(2, '.', ',') }} {{ currency.symbol }}{{ balanceDue|number_format(2, '.', ',') }}
{# Outstanding Invoices #} {% if outstandingInvoices|length > 0 %}

Outstanding Invoices

{% for invoice in outstandingInvoices %} {% endfor %}
Invoice Date Due Date Amount Due
#{{ invoice.displayInvoiceNumber }} {{ invoice.invoiceDate|date('M d, Y') }} {{ invoice.dueDate|date('M d, Y') }} {% if invoice.dueDate < 'now'|date %}
OVERDUE {% endif %}
{{ invoice.formattedBalanceDue }}
{% endif %} {% if balanceDue > 0 %}

Payment Required

Please arrange payment of {{ currency.symbol }}{{ balanceDue|number_format(2, '.', ',') }} at your earliest convenience.

{% if company.bankName is defined and company.bankName %}

Payment Details

Bank Name {{ company.bankName }}
Account Name {{ company.bankAccountName }}
Account Number {{ company.bankAccountNumber }}
{% endif %} {% else %}

Account in Good Standing

Thank you for keeping your account up to date!

{% endif %}

This statement is provided for your records. If you have any questions about your account, please contact us at sales@kits.co.tz.

{% endblock %}