@extends('reports.layout') @section('content') @php function fmt($amount) { return '$ ' . number_format((float)$amount, 2); } @endphp
| فاز | تعداد فروشات | مجموع فروشات | تادیه شده | باقیمانده |
|---|---|---|---|---|
| {{ $phase['phase'] ?? '-' }} | {{ $phase['count'] ?? 0 }} | {{ fmt($phase['total'] ?? 0) }} | {{ fmt($phase['received'] ?? 0) }} | {{ fmt($remaining) }} |
| مجموع | {{ $byPhase->sum('count') }} | {{ fmt($byPhase->sum('total')) }} | {{ fmt($byPhase->sum('received')) }} | {{ fmt($byPhase->sum('total') - $byPhase->sum('received')) }} |