@extends('layouts.app') @section('title', 'Payment Schedules by Date') @section('styles') @endsection @section('content')

Payment Schedules - {{ $date->format('l, F d, Y') }}

Monthly Schedule All Schedules
@if(session('success')) @endif @if(session('error')) @endif
Total Amount

BDT {{ number_format($totalAmount, 2) }}

Total Committed Amount

BDT {{ number_format($totalPaidAmount, 2) }}

Remaining Amount

BDT {{ number_format($totalRemainingAmount, 2) }}

Total Schedules

{{ $totalCount }}

Committed Amount Cash

BDT {{ number_format($cashAmount, 2) }}

Committed Amount by Cheque

BDT {{ number_format($chequeAmount, 2) }}

Total Bank Amount

BDT {{ number_format($totalBankAmount, 2) }}

Deposits: BDT {{ number_format($bankDeposits, 2) }} Withdrawals: BDT {{ number_format($bankWithdrawals, 2) }}
Committed Amount Cash Details
@if($cashSchedules->count() > 0) @foreach($cashSchedules as $cashSchedule) @endforeach
# Provider Invoice Due Date Committed Amount Status
{{ $loop->iteration }} {{ $cashSchedule->provider->company_name ?? $cashSchedule->provider->name ?? 'N/A' }} @if($cashSchedule->invoice_id) {{ $cashSchedule->invoice->bill_no ?? 'Invoice #' . $cashSchedule->invoice_id }} @else @endif {{ $cashSchedule->due_date->format('d M Y') }} BDT {{ number_format($cashSchedule->paid_amount, 2) }} @if($cashSchedule->payment_status == 'paid') Paid @elseif($cashSchedule->payment_status == 'partial') Partial @else Pending @endif
@else
No committed cash amounts recorded for this date.
@endif
Committed Amount by Cheque Details
@if($chequeSchedules->count() > 0) @foreach($chequeSchedules as $chequeSchedule) @endforeach
# Provider / Payee Cheque No. Payee Date Payee Type Amount (BDT) Clearing Status
{{ $loop->iteration }} {{ $chequeSchedule->provider->company_name ?? $chequeSchedule->provider->name ?? $chequeSchedule->payee_name ?? 'N/A' }} @if($chequeSchedule->payee_name)
{{ $chequeSchedule->payee_name }} @endif
{{ optional($chequeSchedule->chequeLeaf)->cheque_number ?? '—' }} {{ optional($chequeSchedule->payee_date)->format('d M Y') ?? '—' }} {{ $chequeSchedule->payee_type ?? '—' }} {{ number_format($chequeSchedule->amount, 2) }} {{ ucfirst($chequeSchedule->clearing_status) }}
@else
No cheque commitments recorded for this date.
@endif
@if(!empty($bankWiseTotals))
Total Amount by Bank
@foreach($bankWiseTotals as $bankTotal) @endforeach
Bank Name Account Name Total Deposits Total Withdrawals Net Amount Transactions
{{ $bankTotal['bank_name'] }} {{ $bankTotal['account_name'] }} BDT {{ number_format($bankTotal['deposits'], 2) }} BDT {{ number_format($bankTotal['withdrawals'], 2) }} BDT {{ number_format($bankTotal['net_amount'], 2) }} {{ $bankTotal['transaction_count'] }}
Grand Total: BDT {{ number_format($bankDeposits, 2) }} BDT {{ number_format($bankWithdrawals, 2) }} BDT {{ number_format($totalBankAmount, 2) }} {{ $bankTransactions->count() }}
@endif
Today's Transactions
@if($bankTransactions->count() > 0) @foreach($bankTransactions as $transaction) @endforeach
# Bank Account Transaction Type Reference Date Deposit (BDT) Withdraw (BDT) Notes
{{ $loop->iteration }} {{ $transaction->bankAccountInfo->bank_name ?? 'N/A' }}
{{ $transaction->bankAccountInfo->account_name ?? 'N/A' }}
{{ ucfirst(str_replace('_', ' ', $transaction->transaction_type ?? 'n/a')) }} {{ $transaction->reference_number ?? $transaction->transaction_id ?? '—' }} {{ optional($transaction->transaction_date)->format('d M Y') ?? '—' }} {{ number_format($transaction->deposit_balance ?? 0, 2) }} {{ number_format($transaction->withdraw_balance ?? 0, 2) }} {{ Str::limit($transaction->notes ?? $transaction->description ?? '—', 40) }}
Totals {{ number_format($bankDeposits, 2) }} {{ number_format($bankWithdrawals, 2) }} Net: BDT {{ number_format($totalBankAmount, 2) }}
@else
No bank transactions recorded for this date.
@endif
@if($schedules->count() > 0)
Payment Schedules for {{ $date->format('F d, Y') }}
@foreach($schedules as $schedule) @endforeach
# Provider Invoice Due Date Amount Committed Amount Remaining Payment Status Notes Actions
{{ $loop->iteration }} {{ $schedule->provider->company_name ?? $schedule->provider->name ?? 'N/A' }} @if($schedule->invoice_id) {{ $schedule->invoice->bill_no ?? 'Invoice #' . $schedule->invoice_id }} @else @endif {{ $schedule->due_date->format('d M Y') }} @if($schedule->isOverdue()) Overdue @endif BDT {{ number_format($schedule->amount, 2) }} BDT {{ number_format($schedule->paid_amount, 2) }} BDT {{ number_format($schedule->remaining_amount, 2) }} @if($schedule->payment_status == 'paid') Paid @elseif($schedule->payment_status == 'partial') Partial @else Pending @endif @if($schedule->notes) {{ Str::limit($schedule->notes, 30) }} @else @endif
Date Total: BDT {{ number_format($totalAmount, 2) }} BDT {{ number_format($totalPaidAmount, 2) }} BDT {{ number_format($totalRemainingAmount, 2) }}
@else
No payment schedules found for {{ $date->format('F d, Y') }}.
@endif
@endsection