@extends('layouts.default') @section('content') {!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $journal) !!} {!! Form::open(['class' => 'form-horizontal','id' => 'update','url' => route('transactions.update',$journal->id)]) !!}
Mandatory fields
{!! ExpandedForm::text('description',$journal->description) !!} @if($what == 'deposit' || $what == 'withdrawal') {!! ExpandedForm::select('account_id',$accounts,$data['account_id']) !!} @endif @if($what == 'withdrawal') {!! ExpandedForm::text('expense_account',$data['expense_account']) !!} @endif @if($what == 'deposit') {!! ExpandedForm::text('revenue_account',$data['revenue_account']) !!} @endif @if($what == 'transfer') {!! ExpandedForm::select('account_from_id',$accounts,$data['account_from_id']) !!} {!! ExpandedForm::select('account_to_id',$accounts,$data['account_to_id']) !!} @endif {!! ExpandedForm::amount('amount',$data['amount'],['currency' => $journal->transactionCurrency]) !!} {!! ExpandedForm::date('date',$data['date']) !!}
Optional fields
@if($what == 'withdrawal') {!! ExpandedForm::select('budget_id',$budgets,$data['budget_id']) !!} @endif {!! ExpandedForm::text('category',$data['category']) !!} {!! ExpandedForm::text('tags') !!} @if($what == 'transfer' && count($piggies) > 0) {!! ExpandedForm::select('piggy_bank_id',$piggies,$data['piggy_bank_id']) !!} @endif
Options
{!! ExpandedForm::optionsList('update','transaction') !!}

{!! Form::close() !!} @stop @section('scripts') @stop @section('styles') @stop