From d5b5a281ac5f2d11ee964827fa7a7fba3e495f3d Mon Sep 17 00:00:00 2001 From: Jonathan Niles Date: Tue, 31 Oct 2017 12:49:44 +0100 Subject: [PATCH] feat(Aged Creditors): implement monthly grouping This commit implements "Group by Month" on the Aged Creditors page. It transforms the date range from being a simply 30/60/90 range to being this month, last month, and the previous month(s). This allows a much more intuitive grouping for users who are not used to thinking in ranges of 30 days. Closes #1367. --- client/src/i18n/en/form.json | 1 + client/src/i18n/fr/form.json | 1 + .../aged_creditors/aged_creditors.html | 10 ++++- .../generate/aged_debtors/aged_debtors.html | 1 + .../finance/reports/creditors/aged.handlebars | 33 +++++++++++++--- .../finance/reports/creditors/index.js | 39 ++++++++++++++----- .../finance/reports/debtors/aged.handlebars | 12 +++--- 7 files changed, 75 insertions(+), 22 deletions(-) diff --git a/client/src/i18n/en/form.json b/client/src/i18n/en/form.json index cab01ea7cf..4a0aab12ba 100644 --- a/client/src/i18n/en/form.json +++ b/client/src/i18n/en/form.json @@ -493,6 +493,7 @@ "UPDATE_GROUP_DEBTOR": "Update Debtor Group", "UPDATE_PATIENT_GROUP": "Update Patient Group Subscription", "USE": "Use", + "USE_MONTH_GROUPING": "Group By Months", "USE_POS_RECEIPT": "POS Receipts", "USE_SIMPLIFIED_CARD": "Use simple patient identity", "USER": "User", diff --git a/client/src/i18n/fr/form.json b/client/src/i18n/fr/form.json index 71afae287d..f9faeb9460 100644 --- a/client/src/i18n/fr/form.json +++ b/client/src/i18n/fr/form.json @@ -496,6 +496,7 @@ "UPDATE_GROUP_DEBTOR": "Mettre à jour le Groupe débiteur", "UPDATE_PATIENT_GROUP": "Mettre à jour les groupes de patients", "USE": "Utilisation", + "USE_MONTH_GROUPING": "Grouper par Mois", "USERNAME": "Nom de l'utilisateur", "USE_POS_RECEIPT": "Impression POS", "USE_SIMPLIFIED_CARD": "Utiliser une identité de patient simple", diff --git a/client/src/modules/reports/generate/aged_creditors/aged_creditors.html b/client/src/modules/reports/generate/aged_creditors/aged_creditors.html index c26daf7ac0..d02b03e364 100644 --- a/client/src/modules/reports/generate/aged_creditors/aged_creditors.html +++ b/client/src/modules/reports/generate/aged_creditors/aged_creditors.html @@ -28,6 +28,14 @@

REPORT.AGED_CREDITORS.TITLE

on-select-callback = "ReportConfigCtrl.onSelectPeriod(period)"> + +
+ +
+
- \ No newline at end of file + 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 ecc8f58c94..82fb3637eb 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,7 @@

REPORT.AGED_DEBTORS.TITLE

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