mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Added a block with savings.
This commit is contained in:
		| @@ -57,7 +57,54 @@ | ||||
|                         <i class="fa fa-line-chart"></i> Savings | ||||
|                     </div> | ||||
|                     <div class="panel-body"> | ||||
|                         (todo) | ||||
|                         @if(count($savings) == 0) | ||||
|                             <p class="small"><em>Mark your asset accounts as "Savings account" to fill this panel.</em></p> | ||||
|                         @else | ||||
|                             @foreach($savings as $account) | ||||
|                                 <div class="row"> | ||||
|                                     <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"><h5><a href="{{route('accounts.show')}}">{{$account->name}}</a></h5></div> | ||||
|                                 </div> | ||||
|                                 <div class="row"> | ||||
|                                     <!-- start --> | ||||
|                                     <div class="col-lg-2 col-md-2 col-sm-3 col-xs-4">{!! Amount::format($account->startBalance) !!}</div> | ||||
|                                     <!-- bar --> | ||||
|                                     <div class="col-lg-8 col-md-8 col-sm-6 col-xs-4"> | ||||
|                                         @if($account->difference < 0) | ||||
|                                             <!-- green (100-pct), then red (pct) --> | ||||
|                                             <div class="progress"> | ||||
|                                                 <div class="progress-bar progress-bar-success progress-bar-striped" style="width: {{100 - $account->percentage}}%"> | ||||
|                                                     @if($account->percentage <= 50) | ||||
|                                                         {{Amount::format($account->difference,false)}} | ||||
|                                                     @endif | ||||
|                                                 </div> | ||||
|                                                 <div class="progress-bar progress-bar-danger progress-bar-striped" style="width: {{$account->percentage}}%"> | ||||
|                                                     @if($account->percentage > 50) | ||||
|                                                         {{Amount::format($account->difference,false)}} | ||||
|                                                     @endif | ||||
|                                                 </div> | ||||
|                                             </div> | ||||
|                                             @else | ||||
|                                             <!-- green (pct), then blue (100-pct) --> | ||||
|                                             <div class="progress"> | ||||
|                                                 <div class="progress-bar progress-bar-success progress-bar-striped" style="width: {{$account->percentage}}%"> | ||||
|                                                     @if($account->percentage > 50) | ||||
|                                                         {{Amount::format($account->difference,false)}} | ||||
|                                                     @endif | ||||
|                                                 </div> | ||||
|                                                 <div class="progress-bar progress-bar-info progress-bar-striped" style="width: {{100 - $account->percentage}}%"> | ||||
|                                                     @if($account->percentage <= 50) | ||||
|                                                         {{Amount::format($account->difference,false)}} | ||||
|                                                     @endif | ||||
|                                                 </div> | ||||
|                                             </div> | ||||
|                                         @endif | ||||
|  | ||||
|                                     </div> | ||||
|                                     <!-- end --> | ||||
|                                     <div class="col-lg-2 col-md-2 col-sm-3 col-xs-4">{!! Amount::format($account->endBalance) !!}</div> | ||||
|                                     </div> | ||||
|                             @endforeach | ||||
|                         @endif | ||||
|                     </div> | ||||
|                 </div> | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user