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

Direct Dues report

@forelse($sales as $key => $sale) @empty @endforelse
Sr Bill No Customer Name Customer Phone Total Remaining Action
{{ $key + 1 }} {{ $sale->bill_no }} {{ $sale->customer->name ?? '-' }} {{ $sale->customer->phone ?? '-' }} {{ number_format($sale->total, 2) }} {{ number_format($sale->remaining, 2) }} @php $phone = $sale->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 = "سلام ".$sale->customer->name. "، آپ کا بل نمبر ".$sale->bill_no. "، Rs ".$sale->remaining. " واجب الادا ہے، براہ کرم اسے جلد از جلد ادا کریں۔". " : اسلام آباد ٹائرز اینڈ رمز G10/4، اسلام آباد"; @endphp @if(!empty($phone)) Whatsapp @else - @endif
No installment dues found.
@endsection