@php
$paymentMethod = null;
if (isset($invoice) && is_object($invoice) && !empty($invoice->payment_method)) {
$paymentMethod = $invoice->payment_method;
} elseif (isset($invoiceData) && is_array($invoiceData) && !empty($invoiceData['payment_method'])) {
$paymentMethod = $invoiceData['payment_method'];
}
$selectedBankAccount = null;
if ($paymentMethod && is_string($paymentMethod) && str_starts_with($paymentMethod, 'bank_')) {
$bankId = str_replace('bank_', '', $paymentMethod);
$selectedBankAccount = \App\Models\BankAccount::find($bankId);
}
@endphp
@if($paymentMethod === 'online')
Online Payment
Payments can be made online via our payment gateway.
@elseif($selectedBankAccount)
{{ $selectedBankAccount->bank_name }}
@if($selectedBankAccount->account_name)
Account: {{ $selectedBankAccount->account_name }}
@endif
@if($selectedBankAccount->account_number)
Account #: {{ $selectedBankAccount->account_number }}
@endif
@if($selectedBankAccount->iban)
IBAN: {{ $selectedBankAccount->iban }}
@endif
@else
No payment method specified
@endif