@php $paymentLabels = [ 'cash' => 'Tunai', 'transfer' => 'Transfer', 'qris' => 'QRIS', 'debit' => 'Kartu Debit', 'credit' => 'Kartu Kredit', 'mixed' => 'Campuran', ]; $statusLabels = [ 'paid' => 'Lunas', 'pending' => 'Dibayar Sebagian', 'cancelled' => 'Dibatalkan', 'refunded' => 'Dikembalikan', ]; $customerName = $posTransaction->patient?->name ?? 'Customer Umum'; @endphp
@if ($printOnLoad) @else
@csrf
@endif
@if ($posTransaction->location?->logo_path)
@endif

{{ $posTransaction->location?->name ?? 'Klinik Mustika' }}

@if ($posTransaction->location?->address)
{!! nl2br(e($posTransaction->location->address)) !!}
@endif
@if ($posTransaction->location?->phone_number) Telp. {{ $posTransaction->location->phone_number }} @endif @if ($posTransaction->location?->email) {{ $posTransaction->location?->phone_number ? ' · ' : '' }}{{ $posTransaction->location->email }} @endif
Kwitansi Pembayaran
{{ $posTransaction->transaction_number }}
Tanggal
: {{ \App\Helpers\DateHelper::formatDate($posTransaction->created_at) }} {{ $posTransaction->created_at->format('H:i') }}
Customer / Pasien
: {{ $customerName }} @if ($posTransaction->patient?->medical_record_number) ({{ $posTransaction->patient->medical_record_number }}) @endif
Kasir
: {{ $posTransaction->cashier?->name ?? '-' }}
@if ($posTransaction->labOrder)
Permintaan Lab
: {{ $posTransaction->labOrder->order_number }}
@endif
Status
: {{ $statusLabels[$posTransaction->payment_status] ?? strtoupper($posTransaction->payment_status) }}
@foreach ($posTransaction->items as $item) @endforeach @if ((float) $posTransaction->tax_amount !== 0.0) @endif
No. Produk / Jasa Jumlah & Satuan Harga Diskon Total
{{ $loop->iteration }}
{{ $item->item_name ?? ($item->pharmacyService?->name ?? ($item->drug?->name ?? '-')) }}
@if ($item->drugBatch?->batch_number)
Batch {{ $item->drugBatch->batch_number }}
@endif
{{ number_format( $item->selling_quantity ?? $item->quantity, 0, ',', '.', ) }} {{ $item->selling_unit_name ?: ($item->item_type === 'service' ? 'layanan' : $item->drug?->unit?->name ?? 'unit') }} Rp {{ number_format((float) $item->unit_price, 0, ',', '.') }} Rp {{ number_format((float) $item->discount_amount, 0, ',', '.') }} Rp {{ number_format((float) $item->total_amount, 0, ',', '.') }}
Subtotal Rp {{ number_format((float) $posTransaction->subtotal, 0, ',', '.') }}
Diskon Transaksi Rp {{ number_format((float) $posTransaction->discount_amount, 0, ',', '.') }}
Pajak Rp {{ number_format((float) $posTransaction->tax_amount, 0, ',', '.') }}
Total Rp {{ number_format((float) $posTransaction->total_amount, 0, ',', '.') }}
Sudah Dibayar Rp {{ number_format($posTransaction->paidAmount(), 0, ',', '.') }}
Sisa Tagihan Rp {{ number_format($posTransaction->remainingAmount(), 0, ',', '.') }}
Pembayaran
@forelse ($posTransaction->payments as $payment)
{{ $paymentLabels[$payment->payment_method] ?? strtoupper($payment->payment_method) }}{{ $payment->reference_number ? ' · ' . $payment->reference_number : '' }} Rp {{ number_format((float) $payment->amount, 0, ',', '.') }}
@if ($payment->payment_method === 'cash' && (float) $payment->cash_received > 0)
Tunai diterimaRp {{ number_format((float) $payment->cash_received, 0, ',', '.') }}
@endif @empty
{{ $paymentLabels[$posTransaction->payment_method] ?? strtoupper($posTransaction->payment_method) }} Rp {{ number_format((float) $posTransaction->total_amount, 0, ',', '.') }}
@endforelse
KembalianRp {{ number_format((float) $posTransaction->change_amount, 0, ',', '.') }}
@if ($posTransaction->notes)
Keterangan: {{ $posTransaction->notes }}
@endif
Customer / Pasien
{{ $customerName }}
Kasir
{{ $posTransaction->cashier?->name ?? '-' }}