mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Should simplify reports.
This commit is contained in:
		| @@ -36,29 +36,8 @@ | ||||
|         {% include 'partials/reports/budgets.twig' %} | ||||
|     </div> | ||||
|     <div class="col-lg-4 col-md-4 col-sm-12"> | ||||
|         <div class="panel panel-default"> | ||||
|             <div class="panel-heading"> | ||||
|                 <i class="fa fa-bar-chart fa-fw"></i> | ||||
|                 {{ 'categories'|_ }} | ||||
|             </div> | ||||
|             <table class="table table-bordered"> | ||||
|                 <tr> | ||||
|                     <th>{{ 'categories'|_ }}</th> | ||||
|                     <th>{{ 'spent'|_ }}</th> | ||||
|                 </tr> | ||||
|                 {% set sum = 0 %} | ||||
|                 {% for data in categories %} | ||||
|                     {% if data[1] > 0 %} | ||||
|                         <tr> | ||||
|                             <td> | ||||
|                                 <a href="{{route('categories.show',data[0].id)}}">{{ data[0].name }}</a> | ||||
|                             </td> | ||||
|                             <td><span class="text-danger">{{  (data[1])|formatAmountPlain  }}</span></td> | ||||
|                         </tr> | ||||
|                     {% endif %} | ||||
|                 {% endfor %} | ||||
|             </table> | ||||
|         </div> | ||||
|         <!-- categories --> | ||||
|         {% include 'partials/reports/categories.twig' %} | ||||
|     </div> | ||||
| </div> | ||||
| <div class="row"> | ||||
| @@ -68,112 +47,7 @@ | ||||
| </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-sort-amount-asc fa-fw"></i> | ||||
|                 {{ 'budgets'|_ }} ({{ 'splitByAccount'|_|lower }}) | ||||
|             </div> | ||||
|             <table class="table table-bordered table-striped"> | ||||
|                 <tr> | ||||
|                     <th colspan="2">{{ 'budgets'|_ }}</th> | ||||
|                     {% for account in accounts %} | ||||
|                         <th><a href="{{route('accounts.show',account.id)}}">{{ account.name }}</a></th> | ||||
|                     {% endfor %} | ||||
|                     <th colspan="2"> | ||||
|                         {{ 'leftInBudget'|_ }} | ||||
|                     </th> | ||||
|                 </tr> | ||||
|                 {% for data in budgets %} | ||||
|                     {% if data[0] %} | ||||
|                         <tr> | ||||
|                             <td>{{ data[0].name }}</td> | ||||
|                             <td> | ||||
|                                 {% if data[1] %} | ||||
|                                     {{  data[1].amount|formatAmount  }} | ||||
|                                 {% else %} | ||||
|                                     {{ 0|formatAmount }} | ||||
|                                 {% endif %} | ||||
|                             </td> | ||||
|                             {% set spent = 0 %} | ||||
|                             {% for account in accounts %} | ||||
|                                 {% 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 %} | ||||
|                             {% endfor %} | ||||
|                             <td> | ||||
|                                 {% if data[1] %} | ||||
|                                     {{  (data[1].amount - data[3])|formatAmount  }} | ||||
|                                 {% else %} | ||||
|                                     {{  (0 - data[3])|formatAmount  }} | ||||
|                                 {% endif %} | ||||
|                             </td> | ||||
|                             <td>{{ data[2]|formatAmount }}</td> | ||||
|                         </tr> | ||||
|                     {% endif %} | ||||
|                 {% endfor %} | ||||
|                 <tr> | ||||
|                     <td colspan="2">{{ 'balancedByTransfersAndTags'|_ }}</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">{{ 'leftUnbalanced'|_ }}</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">{{ 'expectedBalance'|_ }}</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> | ||||
|         {% include 'partials/reports/budgets-vs-accounts.twig' %} | ||||
|     </div> | ||||
| </div> | ||||
| <div class="row"> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user