@foreach($debtors as $debtor)
@if($debtor->sale_date < now()->subWeeks(2)->format('Y-m-d'))
| {{ $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)
| {{$items->product->product_name}} |
@endforeach
|
@elseif($debtor->sale_date < now()->subWeeks(1)->format('Y-m-d') && $debtor->sale_date > now()->subWeeks(2)->format('Y-m-d'))
| {{ $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)
| {{$items->product->product_name}} |
@endforeach
|
@else
| {{ $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)
| {{$items->product->product_name}} |
@endforeach
|
@endif
@endforeach
|
|
|
|
|
| | |
|
| |
|
| |
| Debts taken more than 2weeks ago |
|
Debts taken more than 1weeks ago |
|
Debts taken in a less than a week ago |