@include('partials.head', ['title' => $pageTitle])
@include('partials.sidebar')
@include('partials.navbar')

{{ $pageTitle }}

{{ $pagesubTitle }}

Back to History
@if (session('success')) @endif @if (session('error')) @endif @if (session('info')) @endif @php $isBuy = $trxMain->transaction_type === 'B'; $typeLabel = $isBuy ? 'Buy' : 'Sell'; $typeBadgeClass = $isBuy ? 'is-buy' : 'is-sell'; $statusBadges = [ 'SUCCESS' => 'is-success', 'PENDING' => 'is-pending', 'FAIL' => 'is-fail', ]; $statusClass = $statusBadges[$trxMain->transaction_status] ?? 'is-fail'; $statusLabel = ucfirst(strtolower($trxMain->transaction_status)); $statusIcon = match ($statusClass) { 'is-success' => 'fa-solid fa-circle-check', 'is-pending' => 'fa-solid fa-clock', default => 'fa-solid fa-circle-xmark', }; $accountName = $company->ssm_name ?? $trxMain->user_name; $serviceCharge = (float) ($trxMain->service_charge ?? 0); $trxSell = $trxMain->trxSell; $hasGatewayDetails = $isBuy && ($trxMain->npg_transaction_id || $trxMain->acq_approval_code || $trxMain->acq_reference_no || $trxMain->npg_payment_issuer_bank); @endphp
Official Receipt

YAPEIM GOLD

{{ $typeLabel }} {{ $statusLabel }}
Ref: {{ $trxMain->trx_ref }}

Date & Time {{ optional($trxMain->trx_transaction_time)->format('d M Y, h:i A') }}
Account {{ $accountName }}
Account ID {{ $trxMain->user_id_no }}
Payment Method {{ $trxMain->payment_method ?: '-' }}
Description {{ $trxMain->trx_description ?: '-' }}
Product ID {{ $trxMain->trx_product_id ?: '-' }}

{{ $isBuy ? 'Gold Purchase Details' : 'Gold Sale Details' }}
Gold Purity Gold {{ $trxMain->purity }}
Weight {{ number_format($trxMain->total_weight_gram, 2) }} g
Price per Gram RM {{ number_format($pricePerGram, 2) }}
Gold Value RM {{ number_format($goldValue, 2) }}
@if ($serviceCharge > 0)
{{ $isBuy ? 'Service Charge' : 'Service Charge (Deducted)' }} RM {{ number_format($serviceCharge, 2) }}
@endif
{{ $isBuy ? 'Total Amount Paid' : 'Total Amount Received' }} RM {{ number_format($trxMain->trx_amount, 2) }}
@if (!$isBuy && $trxSell)
Payout Details
Bank Name {{ $trxSell->bank_name ?: '-' }}
Account No. {{ $trxSell->bank_account_no ?: '-' }}
Account Holder {{ $trxSell->account_holder_name ?: '-' }}
Payout Status {{ ucfirst(strtolower($trxSell->status)) }}
@if ($trxSell->bank_reference_no)
Bank Reference No. {{ $trxSell->bank_reference_no }}
@endif @if ($trxSell->transferred_at)
Transferred At {{ $trxSell->transferred_at->format('d M Y, h:i A') }}
@endif
@endif @if ($hasGatewayDetails)
Payment Gateway Details
@if ($trxMain->npg_payment_issuer_bank)
Issuing Bank {{ $trxMain->npg_payment_issuer_bank }}
@endif @if ($trxMain->acq_approval_code)
Approval Code {{ $trxMain->acq_approval_code }}
@endif @if ($trxMain->acq_reference_no)
Reference No. {{ $trxMain->acq_reference_no }}
@endif @if ($trxMain->npg_transaction_id)
Gateway Transaction ID {{ $trxMain->npg_transaction_id }}
@endif
@endif

This is a system-generated receipt and is valid without a signature or stamp. Printed on {{ now()->format('d M Y, h:i A') }}.

@include('partials.footer')