@extends('layouts.app') @section('title', 'Water Production') @section('content')

Water Production

Monthly volume produced or purchased per source — the basis for non-revenue water in the NWRB report

Record Production
@if(session('success'))
{{ session('success') }}
@endif
@if($isSuperAdmin)
@endif
Total Supply {{ $year }}

{{ number_format($summary['supply'], 2) }}

cu.m produced + purchased
Billed to Customers

{{ number_format($summary['billed'], 2) }}

cu.m on issued bills
Non-Revenue Water

{{ number_format($summary['nrw'], 2) }}

cu.m unaccounted for
NRW Rate

{{ number_format($summary['nrw_rate'], 1) }}%

{{ $summary['supply'] > 0 ? 'of total supply' : 'no production recorded' }}
Production Records for {{ $year }}
@if($isSuperAdmin)@endif @forelse($records as $record) @php $key = $record->period->format('Y-m'); $monthSupply = $supplyByMonth[$key] ?? 0; $monthBilled = (float) ($billed[$key] ?? 0); $nrwRate = $monthSupply > 0 ? (($monthSupply - $monthBilled) / $monthSupply) * 100 : null; @endphp @if($isSuperAdmin)@endif @empty @endforelse
Month SourceCompanyProduced Purchased Total Supply Billed (month) NRW % Recorded By Actions
{{ $record->period->format('M Y') }} {{ $record->source_name }}{{ $record->company->name ?? '—' }}{{ number_format($record->production_volume, 2) }} {{ number_format($record->purchased_volume, 2) }} {{ number_format($record->total_supply, 2) }} {{ number_format($monthBilled, 2) }} @if($nrwRate === null) @else {{ number_format($nrwRate, 1) }}% @endif {{ $record->recordedByUser->name ?? '—' }}
@csrf @method('DELETE')
No production recorded for {{ $year }}. Add the first month so non-revenue water can be reported.

NRW is computed as (total supply − volume billed) ÷ total supply for the same month. Billed volume comes from the bills issued in that month, so record production for a month only once its billing run is complete for the figure to be meaningful.

@endsection