@php $invoiceRawCurrency = $invoice->getRawOriginal('currency'); @endphp
{{-- LEFT: Table --}}
{{-- Header --}}
Payments
{{-- Tab Content --}}
@include('scrumboard::livewire.invoices.payment.vendor', ['invoice' => $invoice])
@include('scrumboard::livewire.invoices.payment.zatca', ['invoice' => $invoice])
Setting
{{-- Account --}} {{--
{{ Form::label('account_balance_id', __('Account'), ['class' => 'col-form-label']) }} {!! Form::select('account_balance_id', $selectedAccountBalance ?? [], @$invoicePayment->accountTransaction->account_balance_id ?? @array_keys($selectedAccountBalance ?? [])[0], [ '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', 'dependent_id' => $invoice->uuid, 'dependent_2' => 'Invoice', 'dependent_3' => 'Partial', 'mainInvoice' => $invoice->type ]), 'data-placeholder' => __('Select Account'), 'data-allow-clear' => 'true' ]) !!}
--}}
{{ Form::label('account_balance_id', __('Account'), ['class' => 'col-form-label']) }} {!! Form::select('account_balance_id', $selectedAccountBalance ?? [], $selectedAccountId ?? @$invoicePayment->accountTransaction->account_balance_id ?? array_key_first($selectedAccountBalance ?? []), [ 'class' => 'form-select', 'id' => 'account_balance_id-select', 'data-kt-select2' => 'true', 'data-remote' => route('resource-select', [ 'AccountBalance', 'dependent' => 'invoice_id', 'dependent_2_col' => 'inv-type', 'dependent_3_col' => 'pay-type', 'dependent_id' => $invoice->uuid, 'dependent_2' => 'Invoice', 'dependent_3' => 'Partial', 'mainInvoice' => $invoice->type ]), 'data-placeholder' => __('Select Account'), 'data-allow-clear' => 'true', 'data-set-prop-renderless' => 'selectedAccountId', 'data-component-id' => $this->__id, ] ) !!}
@if($selectedAccountId)
Selected Account ID: {{ $selectedAccountId }}
@endif {{-- Transaction Id --}}
{{ Form::label('transaction_id', __('Transaction Id'), ['class' => 'col-form-label']) }} {!! Form::text('transaction_id', @$invoicePayment->transaction_id, ['class' => 'form-control', 'placeholder' => __('Transaction Id')]) !!}
{{-- payment date --}}
{{ Form::label('payment_date', __('Payment Date'), ['class' => 'col-form-label']) }}
{{-- Currency --}}
{{ Form::label('currency', __('Currency'), ['class' => 'col-form-label']) }} {!! Form::select('currency', [cCurrency()->getSymbol() => cCurrency()->getSymbol(), $invoiceRawCurrency => $invoiceRawCurrency], $invoiceRawCurrency, [ 'class' => 'form-select', 'data-kt-select2' => 'true' ], [ cCurrency()->getSymbol() => ['data-is-base' => '1', 'data-symbol' => cCurrency()->getSymbol()], $invoiceRawCurrency => ['data-is-base' => '0', 'data-symbol' => $invoiceRawCurrency], ]) !!}
{{-- {{dd($invoice->payments->pluck('conversion_rate'))}} --}} {{-- conversion rate --}}
@if($isForeignCurrencyInvoice && ($used_conversion_rates = $invoice->payments->pluck('conversion_rate'))->count() > 0) @endif
1 {{$invoiceRawCurrency}} = {!! Form::number('conversion_rate', @floatval($invoicePayment->conversion_rate), ['class' => 'form-control']) !!} {{ cCurrency()->getSymbol() }}
{{-- @include('scrumboard::livewire.invoices.partials.menu') --}}