@if($type == 'Month-wise')
@php $totalBilled = 0; $totalPaid = 0; $totalPending = 0; @endphp @foreach ($data as $item) @php $totalBilled += $item['billed'] ?? $item['total_billed']; $totalPaid += $item['paid'] ?? $item['total_paid']; $totalPending += $item['pending']; @endphp @endforeach
@lang('modules.settings.apartment') @lang('modules.maintenance.amountBilled') ({{ $society->currency->currency_code }}) @lang('modules.maintenance.amountPaid') ({{ $society->currency->currency_code }}) @lang('modules.maintenance.pending') ({{ $society->currency->currency_code }})
{{ $item['apartment'] }} {{ $item['billed'] ?? $item['total_billed'] }} {{ $item['paid'] ?? $item['total_paid'] }} {{ $item['pending'] }}
@lang('app.total') {{ $totalBilled }} {{ $totalPaid }} {{ $totalPending }}
@else
@php $totalJanuary = 0; $totalFebruary = 0; $totalMarch = 0; $totalApril = 0; $totalMay = 0; $totalJune = 0; $totalJuly = 0; $totalAugust = 0; $totalSeptember = 0; $totalOctober = 0; $totalNovember = 0; $totalDecember = 0; $totalBilled = 0; $totalPaid = 0; $totalPending = 0; @endphp @foreach($data as $row) @php $totalJanuary += $row['january']; $totalFebruary += $row['february']; $totalMarch += $row['march']; $totalApril += $row['april']; $totalMay += $row['may']; $totalJune += $row['june']; $totalJuly += $row['july']; $totalAugust += $row['august']; $totalSeptember += $row['september']; $totalOctober += $row['october']; $totalNovember += $row['november']; $totalDecember += $row['december']; $totalBilled += $row['total_billed']; $totalPaid += $row['total_paid']; $totalPending += $row['total_pending']; @endphp @endforeach
@lang('modules.settings.apartment') @lang('modules.rent.jan') ({{ $society->currency->currency_code }}) @lang('modules.rent.feb') ({{ $society->currency->currency_code }}) @lang('modules.rent.mar') ({{ $society->currency->currency_code }}) @lang('modules.rent.apr') ({{ $society->currency->currency_code }}) @lang('modules.rent.may') ({{ $society->currency->currency_code }}) @lang('modules.rent.jun') ({{ $society->currency->currency_code }}) @lang('modules.rent.jul') ({{ $society->currency->currency_code }}) @lang('modules.rent.aug') ({{ $society->currency->currency_code }}) @lang('modules.rent.sep') ({{ $society->currency->currency_code }}) @lang('modules.rent.oct') ({{ $society->currency->currency_code }}) @lang('modules.rent.nov') ({{ $society->currency->currency_code }}) @lang('modules.rent.dec') ({{ $society->currency->currency_code }}) @lang('modules.maintenance.totalBilled') ({{ $society->currency->currency_code }}) @lang('modules.maintenance.totalPaid') ({{ $society->currency->currency_code }}) @lang('modules.maintenance.pending') ({{ $society->currency->currency_code }})
{{ $row['apartment'] }} {{ $row['january'] }} {{ $row['february'] }} {{ $row['march'] }} {{ $row['april'] }} {{ $row['may'] }} {{ $row['june'] }} {{ $row['july'] }} {{ $row['august'] }} {{ $row['september'] }} {{ $row['october'] }} {{ $row['november'] }} {{ $row['december'] }} {{ $row['total_billed'] }} {{ $row['total_paid'] }} {{ $row['total_pending'] }}
@lang('app.total') {{ $totalJanuary }} {{ $totalFebruary }} {{ $totalMarch }} {{ $totalApril }} {{ $totalMay }} {{ $totalJune }} {{ $totalJuly }} {{ $totalAugust }} {{ $totalSeptember }} {{ $totalOctober }} {{ $totalNovember }} {{ $totalDecember }} {{ $totalBilled }} {{ $totalPaid }} {{ $totalPending }}
@endif