{{-- Filter Bar --}}
Dari
Sampai
Cari
@php $data = $this->getJournalData(); @endphp {{-- Summary Cards --}}

Total Pembelian

{{ number_format($data['summary']->total_pembelian ?? 0, 0, ',', '.') }}

Total Terbayar

{{ number_format($data['summary']->total_terbayar ?? 0, 0, ',', '.') }}

Sisa Hutang

{{ number_format($data['summary']->sisa_hutang ?? 0, 0, ',', '.') }}

PPN

{{ number_format($data['summary']->total_ppn ?? 0, 0, ',', '.') }}

Diskon

{{ number_format($data['summary']->total_diskon ?? 0, 0, ',', '.') }}

{{-- Table --}}
{{ $data['summary']->total_orders ?? 0 }} transaksi pembelian
{{-- Desktop Table --}}
@forelse($data['orders'] as $po) @php $isPaid = ($po->balance_due ?? 0) <= 0; $subtotal = $po->total_amount - ($po->tax ?? 0) + ($po->discount ?? 0); @endphp @empty @endforelse
No. PO / Supplier Tgl Diterima Status Subtotal Diskon Pajak Grand Total Terbayar Sisa Hutang
{{ $po->po_number }}
{{ $po->supplier->name ?? '-' }}
{{ $po->received_date ? \Carbon\Carbon::parse($po->received_date)->format('d M Y') : '-' }} {{ $isPaid ? 'Lunas' : 'Belum' }} {{ number_format($subtotal, 0, ',', '.') }} {{ ($po->discount ?? 0) > 0 ? number_format($po->discount, 0, ',', '.') : '-' }} {{ ($po->tax ?? 0) > 0 ? number_format($po->tax, 0, ',', '.') : '-' }} {{ number_format($po->total_amount, 0, ',', '.') }} {{ ($po->amount_paid ?? 0) > 0 ? number_format($po->amount_paid, 0, ',', '.') : '0' }} {{ ($po->balance_due ?? 0) > 0 ? number_format($po->balance_due, 0, ',', '.') : '0' }}
Belum ada transaksi pembelian pada periode ini
{{-- Mobile Cards --}}
@forelse($data['orders'] as $po) @php $isPaid = ($po->balance_due ?? 0) <= 0; @endphp
{{-- Row 1: PO number + Total --}}

{{ $po->po_number }}

{{ $po->supplier->name ?? '-' }} | {{ $po->received_date ? \Carbon\Carbon::parse($po->received_date)->format('d M Y') : '-' }}

Rp {{ number_format($po->total_amount, 0, ',', '.') }}
{{-- Row 2: Status + details --}}
{{ $isPaid ? 'Lunas' : 'Belum' }} Bayar: {{ number_format($po->amount_paid ?? 0, 0, ',', '.') }} @if(($po->balance_due ?? 0) > 0) Hutang: {{ number_format($po->balance_due, 0, ',', '.') }} @endif @if(($po->tax ?? 0) > 0) PPN: {{ number_format($po->tax, 0, ',', '.') }} @endif
@empty
Belum ada transaksi pembelian pada periode ini
@endforelse