Revamped the account controller.

This commit is contained in:
James Cole
2014-08-30 14:26:33 +02:00
parent 85f1e744b8
commit 9db4137a1b
16 changed files with 339 additions and 519 deletions

View File

@@ -10,11 +10,14 @@
Accounts are the record holders for transactions and transfers. Money moves
from one account to another.
</p>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-12 col-sm-12">
<p class="text-info">
In a double-entry bookkeeping system (such as this one) there is a "from" account and a "to"
account, even when money is created from thin air (such as interest, or when new accounts already have
a positive balance).
In a double-entry bookkeeping system (such as this one) there is a "from"-account and a "to"-account,
even when money is created from thin air (such as interest, or when new accounts already have a
positive balance).
</p>
<p class="text-info"><span class="text-danger">This form creates personal accounts only.</span>
@@ -34,9 +37,9 @@
<div class="col-sm-8">
{{ Form::text('name', Input::old('name'), ['class' => 'form-control']) }}
@if($errors->has('name'))
<p class="text-danger">{{$errors->first('name')}}</p>
<p class="text-danger">{{$errors->first('name')}}</p>
@else
<span class="help-block">Use something descriptive such as "checking account" or "My Bank Main Account".</span>
<span class="help-block">Use something descriptive such as "checking account" or "My Bank Main Account".</span>
@endif
</div>

View File

@@ -33,7 +33,7 @@
</div>
<div class="col-lg-6 col-md-6 col-sm-12">
@if($account->accounttype->description == 'Default account')
@if($account->accounttype->type == 'Default account')
<h4>Optional fields</h4>
<div class="form-group">

View File

@@ -35,22 +35,22 @@
<td>Out</td>
<td>
{{mf($show['statistics']['period']['out'])}}
<a href="{{route('accounts.show',$account->id)}}#transactions-thisaccount-this-period-expensesonly"><span class="glyphicon glyphicon-circle-arrow-right"></span></a>
<a href="{{route('accounts.show',$account->id)}}?type=transactions&amp;show=expenses"><span class="glyphicon glyphicon-circle-arrow-right"></span></a>
</td>
<td>
{{mf($show['statistics']['period']['t_out'])}}
<a href="#transactions-thisaccount-this-period-transfers-out-only"><span class="glyphicon glyphicon-circle-arrow-right"></span></a>
<a href="{{route('accounts.show',$account->id)}}?type=transfers&amp;show=out"><span class="glyphicon glyphicon-circle-arrow-right"></span></a>
</td>
</tr>
<tr>
<td>In</td>
<td>
{{mf($show['statistics']['period']['in'])}}
<a href="#transactions-thisaccount-this-period-incomeonly"><span class="glyphicon glyphicon-circle-arrow-right"></span></a>
<a href="{{route('accounts.show',$account->id)}}?type=transactions&amp;show=income"><span class="glyphicon glyphicon-circle-arrow-right"></span></a>
</td>
<td>
{{mf($show['statistics']['period']['t_in'])}}
<a href="#transactions-thisaccount-this-period-transfers-in-only"><span class="glyphicon glyphicon-circle-arrow-right"></span></a>
<a href="{{route('accounts.show',$account->id)}}?type=transfers&amp;show=in"><span class="glyphicon glyphicon-circle-arrow-right"></span></a>
</td>
</tr>
<tr>
@@ -101,7 +101,7 @@
<h4>Transactions <small> For selected account and period</small></h4>
@include('paginated.transactions',['journals' => $show['journals']])
@include('paginated.transactions',['journals' => $show['journals'],'sum' => true])
</div>
</div>

View File

@@ -50,7 +50,7 @@ $r = Route::current()->getName();
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Create ... <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="{{route('transactions.create','withdrawal')}}" title="For when you spend money"><span class="glyphicon glyphicon-arrow-left"></span> Withdrawal</a></li>
<li><a href="{{route('accounts.create')}}" title="Create new account"><span class="glyphicon glyphicon-inbox"></span> Account</a></li>
</ul>
</li>
</ul>