Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cashflow report improve budget report #7900

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions bash.exe.stackdump
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Stack trace:
Frame Function Args
000FFFFBF18 0018006401E (0018028FB18, 0018026EFBE, 00000000000, 000FFFFAE20)
000FFFFBF18 0018004973A (00000000000, 00000000000, 00000000000, 0018028FBD0)
000FFFFBF18 00180049772 (0018028FC18, 000FFFFBDD8, 00000000000, 00000000000)
000FFFFBF18 001800CAAC2 (00000000000, 00000000000, 00000000000, 00000000000)
000FFFFBF18 001800CAC60 (000FFFFBF60, 00000000000, 00000000000, 00000000000)
000FFFFC210 001800CC475 (000FFFFBF60, 00000000000, 00000000000, 00000000000)
End of stack trace
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.reportDetails.include_summary_section = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


vm.previewGenerated = false;
checkCachedConfiguration();

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

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

vm.reportDetails.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.reportDetails.include_summary_section === 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

vm.reportDetails.cashboxesIds = [];
}

// 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.reportDetails.include_summary_section"
name="include_summary_section"
on-change-callback="ReportConfigCtrl.onChangeIncludeSection(value)">
</bh-yes-no-radios>

<div ng-if="ReportConfigCtrl.reportDetails.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