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

View Sales Payment Schedule

Schedule Details

{{ optional($schedule->salesInvoice)->invoice_no ?? 'N/A' }}

@php $user = $schedule->user; $displayName = $user && $user->company_name ? $user->company_name : ($user ? $user->name : 'N/A'); @endphp {{ $displayName }}

@php $user = $schedule->user; $mobileNumber = $user && $user->phone ? $user->phone : 'N/A'; @endphp {{ $mobileNumber }}

BDT {{ number_format($schedule->sales_invoice_amount, 2) }}

{{ optional($schedule->expected_payment_date)->format('Y-m-d') ?? 'N/A' }}

{{ $schedule->expected_amount_percentage ? number_format($schedule->expected_amount_percentage, 2) . '%' : 'N/A' }}

BDT {{ number_format($schedule->expected_payment_amount, 2) }}

{{ optional($schedule->payment_due_date)->format('Y-m-d') ?? '—' }}

BDT {{ number_format($schedule->transaction_payment_amount ?? 0, 2) }}

{{ optional($schedule->paid_on)->format('Y-m-d') ?? '—' }}

{{ $schedule->payment_method ? ucfirst(str_replace('_', ' ', $schedule->payment_method)) : '—' }}

{{ $schedule->transaction_reference ?? '—' }}

{{ $schedule->remarks ?? '—' }}

Payment Transactions {{ $paymentTransactions->count() }}
@if($paymentTransactions->count() > 0)
@foreach($paymentTransactions as $transaction) @endforeach
Date Amount Method
{{ optional($transaction->transaction_date)->format('Y-m-d') }} BDT {{ number_format($transaction->amount, 2) }} {{ $transaction->payment_method ? ucfirst($transaction->payment_method) : '—' }}
Total BDT {{ number_format($paymentTransactions->sum('amount'), 2) }}
@else

No payment transactions found for this date.

@endif
@endsection