Watermark

Laporan Laba/Rugi

Periode: {{ $judulPeriode }}

@php $no = 1; $grandLaba = 0; @endphp @foreach ($data as $invoice) @foreach ($invoice['items'] as $item) @php $grandLaba += $item['laba_rugi']; @endphp @endforeach @endforeach
# Kode Invoice Tanggal Pelanggan Produk Kuantitas Harga Jual HPP Subtotal Laba / Rugi
{{ $no++ }} {{ $invoice['kode_invoice'] }} {{ \Carbon\Carbon::parse($invoice['tanggal'])->format('d/m/Y') }} {{ $invoice['pelanggan']['nama'] ?? '-' }} {{ $item['product']['nama'] ?? '-' }} {{ $item['kuantitas'] }} Rp {{ number_format($item['harga_satuan'], 0, ',', '.') }} Rp {{ number_format($item['product']['hpp'] ?? 0, 0, ',', '.') }} Rp {{ number_format($item['subtotal'], 0, ',', '.') }} Rp {{ number_format($item['laba_rugi'], 0, ',', '.') }}

Total Laba/Rugi: Rp {{ number_format($grandLaba, 0, ',', '.') }}