Add and remove transactions.

This commit is contained in:
James Cole
2015-02-24 22:53:38 +01:00
parent 5b9c2cdc13
commit d83b508bbc
15 changed files with 398 additions and 33 deletions

View File

@@ -1,6 +1,6 @@
@extends('layouts.default')
@section('content')
{{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $category) }}
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $category) !!}
<div class="row">
<div class="col-lg-9 col-md-9 col-sm-7">
<div class="panel panel-default">
@@ -22,7 +22,7 @@
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-5">
BLa bla something here.
(TODO)
</div>
</div>
@@ -35,8 +35,8 @@
</script>
<!-- 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')}}
{{HTML::script('assets/javascript/firefly/categories.js')}}
<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/categories.js"></script>
@stop

View File

@@ -12,11 +12,11 @@
@endforeach
</ul>
</div>
{{Form::input('number', $name, $value, $options)}}
{!! Form::input('number', $name, $value, $options) !!}
</div>
@include('form.feedback')
</div>
{{Form::input('hidden','amount_currency_id',$defaultCurrency->id)}}
{!! Form::input('hidden','amount_currency_id',$defaultCurrency->id) !!}
</div>

View File

@@ -3,6 +3,7 @@
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $what) !!}
{!! Form::open(['class' => 'form-horizontal','id' => 'store','url' => route('transactions.store',$what)]) !!}
{!! Form::hidden('reminder',Input::get('reminder_id')) !!}
{!! Form::hidden('what',$what) !!}
<div class="row">
<div class="col-lg-6 col-md-12 col-sm-12">
@@ -21,27 +22,27 @@
<!-- SHOW EXPENSE ACCOUNT ONLY FOR WITHDRAWALS -->
@if($what == 'withdrawal')
{{ExpandedForm::text('expense_account')}}
{!! ExpandedForm::text('expense_account') !!}
@endif
<!-- SHOW REVENUE ACCOUNT ONLY FOR DEPOSITS -->
@if($what == 'deposit')
{{ExpandedForm::text('revenue_account')}}
{!! ExpandedForm::text('revenue_account') !!}
@endif
<!-- ONLY SHOW FROM/TO ACCOUNT WHEN CREATING TRANSFER -->
@if($what == 'transfer')
{{ExpandedForm::select('account_from_id',$accounts)}}
{{ExpandedForm::select('account_to_id',$accounts)}}
{!! ExpandedForm::select('account_from_id',$accounts) !!}
{!! ExpandedForm::select('account_to_id',$accounts) !!}
@endif
<!-- ALWAYS SHOW AMOUNT -->
{{ExpandedForm::amount('amount')}}
{!! ExpandedForm::amount('amount') !!}
<!-- ALWAYS SHOW DATE -->
{{ExpandedForm::date('date', date('Y-m-d'))}}
{!! ExpandedForm::date('date', date('Y-m-d')) !!}
</div>
</div>
<p>
@@ -60,17 +61,17 @@
<div class="panel-body">
<!-- BUDGET ONLY WHEN CREATING A WITHDRAWAL -->
@if($what == 'withdrawal')
{{ExpandedForm::select('budget_id',$budgets,0)}}
{!! ExpandedForm::select('budget_id',$budgets,0) !!}
@endif
<!-- CATEGORY ALWAYS -->
{{ExpandedForm::text('category')}}
{!! ExpandedForm::text('category') !!}
<!-- TAGS -->
<!-- RELATE THIS TRANSFER TO A PIGGY BANK -->
@if($what == 'transfer' && count($piggies) > 0)
{{ExpandedForm::select('piggy_bank_id',$piggies)}}
{!! ExpandedForm::select('piggy_bank_id',$piggies) !!}
@endif
</div>
</div>
@@ -80,14 +81,14 @@
<i class="fa fa-bolt"></i> Options
</div>
<div class="panel-body">
{{ExpandedForm::optionsList('create','transaction')}}
{!! ExpandedForm::optionsList('create','transaction') !!}
</div>
</div>
</div>
</div>
{{Form::close()}}
{!! Form::close() !!}
@stop
@section('scripts')