mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 18:54:58 +00:00 
			
		
		
		
	Some minor cleanup.
This commit is contained in:
		| @@ -15,6 +15,8 @@ class BaseController extends Controller | |||||||
|     { |     { | ||||||
|         \Event::fire('limits.check'); |         \Event::fire('limits.check'); | ||||||
|         \Event::fire('piggybanks.check'); |         \Event::fire('piggybanks.check'); | ||||||
|  |         \Event::fire('recurring.check'); | ||||||
|  |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|   | |||||||
| @@ -200,7 +200,6 @@ class ChartController extends BaseController | |||||||
|         $start  = clone Session::get('start'); |         $start  = clone Session::get('start'); | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|         /* |         /* | ||||||
|          * Expenses per day in the session's period. That's easy. |          * Expenses per day in the session's period. That's easy. | ||||||
|          */ |          */ | ||||||
| @@ -245,7 +244,7 @@ class ChartController extends BaseController | |||||||
|                 'type'  => 'spline', |                 'type'  => 'spline', | ||||||
|                 'id'    => 'rep-' . $repetition->id, |                 'id'    => 'rep-' . $repetition->id, | ||||||
|                 'yAxis' => 1, |                 'yAxis' => 1, | ||||||
|                 'name'  => 'Envelope #'.$repetition->id.' in ' . $repetition->periodShow(), |                 'name'  => 'Envelope #' . $repetition->id . ' in ' . $repetition->periodShow(), | ||||||
|                 'data'  => [] |                 'data'  => [] | ||||||
|             ]; |             ]; | ||||||
|             $current      = clone $repetition->startdate; |             $current      = clone $repetition->startdate; | ||||||
|   | |||||||
| @@ -38,15 +38,6 @@ class HomeController extends BaseController | |||||||
|      */ |      */ | ||||||
|     public function index() |     public function index() | ||||||
|     { |     { | ||||||
| //        Queue::push(function($job) |  | ||||||
| //        { |  | ||||||
| //            Log::debug('This is a job!'); |  | ||||||
| //        }); |  | ||||||
|  |  | ||||||
|         \Event::fire('limits.check'); |  | ||||||
|         \Event::fire('piggybanks.check'); |  | ||||||
|         \Event::fire('recurring.check'); |  | ||||||
|  |  | ||||||
|  |  | ||||||
|         // count, maybe we need some introducing text to show: |         // count, maybe we need some introducing text to show: | ||||||
|         $count = $this->_accounts->count(); |         $count = $this->_accounts->count(); | ||||||
| @@ -78,13 +69,7 @@ class HomeController extends BaseController | |||||||
|             $transactions = array_chunk($transactions, 3); |             $transactions = array_chunk($transactions, 3); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         // get the users reminders: |  | ||||||
|  |  | ||||||
|         $reminders =  $this->_reminders->getCurrentRecurringReminders(); |  | ||||||
|  |  | ||||||
|         // build the home screen: |         // build the home screen: | ||||||
|         return View::make('index')->with('count', $count)->with('transactions', $transactions)->with( |         return View::make('index')->with('count', $count)->with('transactions', $transactions); | ||||||
|             'reminders', $reminders |  | ||||||
|         ); |  | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @@ -71,66 +71,6 @@ | |||||||
|     @endforeach |     @endforeach | ||||||
|     @endif |     @endif | ||||||
|  |  | ||||||
|     @if(count($reminders) > 0) |  | ||||||
|     <div class="row"> |  | ||||||
|         <div class="col-lg-12 col-md-12 col-sm-12"> |  | ||||||
|             <h4>Recurring transactions</h4> |  | ||||||
|             <p class="text-info">These transactions are set to be expected between |  | ||||||
|                 {{Session::get('start')->format('j F Y')}} and {{Session::get('end')->format('j F Y')}}.</p> |  | ||||||
|             <table class="table"> |  | ||||||
|                 <tr> |  | ||||||
|                     <th>Name</th> |  | ||||||
|                     <th>Tags</th> |  | ||||||
|                     <th colspan="2">Amount</th> |  | ||||||
|                     <th>Repeats</th> |  | ||||||
|                 </tr> |  | ||||||
|                 <?php $max =0;$min = 0;?> |  | ||||||
|                 @foreach($reminders as $reminder) |  | ||||||
|                 <?php |  | ||||||
|                 $max += $reminder->recurringtransaction->amount_max; |  | ||||||
|                 $min += $reminder->recurringtransaction->amount_min; |  | ||||||
|                 ?> |  | ||||||
|                 <tr> |  | ||||||
|                     <td> |  | ||||||
|                         <a href="{{route('recurring.show',$reminder->recurringtransaction->id)}}"> |  | ||||||
|                             {{{$reminder->recurringtransaction->name}}} |  | ||||||
|                         </a> |  | ||||||
|                     </td> |  | ||||||
|                     <td> |  | ||||||
|                         @foreach(explode(' ',$reminder->recurringtransaction->match) as $word) |  | ||||||
|                         <span class="label label-info">{{{$word}}}</span> |  | ||||||
|                         @endforeach |  | ||||||
|                     </td> |  | ||||||
|  |  | ||||||
|                     <td> |  | ||||||
|                         {{mf($reminder->recurringtransaction->amount_min)}} |  | ||||||
|                         </td> |  | ||||||
|                     <td> |  | ||||||
|                         {{mf($reminder->recurringtransaction->amount_max)}} |  | ||||||
|                     </td> |  | ||||||
|                     <td> |  | ||||||
|                         {{$reminder->recurringtransaction->repeat_freq}} |  | ||||||
|                     </td> |  | ||||||
|                     <td> |  | ||||||
|                         <div class="btn-group btn-group-xs"> |  | ||||||
|                             <a href="#" class="btn btn-default">postpone</a> |  | ||||||
|                             <a href="#" class="btn btn-default">dismiss</a> |  | ||||||
|                             <a href="#" class="btn btn-default">done!</a> |  | ||||||
|                         </div> |  | ||||||
|                     </td> |  | ||||||
|                 </tr> |  | ||||||
|                 @endforeach |  | ||||||
|                 <tr> |  | ||||||
|                     <td colspan="2">Sum</td> |  | ||||||
|                     <td>{{mf($max)}}</td> |  | ||||||
|                     <td colspan="3">{{mf($min)}}</td> |  | ||||||
|                 </tr> |  | ||||||
|             </table> |  | ||||||
|         </div> |  | ||||||
|     </div> |  | ||||||
|     @endif |  | ||||||
|  |  | ||||||
|  |  | ||||||
|     <div class="row"> |     <div class="row"> | ||||||
|         <div class="col-lg-12 col-md-12 col-sm-12"> |         <div class="col-lg-12 col-md-12 col-sm-12"> | ||||||
|             <div id="budgets"></div> |             <div id="budgets"></div> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user