[#if expensesreport.dateIntervalStart??] [#if expensesreport.dateIntervalEnd??] ${expensesreport.dateIntervalStart?date} - ${expensesreport.dateIntervalEnd?date} [#else] After ${expensesreport.dateIntervalStart?date} [/#if] [#else] [#if expensesreport.dateIntervalEnd??] Before ${expensesreport.dateIntervalEnd?date} [#else] All dates [/#if] [/#if]
[#assign totalAmount = expensesreport.calculateAmount(expensesreport.expenses)] [#-- Build the data set expression record by record --] [#assign categories = expensesreport.groupExpenseCategories(expensesreport.expenses)] [#assign pieDataSet] [ [#list categories?sort_by("name") as category] [#assign categoryExpenses=expensesreport.filterByExpenseCategory(expensesreport.expenses, category)] [#assign categoryAmount=expensesreport.calculateAmount(categoryExpenses)] ['${category.name}', ${categoryAmount.contents()?first.amount?c}] [#if category?has_next],[/#if] [/#list] [#assign noCategoryExpenses=expensesreport.filterByExpenseCategoryNone(expensesreport.expenses)] [#assign noCategoryAmount=expensesreport.calculateAmount(noCategoryExpenses)] [#if noCategoryExpenses?size != 0] [#if categories?size != 0], [/#if] ['Others', ${noCategoryAmount.contents()?first.amount?c}] [/#if] ] [/#assign] [#assign chartProperties = { 'title.visible': false, 'legend.visible': true, 'legend.position': 'right', 'legend.verticalAlignment': 'top', 'legend.frame': {"insets": [0, 0, 0, 0]}, 'legend.margin': [30, 0, 0, 0], 'legend.itemLabelPadding': [10, 10, 10, 10], 'plot.legendLabelGenerator': '{0} ({1})', 'plot.backgroundPaint': '', 'plot.outlineVisible': false, 'plot.shadowPaint': '', 'plot.baseSectionOutlineStroke': {'width': 2.0}, 'plot.sectionOutlinePaint': ['#87b80e', '#ef4747', '#fab220', '#9e9e9e', '#15a9d9'], 'plot.sectionPaint':['#a6cb4a', '#f46e6d', '#ffc65b', '#b7b7b7', '#5bbfe3'], 'plot.labelGenerator': '', 'plot.centerTextMode': 'fixed', 'plot.centerText': '${totalAmount}', 'plot.centerTextFont': {'size': 24}, 'plot.centerTextColor': '#555555', 'plot.sectionDepth': 0.15, 'plot.separatorsVisible': false } /][#if expensesreport.expenses?size != 0]
[/#if]
Date |
Description |
Amount |
|
---|---|---|---|
[#list expensesreport.expenses?sort_by("date") as expense] | |||
${expense.date?date} |
[#if expense.category??][${expense.category}] [/#if]${expense.description} ${expense.project.client} / ${expense.project} |
${expense.amount} |
|
[/#list] | |||
${expensesreport.calculateAmount(expensesreport.expenses)} |