@extends('layouts.app') @section('title', __('accounting-reports::lang.edit_account')) @section('content')

@lang('accounting-reports::lang.edit_account')

{!! Form::open(['route' => ['accounting-reports.chart-of-accounts.update', $account->id], 'method' => 'put', 'id' => 'account_form']) !!}
{!! Form::label('code', __('accounting-reports::lang.account_code') . ':*') !!} {!! Form::text('code', $account->code, ['class' => 'form-control', 'required', 'readonly' => $hasTransactions, 'placeholder' => 'e.g., 1000, 2000']) !!} @if($hasTransactions) Cannot change code. Account has transactions. @endif
{!! Form::label('name', __('accounting-reports::lang.account_name') . ':*') !!} {!! Form::text('name', $account->name, ['class' => 'form-control', 'required']) !!}
{!! Form::label('account_type', __('accounting-reports::lang.account_type') . ':*') !!} {!! Form::select('account_type', $accountTypes, $account->account_type, ['class' => 'form-control select2', 'required', 'style' => 'width:100%']) !!}
{!! Form::label('account_group', __('accounting-reports::lang.account_group') . ':*') !!} {!! Form::select('account_group', $accountGroups, $account->account_group, ['class' => 'form-control select2', 'required', 'style' => 'width:100%']) !!}
{!! Form::label('parent_id', __('accounting-reports::lang.parent_account') . ':') !!} {!! Form::select('parent_id', $parentAccounts, $account->parent_id, ['class' => 'form-control select2', 'placeholder' => __('lang_v1.none'), 'style' => 'width:100%']) !!}
{!! Form::label('description', __('accounting-reports::lang.description') . ':') !!} {!! Form::textarea('description', $account->description, ['class' => 'form-control', 'rows' => 3]) !!}
@lang('messages.cancel')
{!! Form::close() !!}
@endsection @section('javascript') @endsection