@extends('layouts.default') @section('content')

Firefly Edit "{{{$account->name}}}"

Accounts are the record holders for transactions and transfers. Money moves from one account to another.

{{Form::model($account, ['class' => 'form-horizontal','url' => route('accounts.update',$account->id)])}}

Mandatory fields

{{ Form::label('name', 'Account name', ['class' => 'col-sm-4 control-label'])}}
{{ Form::text('name', Input::old('name'), ['class' => 'form-control']) }} @if($errors->has('name'))

{{$errors->first('name')}}

@else Use something descriptive such as "checking account" or "Albert Heijn". @endif
@if($account->accounttype->type == 'Default account')

Optional fields

{{ Form::label('openingbalance', 'Opening balance', ['class' => 'col-sm-4 control-label'])}}
@if(!is_null($openingBalance)) {{Form::input('number','openingbalance', Input::old('openingbalance') ?: $openingBalance->transactions[1]->amount, ['step' => 'any', 'class' => 'form-control'])}} @else {{Form::input('number','openingbalance', Input::old('openingbalance'), ['step' => 'any', 'class' => 'form-control'])}} @endif
@if($errors->has('openingbalance'))

{{$errors->first('openingbalance')}}

@else What's the current balance of this new account? @endif
{{ Form::label('openingbalancedate', 'Opening balance date', ['class' => 'col-sm-4 control-label'])}}
@if(!is_null($openingBalance)) {{ Form::input('date','openingbalancedate', Input::old('openingbalancedate') ?: $openingBalance->date->format('Y-m-d'), ['class' => 'form-control']) }} @else {{ Form::input('date','openingbalancedate', Input::old('openingbalancedate') ?: date('Y-m-d'), ['class' => 'form-control']) }} @endif @if($errors->has('openingbalancedate'))

{{$errors->first('openingbalancedate')}}

@else When was this the balance of the new account? Since your bank statements may lag behind, update this date to match the date of the last known balance of the account. @endif
@endif
{{Form::close()}} @stop