@extends(Request::ajax() ? 'layouts.model' : 'layouts.app') @section('include_css') @endsection @section('content')

{{ __('xpayment::payment.headings.new_payment') }}

{{-- This form is now only for reloading the page with customer data --}}
@csrf
@if ($customer_id) {{-- DISPLAY MODE --}}
{{ $customer_info->company_name ?? 'N/A' }}
@else {{-- SELECTION MODE --}} @include('xcustomer::customer_filter')
@endif
{{ Form::select('rep', !empty($roles) ? $roles->pluck('username', 'id') : [], null, ['class' => 'form-control representative', 'id' => 'rep', 'placeholder' => 'Select Rep']) }}
Previous Payments
{{ Form::select( 'filter_rep_input', ['' => 'Select Rep'] + (!empty($roles) ? $roles->pluck('username', 'id')->toArray() : []), request('filter_rep'), ['class' => 'form-control', 'id' => 'filter_rep_input'], ) }}
{{-- --}} @if (!empty($old_payments)) @forelse($old_payments as $old_payment) {{-- --}} @empty @endforelse @else @endif
Payment Code Invoice Code Date Method Effective Date Cheque Bank Ref # Remarks AmountCheque Statusrep
{{ $old_payment->payment_code }} {{ $old_payment->invoice->invoice_code }} {{ $old_payment->payment_date }} {{ $old_payment->payment_method }} {{ $old_payment->cheque_date }} {{ $old_payment->bank_id ? getConfigArrayValueByKey('BANKS_LIST', $old_payment->bank_id) : 'N/A' }} {{ $old_payment->payment_ref_no ?? 'N/A' }} {{ $old_payment->payment_remarks }} {{ number_format($old_payment->payment_amount, 2) }} {{ $old_payment->cheque_status }} @if (!empty($old_payment->rep_id)) @php $rep = DB::table('users')->find( $old_payment->rep_id, ); @endphp {{ $rep->username }} @else {{ 'N/A' }} @endif
No found data.
No found data.
@if (!empty($old_payments))
{{ $old_payments->appends($_GET)->links() }}
@endif
Outstanding Invoices
0.00
@if (!empty($outstanding_invoices)) @forelse($outstanding_invoices as $invoice) @empty @endforelse @else @endif
Invoice No Invoice Date Total Paid Balance Amount to Pay
{{ $invoice->invoice_code }} {{ \Carbon\Carbon::parse($invoice->invoice_date)->format('Y-m-d') }} {{ number_format($invoice->total, 2) }} {{ number_format($invoice->paid_amount, 2) }} {{ number_format($invoice->balance, 2) }}
No outstanding invoices found for this customer.
Please load a customer to see their outstanding invoices.
@endsection @section('custom_script') @endsection