Month Wise Camp wise Refreshment and IEC Due Statement against Blood Bank

Financial Year: {{ str_replace('-', ' - ', $data['report_financial_year']) }}

@php $first = true; @endphp @if (!empty($data['list']) && count($data['list']) > 0) @foreach ($data['list'] as $bbCode => $bbData)
@php $first = false; @endphp @php $bbRef = 0; $bbIEC = 0; $bbTotal = 0; $bbDonor = 0; $bbCampCount = 0; @endphp @foreach ($bbData['MonthWisedata'] as $month => $records) @php // ✅ RESET SL PER MONTH $sl = 1; $monthRef = 0; $monthIEC = 0; $monthTotal = 0; $monthDonor = 0; $campCount = count($records); $bbCampCount += $campCount; @endphp @foreach ($records as $value) @php $monthRef += $value->refreshment_charge ?? 0; $monthIEC += $value->iec_grant_paid ?? 0; $monthTotal += $value->total_amount ?? 0; $monthDonor += $value->donor_count ?? 0; $bbRef += $value->refreshment_charge ?? 0; $bbIEC += $value->iec_grant_paid ?? 0; $bbTotal += $value->total_amount ?? 0; $bbDonor += $value->donor_count ?? 0; @endphp @endforeach @endforeach
Sl Camp Date Organisation Name BB NOD Ref Amt IEC Amt Tot Ref & IEC Amt Ref Status IEC Status
Blood Bank Name:     {{ $bbData['BloodbankName'] ?? '' }}
{{ $sl++ }} {{ $value->camp_date ? date('d-m-Y', strtotime($value->camp_date)) : '' }} {{ $value->org_name }} {{ $value->blood_bank_code ?? '' }} {{ $value->donor_count ?? 0 }} {{ number_format($value->refreshment_charge ?? 0, 2) }} {{ number_format($value->iec_grant_paid ?? 0, 2) }} {{ number_format($value->total_amount ?? 0, 2) }} {{ strtoupper($value->ref_status ?? '') }} {{ strtoupper($value->iec_status ?? '') }}
Total in {{ $month }} {{ $monthDonor }} {{ number_format($monthRef, 2) }} {{ number_format($monthIEC, 2) }} {{ number_format($monthTotal, 2) }} Camp No: {{ $campCount }}
Total Due During the Period against BB     {{ $bbCode }} {{ $bbDonor }} {{ number_format($bbRef, 2) }} {{ number_format($bbIEC, 2) }} {{ number_format($bbTotal, 2) }} Camp No: {{ $bbCampCount }}
@endforeach @else
No Record Found.
@endif