@if ($design && $design->invoice_header) Header Image @endif

Money Receipt

@php $moneyReceipt = $moneyReceipts->first(); $donar = \App\Models\Donar::where('id', $moneyReceipt->donar_id)->first(); @endphp @if ($donar)

Donar: {{ $donar->name ?? '--' }}

{{-- @dd($multiMonthData); --}} @endif

Student: {{ $multiMonthData->student_name ?? '--' }}

@if (!$donar)

Student ID: {{ $multiMonthData->register_no ?? '--' }}

@endif

Class: {{ $multiMonthData->class_name ?? '--' }}

{{-- @dd($multiMonthData); --}}

Date: {{ \Carbon\Carbon::parse($multiMonthData->date)->format('d-m-Y') }}

Month: @if ($moneyReceipts && $moneyReceipts->count() > 0) {{ $moneyReceipts->pluck('month')->map(function ($month) { return \Carbon\Carbon::parse($month)->format('F, Y'); })->implode(', ') }} @endif

Receipt No: {{ $multiMonthData->id ?? '--' }}

@if ($moneyReceipts && $moneyReceipts->count() > 0) @foreach ($moneyReceipts as $receipt) {{ \Carbon\Carbon::parse($receipt->month)->format('F, Y') }} @foreach ($receipt->fundDetailTypes as $fundDetailType) @endforeach
Type Details Amount
@if ($fundDetailType->fee_type == 'academic') একাডেমিক @elseif ($fundDetailType->fee_type == 'hostel') আবাসিক @elseif ($fundDetailType->fee_type == 'other') পরীক্ষা ফি @elseif ($fundDetailType->fee_type == 'onabashik') অনাবাসিক @elseif ($fundDetailType->fee_type == 'special') স্পেশাল ফি @endif @if ($fundDetailType->fundDetails->count()) @foreach ($fundDetailType->fundDetails as $detail) {{ $detail->fee_name ?? '' }}
@endforeach @else @php $fundDetail = \App\Models\FundDetail::where('student_id', $data->student_id) ->where('month', $data->month) ->where('purpose', 'Student Monthly Payment') ->pluck('fee_id') ->toArray(); $typeMap = [ 'academic' => 1, 'hostel' => 2, 'other' => 3, 'onabashik' => 4, 'special' => 5, ]; $typeId = $typeMap[$fundDetailType->fee_type] ?? null; // dd($fundDetail, $fundDetailType->fee_type); @endphp @if ($fundDetail) @foreach ($fundDetail as $key => $detail_id) @php $detail = \App\Models\StudentFee::where('type', $typeId)->find( $detail_id, ); @endphp @if ($detail) {{ $detail->name ?? '' }}
@endif @endforeach @endif @endif
{{ $fundDetailType->receive ?? '' }}
@endforeach @endif
Total: {{ $multiMonthData->total_amount ?? '' }}
Total Received: {{ $multiMonthData->total_receive ?? '' }}
Current Received: {{ $multiMonthData->current_receive ?? '' }}
Total Discount Discount: {{ $multiMonthData->total_discount ?? '' }}
Total Due: {{ $multiMonthData->total_due ?? '' }}
{{--

Total Amount:{{ $totalAmount ?? '' }}

Previous Received:{{ round($totalReceived - $data->amount) ?? '' }}

Current Received:{{ round($data->amount) ?? '' }}

Due:{{ $totalAmount - $totalReceived }}

--}}

________________________
Student's Signature

__________________________
Account's Signature