@extends('restaurant.layout') @section('title', 'ربحية الوجبات') @php $n = fn ($v) => number_format((float) $v, 2); $t = $totals; $maxProfit = max(1, collect($rows)->max('profit') ?? 1); @endphp @section('content')
الفترة: {{ $from }} → {{ $to }} · {{ $branchName }} · المبيعات − تكلفة التحضير = الربح
| الوجبة | الحجم | الكمية المباعة | تكلفة الحجم | إجمالي المبيعات | إجمالي التكلفة | الربح | هامش الربح |
|---|---|---|---|---|---|---|---|
| {{ $r['name'] }} | {{ $r['size'] ?: '—' }} | {{ $r['qty'] }} | {{ $r['has_cost'] ? $n($r['unit_cost']) : 'غير محددة' }} | {{ $n($r['revenue']) }} | {{ $n($r['cost']) }} | {{ $n($r['profit']) }} | {{ $r['margin'] }}% |
| لا توجد مبيعات وجبات في هذه الفترة | |||||||
| الإجمالي | {{ $t['qty'] }} | {{ $n($t['revenue']) }} | {{ $n($t['cost']) }} | {{ $n($t['profit']) }} | {{ $t['margin'] }}% | ||