@extends('admin.layout.app') @section('content')

Installment Dues report

@forelse($dueInstallments as $key => $row) @empty @endforelse
Sr Customer Name Customer Phone Installment No Due Amount Due Date Action
{{ $key + 1 }} {{ $row['customer_name'] }} {{ $row['customer_phone'] }} {{ $row['installment_no'] }} {{ number_format($row['due_amount'], 2) }} {{ \Carbon\Carbon::parse($row['due_date'])->format('d M Y') }} @php $phone = $row['customer_phone'] ?? ''; // remove spaces, +, -, brackets $phone = preg_replace('/[^0-9]/', '', $phone); // ✅ Pakistan format convert 03xx... => 92xx... if(strlen($phone) == 11 && substr($phone, 0, 1) == '0'){ $phone = '92' . substr($phone, 1); } $msg = "سلام ".$row['customer_name']. "، آپ کا بل نمبر ".$row['bill_no']. "، قسط Rs ".$row['due_amount']. " واجب الادا ہے، براہ کرم اسے جلد از جلد ادا کریں۔". " : اسلام آباد ٹائرز اینڈ رمز G10/4، اسلام آباد"; @endphp @if(!empty($phone)) Whatsapp @else - @endif
No installment dues found.
@endsection