mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Cleaned up reports and associated views.
This commit is contained in:
		| @@ -1,159 +0,0 @@ | ||||
| {% extends "./layout/default.twig" %} | ||||
| {% block content %} | ||||
|     {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, date) }} | ||||
|     <div class="row"> | ||||
|         <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"> | ||||
|             <p> | ||||
|                 <a href="#" class="btn btn-default" id="includeShared" style="display:none;"> | ||||
|                     <i class="state-icon glyphicon glyphicon-unchecked"></i> | ||||
|                     Include shared asset accounts</a> | ||||
|             </p> | ||||
|         </div> | ||||
|     </div> | ||||
| <div class="row"> | ||||
|     <div class="col-lg-6 col-md-6 col-sm-12"> | ||||
|         <div class="panel panel-default"> | ||||
|             <div class="panel-heading"> | ||||
|                 <i class="fa fa-fw fa-credit-card"></i> | ||||
|                 Accounts | ||||
|             </div> | ||||
|             <table class="table table-bordered table-striped"> | ||||
|                 <tr> | ||||
|                     <th>Account</th> | ||||
|                     <th>Start of month</th> | ||||
|                     <th>Current balance</th> | ||||
|                     <th>Spent</th> | ||||
|                     <th>Earned</th> | ||||
|                 </tr> | ||||
|                  | ||||
|                 {% for account in accounts %} | ||||
|                     <tr> | ||||
|                         <td><a href="{{route('accounts.show',account.id)}}">{{ account.name }}</a></td> | ||||
|                         <td>{{  account.startBalance|formatAmount  }}</td> | ||||
|                         <td>{{  account.endBalance|formatAmount  }}</td> | ||||
|                         <td> | ||||
|                             {% if account.startBalance - account.endBalance > 0 %} | ||||
|                                 <span class="text-danger">{{  (account.startBalance - account.endBalance)|formatAmountPlain  }}</span> | ||||
|                             {% endif %} | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             {% if account.startBalance - account.endBalance < 0 %} | ||||
|                                 <span class="text-success">{{  ((account.startBalance - account.endBalance)*-1)|formatAmountPlain }}</span> | ||||
|                             {% endif %} | ||||
|                         </td> | ||||
|                     </tr> | ||||
|                 {% endfor %} | ||||
|             </table> | ||||
|         </div> | ||||
|     </div> | ||||
| </div> | ||||
| <div class="row"> | ||||
|     <div class="col-lg-12 col-md-12 col-sm-12"> | ||||
|         <div class="panel panel-default"> | ||||
|             <div class="panel-heading"> | ||||
|                 <i class="fa fa-tasks fa-fw"></i> | ||||
|                 Budgets | ||||
|             </div> | ||||
|             <table class="table table-bordered table-striped"> | ||||
|                 <tr> | ||||
|                     <th colspan="2">Budgets</th> | ||||
|                     {% for account in accounts %} | ||||
|                         {% if not account.hide %} | ||||
|                             <th><a href="{{route('accounts.show',account.id)}}">{{ account.name }}</a></th> | ||||
|                         {% endif %} | ||||
|                     {% endfor %} | ||||
|                     <th colspan="2"> | ||||
|                         Left in budget | ||||
|                     </th> | ||||
|                 </tr> | ||||
|                 {% for id,budget in budgets %} | ||||
|                 <tr> | ||||
|                     <td>{{ budget.name }}</td> | ||||
|                     <td>{{  budget.queryAmount|formatAmount  }}</td> | ||||
|                     {% set spent = 0 %} | ||||
|                     {% for account in accounts %} | ||||
|                         {% if not account.hide %} | ||||
|                             {% if account.budgetInformation[id] %} | ||||
|                                 <td> | ||||
|                                     {% if id == 0 %} | ||||
|                                     <a href="{{route('reports.no-budget',[account, year, month])}}" class="openModal"> | ||||
|                                         {{  account.budgetInformation[id].queryAmount|formatAmount  }} | ||||
|                                     </a> | ||||
|                                     {% else %} | ||||
|                                         {{  account.budgetInformation[id].queryAmount|formatAmount  }} | ||||
|                                     {% endif %} | ||||
|                                 </td> | ||||
|                                 {% set spent = spent + account.budgetInformation[id].queryAmount %} | ||||
|                             {% else %} | ||||
|                                 <td>{{  0|formatAmount  }}</td> | ||||
|                             {% endif %} | ||||
|                         {% endif %} | ||||
|                     {% endfor %} | ||||
|                     <td>{{  (budget.queryAmount + budget.spent)|formatAmount  }}</td> | ||||
|                     <td>{{  (budget.queryAmount + spent)|formatAmount  }}</td> | ||||
|                 </tr> | ||||
|                 {% endfor %} | ||||
|                 <tr> | ||||
|                     <td colspan="2">Balanced by transfers</td> | ||||
|                     {% for account in accounts %} | ||||
|                         {% if not account.hide %} | ||||
|                             <td> | ||||
|                                 <a href="{{route('reports.balanced-transfers',[account, year, month])}}" class="openModal">{{  account.balancedAmount|formatAmount  }}</a> | ||||
|                             </td> | ||||
|                         {% endif %} | ||||
|                     {% endfor %} | ||||
|                     <td colspan="2"> </td> | ||||
|                 </tr> | ||||
|                 <tr> | ||||
|                     <td colspan="2">Left unbalanced</td> | ||||
|                     {% for account in accounts %} | ||||
|  | ||||
|                         {% if not account.hide %} | ||||
|                             {% if account.budgetInformation[0] %} | ||||
|                                 <td> | ||||
|                                     {% if account.budgetInformation[0].queryAmount + account.balancedAmount != 0.0 %} | ||||
|                                         <a href="{{route('reports.left-unbalanced',[account, year, month])}}" class="openModal">{{  (account.budgetInformation[0].queryAmount + account.balancedAmount)|formatAmount  }}</a> | ||||
|                                     {% else %} | ||||
|                                         {{  (account.budgetInformation[0].queryAmount + account.balancedAmount)|formatAmount  }} | ||||
|                                     {% endif %} | ||||
|                                 </td> | ||||
|                             {% else %} | ||||
|                                 <td>{{  0|formatAmount  }}</td> | ||||
|                             {% endif %} | ||||
|                         {% endif %} | ||||
|                     {% endfor %} | ||||
|                     <td colspan="2"> </td> | ||||
|                 </tr> | ||||
|                 <tr> | ||||
|                     <td colspan="2"><em>Sum</em></td> | ||||
|                     {% for account in accounts %} | ||||
|                         {% if not account.hide %} | ||||
|                             <td>{{  accountAmounts[account.id]|formatAmount  }}</td> | ||||
|                         {% endif %} | ||||
|                     {% endfor %} | ||||
|                     <td colspan="2"> </td> | ||||
|                 </tr> | ||||
|                 <tr> | ||||
|                     <td colspan="2">Expected balance</td> | ||||
|                     {% for account in accounts %} | ||||
|                         {% if not account.hide %} | ||||
|                             <td>{{  (account.startBalance + accountAmounts[account.id])|formatAmount  }}</td> | ||||
|                         {% endif %} | ||||
|                     {% endfor %} | ||||
|                     <td colspan="2"> </td> | ||||
|                 </tr> | ||||
|  | ||||
|             </table> | ||||
|         </div> | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
| <!-- modal to show various budget information --> | ||||
| <div class="modal fade" id="budgetModal"> | ||||
|  | ||||
| </div> | ||||
|  | ||||
| {% endblock %} | ||||
| {% block scripts %} | ||||
|     <script type="text/javascript" src="js/reports.js"></script> | ||||
| {% endblock %} | ||||
| @@ -11,57 +11,21 @@ | ||||
|     </div> | ||||
| </div> | ||||
| <div class="row"> | ||||
|  <div class="col-lg-4 col-md-4 col-sm-4"> | ||||
|     <div class="panel panel-default"> | ||||
|         <div class="panel-heading"> | ||||
|             <i class="fa fa-calendar fa-fw"></i> | ||||
|             Yearly reports | ||||
|         </div> | ||||
|         <div class="panel-body"> | ||||
|             <ul> | ||||
|                 {% for year in years %} | ||||
|                 <li><a href="{{route('reports.year',year)}}">{{ year }}</a></li> | ||||
|                 {% endfor %} | ||||
|             </ul> | ||||
|         </div> | ||||
|     </div> | ||||
|  </div> | ||||
|  | ||||
|     <div class="col-lg-4 col-md-4 col-sm-4"> | ||||
|     <div class="col-lg-12 col-md-12 col-sm-12"> | ||||
|         <div class="panel panel-default"> | ||||
|             <div class="panel-heading"> | ||||
|                 <i class="fa fa-calendar fa-fw"></i> | ||||
|                 Monthly reports | ||||
|                 Reports | ||||
|             </div> | ||||
|             <div class="panel-body"> | ||||
|  | ||||
|                     {% for year, entries in months %} | ||||
|                         <h5>{{ year }}</h5> | ||||
|                         <ul> | ||||
|                             {% for month in entries %} | ||||
|                                 <li><a href="{{route('reports.month',[month.year, month.month])}}">{{ month.formatted}}</a></li> | ||||
|                             {% endfor %} | ||||
|                         </ul> | ||||
|                 {% endfor %} | ||||
|  | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
|  | ||||
|     <div class="col-lg-4 col-md-4 col-sm-4"> | ||||
|         <div class="panel panel-default"> | ||||
|             <div class="panel-heading"> | ||||
|                 <i class="fa fa-calendar fa-fw"></i> | ||||
|                 Budget reports | ||||
|             </div> | ||||
|             <div class="panel-body"> | ||||
|                 {% for year, entries in months %} | ||||
|                 <h5>{{ year }}</h5> | ||||
|                 <ul> | ||||
|                 <h4><a href="{{route('reports.year',year)}}">{{ year }}</a></h4> | ||||
|                     <ul class="list-inline"> | ||||
|                     {% for month in entries %} | ||||
|                             <li><a href="{{route('reports.budget',[month.year,month.month])}}">{{ month.formatted}}</a></li> | ||||
|                         <li><a href="{{route('reports.month',[month.year, month.month])}}">{{ month.formatted}}</a></li> | ||||
|                     {% endfor %} | ||||
|                 </ul> | ||||
|                     </ul> | ||||
|                 {% endfor %} | ||||
|             </div> | ||||
|         </div> | ||||
|   | ||||
| @@ -189,31 +189,35 @@ | ||||
|     <div class="col-lg-12 col-md-12 col-sm-12"> | ||||
|         <div class="panel panel-default"> | ||||
|             <div class="panel-heading"> | ||||
|                 <i class="fa fa-credit-card fa-fw"></i> | ||||
|                 <i class="fa fa-fw fa-credit-card"></i> | ||||
|                 Accounts | ||||
|             </div> | ||||
|             <table class="table table-bordered"> | ||||
|                 {% set sumStart = 0 %} | ||||
|                 {% set sumEnd = 0 %} | ||||
|                 {% set sumDiff = 0 %} | ||||
|             {% for id,account in accounts %} | ||||
|             <table class="table table-bordered table-striped"> | ||||
|                 <tr> | ||||
|                     <th>Account</th> | ||||
|                     <th>Start of month</th> | ||||
|                     <th>Current balance</th> | ||||
|                     <th>Spent</th> | ||||
|                     <th>Earned</th> | ||||
|                 </tr> | ||||
|  | ||||
|                 {% set sumStart = sumStart + account.startBalance %} | ||||
|                 {% set sumEnd = sumEnd + account.endBalance %} | ||||
|                 {% set sumDiff = sumDiff + account.difference %} | ||||
|                 <tr> | ||||
|                     <td><a href="{{route('accounts.show',id)}}">{{ account.name }}</a></td> | ||||
|                     <td>{{  account.startBalance|formatAmount  }}</td> | ||||
|                     <td>{{  account.endBalance|formatAmount  }}</td> | ||||
|                     <td>{{  account.difference|formatAmount  }}</td> | ||||
|                 </tr> | ||||
|             {% endfor %} | ||||
|                 <tr> | ||||
|                     <td><em>Sum</em></td> | ||||
|                     <td>{{  sumStart|formatAmount  }}</td> | ||||
|                     <td>{{  sumEnd|formatAmount  }}</td> | ||||
|                     <td>{{  sumDiff|formatAmount  }}</td> | ||||
|                 </tr> | ||||
|                 {% for account in accounts %} | ||||
|                     <tr> | ||||
|                         <td><a href="{{route('accounts.show',account.id)}}">{{ account.name }}</a></td> | ||||
|                         <td>{{  account.startBalance|formatAmount  }}</td> | ||||
|                         <td>{{  account.endBalance|formatAmount  }}</td> | ||||
|                         <td> | ||||
|                             {% if account.startBalance - account.endBalance > 0 %} | ||||
|                                 <span class="text-danger">{{  (account.startBalance - account.endBalance)|formatAmountPlain  }}</span> | ||||
|                             {% endif %} | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             {% if account.startBalance - account.endBalance < 0 %} | ||||
|                                 <span class="text-success">{{  ((account.startBalance - account.endBalance)*-1)|formatAmountPlain }}</span> | ||||
|                             {% endif %} | ||||
|                         </td> | ||||
|                     </tr> | ||||
|                 {% endfor %} | ||||
|             </table> | ||||
|         </div> | ||||
|     </div> | ||||
| @@ -223,9 +227,98 @@ | ||||
|         <div class="panel panel-default"> | ||||
|             <div class="panel-heading"> | ||||
|                 <i class="fa fa-sort-amount-asc fa-fw"></i> | ||||
|                 Piggy banks | ||||
|                 Budgets | ||||
|             </div> | ||||
|             <div class="panel-body">Body</div> | ||||
|             <table class="table table-bordered table-striped"> | ||||
|                 <tr> | ||||
|                     <th colspan="2">Budgets</th> | ||||
|                     {% for account in accounts %} | ||||
|                         {% if not account.hide %} | ||||
|                             <th><a href="{{route('accounts.show',account.id)}}">{{ account.name }}</a></th> | ||||
|                         {% endif %} | ||||
|                     {% endfor %} | ||||
|                     <th colspan="2"> | ||||
|                         Left in budget | ||||
|                     </th> | ||||
|                 </tr> | ||||
|                 {% for id,budget in budgets %} | ||||
|                     <tr> | ||||
|                         <td>{{ budget.name }}</td> | ||||
|                         <td>{{  budget.queryAmount|formatAmount  }}</td> | ||||
|                         {% set spent = 0 %} | ||||
|                         {% for account in accounts %} | ||||
|                             {% if not account.hide %} | ||||
|                                 {% if account.budgetInformation[id] %} | ||||
|                                     <td> | ||||
|                                         {% if id == 0 %} | ||||
|                                             <a href="{{route('reports.no-budget',[account, year, month])}}" class="openModal"> | ||||
|                                                 {{  account.budgetInformation[id].queryAmount|formatAmount  }} | ||||
|                                             </a> | ||||
|                                         {% else %} | ||||
|                                             {{  account.budgetInformation[id].queryAmount|formatAmount  }} | ||||
|                                         {% endif %} | ||||
|                                     </td> | ||||
|                                     {% set spent = spent + account.budgetInformation[id].queryAmount %} | ||||
|                                 {% else %} | ||||
|                                     <td>{{  0|formatAmount  }}</td> | ||||
|                                 {% endif %} | ||||
|                             {% endif %} | ||||
|                         {% endfor %} | ||||
|                         <td>{{  (budget.queryAmount + budget.spent)|formatAmount  }}</td> | ||||
|                         <td>{{  (budget.queryAmount + spent)|formatAmount  }}</td> | ||||
|                     </tr> | ||||
|                 {% endfor %} | ||||
|                 <tr> | ||||
|                     <td colspan="2">Balanced by transfers</td> | ||||
|                     {% for account in accounts %} | ||||
|                         {% if not account.hide %} | ||||
|                             <td> | ||||
|                                 <a href="{{route('reports.balanced-transfers',[account, year, month])}}" class="openModal">{{  account.balancedAmount|formatAmount  }}</a> | ||||
|                             </td> | ||||
|                         {% endif %} | ||||
|                     {% endfor %} | ||||
|                     <td colspan="2"> </td> | ||||
|                 </tr> | ||||
|                 <tr> | ||||
|                     <td colspan="2">Left unbalanced</td> | ||||
|                     {% for account in accounts %} | ||||
|  | ||||
|                         {% if not account.hide %} | ||||
|                             {% if account.budgetInformation[0] %} | ||||
|                                 <td> | ||||
|                                     {% if account.budgetInformation[0].queryAmount + account.balancedAmount != 0.0 %} | ||||
|                                         <a href="{{route('reports.left-unbalanced',[account, year, month])}}" class="openModal">{{  (account.budgetInformation[0].queryAmount + account.balancedAmount)|formatAmount  }}</a> | ||||
|                                     {% else %} | ||||
|                                         {{  (account.budgetInformation[0].queryAmount + account.balancedAmount)|formatAmount  }} | ||||
|                                     {% endif %} | ||||
|                                 </td> | ||||
|                             {% else %} | ||||
|                                 <td>{{  0|formatAmount  }}</td> | ||||
|                             {% endif %} | ||||
|                         {% endif %} | ||||
|                     {% endfor %} | ||||
|                     <td colspan="2"> </td> | ||||
|                 </tr> | ||||
|                 <tr> | ||||
|                     <td colspan="2"><em>Sum</em></td> | ||||
|                     {% for account in accounts %} | ||||
|                         {% if not account.hide %} | ||||
|                             <td>{{  accountAmounts[account.id]|formatAmount  }}</td> | ||||
|                         {% endif %} | ||||
|                     {% endfor %} | ||||
|                     <td colspan="2"> </td> | ||||
|                 </tr> | ||||
|                 <tr> | ||||
|                     <td colspan="2">Expected balance</td> | ||||
|                     {% for account in accounts %} | ||||
|                         {% if not account.hide %} | ||||
|                             <td>{{  (account.startBalance + accountAmounts[account.id])|formatAmount  }}</td> | ||||
|                         {% endif %} | ||||
|                     {% endfor %} | ||||
|                     <td colspan="2"> </td> | ||||
|                 </tr> | ||||
|  | ||||
|             </table> | ||||
|         </div> | ||||
|     </div> | ||||
| </div> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user