Skip to content

Commit

Permalink
Reformat all reports to put title block on the top right
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcameron committed May 23, 2022
1 parent 84a766a commit ebb78af
Show file tree
Hide file tree
Showing 197 changed files with 1,445 additions and 1,883 deletions.
1 change: 1 addition & 0 deletions client/src/i18n/en/asset.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"NO_ASSIGNMENT_HISTORY" : "No assignment history",
"ONLY_ASSETS" : "Only Assets",
"REQUIRED_INVENTORY_SCAN" : "Required Inventory Scan",
"REQUIRED_INVENTORY_SCANS" : "Required Inventory Scans",
"REQUIRED_INVENTORY_SCAN_CREATED" : "Required inventory scan successfully created",
"REQUIRED_INVENTORY_SCAN_DETAILS" : "Required Inventory Scan Details",
"REQUIRED_INVENTORY_SCAN_EDITED" : "Required inventory scan successfully edited",
Expand Down
7 changes: 6 additions & 1 deletion client/src/i18n/en/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,15 @@
"STATUS": {
"CORRECT": "Correct",
"TRANSFERT_GREATER": "The amount transferred is greater",
"TRANSFERT_LOWWER": "The amount transferred is lower",
"TRANSFERT_LOWER": "The amount transferred is lower",
"TRANSFERT_PENDING": "Transfer pending"
},
"TARGET": "Target",
"TRANSFER_PRINCIPAL": "Transfer Account to Principal Cashbox"
},
"ASSET_SCANS": {
"TITLE" : "Asset Scans Report"
},
"AVG_MED_COST_PER_PATIENT" : {
"TITLE" : "Average Medication Costs Per Patient",
"DESCRIPTION" : "This report shows the average medication costs per patient over a specified time period.",
Expand Down Expand Up @@ -123,6 +126,7 @@
},
"GENERATED": "Generated Report",
"INCOME": "Income",
"LEGEND": "Legend",
"PROFIT_AND_LOSS": "Profit and Loss Statement",
"PROFIT_AND_LOSS_BY_MONTH": "Profit and Loss Statement By Month",
"PROFIT_AND_LOSS_BY_YEAR": "Profit and Loss Statement By Fiscal Year",
Expand Down Expand Up @@ -246,6 +250,7 @@
"NULL" : "Null",
"SIXTY_TO_NINETY_DAYS": "60 to 90 Days",
"THIRTY_TO_SIXTY_DAYS": "30 to 60 Days",
"THROUGH": "Through",
"TOTALS": "Totals",
"VIEW_ACCOUNT_STATEMENT": "View in Account Statement",
"VIEW_CREDIT_NOTE": "View Credit Note",
Expand Down
1 change: 1 addition & 0 deletions client/src/i18n/fr/asset.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"NO_ASSIGNMENT_HISTORY" : "Aucun historique des assignations",
"ONLY_ASSETS" : "Seulement les actifs",
"REQUIRED_INVENTORY_SCAN" : "Scan d'inventaire obligatoire",
"REQUIRED_INVENTORY_SCANS" : "Scans d'inventaire obligatoires",
"REQUIRED_INVENTORY_SCAN_CREATED" : "Scan d'inventaire obligatoire créé avec succès",
"REQUIRED_INVENTORY_SCAN_DETAILS" : "Détails de scan d'inventaire obligatoire",
"REQUIRED_INVENTORY_SCAN_EDITED" : "Scan d'inventaire obligatoire édité avec succès",
Expand Down
10 changes: 7 additions & 3 deletions client/src/i18n/fr/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,15 @@
"STATUS": {
"CORRECT": "Correcte",
"TRANSFERT_GREATER": "Le montant transferé est supérieur",
"TRANSFERT_LOWWER": "Le montant transferé est inférieure",
"TRANSFERT_LOWER": "Le montant transferé est inférieure",
"TRANSFERT_PENDING": "Transfère en attente"
},
"TARGET": "Cible",
"TRANSFER_PRINCIPAL": "Compte de transfert vers caisse Principale"
},
"ASSET_SCANS": {
"TITLE" : "Rapport de scans d'actifs"
},
"AVG_MED_COST_PER_PATIENT" : {
"TITLE" : "Coût moyen des médicaments par patient",
"DESCRIPTION" : "Ce rapport indique le coût moyen des médicaments par patient sur une période donnée.",
Expand Down Expand Up @@ -115,6 +118,7 @@
},
"GENERATED" : "Rapport généré",
"INCOME": "Produit",
"LEGEND": "Legende",
"PROFIT_AND_LOSS" : "Rapport des Produits et des Charges",
"PROFIT_AND_LOSS_BY_MONTH": "Rapport des Produit et des Charges par Mois",
"PROFIT_AND_LOSS_BY_YEAR": "Rapport des Produit et des Charges par Années",
Expand Down Expand Up @@ -213,8 +217,8 @@
"STOCK_VALUE": {
"TITLE" : "Rapport de valeur de stock",
"DESCRIPTION" : "Ce rapport affiche la valeur actuelle du stock pour chaque inventaire dans un dépôt.",
"EXCLUDE_INVENTORIES_ZERO_VALUE": "Exclure les inventaires dont la valeur en stock est nulle"

"EXCLUDE_INVENTORIES_ZERO_VALUE": "Exclure les inventaires dont la valeur en stock est nulle",
"THROUGH": "Jusqu'a"
},
"STOCK_EXPIRATION_REPORT" : {
"TITLE": "Rapport d'expiration de stock",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
angular.module('bhima.controllers')
.controller('analysis_auxiliary_cashboxController', analysisAuxiliaryCashboxController);
.controller('analysis_auxiliary_cashboxesController', analysisAuxiliaryCashboxesController);

analysisAuxiliaryCashboxController.$inject = [
analysisAuxiliaryCashboxesController.$inject = [
'$sce', 'NotifyService', 'BaseReportService', 'AppCache',
'reportData', '$state',
];

function analysisAuxiliaryCashboxController($sce, Notify, SavedReports, AppCache,
function analysisAuxiliaryCashboxesController($sce, Notify, SavedReports, AppCache,
reportData, $state) {
const vm = this;

const cache = new AppCache('analysis_auxiliary_cashboxes');

const reportUrl = 'reports/finance/analysis_auxiliary_cashboxes';

vm.previewGenerated = false;
Expand Down
2 changes: 1 addition & 1 deletion client/src/modules/reports/reports.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ angular.module('bhima.routes')
'aged_creditors',
'aged_debtors',
'aggregated_stock_consumption',
'analysis_auxiliary_cashbox',
'analysis_auxiliary_cashboxes',
'annual_clients_report',
'avg_med_costs_per_patient',
'balance_report',
Expand Down
8 changes: 4 additions & 4 deletions server/config/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const cashboxes = require('../controllers/finance/cashboxes');
const exchange = require('../controllers/finance/exchange');
const cash = require('../controllers/finance/cash');
const priceList = require('../controllers/finance/priceLists');
const priceListPreport = require('../controllers/finance/reports/priceList');
const priceListReport = require('../controllers/finance/reports/priceList');
const invoicingFees = require('../controllers/finance/invoicingFees');
const unpaidInvoicePayments = require('../controllers/finance/reports/unpaid_invoice_payments');
const accounts = require('../controllers/finance/accounts');
Expand Down Expand Up @@ -154,7 +154,7 @@ const reqInvScans = require('../controllers/stock/required_inventory_scans');

// todo: the indicator folder must not be inside the finance folder
const dashboard = require('../controllers/finance/indicator/dashboard');
const indicatorRerpor = require('../controllers/finance/indicator/dashboard/report');
const indicatorsReport = require('../controllers/finance/indicator/dashboard/report');

// Data Kit
const dataCollectorManagement = require('../controllers/admin/dataCollectorManagement');
Expand Down Expand Up @@ -614,7 +614,7 @@ exports.configure = function configure(app) {
// price lists
app.get('/prices', priceList.list);
app.get('/prices/:uuid', priceList.details);
app.get('/prices/download/list', priceListPreport.downloadRegistry);
app.get('/prices/download/list', priceListReport.downloadRegistry);
app.get('/prices/download/filled_template', priceList.downloadFilledTemplate);
app.get('/prices/report/:uuid', financeReports.priceList);
app.post('/prices', priceList.create);
Expand Down Expand Up @@ -1076,7 +1076,7 @@ exports.configure = function configure(app) {

// API dashboard
app.get('/indicators/dashboards', dashboard.getIndicators);
app.get('/reports/indicators_report', indicatorRerpor.report);
app.get('/reports/indicators_report', indicatorsReport.report);

// API cron
app.get('/crons', cron.list);
Expand Down
2 changes: 1 addition & 1 deletion server/controllers/admin/metadataReport/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ function metadataCard(req, res, next) {
});

data.surveyFormElements = surveyFormElements;

return report.render(data);
})
.then(result => {
Expand Down Expand Up @@ -227,7 +228,6 @@ function reportMetadata(req, res, next) {
})
.then(dataCollector => {
data.dataCollector = dataCollector;

return report.render(data);
})
.then(result => {
Expand Down
121 changes: 61 additions & 60 deletions server/controllers/admin/metadataReport/metadataReport.handlebars
Original file line number Diff line number Diff line change
@@ -1,71 +1,72 @@
<!doctype html>
<html>
{{> head title="TREE.DATA_KIT_REPORT"}}
<body>
<div class="container">
{{> head }}

<body>
<div class="container-fluid">

{{> header}}

<!-- body -->
<div class="row">
<div class="col-xs-12">
<!-- body -->
<div class="row">
<div class="col-xs-12">

<!-- page title -->
<h3 class="text-center text-uppercase"><strong>{{translate 'TREE.DATA_KIT_REPORT'}}</strong></h3>
<h4 class="text-center"><strong> {{ dataCollector.label }} </strong></h4>
{{#if patient.display_name }}
<hr>
<h4><strong>{{translate 'FORM.LABELS.NAME'}} : {{ patient.reference }} | {{ patient.display_name }}</strong></h4>
<h4><strong>{{translate 'FORM.LABELS.SEX'}} : {{ patient.sex }} </strong></h4>
<h4><strong>{{translate 'FORM.LABELS.DOB'}} : {{date patient.dob }} </strong></h4>
<hr>
{{/if}}
<h3 class="text-center">
<strong> {{ dataCollector.label }}</strong>
</h3>

<!-- invoices listed -->
<table class="table table-striped table-condensed table-report table-bordered table-responsive table-hover">
<thead>
<tr class="text-capitalize text-center" style="background-color: #ddd;">
{{#each rows.columns}}
<th> {{translate displayName}} </th>
{{/each}}
</tr>
</thead>
{{#if patient.display_name }}
<hr>
<h4><strong>{{translate 'FORM.LABELS.NAME'}} : {{ patient.reference }} | {{ patient.display_name }}</strong></h4>
<h4><strong>{{translate 'FORM.LABELS.SEX'}} : {{ patient.sex }} </strong></h4>
<h4><strong>{{translate 'FORM.LABELS.DOB'}} : {{date patient.dob }} </strong></h4>
<hr>
{{/if}}

<tbody>
{{#each rows.surveyData}}
<tr>
{{#each rowValue}}
<td style="width: auto">
{{ value }}
</td>
{{/each}}
</tr>
{{/each}}
</tbody>
</table>
<br>
<br>
<br>
<table style="width:35%" class="table table-striped table-condensed table-report table-bordered table-responsive table-hover">
<tbody>
<tr>
<td><strong> {{ translate 'FORM.INFO.RESULT_FOUND'}} </strong></td>
<td><strong> {{ resultFound }} </strong></td>
</tr>
{{#each filterQuery}}
<tr>
<td>{{ translate key }}</td>
<td>{{ value }}</td>
<!-- invoices listed -->
<table class="table table-striped table-condensed table-report table-bordered table-responsive table-hover">
<thead>
<tr class="text-capitalize text-center" style="background-color: #ddd;">
{{#each rows.columns}}
<th> {{translate displayName}} </th>
{{/each}}
</tr>
{{/each}}
{{#each filterClient}}
</thead>

<tbody>
{{#each rows.surveyData}}
<tr>
{{#each rowValue}}
<td style="width: auto">
{{ value }}
</td>
{{/each}}
</tr>
{{/each}}
</tbody>
</table>
<br>
<br>
<table style="width:35%" class="table table-striped table-condensed table-report table-bordered table-responsive table-hover">
<tbody>
<tr>
<td>{{ _label }}</td>
<td>{{ displayValue }}</td>
<td><strong> {{ translate 'FORM.INFO.RESULT_FOUND'}} </strong></td>
<td><strong> {{ resultFound }} </strong></td>
</tr>
{{/each}}
</tbody>
</table>
{{#each filterQuery}}
<tr>
<td>{{ translate key }}</td>
<td>{{ value }}</td>
</tr>
{{/each}}
{{#each filterClient}}
<tr>
<td>{{ _label }}</td>
<td>{{ displayValue }}</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>

0 comments on commit ebb78af

Please sign in to comment.