{!! Form::open(['route' => ['admin.invoices.release-retention', [$invoice]], 'method' => 'POST']) !!}
{{-- Company --}}
{{ Form::label('company_id', __('Client'), ['class' => 'col-form-label']) }} {!! Form::select('company_id', [$invoice->contract->assignable_id => $invoice->contract->assignable->name], $invoice->contract->assignable_id, [ 'data-placeholder' => __('Select Client'), 'class' => 'form-select dependent-select', 'data-kt-select2' => 'true', 'data-remote' => route('resource-select', ['groupedCompany', 'hasinv']), 'id' => 'payment-company-id', 'disabled' => 'true', ])!!}
{{-- Contract --}}
{{ Form::label('contract_id', __('Contract'), ['class' => 'col-form-label']) }} {!! Form::select('contract_id', [$invoice->contract_id => $invoice->contract->subject], $invoice->contract_id, [ 'data-placeholder' => __('Select Contract'), 'class' => 'form-select dependent-select', 'data-kt-select2' => 'true', 'data-remote' => route('resource-select', ['Contract', 'dependent' => 'company_id']), 'data-dependent_id' => 'payment-company-id', 'id' => 'payment-contract-id', 'disabled' => 'true' ])!!}
{{-- invoice type --}}
{{ Form::label('invoice_type', __('Invoice Type'), ['class' => 'col-form-label']) }} {!! Form::select('invoice_type', ['Invoice' => 'Customer'], 'Invoice', [ 'class' => 'form-select dependent-select', 'data-kt-select2' => 'true', 'disabled' => 'true', 'id' => 'payment-invoice-type' ]) !!}
{{-- invoice --}}
{{ Form::label('invoice_id', __('Invoice'), ['class' => 'col-form-label']) }} {!! Form::select('invoice_id', [$invoice->uuid => $invoice->getFormatedId()], $invoice->uuid, [ 'disabled' => true, 'class' => 'form-select', 'id' => 'payment-invoice-id', ])!!}
{{ Form::label('payment_type', __('Payment Type'), ['class' => 'col-form-label']) }} {!! Form::select('payment_type', ['release-retention' => 'Retention Release'], 'release-retention', [ 'class' => 'form-select', 'data-kt-select2' => 'true', 'id' => 'invoice-payment-type', 'disabled' => 'true' ]) !!}
{{-- retentions amount --}}
{{ Form::label('retention_amount', __('Retention Amount'), ['class' => 'col-form-label']) }} {!! Form::text('retention_amount', cMoney($invoice->retention_amount, $invoice->currency, true), ['class' => 'form-control', 'disabled']) !!}
{{-- Account --}}
{{ Form::label('account_balance_id', __('Account'), ['class' => 'col-form-label']) }} {!! Form::select('account_balance_id', [], null, [ 'class' => 'form-select', 'data-kt-select2' => 'true', 'data-remote' => route('resource-select', ['AccountBalance', 'dependent' => 'invoice_id', 'dependent_2_col' => 'inv-type', 'dependent_3_col' => 'pay-type']), 'data-dependent_id' => 'payment-invoice-id', 'data-dependent_2' => 'payment-invoice-type', 'data-dependent_3' => 'invoice-payment-type', 'data-placeholder' => __('Select Account'), 'data-allow-clear' => 'true' ]) !!}
@if($invoice->isForeignCurrency()) {{-- conversion rate --}}
@if(($used_conversion_rates = $invoice->payments->pluck('conversion_rate'))->count() > 0) @endif
1 {{ $invoice->getRawOriginal('currency') }} = {!! Form::number('conversion_rate', null, ['class' => 'form-control']) !!} {{ cCurrency()->getSymbol() }}
@endif
{!! Form::close() !!}