From c354e8b7316a794fdb2418bd68562e739bdb4ab9 Mon Sep 17 00:00:00 2001 From: Jonathan Niles Date: Tue, 31 Oct 2017 12:36:34 +0100 Subject: [PATCH] feat(aged debtors): enable grouping by month This commit implements grouping by month for the aged debtors report. This implements a checkbox on the client side that allows a user to toggle the month grouping as needed. --- client/src/i18n/en/report.json | 1 + client/src/i18n/fr/report.json | 1 + .../generate/aged_debtors/aged_debtors.html | 7 ++++ .../finance/reports/debtors/aged.handlebars | 34 ++++++++++++++--- .../finance/reports/debtors/index.js | 37 ++++++++++++++----- server/lib/renderers/html.js | 3 ++ server/lib/template/helpers/dates.js | 14 +++++++ server/lib/template/index.js | 1 + 8 files changed, 84 insertions(+), 14 deletions(-) diff --git a/client/src/i18n/en/report.json b/client/src/i18n/en/report.json index 799905281f..1ccf759260 100644 --- a/client/src/i18n/en/report.json +++ b/client/src/i18n/en/report.json @@ -63,6 +63,7 @@ "TOTAL_DEBT": "Total Debt" }, "OVER_NINETY_DAYS": "Over 90 Days", + "PREVIOUS_MONTHS": "Previous Months", "PERIOD_START": "Start", "PERIOD_STOP": "Stop", "PRODUCED_BY": "Produced by", diff --git a/client/src/i18n/fr/report.json b/client/src/i18n/fr/report.json index 6ce8836251..ee37d80c56 100644 --- a/client/src/i18n/fr/report.json +++ b/client/src/i18n/fr/report.json @@ -60,6 +60,7 @@ "TOTAL_DEBT": "Total des Dettes" }, "OVER_NINETY_DAYS": "Plus de 90 Jours", + "PREVIOUS_MONTHS": "Mois Précédents", "PERIOD_START": "Debut", "PERIOD_STOP": "Fin", "PRODUCED_BY": "Produit par", diff --git a/client/src/modules/reports/generate/aged_debtors/aged_debtors.html b/client/src/modules/reports/generate/aged_debtors/aged_debtors.html index 3c3f74a49a..ecc8f58c94 100644 --- a/client/src/modules/reports/generate/aged_debtors/aged_debtors.html +++ b/client/src/modules/reports/generate/aged_debtors/aged_debtors.html @@ -29,6 +29,13 @@

REPORT.AGED_DEBTORS.TITLE

validation-trigger="ConfigForm.$submitted"> +
+ +
+