{{ $pageTitle }}
{{ $pagesubTitle }}
{{ session('success') }}
@endif
@if (session('error'))
{{ session('error') }}
@endif
@if (session('info'))
{{ 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 }}
{{ $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) }}
Payout Details
@endif @if ($hasGatewayDetails)Payment Gateway Details
@endifThis is a system-generated receipt and is valid without a signature or stamp. Printed on {{ now()->format('d M Y, h:i A') }}.