@extends('admin.layout') @section('title', 'Reports') @section('content') @include('admin._range', ['action' => '/admin/reports', 'days' => $days])
Download product report (CSV) @can('orders.view')Download orders (CSV)@endcan
| Product | Category | Units | Orders | Sales | @if ($fin)Profit | Margin | @endifRating | Stock |
|---|---|---|---|---|---|---|---|---|
| {{ $p['name'] }} | {{ $p['cat'] }} | {{ $p['units'] }} | {{ $p['orders'] }} | {{ naira($p['sales']) }} | @if ($fin){{ $p['profit'] === null ? '-' : naira($p['profit']) }} | {{ $p['margin'] === null ? '-' : $p['margin'].'%' }} | @endif{{ $p['rating'] ? $p['rating'].' ★ ('.$p['reviews'].')' : '-' }} | {{ $p['qty'] !== null ? $p['qty'] : $p['stock'] }} |
No sales in this period: {{ implode(', ', array_map(fn ($p) => $p['name'], $noSales)) }}
@endif @if ($customers !== null)| Customer | Phone | Orders | Spent (paid) |
|---|---|---|---|
| {{ $c->customer_name }} | {{ $c->phone }} | {{ (int) $c->n }} | {{ naira((int) $c->paid) }} |