Skip to content

Commit

Permalink
- Fixed display error in the Cashflow report.
Browse files Browse the repository at this point in the history
- Added a new summary section to improve budget report.
closes Third-Culture-Software#7897
  • Loading branch information
lomamech committed Dec 2, 2024
1 parent 5c7d99b commit 7abfeb1
Show file tree
Hide file tree
Showing 18 changed files with 304 additions and 23 deletions.
1 change: 1 addition & 0 deletions client/src/i18n/en/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@
"BILLING_DATE": "Billing Date",
"BREAK_EVEN": "Break Even",
"BUDGET": "Budget",
"BUDGET_ANALYSIS": "Budget analysis",
"BULK_QUANTITY": "Bulk quantity",
"BY": "by",
"BY_ID": "By Id",
Expand Down
3 changes: 3 additions & 0 deletions client/src/i18n/en/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,14 @@
"EXPENSES": "Expenses",
"HIDE_TITLE_ACCOUNT": "Hide Title Account",
"HIDE_UNUSED_ACCOUNTS": "Hide Unused Accounts or Accounts with Zero Values",
"INCLUDE_SUMMARY_SECTION": "Include summary section",
"MAX_5_YEAR": "Please note that the budget analysis period is limited to a maximum of 5 years.",
"PERCENTAGE_VARIATION_COMPARED": "Percentage Variation Compared to the Budget",
"REALIZATION" : "Actuals",
"REVENUS": "Income",
"SET_NUMBER_YEAR": "Set the Number of Years for Analysis",
"SHOW_ONLY_TITLE_ACCOUNT": "Display Only the Title Account",
"SUMMARY_SECTION": "Summary section",
"VARIATION_IN_AMOUNT": "Variation in Amount"
},
"BY_ASC": "By Ascending Order",
Expand Down Expand Up @@ -135,6 +137,7 @@
"TITLE": "Configurable Analysis Report"
},
"CONFIGURATION": "Report Configuration",
"CONSIDER_TRANSFER_MOVEMENTS_REVENUE": "Consider transfer movements as revenue.",
"DELETE": "Delete Report",
"DOWNLOAD": "Download",
"EMPLOYEE_STANDING": {
Expand Down
4 changes: 4 additions & 0 deletions client/src/i18n/en/table.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
"LAST_PAYMENT": "Last Payment",
"LISTS": "Registered price list",
"LOADING": "Fetching data from the server.",
"LOCAL_CASH_REVENUES": "Local Cash Revenues",
"LOCKED": "Locked",
"LOCKEDQ": "Locked?",
"LOT": "Lot / Batch",
Expand Down Expand Up @@ -228,6 +229,7 @@
"RESULT": "Result",
"RESULTS": "Results",
"RESULT_ACCOUNT_SCT": "Result Account section",
"RESULT_WITHOUT_ACCOUNTS": "Result Without Accounts:",
"RUBRICS": "Rubrics",
"SEE_SITUATION_ALL_EMPLOYEES": "See the overall situation of all employees",
"SECTOR": "Sector",
Expand Down Expand Up @@ -258,9 +260,11 @@
"TOTAL_DEBT": "Total Debt",
"TOTAL_DISTRIBUTE": "Total Distributions",
"TOTAL_DISTRIBUTION_COST": "Total distribution cost",
"TOTAL_FINANCEMENT": "Total financement",
"TOTAL_GENERAL": "Total General",
"TOTAL_INVOICE": "Total invoice",
"TOTAL_MEDICAL_CARE_EMPLOYEE": "Total medical care provided to the employee",
"TOTAL_SUBSIDIES": "Total subsidies",
"TOTAL_UNICORPORATED_CHARGE": "Total unincorporated cost",
"TOTAL_UNICORPORARED_PRODUCT": "Total unincorporated product",
"TRANSACTION": "Transaction",
Expand Down
1 change: 1 addition & 0 deletions client/src/i18n/en/vouchers.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"SUPPORT_INCOME": "Support Incomes",
"TITLE": "Simple Voucher",
"TRANSFER": "Money Transfer",
"TRANSFER_MONEY_DISBURSEMENT": "Money Disbursement",
"TRANSFER_PATIENT_INVOICE_AMOUNT": "Patient Invoice Debt Transfer",
"STOCK_INTEGRATION" : "Stock Integration",
"STOCK_EXIT":"Stock Exit",
Expand Down
1 change: 1 addition & 0 deletions client/src/i18n/fr/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@
"BILLING_DATE": "Date Facturation",
"BREAK_EVEN": "Seuil de rentabilité",
"BUDGET": "Budget",
"BUDGET_ANALYSIS": "Analyse du budget",
"BULK_QUANTITY": "Quantité en vrac",
"BY_ID": "Par id",
"BY_NAME": "Par nom",
Expand Down
3 changes: 3 additions & 0 deletions client/src/i18n/fr/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,14 @@
"EXPENSES": "Dépenses",
"HIDE_TITLE_ACCOUNT": "Cacher le compte de titre",
"HIDE_UNUSED_ACCOUNTS": "Cacher le compte non utilisé ou dont les valeurs sont égales à zéro",
"INCLUDE_SUMMARY_SECTION": "Inclure une section récapitulative",
"MAX_5_YEAR": "Veuillez noter que la période d'analyse budgétaire est limitée à un maximum de 5 années.",
"PERCENTAGE_VARIATION_COMPARED": "Variation en pourcentage par rapport au budget",
"REALIZATION" : "Réalisation",
"REVENUS": "Revenus",
"SET_NUMBER_YEAR": "Définir le Nombre d'années pour l'Analyse",
"SHOW_ONLY_TITLE_ACCOUNT": "Afficher uniquement le compte de titre",
"SUMMARY_SECTION": "Section récapitulative",
"VARIATION_IN_AMOUNT": "Variation en chiffre"
},
"BY_ASC": "Par ordre croissant",
Expand Down Expand Up @@ -117,6 +119,7 @@
"TITLE": "Rapport d'analyse configurable"
},
"CONFIGURATION" : "Configuration rapport",
"CONSIDER_TRANSFER_MOVEMENTS_REVENUE": "Considérer les mouvements de transfert comme des recettes.",
"DELETE" : "Supprimer un rapport",
"DOWNLOAD" : "Télécharger",
"EMPLOYEE_STANDING" : {
Expand Down
4 changes: 4 additions & 0 deletions client/src/i18n/fr/table.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
"LAST_PAYMENT": "Derniere Paiement",
"LISTS": "Liste des prix enregistrés",
"LOADING": "Récupération des données à partir du serveur.",
"LOCAL_CASH_REVENUES": "Recettes locales",
"LOCKED": "Bloquée",
"LOCKEDQ": "Bloquée ?",
"LONGITUDE": "Longitude",
Expand Down Expand Up @@ -228,6 +229,7 @@
"RESULT": "Résultat",
"RESULTS": "Résultats",
"RESULT_ACCOUNT_SCT": "Section Compte Résultat",
"RESULT_WITHOUT_ACCOUNTS": "Résultat sans les comptes:",
"RUBRICS": "Rubriques",
"SEE_SITUATION_ALL_EMPLOYEES": "Voir la situation globale de tous les employés",
"SECTOR": "Secteur",
Expand Down Expand Up @@ -259,8 +261,10 @@
"TOTAL_GENERAL": "Total général",
"TOTAL_DISTRIBUTE": "Total de répartition",
"TOTAL_DISTRIBUTION_COST": "Total du coût de la distribution",
"TOTAL_FINANCEMENT": "Total financement",
"TOTAL_INVOICE": "Total de la facture",
"TOTAL_MEDICAL_CARE_EMPLOYEE": "Total des soins médicaux accordés à l'employé",
"TOTAL_SUBSIDIES": "Total subventions",
"TOTAL_UNICORPORATED_CHARGE": "Total charge non incorporé",
"TOTAL_UNICORPORARED_PRODUCT": "Total produit non incorporé",
"TRANSACTION": "Transaction",
Expand Down
1 change: 1 addition & 0 deletions client/src/i18n/fr/vouchers.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"SUPPORT_INCOME": "Paiement Prise en charge",
"TITLE": "Bordereau de transfert",
"TRANSFER": "Transfert d'argent",
"TRANSFER_MONEY_DISBURSEMENT": "Transfert: Décaissement d'argent",
"TRANSFER_PATIENT_INVOICE_AMOUNT": "Prise en Charge de Facture de Patient",
"STOCK_INTEGRATION" : "Intégration Stock",
"STOCK_EXIT":"Sortie de stock",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ function BudgetReportController($sce, Notify, SavedReports, AppCache, reportData
filter : 'default',
};

vm.include_summary_section = 0;

vm.previewGenerated = false;
checkCachedConfiguration();

Expand All @@ -31,13 +33,31 @@ function BudgetReportController($sce, Notify, SavedReports, AppCache, reportData
vm.reportDetails = angular.copy(report);
};

vm.onChangeIncludeSection = value => {
if (value === 0) {
vm.reportDetails.cashboxesIds = [];
}

vm.include_summary_section = value;
};

vm.onSelectCashboxes = (cashboxesIds) => {
vm.reportDetails.cashboxesIds = cashboxesIds;
};

vm.numberYears = [
{ id : 1 }, { id : 2 }, { id : 3 }, { id : 4 }, { id : 5 },
];

vm.preview = function preview(form) {
if (form.$invalid) { return null; }

if (vm.include_summary_section === 0) {
vm.reportDetails.cashboxesIds = [];
}

vm.reportDetails.include_summary_section = vm.include_summary_section;

// update cached configuration
cache.reportDetails = angular.copy(vm.reportDetails);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,21 @@ <h3 class="text-capitalize" translate>REPORT.BUDGET_REPORT.TITLE</h3>
</div>
</div>

<bh-yes-no-radios
label="REPORT.BUDGET_REPORT.INCLUDE_SUMMARY_SECTION"
value="ReportConfigCtrl.include_summary_section"
name="include_summary_section"
on-change-callback="ReportConfigCtrl.onChangeIncludeSection(value)">
</bh-yes-no-radios>

<div ng-if="ReportConfigCtrl.include_summary_section === 1">
<bh-multiple-cashbox-select
cashbox-ids="ReportConfigCtrl.reportDetails.cashboxes"
on-change="ReportConfigCtrl.onSelectCashboxes(cashboxes)"
required="true">
</bh-multiple-cashbox-select>
</div>

<bh-loading-button loading-state="ConfigForm.$loading">
<span translate>REPORT.UTIL.PREVIEW</span>
</bh-loading-button>
Expand Down
9 changes: 9 additions & 0 deletions client/src/modules/reports/generate/cashflow/cashflow.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ <h3 class="text-capitalize" translate>REPORT.CASHFLOW.TITLE</h3>
required="true">
</bh-multiple-cashbox-select>

<div class="form-group">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="ReportConfigCtrl.reportDetails.is_transfer_as_revenue" ng-true-value="1" ng-false-value="0">
<span translate>REPORT.CONSIDER_TRANSFER_MOVEMENTS_REVENUE</span>
</label>
</div>
</div>

<div class="panel-body">
<div class="radio">
<label class="radio-inline">
Expand Down
Loading

0 comments on commit 7abfeb1

Please sign in to comment.