@extends('layouts.default')
@section('content')
{{ 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'))}}
Mandatory fields
{{Form::ffText('description')}}
@if($what == 'deposit' || $what == 'withdrawal')
{{Form::ffSelect('account_id',$accounts)}}
@endif
@if($what == 'withdrawal')
{{Form::ffText('expense_account')}}
@endif
@if($what == 'deposit')
{{Form::ffText('revenue_account')}}
@endif
@if($what == 'transfer')
{{Form::ffSelect('account_from_id',$accounts)}}
{{Form::ffSelect('account_to_id',$accounts)}}
@endif
{{Form::ffAmount('amount')}}
{{Form::ffDate('date', date('Y-m-d'))}}
Optional fields
@if($what == 'withdrawal')
{{Form::ffSelect('budget_id',$budgets,0)}}
@endif
{{Form::ffText('category')}}
@if($what == 'transfer' && count($piggies) > 0)
{{Form::ffSelect('piggy_bank_id',$piggies)}}
@endif
Options
{{Form::ffOptionsList('create','transaction')}}
{{Form::close()}}
@stop
@section('scripts')
{{HTML::script('assets/javascript/typeahead/bootstrap3-typeahead.min.js')}}
{{HTML::script('assets/javascript/firefly/transactions.js')}}
@stop