@foreach($reports as $r) @php $customerSignature = $r['customerSignature'] ?? null; $i = $r['instrument']; $c = $r['company']; $m = $r['measurements']; $unit = e($i['pressureUnit'] ?? 'bar'); @endphp
@if($logo) @endif
The United Republic of Tanzania
Ministry of Industry and Trade
Weights and Measures Agency
Wakala wa Vipimo{{ $r['office']['name'] ? ' - '.$r['office']['name'] : '' }}
{{ collect([$r['office']['address'], $r['office']['phone'] ? 'Tel: '.$r['office']['phone'] : null, $r['office']['email']])->filter()->implode(' | ') }}
CNG Filling Station
(Flow Meter Verification Report)
Weights and Measures Act, Cap. 340
Report No: {{ $r['reference'] }}
Activity: {{ $r['pumpActivity'] }}@if($r['verificationCategory']) ({{ $r['verificationCategory'] }})@endif  |  Visit: {{ $r['activity']['reference'] }}
{{-- 2. Company particulars --}}
Company Name{{ $c['name'] }} Company Address{{ $c['address'] }}
Physical Address{{ $c['physicalAddress'] ?: '-' }} Station Location{{ $c['stationName'] }}@if($c['stationLocation']) - {{ $c['stationLocation'] }}@endif
Contact Person{{ $c['contactPerson'] ?: '-' }} Contact Phone{{ $c['contactPhone'] ?: '-' }}
{{-- 3. Instrument particulars --}}
Identification Name{{ $i['identification'] }} (Dispenser {{ $i['dispenserLabel'] }}, Nozzle {{ $i['nozzleNumber'] }}) Brand Name{{ $i['brandName'] ?? $i['manufacturer'] }}
Serial Number{{ $i['serialNumber'] }} Manufacturer / Model{{ collect([$i['manufacturer'] ?? null, $i['model'] ?? null])->filter()->implode(' / ') ?: '-' }}
Instrument Type{{ $i['instrumentType'] }}@if(!empty($i['productType'])) - {{ $i['productType'] }}@endif Hose Length{{ rtrim(rtrim($i['hoseLength'], '0'), '.') }} m
Hose Lab Test Pressure{{ rtrim(rtrim($i['hoseLabTestPressure'], '0'), '.') }} {{ $unit }} Dispenser Test Pressure{{ rtrim(rtrim($i['dispenserTestPressure'], '0'), '.') }} {{ $unit }}
Minimum Flow Rate{{ rtrim(rtrim($i['minFlowRate'], '0'), '.') }} kg/min Maximum Flow Rate{{ rtrim(rtrim($i['maxFlowRate'], '0'), '.') }} kg/min
Max. Operating Pressure{{ rtrim(rtrim($i['maxOperatingPressure'], '0'), '.') }} bar Operating Temperature{{ $i['operatingTemperature'] }} °C
{{-- Visual examination: the short questions two to a row, the long one on its own, and any notes on one line - so the page still fits on one sheet. --}} @php $visual = collect($r['visual'] ?? [])->keyBy('key'); $answer = fn ($key) => ($visual[$key]['answer'] ?? '-').(($visual[$key]['inOrder'] ?? null) === false ? ' ✗' : ''); $notes = $visual->filter(fn ($v) => $v['details']) ->map(fn ($v) => ($v['key'] === 'anyLegalNonCompliance' ? 'Non-compliance' : 'Non-compliance features').': '.$v['details']) ->implode('; '); $q = 'style="font-family: inherit; font-size: 10.5px; letter-spacing: 0; width: 38%;"'; @endphp @if($notes) @endif
{{ $visual['isComplete']['label'] ?? '' }}{!! $answer('isComplete') !!} {{ $visual['areDenominationsProvided']['label'] ?? '' }}{!! $answer('areDenominationsProvided') !!}
{{ $visual['isSealingMechanismProvided']['label'] ?? '' }}{!! $answer('isSealingMechanismProvided') !!} {{ $visual['anyLegalNonCompliance']['label'] ?? '' }}{!! $answer('anyLegalNonCompliance') !!}
{{ $visual['hasNonComplianceFeatures']['label'] ?? '' }}{!! $answer('hasNonComplianceFeatures') !!}
Notes: {{ $notes }}
{{-- 4. CNG verification measurements and calculation --}}
No. Description Result Unit
1CNG Cylinder Tare weight (kg) (before filling Gas){{ $m['tare'] ?? '-' }}kg
2CNG Cylinder Gross weight (kg) (after filling gas){{ $m['gross'] ?? '-' }}kg
3CNG net weight filled in the Cylinder (kg) (2 - 1){{ $m['net'] ?? '-' }}kg
4CNG Dispenser under test Displayed weight (kg){{ $m['displayed'] ?? '-' }}kg
5Difference (3 - 4){{ $m['difference'] ?? '-' }}kg
6% difference ((5 ÷ 3) × 100){{ $m['percentage'] ?? '-' }}%
{{-- 5. Verification decision --}}
{!! $r['decision'] === 'PASSED' ? '✓' : '' !!}Passed
{!! $r['decision'] === 'FAILED' ? '✗' : '' !!}Failed
@if($r['adjustment'])
Adjustment Action: {{ $r['adjustment']['label'] }} @if($r['adjustment']['retest'])  |  Re-test after adjustment: net {{ $r['adjustment']['retest']['net'] }} kg, displayed {{ $r['adjustment']['retest']['displayed'] }} kg, difference {{ $r['adjustment']['retest']['difference'] }} kg ({{ $r['adjustment']['retest']['percentage'] }}%) @if($r['decision'] === 'PASSED')  |  Adjusting fee charged @endif @endif
@endif {{-- 6. Verification information --}} {{-- Seal and sticker are no longer captured; printed only for pumps recorded with them. --}} @if($r['sealNumber'] || $r['stickerNumber']) @endif @if($r['remarks']) @endif
Verification Date{{ $r['verificationDate'] ?? '-' }} Next Verification{{ $r['nextVerificationDate'] ?? '-' }}
WMA Seal Number{{ $r['sealNumber'] ?? '-' }} WMA Sticker Number{{ $r['stickerNumber'] ?? '-' }}
Remarks{{ $r['remarks'] }}
{{-- Limit of error, signatures and footer - as on the Fuel Pump report. --}}
LIMIT OF ERROR:
On Verification (when new or after repair), Reverification or Inspection, the maximum permissible error is ±{{ $m['mpe'] ?? '-' }}% of the quantity delivered (the CNG net weight filled in the cylinder).
{{-- The customer's own signature, once they have signed the report from their SMS link. --}}
@if(!empty($customerSignature['image'])) Customer signature @endif
Signature of Owner / User
@if(!empty($customerSignature['image']))
Signed electronically on {{ $customerSignature['signedAt'] }}
@else
{{ $c['name'] }}
@endif {{-- The owner's name, as the inspector's is shown: who signed, else the station's contact person. --}}
{{ ($customerSignature['name'] ?? null) ?: ($c['contactPerson'] ?: $c['name']) }}
{{-- The officer who recorded the test. --}}
@if(!empty($r['preparedBy']['signature']) && !empty($r['preparedBy']['name'])) Signature @endif
Inspector of Weights & Measures
Weights and Measures Agency - Official Seal
{{ $r['preparedBy']['name'] ?? '' }}
@endforeach