Print
Back
{{-- প্রতিটি ফান্ড টাইপ আলাদা সেকশন --}} @foreach ($pages as $i => $ctx) @include('dashboard.funds.partials.audit-single', $ctx) @if ($i < count($pages) - 1)
@endif @endforeach {{-- ===== Summary Page (LAST PAGE) ===== --}}
@php // ===== Helpers সেফলি ডিফাইন ===== if (!function_exists('engToBanglaDate')) { function engToBanglaDate($date) { $months = [ 'January' => 'জানুয়ারি', 'February' => 'ফেব্রুয়ারি', 'March' => 'মার্চ', 'April' => 'এপ্রিল', 'May' => 'মে', 'June' => 'জুন', 'July' => 'জুলাই', 'August' => 'আগস্ট', 'September' => 'সেপ্টেম্বর', 'October' => 'অক্টোবর', 'November' => 'নভেম্বর', 'December' => 'ডিসেম্বর', ]; $eng = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']; $bng = ['০', '১', '২', '৩', '৪', '৫', '৬', '৭', '৮', '৯']; $c = \Carbon\Carbon::parse($date); $m = $months[$c->format('F')] ?? $c->format('F'); $d = str_replace($eng, $bng, $c->format('j')); $y = str_replace($eng, $bng, $c->format('Y')); return "{$d} {$m} {$y}"; } } if (!function_exists('engToBangla')) { function engToBangla($number) { $number = round($number, 2); $parts = explode('.', sprintf('%.2f', $number)); $int = $parts[0]; $dec = $parts[1]; $last3 = substr($int, -3); $rest = substr($int, 0, -3); $fmt = $rest ? preg_replace('/\B(?=(\d{2})+(?!\d))/', ',', $rest) . ',' . $last3 : $last3; $fmt = $fmt . '.' . $dec; return str_replace( ['0', '1', '2', '3', '4', '5', '৬', '7', '8', '9'], ['০', '১', '২', '৩', '৪', '৫', '৬', '৭', '৮', '৯'], $fmt, ); } } // ===== Totals ===== $sumIncome = collect($summary)->sum('period_income'); $sumExpense = collect($summary)->sum('period_expense'); $sumPrevious = collect($summary)->sum('previous_balance'); $sumCurrents = collect($summary)->sum('current_balance'); $incomeWithPreviousBalance = collect($summary)->sum('incomeWithPreviousBalance'); $expenseWithCurrentBalance = collect($summary)->sum('expenseWithCurrentBalance'); // চারটা তহবিল আলাদা করে নাও $generalRow = collect($summary)->firstWhere('label', 'General') ?? [ 'period_income' => 0, 'period_expense' => 0, ]; $gurabaRow = collect($summary)->firstWhere('label', 'Guraba') ?? ['period_income' => 0, 'period_expense' => 0]; $mahfilRow = collect($summary)->firstWhere('label', 'Mahfil') ?? ['period_income' => 0, 'period_expense' => 0]; $otherRow = collect($summary)->firstWhere('label', 'Other') ?? ['period_income' => 0, 'period_expense' => 0]; @endphp
প্রাপ্তি ও প্রদান হিসাব (সকল তহবিল)
{{ engToBanglaDate($start_date) }} ইং হতে {{ engToBanglaDate($end_date) }} ইং পর্যন্ত।
প্রাপ্তি
টাকা
পরিশোধ
টাকা
{{-- LEFT: Receipts --}}
প্রাপ্ত তথ্যের উৎস
পুর্বের টাকা
{{ engToBangla($sumPrevious) }}
প্রাপ্তির বিবরণ
{{ engToBangla($sumIncome) }}
সাধারণ তহবিল
গোরাবা তহবিল
মাহফিল তহবিল
অন্যান্য তহবিল
{{ engToBangla($generalRow['period_income'] ?? 0) }}
{{ engToBangla($gurabaRow['period_income'] ?? 0) }}
{{ engToBangla($mahfilRow['period_income'] ?? 0) }}
{{ engToBangla($otherRow['period_income'] ?? 0) }}
{{-- RIGHT: Payments --}}
প্রদানের বিবরণ
{{ engToBangla($sumExpense) }}
সাধারণ তহবিল
গোরাবা তহবিল
মাহফিল তহবিল
অন্যান্য তহবিল
{{ engToBangla($generalRow['period_expense'] ?? 0) }}
{{ engToBangla($gurabaRow['period_expense'] ?? 0) }}
{{ engToBangla($mahfilRow['period_expense'] ?? 0) }}
{{ engToBangla($otherRow['period_expense'] ?? 0) }}
নগদ তহবিল
{{ engToBangla($sumCurrents) }}
{{-- নিচের দুইটা মোটা বার --}}
{{ engToBangla($incomeWithPreviousBalance) }}
{{ engToBangla($expenseWithCurrentBalance) }}