diff --git a/app/Resources/views/logged/previsionnel.html.twig b/app/Resources/views/logged/previsionnel.html.twig index 73dbfe52..63d25a31 100755 --- a/app/Resources/views/logged/previsionnel.html.twig +++ b/app/Resources/views/logged/previsionnel.html.twig @@ -17,7 +17,10 @@ Euros disponibles au départ: - Dépenses mensuelles: {{ sumMonthlyExpenses }} + + + Dépenses mensuelles: {{ sumMonthlyExpenses() }} € +

Postes de dépenses @@ -60,16 +63,16 @@ - + - + {{ e.repeat * e.amount }} - + {{ e.amount * 12 }} @@ -128,18 +131,18 @@ - + {{ $index }} - - + {{ line.expense }} - + {{ line.available }} diff --git a/assets/js/parts/main.js b/assets/js/parts/main.js index c5f43f9c..e6bf666a 100755 --- a/assets/js/parts/main.js +++ b/assets/js/parts/main.js @@ -255,15 +255,16 @@ angular }; $scope.previsionTable = () => { - let turns = 60; + let turns = 24; let monthly = $scope.sumMonthlyExpenses(); let available = $scope.disponibility; let previsionTable = []; for (let i = 0; i <= turns; i++) { // TODO take in account delays in expenses + available = available - monthly; let newLine = { expense: monthly, - available: available - monthly, + available: available, }; previsionTable.push(newLine); }