@extends('layouts.app') @section('content')

Add Payment

Back
@if(isset($selectedCustomer) && $selectedCustomer)
Selected company: {{ $selectedCustomer->company_name ?? $selectedCustomer->name }}
Clear selection
@endif
@csrf
@if($invoices->count())
@foreach($invoices as $inv) @php $invoiceDue = number_format($inv->due_amount, 2, '.', ''); $invoiceTotal = number_format($inv->invoice_amount, 2, '.', ''); $isChecked = old('sales_invoice_id') == $inv->id; @endphp @endforeach
@else
No invoices found for the selected company.
@endif
@error('attachments.*')
{{ $message }}
@enderror
@endsection @push('scripts') @endpush