mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	First reports.
This commit is contained in:
		| @@ -1,10 +1,19 @@ | ||||
| @extends('layouts.default') | ||||
| @section('content') | ||||
| <div class="row"> | ||||
|  <div class="col-lg-12 col-md-12 col-sm-12"> | ||||
|     <p> | ||||
|     Here be content.<!-- TODO actually build this.--> | ||||
|     </p> | ||||
|  <div class="col-lg-6 col-md-6 col-sm-12"> | ||||
|     <div class="panel panel-default"> | ||||
|         <div class="panel-heading"> | ||||
|             Yearly reports | ||||
|         </div> | ||||
|         <div class="panel-body"> | ||||
|             <ul> | ||||
|                 @foreach($years as $year) | ||||
|                 <li><a href="{{route('reports.year',$year)}}">{{$year}}</a></li> | ||||
|                 @endforeach | ||||
|             </ul> | ||||
|         </div> | ||||
|     </div> | ||||
|  </div> | ||||
| </div> | ||||
| @stop | ||||
							
								
								
									
										84
									
								
								app/views/reports/year.blade.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										84
									
								
								app/views/reports/year.blade.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,84 @@ | ||||
| @extends('layouts.default') | ||||
| @section('content') | ||||
| <div class="row"> | ||||
|  <div class="col-lg-10 col-md-8 col-sm-12"> | ||||
|     <div class="panel panel-default"> | ||||
|         <div class="panel-heading"> | ||||
|             Income vs. expenses | ||||
|         </div> | ||||
|         <div class="panel-body"> | ||||
|             <div id="income-expenses-chart"></div> | ||||
|         </div> | ||||
|     </div> | ||||
|  </div> | ||||
|  <div class="col-lg-2 col-md-4 col-sm-12"> | ||||
|     <div class="panel panel-default"> | ||||
|         <div class="panel-heading"> | ||||
|             Income vs. expenses | ||||
|         </div> | ||||
|         <div class="panel-body"> | ||||
|             <div id="income-expenses-sum-chart"></div> | ||||
|         </div> | ||||
|     </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"> | ||||
|                 Summary | ||||
|             </div> | ||||
|             <div class="panel-body"> | ||||
|                 <table class="table table-striped"> | ||||
|                     <tr> | ||||
|                         <td></td> | ||||
|                         @foreach($summary as $entry) | ||||
|                             <th>{{$entry['month']}}</th> | ||||
|                         @endforeach | ||||
|                         <th>Sum</th> | ||||
|                     </tr> | ||||
|                     <tr> | ||||
|                         <th>In</th> | ||||
|                         <?php $inSum = 0;?> | ||||
|                         @foreach($summary as $entry) | ||||
|                             <td>{{mf($entry['income'])}}</td> | ||||
|                             <?php $inSum+=$entry['income'];?> | ||||
|                         @endforeach | ||||
|                         <td>{{mf($inSum)}}</td> | ||||
|                     </tr> | ||||
|                         <th>Out</th> | ||||
|                         <?php $outSum = 0;?> | ||||
|                         @foreach($summary as $entry) | ||||
|                             <td>{{mf($entry['expense']*-1)}}</td> | ||||
|                             <?php $outSum+=$entry['expense']*-1;?> | ||||
|                         @endforeach | ||||
|                         <td>{{mf($outSum)}}</td> | ||||
|                     <tr> | ||||
|                         <th>Difference</th> | ||||
|                         @foreach($summary as $entry) | ||||
|                             <td>{{mf($entry['income']- $entry['expense'])}}</td> | ||||
|                         @endforeach | ||||
|                         <td>{{mf($inSum + $outSum)}}</td> | ||||
|                     </tr> | ||||
|                 </table> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
| @stop | ||||
| @section('scripts') | ||||
| <!-- load the libraries and scripts necessary for Google Charts: --> | ||||
| <script type="text/javascript" src="https://www.google.com/jsapi"></script> | ||||
| {{HTML::script('assets/javascript/firefly/gcharts.options.js')}} | ||||
| {{HTML::script('assets/javascript/firefly/gcharts.js')}} | ||||
|  | ||||
| <script type="text/javascript"> | ||||
| var year = '{{$year}}'; | ||||
|  | ||||
| </script> | ||||
|  | ||||
| {{HTML::script('assets/javascript/firefly/reports.js')}} | ||||
|  | ||||
| @stop | ||||
		Reference in New Issue
	
	Block a user