mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Some new lists for recurring transactions.
This commit is contained in:
parent
eb8f8fa935
commit
54685c1f5f
@ -80,7 +80,11 @@ class RecurringController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
return View::make('recurring.index');
|
/** @var \FireflyIII\Database\Recurring $repos */
|
||||||
|
$repos = App::make('FireflyIII\Database\Recurring');
|
||||||
|
|
||||||
|
$recurring = $repos->get();
|
||||||
|
return View::make('recurring.index',compact('recurring'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -110,7 +114,9 @@ class RecurringController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function show(RecurringTransaction $recurringTransaction)
|
public function show(RecurringTransaction $recurringTransaction)
|
||||||
{
|
{
|
||||||
return View::make('recurring.show')->with('recurring', $recurringTransaction)->with('subTitle', $recurringTransaction->name);
|
$journals = $recurringTransaction->transactionjournals()->withRelevantData()->orderBy('date','DESC')->get();
|
||||||
|
$hideRecurring = true;
|
||||||
|
return View::make('recurring.show',compact('journals','hideRecurring'))->with('recurring', $recurringTransaction)->with('subTitle', $recurringTransaction->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function store()
|
public function store()
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
@if(is_object($journals))
|
@if(is_object($journals) && method_exists($journals, 'links'))
|
||||||
{{$journals->links()}}
|
{{$journals->links()}}
|
||||||
@endif
|
@endif
|
||||||
<table class="table table-striped table-bordered">
|
<table class="table table-striped table-bordered">
|
||||||
@ -16,7 +16,9 @@
|
|||||||
@if(!isset($hideCategory) || (isset($hideCategory) && $hideCategory=== false))
|
@if(!isset($hideCategory) || (isset($hideCategory) && $hideCategory=== false))
|
||||||
<th><i class="fa fa-bar-chart fa-fw" title="Category"></i></th>
|
<th><i class="fa fa-bar-chart fa-fw" title="Category"></i></th>
|
||||||
@endif
|
@endif
|
||||||
<th><i class="fa fa-fw fa-rotate-right" title="Recurring transaction"></i></th>
|
@if(!isset($hideRecurring) || (isset($hideRecurring) && $hideRecurring=== false))
|
||||||
|
<th><i class="fa fa-fw fa-rotate-right" title="Recurring transaction"></i></th>
|
||||||
|
@endif
|
||||||
</tr>
|
</tr>
|
||||||
@foreach($journals as $journal)
|
@foreach($journals as $journal)
|
||||||
@if(!isset($journal->transactions[1]) || !isset($journal->transactions[0]))
|
@if(!isset($journal->transactions[1]) || !isset($journal->transactions[0]))
|
||||||
@ -99,11 +101,13 @@
|
|||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
@endif
|
@endif
|
||||||
|
@if(!isset($hideRecurring) || (isset($hideRecurring) && $hideRecurring=== false))
|
||||||
<td>
|
<td>
|
||||||
@if($journal->recurringTransaction)
|
@if($journal->recurringTransaction)
|
||||||
<a href="{{route('recurring.show',$journal->recurring_transaction_id)}}">{{{$journal->recurringTransaction->name}}}</a>
|
<a href="{{route('recurring.show',$journal->recurring_transaction_id)}}">{{{$journal->recurringTransaction->name}}}</a>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
@ -112,6 +116,6 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@if(is_object($journals))
|
@if(is_object($journals) && method_exists($journals, 'links'))
|
||||||
{{$journals->links()}}
|
{{$journals->links()}}
|
||||||
@endif
|
@endif
|
63
app/views/list/recurring.blade.php
Normal file
63
app/views/list/recurring.blade.php
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
<table class="table table-bordered table-striped">
|
||||||
|
<tr>
|
||||||
|
<th> </th>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Matches on</th>
|
||||||
|
<th>Matching amount</th>
|
||||||
|
<th>Last seen match</th>
|
||||||
|
<th>Next expected match</th>
|
||||||
|
<th>Is active</th>
|
||||||
|
<th>Will be automatched</th>
|
||||||
|
<th>Repeats every</th>
|
||||||
|
</tr>
|
||||||
|
@foreach($recurring as $entry)
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div class="btn-group btn-group-xs">
|
||||||
|
<a href="{{route('recurring.edit',$entry->id)}}" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a>
|
||||||
|
<a href="{{route('recurring.delete',$entry->id)}}" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-trash"></span></a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="{{route('recurring.show',$entry->id)}}" title="{{{$entry->name}}}">{{{$entry->name}}}</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@foreach(explode(' ',$entry->match) as $match)
|
||||||
|
<span class="label label-info">{{{$match}}}</span>
|
||||||
|
@endforeach
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{mf($entry->amount_min)}}
|
||||||
|
—
|
||||||
|
{{mf($entry->amount_max)}}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<!-- TODO -->
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<!-- TODO -->
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@if($entry->active)
|
||||||
|
<i class="fa fa-fw fa-check"></i>
|
||||||
|
@else
|
||||||
|
<i class="fa fa-fw fa-ban"></i>
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@if($entry->automatch)
|
||||||
|
<i class="fa fa-fw fa-check"></i>
|
||||||
|
@else
|
||||||
|
<i class="fa fa-fw fa-ban"></i>
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{{$entry->repeat_freq}}}
|
||||||
|
@if($entry->skip > 0)
|
||||||
|
skips over {{$entry->skip}}
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
@endforeach
|
||||||
|
</table>
|
@ -7,7 +7,7 @@
|
|||||||
<i class="fa {{$mainTitleIcon}}"></i> {{{$title}}}
|
<i class="fa {{$mainTitleIcon}}"></i> {{{$title}}}
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div id="recurring-table"></div>
|
@include('list.recurring')
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -15,13 +15,4 @@
|
|||||||
@stop
|
@stop
|
||||||
@section('scripts')
|
@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 src="assets/javascript/firefly/accounts.js"></script>
|
|
||||||
|
|
||||||
{{HTML::script('assets/javascript/firefly/recurring.js')}}
|
|
||||||
@stop
|
@stop
|
@ -38,7 +38,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
Matching on
|
Matching on
|
||||||
@foreach(explode(',',$recurring->match) as $word)
|
@foreach(explode(' ',$recurring->match) as $word)
|
||||||
<span class="label label-info">{{{$word}}}</span>
|
<span class="label label-info">{{{$word}}}</span>
|
||||||
@endforeach
|
@endforeach
|
||||||
between {{mf($recurring->amount_min)}} and {{mf($recurring->amount_max)}}.
|
between {{mf($recurring->amount_min)}} and {{mf($recurring->amount_max)}}.
|
||||||
@ -74,8 +74,7 @@
|
|||||||
Connected transaction journals
|
Connected transaction journals
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div id="transaction-table"></div>
|
@include('list.journals-full')
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user