@extends('admin.layout') @section('content')

Report(Income)



@foreach($utility_setups as $item) @endforeach @php $total = array(); @endphp @foreach($result as $item) @foreach($utility_setups as $utility) @php $found = 0 @endphp @foreach($item->rent_invoice_detail as $utility_item) @if($utility_item->utility_ref_code == $utility->ref_code) @php $total[$utility->ref_code][] = $utility_item->amount ; $found = 1 @endphp @endif @endforeach @if($found == 0) @php $total[$utility->ref_code][] =0; $found = 1 @endphp @endif @endforeach @endforeach @foreach($utility_setups as $utility) @php $found = 0 @endphp @endforeach
DateFlat{{ $item->title ?? '' }} ({{ $item->ref_code ?? '' }})
{{ !empty($item->created_at)? date('d/m/Y', strtotime($item->created_at)) : '' }} {{ $item->flat_no ?? '' }}{{ $utility_item->amount }} ---
Total={{ array_sum($total[$utility->ref_code]) ?? '0' }}
@endsection