Skip to content

Commit

Permalink
improvement(MonthlyBalance)
Browse files Browse the repository at this point in the history
- Sanitaze code and improve report and translate key
  • Loading branch information
lomamech committed Jul 31, 2019
1 parent 1167990 commit 58cb1d0
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 16 deletions.
2 changes: 1 addition & 1 deletion client/src/i18n/en/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"INCOME_REPORT": "Income Report",
"MONTHLY_BALANCE": "Monthly Balance",
"MONTHLY_ACCOUNT_ANALYSIS": {
"DESCRIPTION": "This report allows for monthly analysis of accounts",
"DESCRIPTION": "This report is used to analyze the balance of accounts on a monthly basis. This analysis shows the total debits and credits as well as the total balances for each account.",
"TITLE": "Monthly Balance analysis"
},
"OPEN_DEBTORS": {
Expand Down
2 changes: 1 addition & 1 deletion client/src/i18n/en/tree.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"IPR_TAX_CONFIGURATION" : "IPR Tax Configuration",
"JOURNAL_VOUCHER" : "Journal Voucher",
"LOCATION" : "Location Management",
"MONTHLT_ACCOUNT_ANALYSIS": "Monthly Balance analysis",
"MONTHLY_ACCOUNT_ANALYSIS": "Monthly Balance analysis",
"MULTI_PAYROLL" : "Multiple Payroll",
"OHADA_BILAN":"[OHADA] Bilan",
"OHADA_PROFIT_LOSS" : "[OHADA] Profit and Loss",
Expand Down
2 changes: 1 addition & 1 deletion client/src/i18n/fr/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"INCOME_REPORT" : "Rapport des Recettes",
"MONTHLY_BALANCE" : "Balance Mensuelle",
"MONTHLY_ACCOUNT_ANALYSIS": {
"DESCRIPTION": "Ce rapport permet de faire l'analyse mensuel des comptes",
"DESCRIPTION": "Ce rapport permet de faire l'analyse mensuel de la balance des comptes, cette analyse permet de visualiser le total des debits et des des crédits ainsi que le totals des soldes pour chaque comptes",
"TITLE": "Analyse mensuel de la Balance"
},
"OPEN_DEBTORS": {
Expand Down
2 changes: 1 addition & 1 deletion client/src/i18n/fr/tree.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"IPR_TAX_CONFIGURATION": "Configuration de la taxe IPR",
"JOURNAL_VOUCHER":"Ajout Transactions",
"LOCATION":"Localisations",
"MONTHLT_ACCOUNT_ANALYSIS": "Analyse mensuel de la Balance",
"MONTHLY_ACCOUNT_ANALYSIS": "Analyse mensuel de la Balance",
"MULTI_PAYROLL" : "Payroll Multiple",
"OFFDAYS_MANAGEMENT" : "Gestion des jours fériés",
"OHADA_BILAN":"[OHADA] Bilan",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ <h3 class="text-capitalize" translate>REPORT.MONTHLY_ACCOUNT_ANALYSIS.TITLE</h3>
period-id="ReportConfigCtrl.reportDetails.period_id"
on-select-callback="ReportConfigCtrl.onSelectPeriod(period)">
</bh-period-selection>
<hr>
<div class="panel-body" ng-class="{'has-error' : ConfigForm.$submitted && ConfigForm.allAccount.$invalid }">

<div class="form-group" ng-class="{'has-error' : ConfigForm.$submitted && ConfigForm.allAccount.$invalid }">
<div class="radio">
<label class="radio-inline">
<input
Expand Down Expand Up @@ -90,7 +90,6 @@ <h3 class="text-capitalize" translate>REPORT.MONTHLY_ACCOUNT_ANALYSIS.TITLE</h3>
</div>
</div>
</div>
<hr>

<bh-loading-button loading-state="ConfigForm.$loading">
<span translate>REPORT.UTIL.PREVIEW</span>
Expand Down
4 changes: 2 additions & 2 deletions server/controllers/finance/reports/monthlyBalance/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function reporting(opts, session) {

let docReport;
const options = _.extend(opts, {
filename : 'FORM.LABELS.MONTHLT_ACCOUNT_ANALYSIS',
filename : 'FORM.LABELS.MONTHLY_ACCOUNT_ANALYSIS',
csvKey : 'rows',
user : session.user,
});
Expand Down Expand Up @@ -61,7 +61,7 @@ function reporting(opts, session) {
if (accountNumber) {
filterByAccount = selectAccountParent(accountNumber);
} else {
filterByAccount = ``;
filterByAccount = '';
}

const sql = `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@

<table class="table table-condensed table-report table-bordered">
<tbody>
<tr>
<th class="text-center">
{{translate 'REPORT.INCOME'}}
</th>
</tr>
<tr style="padding:0;margin:0;border:none;">
<td style="padding:0;margin:0;border:none;">
<table class="table table-condensed table-report table-bordered">
Expand Down
2 changes: 1 addition & 1 deletion server/models/bhima.sql
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ INSERT INTO unit VALUES
(241, 'Entity Folder', 'ENTITY.MANAGEMENT', 'Entity Folder', 0, '/modules/entities', '/ENTITY_FOLDER'),
(242, 'Entity Management','ENTITY.MANAGEMENT','',241,'/modules/entities','/entities'),
(243, 'Entity Group', 'ENTITY.GROUP.TITLE', 'Entity Group', 241, '/modules/entity_group', '/entity_group'),
(244, 'Monthly Balance analysis', 'TREE.MONTHLT_ACCOUNT_ANALYSIS', 'Monthly Balance analysis', 144, '/modules/reports/monthlyBalanceAnalysis', '/reports/monthlyBalanceAnalysis');
(244, 'Monthly Balance analysis', 'TREE.MONTHLY_ACCOUNT_ANALYSIS', 'Monthly Balance analysis', 144, '/modules/reports/monthlyBalanceAnalysis', '/reports/monthlyBalanceAnalysis');

-- Reserved system account type
INSERT INTO `account_category` VALUES
Expand Down
2 changes: 1 addition & 1 deletion server/models/migrations/next/migrations.sql
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ INSERT INTO `report` (`id`, `report_key`, `title_key`) VALUES
@description: This report allows for monthly analysis of accounts
*/
INSERT INTO unit VALUES
(244, 'Monthly Balance analysis', 'TREE.MONTHLT_ACCOUNT_ANALYSIS', 'Monthly Balance analysis', 144, '/modules/reports/monthlyBalanceAnalysis', '/reports/monthlyBalanceAnalysis');
(244, 'Monthly Balance analysis', 'TREE.MONTHLY_ACCOUNT_ANALYSIS', 'Monthly Balance analysis', 144, '/modules/reports/monthlyBalanceAnalysis', '/reports/monthlyBalanceAnalysis');

INSERT INTO `report` (`id`, `report_key`, `title_key`) VALUES
(34, 'monthlyBalanceAnalysis', 'REPORT.MONTHLY_ACCOUNT_ANALYSIS.TITLE');
Expand Down

0 comments on commit 58cb1d0

Please sign in to comment.