{{-- 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' => $invoices[0]->uuid,
'dependent_2' => 'Invoice',
'dependent_3' => 'Partial',
'mainInvoice' => $invoices[0]->type
]),
'data-placeholder' => __('Select Account'),
'data-allow-clear' => 'true'
]) !!}
{{-- 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']) }}
{!! Form::date('payment_date', @$invoicePayment->payment_date, ['class' => 'form-control flatpickr', 'placeholder' => __('Payment Date')]) !!}
{{-- 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 --}}
{{-- paying amount h3 --}}
Total Paying Amount
{{ cMoney(isset($invoicePayment) ? ($invoicePayment->amount / $invoicePayment->conversion_rate) : 0, $invoices[0]->currency, true) }}
Vat Amount: {{ cMoney(@$invoicePayment?->totalVatPaidAmount() ?? 0, $invoices[0]->currency, true) }}
Excluding VAT Amount : {{ cMoney(@$invoicePayment?->totalExcludingVatPaidAmount() ?? 0, $invoices[0]->currency, true) }}