add monthly result after irregular expenses
This commit is contained in:
@@ -225,5 +225,7 @@ class Statistics:
|
|||||||
self.avg_weekly_irregular_expenses = self.avg_daily_irregular_expenses * days_per_week
|
self.avg_weekly_irregular_expenses = self.avg_daily_irregular_expenses * days_per_week
|
||||||
self.avg_monthly_irregular_expenses = self.avg_daily_irregular_expenses * days_per_month
|
self.avg_monthly_irregular_expenses = self.avg_daily_irregular_expenses * days_per_month
|
||||||
|
|
||||||
|
self.avg_monthly_result_complete = self.avg_monthly_result + self.avg_monthly_irregular_expenses
|
||||||
|
|
||||||
def get_daily_stats_in_range(self):
|
def get_daily_stats_in_range(self):
|
||||||
return [s for s in self.daily_stats if self.display_start <= s.date <= self.display_end]
|
return [s for s in self.daily_stats if self.display_start <= s.date <= self.display_end]
|
||||||
|
|||||||
@@ -79,6 +79,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<p>monthly result after irregular expenses: {{ avg_monthly_result_complete|euro }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="main-container">
|
<div class="main-container">
|
||||||
|
|||||||
@@ -21,5 +21,6 @@ def index(request):
|
|||||||
"avg_daily_irregular_expenses": statistics.avg_daily_irregular_expenses,
|
"avg_daily_irregular_expenses": statistics.avg_daily_irregular_expenses,
|
||||||
"avg_weekly_irregular_expenses": statistics.avg_weekly_irregular_expenses,
|
"avg_weekly_irregular_expenses": statistics.avg_weekly_irregular_expenses,
|
||||||
"avg_monthly_irregular_expenses": statistics.avg_monthly_irregular_expenses,
|
"avg_monthly_irregular_expenses": statistics.avg_monthly_irregular_expenses,
|
||||||
|
"avg_monthly_result_complete": statistics.avg_monthly_result_complete,
|
||||||
}
|
}
|
||||||
return render(request, "financeplanner/index.html", context)
|
return render(request, "financeplanner/index.html", context)
|
||||||
|
|||||||
Reference in New Issue
Block a user