{{ $store->store_name }}

{{ $store->address }}

Telp: {{ $store->phone }}

No: {{ $transaction->transaction_id }}

Tgl: {{ date('d/m/Y H:i', strtotime($transaction->purchase_date)) }}

Supplier: {{ $supplier->store_name }}

@foreach ($products as $product) @endforeach
{{ $product->product_name }} @if($product->variasi_1 || $product->variasi_2 || $product->variasi_3) ({{ $product->variasi_1 }} {{ $product->variasi_2 }} {{ $product->variasi_3 }}) @endif
{{ $product->quantity }} x {{ number_format($product->purchase_price, 0, ',', '.') }}
{{ number_format($product->quantity * $product->purchase_price, 0, ',', '.') }}
Total Item: {{ $products->sum('quantity') }}

Total Pembelian: {{ number_format($transaction->total_amount, 0, ',', '.') }}

@if($transaction->discount > 0)

Diskon: {{ number_format($transaction->discount, 0, ',', '.') }}

Total Setelah Diskon: {{ number_format($transaction->total_amount - $transaction->discount, 0, ',', '.') }}

@endif @if($expenses->isNotEmpty())

Biaya Lain-lain:

@foreach($expenses as $expense)

{{ $expense->name }} {{ number_format($expense->amount, 0, ',', '.') }}

@if($expense->note)

{{ $expense->note }}

@endif @endforeach
@endif

Total Keseluruhan: {{ number_format($transaction->total_amount - $transaction->discount + $expenses->sum('amount'), 0, ',', '.') }}

Total Bayar: {{ number_format($detail_payment->sum('amount_paid'), 0, ',', '.') }}

@if($transaction->remaining_payment > 0)

Sisa Pembayaran: {{ number_format($transaction->remaining_payment, 0, ',', '.') }}

@else

Kembalian: {{ number_format($detail_payment->sum('amount_paid') - ($transaction->total_amount - $transaction->discount + $expenses->sum('amount')), 0, ',', '.') }}

@endif