{!! Form::open([ 'url' => action('AccountController@updateAccountTransaction', ['id' => $account_transaction->id]), 'method' => 'post', 'id' => 'edit_account_transaction_form', ]) !!}

@if ($account_transaction->sub_type == 'opening_balance') @lang('lang_v1.edit_opening_balance') @elseif($account_transaction->sub_type == 'fund_transfer') @lang('lang_v1.edit_fund_transfer') @elseif($account_transaction->sub_type == 'deposit') @lang('lang_v1.edit_deposit') @endif

@lang('account.selected_account'): {{ $account_transaction->account->name }}
@if ($account_transaction->sub_type == 'deposit') @php $label = !empty($account_transaction->type == 'debit') ? __('account.deposit_from') : __('lang_v1.deposit_to'); @endphp
{!! Form::label('account_id', $label . ':') !!}
@endif @if ($account_transaction->sub_type == 'fund_transfer') @php $label = !empty($account_transaction->type == 'credit') ? __('account.transfer_to') : __('lang_v1.transfer_from'); @endphp
{!! Form::label('account_id', $label . ':') !!}
@endif
{!! Form::label('amount', __('sale.amount') . ':*') !!} {!! Form::text('amount', @num_format($account_transaction->amount), [ 'class' => 'form-control input_number', 'required', 'placeholder' => __('sale.amount'), ]) !!}
@if ($account_transaction->sub_type == 'deposit') @php $label = !empty($account_transaction->type == 'debit') ? __('lang_v1.deposit_to') : __('account.deposit_from'); @endphp
{!! Form::label('from_account', $label . ':') !!}
@endif @if ($account_transaction->sub_type == 'fund_transfer') @php $label = !empty($account_transaction->type == 'credit') ? __('lang_v1.transfer_from') : __('account.transfer_to'); @endphp
{!! Form::label('to_account', $label . ':*') !!}
@endif
{!! Form::label('operation_date', __('messages.date') . ':*') !!}
{!! Form::text('operation_date', @format_datetime($account_transaction->operation_date), [ 'class' => 'form-control', 'required', 'placeholder' => __('messages.date'), 'id' => 'od_datetimepicker', ]) !!}
@if ($account_transaction->sub_type == 'fund_transfer' || $account_transaction->sub_type == 'deposit')
{!! Form::label('note', __('brand.note')) !!} {!! Form::textarea('note', $account_transaction->note, [ 'class' => 'form-control', 'placeholder' => __('brand.note'), 'rows' => 4, ]) !!}
@endif
{!! Form::close() !!}