mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
New code for bills.
This commit is contained in:
63
resources/views/bills/create.blade.php
Normal file
63
resources/views/bills/create.blade.php
Normal file
@@ -0,0 +1,63 @@
|
||||
@extends('layouts.default')
|
||||
@section('content')
|
||||
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName()) !!}
|
||||
{!! Form::open(['class' => 'form-horizontal','id' => 'store','url' => route('bills.store')]) !!}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-12 col-sm-6">
|
||||
<!-- panel for mandatory fields -->
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-exclamation-circle"></i> Mandatory fields
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{!! ExpandedForm::text('name') !!}
|
||||
{!! ExpandedForm::tags('match') !!}
|
||||
{!! ExpandedForm::amount('amount_min') !!}
|
||||
{!! ExpandedForm::amount('amount_max') !!}
|
||||
{!! ExpandedForm::date('date',Carbon\Carbon::now()->addDay()->format('Y-m-d')) !!}
|
||||
{!! ExpandedForm::select('repeat_freq',$periods,'monthly') !!}
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
<button type="submit" class="btn btn-lg btn-success">
|
||||
<i class="fa fa-plus-circle"></i> Store new bill
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-12 col-sm-6">
|
||||
<!-- panel for optional fields -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-smile-o"></i> Optional fields
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{!! ExpandedForm::integer('skip',0) !!}
|
||||
{!! ExpandedForm::checkbox('automatch',1,true) !!}
|
||||
{!! ExpandedForm::checkbox('active',1,true) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- panel for options -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-bolt"></i> Options
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{!! ExpandedForm::optionsList('create','bill') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
|
||||
@stop
|
||||
@section('styles')
|
||||
<link href="css/bootstrap-tagsinput.css" type="text/css" rel="stylesheet" media="all">
|
||||
@stop
|
||||
@section('scripts')
|
||||
<script type="text/javascript" src="js/bootstrap-tagsinput.min.js"></script>
|
||||
@stop
|
37
resources/views/bills/delete.blade.php
Normal file
37
resources/views/bills/delete.blade.php
Normal file
@@ -0,0 +1,37 @@
|
||||
@extends('layouts.default')
|
||||
@section('content')
|
||||
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $bill) !!}
|
||||
{!! Form::open(['class' => 'form-horizontal','id' => 'destroy','url' => route('bills.destroy',$bill->id)]) !!}
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-12 col-sm-12">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
Delete bill "{{{$bill->name}}}"
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p>
|
||||
Are you sure?
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button type="submit" class="btn btn-default btn-danger">Delete permanently</button>
|
||||
<a href="{{URL::previous()}}" class="btn-default btn">Cancel</a >
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group">
|
||||
<div class="col-sm-8">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{!! Form::close() !!}
|
||||
@stop
|
64
resources/views/bills/edit.blade.php
Normal file
64
resources/views/bills/edit.blade.php
Normal file
@@ -0,0 +1,64 @@
|
||||
@extends('layouts.default')
|
||||
@section('content')
|
||||
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $bill) !!}
|
||||
{!! Form::model($bill, ['class' => 'form-horizontal','id' => 'update','url' => route('bills.update', $bill->id)]) !!}
|
||||
|
||||
<input type="hidden" name="id" value="{{$bill->id}}" />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-12 col-sm-6">
|
||||
<!-- panel for mandatory fields -->
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-exclamation-circle"></i> Mandatory fields
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{!! ExpandedForm::text('name') !!}
|
||||
{!! ExpandedForm::tags('match') !!}
|
||||
{!! ExpandedForm::amount('amount_min') !!}
|
||||
{!! ExpandedForm::amount('amount_max') !!}
|
||||
{!! ExpandedForm::date('date',$bill->date->format('Y-m-d')) !!}
|
||||
{!! ExpandedForm::select('repeat_freq',$periods) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<button type="submit" class="btn btn-lg btn-success">
|
||||
<i class="fa fa-plus-circle"></i> Update bill
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-12 col-sm-6">
|
||||
<!-- panel for optional fields -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-smile-o"></i> Optional fields
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{!! ExpandedForm::integer('skip') !!}
|
||||
{!! ExpandedForm::checkbox('automatch',1) !!}
|
||||
{!! ExpandedForm::checkbox('active',1) !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-bolt"></i> Options
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{!! ExpandedForm::optionsList('update','bill') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
|
||||
|
||||
@stop
|
||||
@section('styles')
|
||||
<link href="css/bootstrap-tagsinput.css" type="text/css" rel="stylesheet" media="all">
|
||||
@stop
|
||||
@section('scripts')
|
||||
<script type="text/javascript" src="js/bootstrap-tagsinput.min.js"></script>
|
||||
@stop
|
32
resources/views/bills/index.blade.php
Normal file
32
resources/views/bills/index.blade.php
Normal file
@@ -0,0 +1,32 @@
|
||||
@extends('layouts.default')
|
||||
@section('content')
|
||||
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName()) !!}
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-sm-12 col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa {{$mainTitleIcon}}"></i> {{{$title}}}
|
||||
|
||||
<!-- ACTIONS MENU -->
|
||||
<div class="pull-right">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
|
||||
Actions
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" role="menu">
|
||||
<li><a href="{{route('bills.create')}}"><i class="fa fa-plus fa-fw"></i> New bill</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
@include('list.bills')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
@section('scripts')
|
||||
|
||||
@stop
|
116
resources/views/bills/show.blade.php
Normal file
116
resources/views/bills/show.blade.php
Normal file
@@ -0,0 +1,116 @@
|
||||
@extends('layouts.default')
|
||||
@section('content')
|
||||
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $bill) !!}
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-sm-12 col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-rotate-right"></i> {{{$bill->name}}}
|
||||
|
||||
@if($bill->active)
|
||||
<span class="glyphicon glyphicon-ok" title="Active"></span>
|
||||
@else
|
||||
<span class="glyphicon glyphicon-remove" title="Inactive"></span>
|
||||
@endif
|
||||
|
||||
@if($bill->automatch)
|
||||
<span class="glyphicon glyphicon-ok" title="Automatically matched by Firefly"></span>
|
||||
@else
|
||||
<span class="glyphicon glyphicon-remove" title="Not automatically matched by Firefly"></span>
|
||||
@endif
|
||||
|
||||
<!-- ACTIONS MENU -->
|
||||
<div class="pull-right">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
|
||||
Actions
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" role="menu">
|
||||
<li><a href="{{route('bills.edit',$bill->id)}}"><span class="glyphicon glyphicon-pencil"></span> edit</a></li>
|
||||
<li><a href="{{route('bills.delete',$bill->id)}}"><span class="glyphicon glyphicon-trash"></span> delete</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
Matching on
|
||||
@foreach(explode(',',$bill->match) as $word)
|
||||
<span class="label label-info">{{{$word}}}</span>
|
||||
@endforeach
|
||||
between {!! Amount::format($bill->amount_min) !!} and {!! Amount::format($bill->amount_max) !!}.
|
||||
Repeats {!! $bill->repeat_freq !!}.</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Next expected match</td>
|
||||
<td>
|
||||
@if($bill->nextExpectedMatch)
|
||||
{{$bill->nextExpectedMatch->format('j F Y')}}
|
||||
@else
|
||||
<em>Unknown</em>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-sm-12 col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
More
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p>
|
||||
<a href="{{route('bills.rescan',$bill->id)}}" class="btn btn-default">Rescan old transactions</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-sm-12 col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Chart
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="bill-overview"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-sm-12 col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Connected transaction journals
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
@include('list.journals-full')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var billID = {{{$bill->id}}};
|
||||
var currencyCode = '{{Amount::getCurrencyCode()}}';
|
||||
</script>
|
||||
<!-- load the libraries and scripts necessary for Google Charts: -->
|
||||
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
|
||||
<script type="text/javascript" src="js/gcharts.options.js"></script>
|
||||
<script type="text/javascript" src="js/gcharts.js"></script>
|
||||
|
||||
<script type="text/javascript" src="js/bills.js"></script>
|
||||
@stop
|
71
resources/views/list/bills.blade.php
Normal file
71
resources/views/list/bills.blade.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<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($bills as $entry)
|
||||
<tr>
|
||||
<td>
|
||||
<div class="btn-group btn-group-xs">
|
||||
<a href="{{route('bills.edit',$entry->id)}}" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a>
|
||||
<a href="{{route('bills.delete',$entry->id)}}" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{route('bills.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>
|
||||
{!! Amount::format($entry->amount_min) !!}
|
||||
—
|
||||
{!! Amount::format($entry->amount_max) !!}
|
||||
</td>
|
||||
<td>
|
||||
@if($entry->lastFoundMatch)
|
||||
{{$entry->lastFoundMatch->format('j F Y')}}
|
||||
@else
|
||||
<em>Unknown</em>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if($entry->nextExpectedMatch)
|
||||
{{$entry->nextExpectedMatch->format('j F Y')}}
|
||||
@else
|
||||
<em>Unknown</em>
|
||||
@endif
|
||||
</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>
|
Reference in New Issue
Block a user