@extends('layouts.print') @section('title', 'Cetak Laporan Penjualan') @section('doc-title', 'Laporan Penjualan') @section('doc-subtitle', 'Periode: ' . \Carbon\Carbon::parse($from)->locale('id')->isoFormat('D MMMM Y') . ' – ' . \Carbon\Carbon::parse($to)->locale('id')->isoFormat('D MMMM Y') ) @section('content') {{-- Summary Cards --}}
Total Transaksi
{{ $data->count() }}
Total Qty Terjual
{{ number_format($data->sum('qty')) }}
Total Produk
{{ $rekap->count() }}
Total Pendapatan
Rp {{ number_format($total, 0, ',', '.') }}
{{-- Rekap per Produk --}} @if($rekap->isNotEmpty())
Rekapitulasi per Produk
@foreach($rekap as $i => $r) @endforeach
# Produk Total Qty Terjual Total Nilai % Kontribusi
{{ $i + 1 }} {{ $r['barang'] }} {{ number_format($r['total_qty']) }} Rp {{ number_format($r['total_nilai'], 0, ',', '.') }} {{ $total > 0 ? number_format(($r['total_nilai'] / $total) * 100, 1) : 0 }}%
@endif {{-- Rincian Transaksi --}}
Rincian Transaksi Penjualan
@forelse($data as $i => $p) @empty @endforelse @if($data->isNotEmpty()) @endif
# Tanggal Produk Pembeli Qty Harga/Satuan Total
{{ $i + 1 }} {{ $p->tanggal->format('d M Y') }} {{ $p->barang->name ?? '-' }} {{ $p->pembeli ?? '—' }} {{ $p->qty }} Rp {{ number_format($p->harga_satuan, 0, ',', '.') }} Rp {{ number_format($p->total_harga, 0, ',', '.') }}
Tidak ada data penjualan pada periode ini.
TOTAL PENDAPATAN Rp {{ number_format($total, 0, ',', '.') }}
{{-- Area Tanda Tangan --}}
Mengetahui,
( _________________________ )
@endsection