{{-- div for Company --}} @php $company = DB::table('gnr_company')->where('id', Auth::user()->company_id_fk)->select('name','address')->first(); @endphp {{$company->name}}
{{$company->address}}
Samity Wise Pass Book Balancing Register Report
Branch Name & Code : {{$branchInfo->name}}({{$branchInfo->branchCode}})
Area Name : {{$areaInfo}}
Creadit Officer : {{$creditOfficerName}}
Quarter
: {{$querter}}
Quarter Date
: @if ($requestedQuerter == '1-3') January-01 to March-31 @elseif ($requestedQuerter == '4-6') April-01 to June-30 @elseif ($requestedQuerter == '7-9') July-01 to September-30 @elseif ($requestedQuerter == '10-12') October-01 to December-31 @endif {{-- {{$RequestedQuerter}} --}}
Print Date
: 2026-07-21
@foreach ($savingsProducts as $key => $SavingsProduct1) @endforeach @foreach ($savingsProducts as $key => $SavingsProduct1) @endforeach @php // Initialize totals array $totals = [ 'totalDisbursement' => 0, 'totalOutstanding' => 0, 'totalDue' => 0, 'savingsByProduct' => [], 'passbookOutstanding' => 0, 'passbookDue' => 0, 'passbookSavings' => [] ]; // Initialize savings products totals with 0 if(isset($samityReports[0]['summary']['savingsByProduct'])) { foreach($samityReports[0]['summary']['savingsByProduct'] as $productId => $value) { $totals['savingsByProduct'][$productId] = 0; } } // Initialize passbook savings totals with 0 if(isset($samityReports[0]['summary']['passbook']['savingsByProduct'])) { foreach($samityReports[0]['summary']['passbook']['savingsByProduct'] as $productId => $value) { $totals['passbookSavings'][$productId] = 0; } } @endphp @foreach ($samityReports as $samityData) @php $samity = $samityData['summary']; $samitySavings = $samity['savingsByProduct']; $passBook = $samity['passbook']; $passsBookSavings = $passBook['savingsByProduct']; $differences = $samity['differences']; $differencesSavings = $differences['savingsByProduct']; // Accumulate totals $totals['totalDisbursement'] += $samity['totalDisbursement']; $totals['totalOutstanding'] += $samity['totalOutstanding']; $totals['totalDue'] += $samity['totalDue']; $totals['passbookOutstanding'] += $passBook['outstanding']; $totals['passbookDue'] += $passBook['due']; foreach($samitySavings as $productId => $value) { $totals['savingsByProduct'][$productId] += $value; } foreach($passsBookSavings as $productId => $value) { $totals['passbookSavings'][$productId] += $value; } @endphp @foreach ($samitySavings as $item) @endforeach {{-- passbook data --}} @foreach ($passsBookSavings as $key => $item) @endforeach @endforeach @foreach ($totals['savingsByProduct'] as $item) @endforeach @foreach ($totals['passbookSavings'] as $item) @endforeach
SL. No.
Samity Id
Samity Name
Loan Amount
Collection Sheet Balance
Pass Book Balance
Loan
Savings
Loan
Savings
Outstanding
Due
{{$SavingsProduct1->name}}
Outstanding
Due
{{$SavingsProduct1->name}}
{{$loop->iteration}} {{$samityData['samityCode']}} {{$samityData['samityInfo']}} {{number_format($samity['totalDisbursement'], 2)}} {{number_format($samity['totalOutstanding'], 2)}} {{number_format($samity['totalDue'], 2)}}{{number_format($item, 2)}} {{number_format($passBook['outstanding'], 2)}} @if($differences['outstanding'] != 0)
({{number_format($differences['outstanding'], 2)}}) @endif
{{number_format($passBook['due'], 2)}} @if($differences['due'] != 0)
({{number_format($differences['due'], 2)}}) @endif
{{number_format($item, 2)}} @if($differencesSavings[$key] != 0)
({{number_format($differencesSavings[$key], 2)}}) @endif
Total {{number_format($totals['totalDisbursement'], 2)}} {{number_format($totals['totalOutstanding'], 2)}} {{number_format($totals['totalDue'], 2)}}{{number_format($item, 2)}}{{number_format($totals['passbookOutstanding'], 2)}} {{number_format($totals['passbookDue'], 2)}}{{number_format($item, 2)}}