Sales Report

Invoices by year


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

Date

Client

Number

Balance

Total

Taxes Total

Grand Total

[#list salesreport.groupDatesByYear(salesreport.invoices)?sort as year]
[#assign invoices=salesreport.filterByDate(salesreport.invoices, year.toInterval())]
${year}
[#list invoices?sort_by("date") as invoice]

${invoice.date?date}

${invoice.client}

${invoice.number}

${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.invoices)}

${salesreport.calculateTotal(salesreport.invoices)}

${salesreport.calculateTaxesTotal(salesreport.invoices)}

${salesreport.calculateGrandTotal(salesreport.invoices)}