2014-07-24 15:16:42 -05:00
@ extends ( 'layouts.default' )
@ section ( 'content' )
< div class = " row " >
< div class = " col-lg-12 col-md-12 col-sm-12 " >
< h1 > Firefly
2014-07-27 13:29:58 -05:00
< small > Budgets and envelopes </ small >
2014-07-24 15:16:42 -05:00
</ h1 >
2014-07-27 13:29:58 -05:00
< p class = " lead " > Use budgets to organize and limit your expenses .</ p >
< p class = " text-info " >
Budgets are groups of expenses that reappear every [ period ] *. Examples could be " groceries " , " bills " or
" drinks with friends " . The table below lists all of the budgets you have , if any .
< a href = " http://dictionary.reference.com/browse/budget " > By definition </ a > , budgets are an estimated amount
of money , ie . € 400 , -. Such an estimation can change over time but < em > should </ em > always be set . Budgets
without an actual budget are fairly pointless .
</ p >
2014-07-24 15:16:42 -05:00
< p class = " text-info " >
2014-07-27 13:29:58 -05:00
Use this page to create or change budgets and the estimated amount of money you think is wise . Pages further ahead
will explain what an " envelope " is in the context of budgeting .
</ p >
< p class = " text-info " >
* < small > Every month , week , year , etc .</ small >
2014-07-24 15:16:42 -05:00
</ p >
2014-07-27 15:48:13 -05:00
< div class = " btn-group " >
< a class = " btn btn-default " href = " { { route('budgets.index.budget')}} " >< span class = " glyphicon glyphicon-tasks " ></ span > Group by budget </ a >
< a class = " btn btn-default " href = " { { route('budgets.create')}}?from=date " >< span class = " glyphicon glyphicon-plus-sign " ></ span > Create a new budget </ a >
< a class = " btn btn-default " href = " { { route('budgets.limits.create')}}?from=date " >< span class = " glyphicon glyphicon-plus-sign " ></ span > Create a new envelope </ a >
</ div >
2014-07-24 15:16:42 -05:00
</ div >
</ div >
2014-07-27 13:29:58 -05:00
<!-- count = zero ! -->
@ foreach ( $budgets as $date => $entry )
2014-07-20 13:46:10 -05:00
< div class = " row " >
< div class = " col-lg-12 col-md-12 col-sm-12 " >
2014-08-23 03:01:40 -05:00
< h3 >< a href = " { { route('transactions.index')}}?startdate= { { $entry [ 'start' ] -> format ( 'Y-m-d' ) } }&enddate= { { $entry [ 'end' ] -> format ( 'Y-m-d' ) } } " > {{ $entry [ 'date' ]}} </ a >
2014-09-03 09:50:53 -05:00
< a class = " btn btn-default btn-xs " href = " { { route('budgets.limits.create')}}?startdate= { { $entry [ 'start' ] -> format ( 'Y-m-d' ) } } " >< span class = " glyphicon glyphicon-plus-sign " ></ span > Create a new envelope for {{ $entry [ 'date' ]}} </ a >
2014-07-27 13:29:58 -05:00
</ h3 >
2014-07-20 13:46:10 -05:00
< table class = " table table-bordered table-striped " >
< tr >
2014-07-27 13:29:58 -05:00
< th colspan = " 2 " style = " width:45%; " > Budget </ th >
2014-07-20 13:46:10 -05:00
< th style = " width:15%; " > Envelope </ th >
< th style = " width:15%; " > Left </ th >
< th >& nbsp ; </ th >
</ tr >
2014-07-27 13:29:58 -05:00
@ foreach ( $entry [ 'limitrepetitions' ] as $index => $repetition )
2014-07-20 13:46:10 -05:00
< tr >
< td >
2014-07-27 13:29:58 -05:00
< div class = " btn-group " >
2014-07-28 07:53:04 -05:00
< a title = " Edit budget { { { $repetition -> limit -> budget -> name } }} " href = " { { route('budgets.edit', $repetition->limit ->budget->id)}}?from=date " class = " btn btn-default btn-xs " >< span class = " glyphicon glyphicon-pencil " ></ span ></ a >
< a title = " Delete budget { { { $repetition -> limit -> budget -> name } }} " href = " { { route('budgets.delete', $repetition->limit ->budget->id)}}?from=date " class = " btn btn-xs btn-danger " >< span class = " glyphicon glyphicon-trash " ></ span ></ a >
2014-07-27 13:29:58 -05:00
</ div >
</ td >
< td >
2014-09-09 03:43:12 -05:00
< a href = " { { route('budgets.show',[ $repetition->limit ->budget->id, $repetition->id ])}} " >
2014-07-27 13:29:58 -05:00
{{{ $repetition -> limit -> budget -> name }}}
</ a >
2014-07-20 13:46:10 -05:00
</ td >
< td >
< span class = " label label-primary " >
2014-07-27 13:29:58 -05:00
< span class = " glyphicon glyphicon-envelope " ></ span > {{ mf ( $repetition -> amount , false )}} </ span >
2014-07-20 13:46:10 -05:00
</ td >
< td >
2014-07-27 13:29:58 -05:00
@ if ( $repetition -> left < 0 )
2014-07-20 13:46:10 -05:00
< span class = " label label-danger " >
< span class = " glyphicon glyphicon-envelope " ></ span >
2014-07-27 13:29:58 -05:00
{{ mf ( $repetition -> left , false )}} </ span >
2014-07-20 13:46:10 -05:00
@ else
< span class = " label label-success " >
< span class = " glyphicon glyphicon-envelope " ></ span >
2014-07-27 13:29:58 -05:00
{{ mf ( $repetition -> left , false )}} </ span >
2014-07-20 13:46:10 -05:00
@ endif
</ td >
< td >
2014-07-23 23:47:28 -05:00
< div class = " btn-group " >
2014-07-30 15:31:35 -05:00
< a title = " Edit envelope for { { { $repetition -> limit -> budget -> name } }} in { { $entry [ 'date' ] } } " href = " { { route('budgets.limits.edit', $repetition->limit ->id)}}?from=date " class = " btn btn-default btn-xs " >< span class = " glyphicon glyphicon-pencil " ></ span ></ a >
< a title = " Delete envelope for { { { $repetition -> limit -> budget -> name } }} in { { $entry [ 'date' ] } } " href = " { { route('budgets.limits.delete', $repetition->limit ->id)}}?from=date " class = " btn btn-xs btn-danger " >< span class = " glyphicon glyphicon-trash " ></ span ></ a >
2014-07-23 23:47:28 -05:00
</ div >
2014-07-27 13:29:58 -05:00
@ if ( $repetition -> limit -> repeats == 1 )
2014-07-20 13:46:10 -05:00
< span class = " label label-warning " > auto repeats </ span >
@ endif
</ td >
</ tr >
@ endforeach
</ table >
</ div >
</ div >
2014-07-24 15:16:42 -05:00
@ endforeach
@ stop