@foreach($debtors as $debtor) @if($debtor->sale_date < now()->subWeeks(2)->format('Y-m-d')) @elseif($debtor->sale_date < now()->subWeeks(1)->format('Y-m-d') && $debtor->sale_date > now()->subWeeks(2)->format('Y-m-d')) @else @endif @endforeach
DEBTORS REPORT
CUSTOMER TOTAL PAID DISCOUNT BALANCE DATE
PRODUCTS
{{ $debtor->customer->name ?? '' }} {{ $debtor->total+$debtor->discount ?? 0 }} {{ $debtor->paid ?? 0 }} {{ $debtor->discount ?? 0 }} {{ $debtor->total-$debtor->paid ?? 0 }} {{ $debtor->sale_date ?? '----' }} @foreach($debtor->items as $items) @endforeach
{{$items->product->product_name}}
{{ $debtor->customer->name ?? '' }} {{ $debtor->total+$debtor->discount ?? 0 }} {{ $debtor->paid ?? 0 }} {{ $debtor->discount ?? 0 }} {{ $debtor->total-$debtor->paid ?? 0 }} {{ $debtor->sale_date ?? '----' }} @foreach($debtor->items as $items) @endforeach
{{$items->product->product_name}}
{{ $debtor->customer->name ?? '' }} {{ $debtor->total+$debtor->discount ?? 0 }} {{ $debtor->paid ?? 0 }} {{ $debtor->discount ?? 0 }} {{ $debtor->total-$debtor->paid ?? 0 }} {{ $debtor->sale_date ?? '----' }} @foreach($debtor->items as $items) @endforeach
{{$items->product->product_name}}
| | |
Debts taken more than 2weeks ago Debts taken more than 1weeks ago Debts taken in a less than a week ago