{% decimalMath totIncome = 0 %}
{% decimalMath totExpense = 0 %}
{% decimalMath profit = 0 %}
{% for item in invoicesByClient %}
{% decimalMath totIncome = totIncome + item.invoice.totalPaid %}
{% decimalMath profit = profit + item.invoice.totalPaid %}
{% /for %}
{% for entry in expenses %}
{% decimalMath totExpense = totExpense + entry.cost %}
{% decimalMath profit = profit - entry.cost %}
{% /for %}
Income |
Total |
Paid |
Unpaid |
{% decimalMath total = 0 %}
{% decimalMath totalPaid = 0 %}
{% decimalMath totalUnpaid = 0 %}
{% decimalMath client = 0 %}
{% decimalMath clientPaid = 0 %}
{% decimalMath clientUnpaid = 0 %}
{% decimalMath start = 0 %}
{% for item in invoicesByClient %}
{% if start == 0 %}
{{ item.invoice.client.displayName.escapedForHTML }} |
{% set clientId item.invoice.client.uuid %}
{% decimalMath start = 1 %}
{% else %}
{% if clientId isnotequaltostring item.invoice.client.uuid %}
{{client | currency_format}} |
{{clientPaid | currency_format}} |
{{clientUnpaid | currency_format}} |
{% decimalMath client = 0 %}
{% decimalMath clientPaid = 0 %}
{% decimalMath clientUnpaid = 0 %}
{{ item.invoice.client.displayName.escapedForHTML }} |
{% /if %}
{% /if %}
{% set clientId item.invoice.client.uuid %}
{% decimalMath total = total + item.invoice.totalCost %}
{% decimalMath totalPaid = totalPaid + item.invoice.totalPaid %}
{% decimalMath totalUnpaid = totalUnpaid + item.invoice.totalDue %}
{% decimalMath client = client + item.invoice.totalCost %}
{% decimalMath clientPaid = clientPaid + item.invoice.totalPaid %}
{% decimalMath clientUnpaid = clientUnpaid + item.invoice.totalDue %}
{% /for %}
{% if start == 1 %}
{{client | currency_format}} |
{{clientPaid | currency_format}} |
{{clientUnpaid | currency_format}} |
{% /if %}
Income Totals: |
{{total | currency_format}} |
{{totalPaid | currency_format}} |
{{totalUnpaid | currency_format}} |
Reported generated on {% now | date_format: "MMM dd yyyy 'at' HH:mm:ss" %}.