Skip to content

Commit

Permalink
fix(reports): name aged_creditors correctly
Browse files Browse the repository at this point in the history
This commit fixes the names for aged_creditors and aged_debtors.
Previously, aged_creditors was named "Aged Debts" which was very
confusing.
  • Loading branch information
jniles committed Oct 31, 2017
1 parent 1d23283 commit fbf7f6b
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 110 deletions.
3 changes: 1 addition & 2 deletions client/src/i18n/en/tree.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"ACCOUNT":"Account",
"ACCOUNT_STATEMENT":"Account Statement",
"ADMIN":"Admin",
"AGED_CREDITORS":"Aged Debts",
"AGED_CREDITORS":"Aged Creditors",
"BALANCE":"Balance",
"BALANCE_SHEET":"Balance Sheet",
"BALANCE_REPORT":"Balance of accounts",
Expand All @@ -19,7 +19,6 @@
"CREDIT_NOTE":"Credit note",
"CREDITOR_GROUP":"Creditor Group Management",
"CURRENCY":"Currency",
"CUSTOMER_DEBTS":"Customer Debts",
"DEBTOR_GROUP":"Debtor Group Management",
"DEPOTS":"Depots Management",
"EMPLOYEE":"Employee",
Expand Down
171 changes: 87 additions & 84 deletions client/src/i18n/fr/tree.json
Original file line number Diff line number Diff line change
@@ -1,84 +1,87 @@
{"TREE":{"ACCOUNT":"Comptes",
"ACCOUNT_STATEMENT":"Rélevé de compte",
"ADMIN":"Admin",
"AGED_CREDITORS":"Balance âgée des Créances",
"BALANCE":"Balance",
"BALANCE_SHEET":"Bilan",
"BALANCE_REPORT":"Balance des comptes",
"BILLING_SERVICES":"Services de facturation",
"CASH_REPORT" : "Rapport de Caisse",
"CASHBOX_MANAGEMENT":"Caisses et Banques",
"CASHFLOW": "Flux de trésorerie",
"CASHFLOW_BY_SERVICE": "Flux de trésorerie par Service",
"CASH_PAYMENT_REGISTRY":"Registre des paiements",
"CASH_WINDOW":"Paiements",
"COMPLEX_JOURNAL_VOUCHER":"Ajout de transactions",
"COST_CENTER_MGMT":"Centres de coûts",
"CREDIT_NOTE":"Note de Crédit",
"CREDITOR_GROUP":"Gestion de groupes crediteurs",
"CURRENCY":"Monnaie",
"CUSTOMER_DEBTS":"Balance agée des Conventionnés",
"DEBTOR_GROUP":"Gestion de groupes débiteurs",
"DEPOTS":"Gestion Dépôts",
"EMPLOYEE":"Gestion Employés",
"EMPLOYEE_REGISTRY" : "Registre des employees",
"ENTERPRISE":"Entreprise",
"EXCHANGE":"Taux de change",
"FINANCE":"Finances",
"FISCAL_YEAR":"Année Fiscale",
"FONCTION":"Gestion Fonctions",
"GENERAL_LEDGER":"Grand Livre",
"GRADE_EMPLOYERS":"Gestion Grades",
"HOSPITAL":"Hôpital",
"INCOME_EXPENSE":"Recettes et dépenses",
"INVENTORY":"Inventaires",
"INVENTORY_CONFIGURATION":"Configurations",
"INVENTORY_GROUP":"Groupe",
"INVENTORY_LIST":"Liste",
"INVENTORY_MANAGEMENT":"Gestion des Inventaires ",
"INVENTORY_TYPE":"Type",
"INVENTORY_UNIT":"Forme Galenique",
"INVENTORY_VIEW":"Stocks",
"INVOICE_REGISTRY":"Registre des factures",
"JOURNAL_VOUCHER":"Ajout Transactions",
"LOCATION":"Localisations",
"PHARMACY":"Gestion de pharmacie",
"PATIENT_DOCUMENT":"Documents de Patient",
"PATIENT_GRP":"Groupe des Patients",
"PATIENT_GRP_ASSIGNMENT":"Assignation Groupe",
"PATIENT_INVOICE":"Facturation des patients",
"PATIENT_RECORDS":"Historique Patients",
"PATIENT_REGISTRATION":"Enregistrement Patient",
"PATIENT_REGISTRATIONS":"Enregistrement Patients",
"PATIENT_REGISTRY":"Registre des patients",
"PAYROLL":"Payroll",
"POSTING_JOURNAL":"Journal",
"PRICE_LIST":"Liste des Prix",
"PROJECT":"Projets",
"PURCHASING":"Achat",
"PURCHASE_ORDER":"Ordre d'Achats",
"PURCHASE":"Commande",
"PURCHASE_REGISTRY":"Registre des commandes",
"REPORTS":"Rapports",
"REPORT_ACCOUNTS":"Rapport de comptes",
"REFERENCE":"Référence",
"REFERENCE_GROUP":"Groupe de référence",
"REGISTER_SUPPLIER":"Fournisseurs",
"ROOT":"Racine",
"RUBRIC_MANAGEMENT":"Gestion Rubriques",
"INVOICES":"Facturation",
"SECTION_BILAN":"Section bilan",
"SECTION_RESULTAT":"Section Resultat",
"SERVICE":"Services",
"SIMPLE_VOUCHER":"Bordereau de transfert",
"STOCK":"Stock",
"STOCK_INVENTORY":"Articles en stock",
"STOCK_REPORT": "[Stock] Articles en stock",
"STOCK_INVENTORY_REPORT":"[Stock] Fiche de stock",
"STOCK_LOTS":"Lots en stock",
"STOCK_MOVEMENTS":"Movements de stock",
"TRANSACTION_TYPE":"Types de Transaction",
"SUBSIDY":"Gestion des subventions",
"USERS":"Utilisateurs",
"VOUCHER_REGISTRY":"Registre des Bordereaux",
"AGED_DEBTORS":"Les plus anciens débiteurs"}}
{
"TREE": {
"ACCOUNT":"Comptes",
"ACCOUNT_STATEMENT":"Rélevé de compte",
"ADMIN":"Admin",
"AGED_CREDITORS":"Balance âgée des Créances",
"BALANCE":"Balance",
"BALANCE_SHEET":"Bilan",
"BALANCE_REPORT":"Balance des comptes",
"BILLING_SERVICES":"Services de facturation",
"CASH_REPORT" : "Rapport de Caisse",
"CASHBOX_MANAGEMENT":"Caisses et Banques",
"CASHFLOW": "Flux de trésorerie",
"CASHFLOW_BY_SERVICE": "Flux de trésorerie par Service",
"CASH_PAYMENT_REGISTRY":"Registre des paiements",
"CASH_WINDOW":"Paiements",
"COMPLEX_JOURNAL_VOUCHER":"Ajout de transactions",
"COST_CENTER_MGMT":"Centres de coûts",
"CREDIT_NOTE":"Note de Crédit",
"CREDITOR_GROUP":"Gestion de groupes crediteurs",
"CURRENCY":"Monnaie",
"DEBTOR_GROUP":"Gestion de groupes débiteurs",
"DEPOTS":"Gestion Dépôts",
"EMPLOYEE":"Gestion Employés",
"EMPLOYEE_REGISTRY" : "Registre des employees",
"ENTERPRISE":"Entreprise",
"EXCHANGE":"Taux de change",
"FINANCE":"Finances",
"FISCAL_YEAR":"Année Fiscale",
"FONCTION":"Gestion Fonctions",
"GENERAL_LEDGER":"Grand Livre",
"GRADE_EMPLOYERS":"Gestion Grades",
"HOSPITAL":"Hôpital",
"INCOME_EXPENSE":"Recettes et dépenses",
"INVENTORY":"Inventaires",
"INVENTORY_CONFIGURATION":"Configurations",
"INVENTORY_GROUP":"Groupe",
"INVENTORY_LIST":"Liste",
"INVENTORY_MANAGEMENT":"Gestion des Inventaires ",
"INVENTORY_TYPE":"Type",
"INVENTORY_UNIT":"Forme Galenique",
"INVENTORY_VIEW":"Stocks",
"INVOICE_REGISTRY":"Registre des factures",
"JOURNAL_VOUCHER":"Ajout Transactions",
"LOCATION":"Localisations",
"PHARMACY":"Gestion de pharmacie",
"PATIENT_DOCUMENT":"Documents de Patient",
"PATIENT_GRP":"Groupe des Patients",
"PATIENT_GRP_ASSIGNMENT":"Assignation Groupe",
"PATIENT_INVOICE":"Facturation des patients",
"PATIENT_RECORDS":"Historique Patients",
"PATIENT_REGISTRATION":"Enregistrement Patient",
"PATIENT_REGISTRATIONS":"Enregistrement Patients",
"PATIENT_REGISTRY":"Registre des patients",
"PAYROLL":"Payroll",
"POSTING_JOURNAL":"Journal",
"PRICE_LIST":"Liste des Prix",
"PROJECT":"Projets",
"PURCHASING":"Achat",
"PURCHASE_ORDER":"Ordre d'Achats",
"PURCHASE":"Commande",
"PURCHASE_REGISTRY":"Registre des commandes",
"REPORTS":"Rapports",
"REPORT_ACCOUNTS":"Rapport de comptes",
"REFERENCE":"Référence",
"REFERENCE_GROUP":"Groupe de référence",
"REGISTER_SUPPLIER":"Fournisseurs",
"ROOT":"Racine",
"RUBRIC_MANAGEMENT":"Gestion Rubriques",
"INVOICES":"Facturation",
"SECTION_BILAN":"Section bilan",
"SECTION_RESULTAT":"Section Resultat",
"SERVICE":"Services",
"SIMPLE_VOUCHER":"Bordereau de transfert",
"STOCK":"Stock",
"STOCK_INVENTORY":"Articles en stock",
"STOCK_REPORT": "[Stock] Articles en stock",
"STOCK_INVENTORY_REPORT":"[Stock] Fiche de stock",
"STOCK_LOTS":"Lots en stock",
"STOCK_MOVEMENTS":"Movements de stock",
"TRANSACTION_TYPE":"Types de Transaction",
"SUBSIDY":"Gestion des subventions",
"USERS":"Utilisateurs",
"VOUCHER_REGISTRY":"Registre des Bordereaux",
"AGED_DEBTORS":"Les plus anciens débiteurs"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ angular.module('bhima.controllers')

ClientsReportConfigController.$inject = [
'$sce', 'NotifyService', 'BaseReportService', 'AppCache', 'reportData',
'$state', 'moment', 'bhConstants'
'$state', 'moment', 'bhConstants',
];

function ClientsReportConfigController($sce, Notify, SavedReports, AppCache, reportData, $state, Moment, bhContants) {
Expand Down Expand Up @@ -50,7 +50,7 @@ function ClientsReportConfigController($sce, Notify, SavedReports, AppCache, rep
var sendDetails = sanitiseDateStrings(vm.reportDetails);

return SavedReports.requestPreview(reportUrl, reportData.id, sendDetails)
.then(function (result) {
.then(function (result) {
// update cached configuration
vm.previewGenerated = true;
vm.previewResult = $sce.trustAsHtml(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ <h3 class="text-capitalize" translate>REPORT.CLIENTS_REPORT.TITLE</h3>
ng-if="!ReportConfigCtrl.reportDetails.simplePreview"
date-from="ReportConfigCtrl.reportDetails.dateFrom"
date-to="ReportConfigCtrl.reportDetails.dateTo">
</bh-date-interval>
</bh-date-interval>

<!-- detail the previous year flag -->
<div class="form-group" ng-if="!ReportConfigCtrl.reportDetails.simplePreview">
Expand All @@ -49,9 +49,9 @@ <h3 class="text-capitalize" translate>REPORT.CLIENTS_REPORT.TITLE</h3>
<bh-multiple-debtor-group-select
label="FORM.LABELS.CLIENT_TO_IGNORE"
on-select-callback="ReportConfigCtrl.onDebtorGroupSelected(debtorGroups)"
on-remove-callback="ReportConfigCtrl.onDebtorGroupRemoved(debtorGroups)"
></bh-multiple-debtor-group-select>
on-remove-callback="ReportConfigCtrl.onDebtorGroupRemoved(debtorGroups)">
</bh-multiple-debtor-group-select>

<bh-loading-button loading-state="ConfigForm.$loading">
<span translate>REPORT.UTIL.PREVIEW</span>
</bh-loading-button>
Expand Down
6 changes: 3 additions & 3 deletions server/models/bhima.sql
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ INSERT INTO unit VALUES
(147, 'Cash Payment Registry', 'TREE.CASH_PAYMENT_REGISTRY', 'Cash Payment Registry', 5, '/modules/cash/payments/registry', '/payments'),
(149, 'Cash report', 'TREE.CASH_REPORT', 'The Report of cash entry and exit', 144, '/modules/reports/cash_report', '/reports/cash_report'),
(150, 'Balance Report', 'TREE.BALANCE_REPORT', 'Balance report module', 144, '/modules/reports/balance_report', '/reports/balance_report'),
(151, 'Customer Debts', 'TREE.CUSTOMER_DEBTS', 'Customer Debts', 144, '/modules/reports/aged_debtors', '/reports/aged_debtors'),
(151, 'Customer Debts', 'TREE.AGED_DEBTORS', 'Aged Debtors', 144, '/modules/reports/aged_debtors', '/reports/aged_debtors'),
(152, 'Account report', 'TREE.REPORT_ACCOUNTS', 'The Report accounts', 144, '/modules/reports/account_report', '/reports/account_report'),
(153, 'Report Cashflow by Service', 'TREE.CASHFLOW_BY_SERVICE', 'CashflowByService', 144, '/partials/reports/cashflowByService', '/reports/cashflowByService'),
(154, 'Purchase Order', 'TREE.PURCHASE_ORDER', 'Purchase order folder', 0, '/partials/purchase_order', '/purchases/'),
Expand Down Expand Up @@ -95,7 +95,7 @@ INSERT INTO `report` (`id`, `report_key`, `title_key`) VALUES
(2, 'accounts_chart', 'REPORT.CHART_OF_ACCOUNTS'),
(3, 'income_expense', 'REPORT.INCOME_EXPENSE'),
(4, 'balance_report', 'REPORT.BALANCE'),
(5, 'aged_debtors', 'TREE.CUSTOMER_DEBTS'),
(5, 'aged_debtors', 'TREE.AGED_DEBTORS'),
(6, 'account_report', 'REPORT.REPORT_ACCOUNTS.TITLE'),
(7, 'cashflowByService', 'REPORT.CASHFLOW_BY_SERVICE.TITLE'),
(8, 'open_debtors', 'REPORT.OPEN_DEBTORS.TITLE'),
Expand Down Expand Up @@ -165,4 +165,4 @@ INSERT INTO `purchase_status` (`id`, `text`) VALUES
(2, 'PURCHASES.STATUS.CONFIRMED'),
(3, 'PURCHASES.STATUS.RECEIVED'),
(4, 'PURCHASES.STATUS.PARTIALLY_RECEIVED'),
(5, 'PURCHASES.STATUS.CANCELLED');
(5, 'PURCHASES.STATUS.CANCELLED');
25 changes: 10 additions & 15 deletions test/temporary-financial-reports/agedDebtors.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
/* global expect, chai, agent */
const expect = require('chai').expect;
const _ = require('lodash');
/* global agent */
const { expect } = require('chai');

describe('Aged debtors Report', () => {

const reportURL = '/reports/finance/debtors/aged';

const january2017 = {
date: '2017-01-31',
reportId: '5',
zeroes: '0',
const january2017 = {
date : '2017-01-31',
reportId : '5',
zeroes : '0',
renderer : 'json',
};

const june2015 = {
date: '2015-06-30',
reportId: '5',
zeroes: '1',
const june2015 = {
date : '2015-06-30',
reportId : 5,
zeroes : 1,
renderer : 'json',
};

Expand All @@ -31,9 +29,7 @@ describe('Aged debtors Report', () => {

expect(Number(report.debtors[0].total)).to.equal(totalGuestHouse);
expect(Number(report.debtors[3].sixty)).to.equal(totalRegideso30To60);

});

});

// Aged debtors report during the period June 2015
Expand All @@ -56,5 +52,4 @@ describe('Aged debtors Report', () => {
expect(Number(report.aggregates.total)).to.equal(totalAggregates);
});
});

});

0 comments on commit fbf7f6b

Please sign in to comment.