Sales Report

Invoices by month of payment


[#if salesreport.paidDateIntervalStart??] [#if salesreport.paidDateIntervalEnd??] Paid Date: ${salesreport.paidDateIntervalStart?date} - ${salesreport.paidDateIntervalEnd?date} [#else] Paid Date: After ${salesreport.paidDateIntervalStart?date} [/#if] [#else] [#if salesreport.paidDateIntervalEnd??] Paid Date: Before ${salesreport.paidDateIntervalEnd?date} [#else] Paid Date: All dates [/#if] [/#if]

Date

Client

Number

Paid Date

Balance

Total

Taxes Total

Grand Total

[#list salesreport.groupPaidDatesByMonth(salesreport.paidInvoices)?sort as month]
[#assign invoices=salesreport.filterByPaidDate(salesreport.paidInvoices, month.toInterval())]
${month.toString("MMM yyyy")}
[#list invoices?sort_by("date") as invoice]

${invoice.date?date}

${invoice.client}

${invoice.number}

${invoice.paymentDate?date}

${invoice.balance}

${invoice.total}

${invoice.taxesTotal}

${invoice.grandTotal}

[/#list]

Subtotal

${salesreport.calculateBalance(invoices)}

${salesreport.calculateTotal(invoices)}

${salesreport.calculateTaxesTotal(invoices)}

${salesreport.calculateGrandTotal(invoices)}

[/#list]

Total

${salesreport.calculateBalance(salesreport.paidInvoices)}

${salesreport.calculateTotal(salesreport.paidInvoices)}

${salesreport.calculateTaxesTotal(salesreport.paidInvoices)}

${salesreport.calculateGrandTotal(salesreport.paidInvoices)}