@php $coatPath = public_path('assets/images/emblem.jpeg'); $coatBase64 = file_exists($coatPath) ? base64_encode(file_get_contents($coatPath)) : ''; $coatSrc = $coatBase64 ? 'data:image/jpeg;base64,' . $coatBase64 : ''; $wmaPath = public_path('assets/images/wmalogo.png'); $wmaBase64 = file_exists($wmaPath) ? base64_encode(file_get_contents($wmaPath)) : ''; $wmaSrc = $wmaBase64 ? 'data:image/png;base64,' . $wmaBase64 : ''; $sortedCharts = $charts ?? []; uksort($sortedCharts, 'strnatcmp'); $totalComps = count($sortedCharts); $boxWidth = $totalComps > 0 ? floor(100 / $totalComps) . '%' : '100%'; @endphp
@if($coatSrc) Coat of Arms @endif

THE UNITED REPUBLIC OF TANZANIA

MINISTRY OF INDUSTRY AND TRADE

WEIGHTS AND MEASURES AGENCY

Wma Headquarters (HQ)

Mob: +255 (022) 2928158 Tel: 0800 110097 Fax: 0800 110097 Address: P.O BOX 313, Dar es Salaam, Email: info@wma.go.tz

@if($wmaSrc) WMA Logo @endif
VERIFICATION CHART NO {{ $chartNumber ?? 'N/A' }} @if(!empty($qrCodeImage)) @endif
FOR: TANK/TR TANK/TR NO {{ $plateNumber ?? 'N/A' }}
FOR: {{ $customerName ?? 'N/A' }}
CAPACITY: {{ $capacity ?? 'N/A' }}
@foreach($sortedCharts as $compKey => $data) @endforeach
T.T {{ $data['tankTop'] ?? 'N/A' }} mm
@foreach(($data['readings'] ?? []) as $reading) @endforeach
Volume(l) Height(mm)
{{ $reading['litre'] ?? '' }} {{ $reading['mm'] ?? '' }}
The dipstick(s) was | were marked {{ $chartNumber ?? 'N/A' }}
{{ $customerName ?? 'N/A' }}
TANK/TR NO {{ $plateNumber ?? 'N/A' }}
@foreach($sortedCharts as $compKey => $data) @php $cleanCompNo = str_replace('compartment', '', $compKey); $maxLitre = count($data['readings'] ?? []) > 0 ? end($data['readings'])['litre'] : '0'; @endphp @endforeach
COMPT NO. {{ $cleanCompNo }}
{{ $maxLitre }} LITRE
STAMP: {{ $data['stampNumber'] ?? 'N/A' }}
The tank was verified  1. On a level plane  2 . against approved measure
NOTE (a) the compartments should be filled in the order {{ $fillOrder ?? 'N/A' }} and emptied in the order {{ $emptyOrder ?? 'N/A' }}
@php $expDateObj = !empty($expiryDate) ? \Carbon\Carbon::parse($expiryDate) : null; $expDateStr = $expDateObj ? $expDateObj->format('d M Y') : 'N/A'; $genDateObj = !empty($generatedDate) ? \Carbon\Carbon::parse($generatedDate) : null; $genDateStr = $genDateObj ? $genDateObj->format('d M Y') : 'N/A'; @endphp (b) THIS TANK SHALL BE VERIFIED AGAIN IF SUSPECTED OF GIVING INCORRECT MEASUREMENTS BUT IN ANY CASE NOT LATER THAN {{ $expDateStr }}