{!! Form::model($agreement_transaction, ['action' => ['TransactionController@store'], 'id' => 'fm_agreement_transaction', 'class' => 'form-horizontal', 'role' => 'form']) !!} {!! Form::hidden('id', null, ['id' => 'id']) !!} {!! Form::hidden('agreement_id', null, ['id' => 'agreement_id']) !!} {{-- See hilbit-transaction-create.js for hiding and showing divs triggered by changes to transaction type --}}
{!! Form::label('type_id', 'Transaction type:', ['class' => 'control-label col-sm-2']) !!}
{!! Form::fancySelect('type_id', $type_list, ['class' => 'form-control', 'required' => 'required'], ['automatic', 'credit', 'deposit']) !!}
{{-- Don't show payment no for agreement types that do not group transactions by payment no --}}
{!! Form::label('payment_no', 'Payment No:', ['class' => 'control-label col-sm-2']) !!}
{!! Form::text('payment_no', null, ['class' => 'form-control', 'type' => 'integer', 'min' => $min_payment_no, 'max'=> $max_payment_no]) !!}
{!! Form::label('effective_date', 'Effective date:', ['class' => 'control-label col-sm-2']) !!}
{!! Form::formattedDate('effective_date', ['class' => 'form-control', 'type'=> 'text']) !!}
{{-- Capital and interest fields are only for agreements whose transactions are split into capital and interest --}}
{{-- Don't show this for deposit and automatic transaction types --}}
{!! Form::label('interest', 'Interest:', ['class' => 'control-label col-sm-2']) !!}
{!! Form::text('interest', null, ['class' => 'form-control', 'type' => 'number']) !!}
{{-- Don't show this for deposit and automatic transaction types --}}
{!! Form::label('capital', 'Capital:', ['class' => 'control-label col-sm-2']) !!}
{!! Form::text('capital', null, ['class' => 'form-control', 'type' => 'number']) !!}
{{-- Only show this for deposit and automatic transaction types or for agreements whose transactions are not split -- into capital and interest --}}
{!! Form::label('amount', 'Amount:', ['class' => 'control-label col-sm-2']) !!}
{!! Form::text('amount', null, ['class' => 'form-control', 'type' => 'number']) !!}
{!! Form::label('reference', 'Reference:', ['class' => 'control-label col-sm-2']) !!}
{!! Form::text('reference', null, ['class' => 'form-control']) !!}
{!! Form::label('comment', 'Comment:', ['class' => 'control-label col-sm-2']) !!}
{!! Form::text('comment', null, ['class' => 'form-control']) !!}
{!! Form::close() !!}