@foreach($trx->items as $item)
{{ $item->product_name }}
{{ $item->quantity }}x Rp{{ number_format($item->unit_price, 0, ',', '.') }}
= Rp{{ number_format($item->subtotal, 0, ',', '.') }}
@endforeach
Subtotal
Rp{{ number_format($trx->subtotal, 0, ',', '.') }}
@if($trx->discount_amount > 0)
Diskon
-Rp{{ number_format($trx->discount_amount, 0, ',', '.') }}
@endif
@if($trx->tax_amount > 0)
PPN ({{ $trx->tax_percent }}%)
Rp{{ number_format($trx->tax_amount, 0, ',', '.') }}
@endif
Total
Rp{{ number_format($trx->grand_total, 0, ',', '.') }}
@if($trx->payment_method === 'cash')
Bayar
Rp{{ number_format($trx->amount_paid, 0, ',', '.') }}
Kembali
Rp{{ number_format($trx->change_amount, 0, ',', '.') }}
@endif