@lang('base/document_type.document_title')

@include('flash::message')

{{ $document_type->name }}

{!! Form::model($document_type,['route' => ['document-types.update',$document_type->id],'method' => 'PUT','class' => 'form-horizontal','role' => 'form','id' => 'form']) !!}
{!! html_entity_decode(Form::label('name', __('base/document_type.entry_name') . ' *', ['class' => 'col-md-3 col-xs-12 control-label'])) !!}
{!! Form::text('name', old('name'), ['class' => 'form-control', 'placeholder' => __('base/document_type.entry_name'),'required','autofocus']) !!} @if ($errors->has('name')) {{ $errors->first('name') }} @endif
{!! html_entity_decode(Form::label('code', __('base/document_type.entry_code') . ' *', ['class' => 'col-md-3 col-xs-12 control-label'])) !!}
{!! Form::text('code', old('code'), ['class' => 'form-control', 'placeholder' => __('base/document_type.entry_code'),'required']) !!} @if ($errors->has('code')) {{ $errors->first('code') }} @endif
{!! html_entity_decode(Form::label('prefix', __('base/document_type.entry_prefix') . ' *', ['class' => 'col-md-3 col-xs-12 control-label'])) !!}
{!! Form::text('prefix', old('prefix'), ['class' => 'form-control', 'placeholder' => __('base/document_type.entry_prefix'),'required']) !!} @if ($errors->has('prefix')) {{ $errors->first('prefix') }} @endif
{!! html_entity_decode(Form::label('current_number', __('base/document_type.entry_current_number') . ' *', ['class' => 'col-md-3 col-xs-12 control-label'])) !!}
{!! Form::number('current_number', old('current_number'), ['class' => 'form-control', 'placeholder' => __('base/document_type.entry_current_number'),'required']) !!} @if ($errors->has('current_number')) {{ $errors->first('current_number') }} @endif
{!! html_entity_decode(Form::label('increment_number', __('base/document_type.entry_increment_number') . ' *', ['class' => 'col-md-3 col-xs-12 control-label'])) !!}
{!! Form::number('increment_number', old('increment_number'), ['class' => 'form-control', 'placeholder' => __('base/document_type.entry_increment_number'),'required']) !!} @if ($errors->has('increment_number')) {{ $errors->first('increment_number') }} @endif
{!! html_entity_decode(Form::label('nature', __('base/document_type.entry_nature') . ' *', ['class' => 'col-md-3 col-xs-12 control-label'])) !!}
{!! Form::select('nature', $list_nature,old('nature'), ['class' => 'form-control', 'placeholder' => __('general.text_select'),'required']) !!} @if ($errors->has('nature')) {{ $errors->first('nature') }} @endif
{!! html_entity_decode(Form::label('cfdi_type_id', __('base/document_type.entry_cfdi_type_id') . '', ['class' => 'col-md-3 col-xs-12 control-label'])) !!}
{!! Form::select('cfdi_type_id', $cfdi_types,old('cfdi_type_id'), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!}
@if(!empty(setting('folios_per_branch_office')))
{!! html_entity_decode(Form::label('branch_office', __('base/document_type.entry_branch_office_id') . '', ['class' => 'col-md-3 col-xs-12 control-label'])) !!}
{!! Form::text('branch_office', old('branch_office', $document_type->branchOffice->name ?? ''), ['class' => 'form-control', 'placeholder' => __('base/document_type.entry_branch_office_id'),'readonly']) !!}
@endif
{!! Form::label('sort_order', __('base/document_type.entry_sort_order'), ['class' => 'col-md-3 col-xs-12 control-label']) !!}
{!! Form::number('sort_order', old('sort_order'), ['class' => 'form-control', 'placeholder' => __('base/document_type.entry_sort_order')]) !!}
{!! html_entity_decode(Form::label('status', __('base/document_type.entry_status') , ['class' => 'col-md-3 col-xs-12 control-label'])) !!}
{!! Form::close() !!}