@extends('layouts.app') @section('title', 'Laporan') @section('body')
@include('partials.sidebar', ['active' => 'reports'])
@include('partials.topbar', ['heading' => 'Laporan transaksi'])

Laporan pendapatan

Ringkasan transaksi sewa komputer dan penjualan cafe.

@include('partials.flash')
Total pendapatan
Rp {{ number_format($totalRevenue, 0, ',', '.') }}
{{ $sales->count() }} transaksi
Pendapatan sewa
Rp {{ number_format($rentalRevenue, 0, ',', '.') }}
Sewa komputer
Pendapatan cafe
Rp {{ number_format($cafeRevenue, 0, ',', '.') }}
Penjualan produk
Periode laporan
{{ \Carbon\Carbon::parse($from)->format('d M Y') }}
s.d. {{ \Carbon\Carbon::parse($to)->format('d M Y') }}

Rincian transaksi {{ $sales->count() }} data

@if ($sales->isEmpty())
Tidak ada transaksi pada periode iniPilih periode tanggal lainnya untuk melihat transaksi.
@else
@foreach ($sales as $sale)@endforeach
WaktuNo. transaksiJenisPelangganKasirTotalDibayarKembalian
{{ $sale->occurred_at->format('d/m/Y H:i') }}#{{ str_pad((string) $sale->id, 6, '0', STR_PAD_LEFT) }}{{ $sale->type === 'cafe' ? 'Cafe' : 'Sewa' }}{{ $sale->customer_name ?: 'Pelanggan umum' }}{{ $sale->user->name }}Rp {{ number_format($sale->total, 0, ',', '.') }}Rp {{ number_format($sale->paid_amount, 0, ',', '.') }}Rp {{ number_format($sale->change_amount, 0, ',', '.') }}
@endif
@endsection