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

{{ $pageTitle }}

{{ $pagesubTitle }}

Withdrawal History
@if (session('error')) @endif @if (session('success')) @endif {{-- Wallet Balance Banner --}} {{--
Your Gold Vault
916 {{ number_format($wallet->current_gold_gram_916 ?? 0, 4) }}g
999 {{ number_format($wallet->current_gold_gram_999 ?? 0, 4) }}g
Minting Fee Rates
@foreach($mintingFees as $goldType => $fee)
Gold {{ $goldType }}: RM {{ number_format($fee->fee_per_gram, 2) }}/g
@endforeach
--}} {{-- Wallet Balance Banner (wallet-card color) --}}
My Gold Vault
916 {{ number_format($wallet->current_gold_gram_916 ?? 0, 2) }}g
999 {{ number_format($wallet->current_gold_gram_999 ?? 0, 2) }}g
Minting Fee Rates
@foreach($mintingFees as $goldType => $fee)
Gold {{ $goldType }}: RM {{ number_format($fee->fee_per_gram, 2) }}/g
@endforeach
@csrf
{{-- LEFT: Inventory Selection --}}
Select Gold Item

Choose the physical gold item you want to withdraw

{{-- Step 1: Category Selection Tiles --}}
Showing: Gold Bar / Dinar
Gold Bar / Dinar
Jongkong & Dinar
Jewelry
Barang Kemas
{{-- Filter Bar (client-side, matches Available Gold Asset module) --}}
{{-- Inventory Cards --}}
@if($inventories->isEmpty())

No physical gold inventory available for withdrawal at this time.

@else
@foreach($inventories as $item) @php $purityKey = strval($item->gold_type); $mintFeeRate = $mintingFees[$purityKey]->fee_per_gram ?? 0; $mintFeeTotal = floatval($item->weight) * floatval($mintFeeRate); $itemCat = $item->category ?? 'GOLDBAR'; @endphp
@if(!empty($item->image)) {{ $item->type }} @elseif($itemCat === 'JEWELRY') @else @endif
Gold {{ $item->gold_type }} {{ number_format(floatval($item->weight), 2) }}g

{{ $item->type ?: 'Gold Item' }}

{{ $item->inv_id }}

Minting Fee RM {{ number_format($mintFeeTotal, 2) }}
@endforeach

No items found.

@endif
{{-- RIGHT: Fulfillment & Fee Summary --}}
Collection Method

How would you like to collect your gold?

{{-- Fulfillment Type --}}
@foreach($withdrawalTypes as $wtype)
first ? 'checked' : '' }}>
@endforeach
{{-- Branch Selection (WALK_IN only) --}}
{{-- Delivery Address (POSTAGE only) --}} {{-- Fee Summary --}}
Selected Item —
Purity —
Weight —
Minting Fee Total RM 0.00 / g RM 0.00
Postage / Delivery Total RM 0.00

Total Fee Payable RM 0.00
Payment processed securely via FPX Gateway
{{-- Takaful Option (POSTAGE only) --}}
Not enough gold balance in your vault to withdraw this item.

You will be redirected to FPX to complete fee payment. Gold item will be reserved immediately.

@include('partials.footer')