{{-- 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}}
Savings Collection Register
Branch Name & Code : @if($branches == '' || $branches == Null) @foreach ($BranchDatas as $BranchInfo) @if($BranchInfo->id == $userBranchId) {{$BranchInfo->name}}({{ str_pad($BranchInfo->branchCode, 3, '0', STR_PAD_LEFT) }}) @endif @endforeach @elseif ($branches == 'All') {{$branches}} @elseif ($branches != 'All') @foreach ($BranchDatas as $BranchInfo) @if($BranchInfo->id == $branches) {{$BranchInfo->name}}({{ str_pad($BranchInfo->branchCode, 3, '0', STR_PAD_LEFT) }}) @endif @endforeach @endif
Product Category : @if ($productCategory == 'All') {{ $productCategory }} @elseif ($productCategory > 0) @foreach ($ProductsCategories as $CategoryInfo) @if($CategoryInfo->id == $productCategory) {{$CategoryInfo->name}} @endif @endforeach @endif
Primary Product : @if ($product == 'All') {{ 'All' }} @elseif ($product == 'AllSELECTED') {{ 'All' }} @elseif ($product > 0) @foreach ($ProductDatas as $key => $ProductInfo) @if($ProductInfo->id == $product) {{$ProductInfo->shortName}}({{ str_pad($ProductInfo->code, 3, '0', STR_PAD_LEFT) }}) @endif @endforeach @endif
Savings Product
: @if ($savingsProduct == 'All') {{ 'All' }} @elseif ($savingsProduct > 0) @foreach ($SavingsProducts as $SavingsProduct) @if($SavingsProduct->id == $savingsProduct) {{$SavingsProduct->name}} @endif @endforeach @endif
Reporting Date
: {{ date('d-m-Y', strtotime($dateFrom)) }} to {{ date('d-m-Y', strtotime($dateTo)) }}
Print Date
: {{ date('d-m-Y') }}

{{-- table header start --}} {{-- table header end --}} @php $serialNo = 0; $totalOpeningBalance = 0; $transferredMembers = $allDeposits // transferred member count ->where('isTransferred', 1) ->unique('memberIdFk') ->count(); $transferredDeposits = $allDeposits // transferred amount sum ->where('isTransferred', 1) ->sum('amount'); @endphp @if (sizeof($allDeposits)>0) {{-- loop for filtered deposits --}} @foreach ($allDeposits as $depositInfo) @php $serialNo = $serialNo + 1; $openingBalance = $allDepositsFromBeginning // collection of all deposit ->where('accountIdFk', $depositInfo->accountIdFk) ->where('depositDate', '<', $depositInfo->depositDate) ->sum('amount') + $accountOpeningBalance //account opening balance ->where('savingsAccIdFk', $depositInfo->accountIdFk) ->sum('openingBalance') - $savingsWithdraw // withdraw amount ->where('accountIdFk', $depositInfo->accountIdFk) ->where('withdrawDate', '<', $depositInfo->depositDate) ->sum('amount'); $totalOpeningBalance += $openingBalance; // total opening balance collection @endphp {{-- view with loop --}} @endforeach {{-- foreach loop closed --}} {{-- row for total result --}} @else {{-- row for no data --}} @endif
SL. No.
Deposit Date
Member
Samity
Savings Code
Opening Balance
Deposit Amount
Current Savings Balance
Signature Of Member
Signature Of Field Office
Name
Code
Name
Code
{{ $serialNo }} {{ date('d-m-Y', strtotime($depositInfo->depositDate)) }} {{ $memberInfos->where('id', $depositInfo->memberIdFk)->first()->name }} {{ $memberInfos->where('id', $depositInfo->memberIdFk)->first()->code }} {{ $samityInfos->where('id', $depositInfo->samityIdFk)->first()->name }} {{ $samityInfos->where('id', $depositInfo->samityIdFk)->first()->code }} {{ $savingsAccounts->where('id', $depositInfo->accountIdFk)->first()->savingsCode }} {{ $openingBalance }} {{ $depositInfo->amount }} {{ $openingBalance + $depositInfo->amount }}
Total {{ number_format($totalOpeningBalance, 2) }} {{ number_format($allDeposits->sum('amount'), 2) }} {{ number_format($totalOpeningBalance + $allDeposits->sum('amount'), 2) }}
NO DATA FOUND !


{{-- div for transferred record --}}
S/N
Members / Amount
Transfered
1 Total Members {{ $transferredMembers }}
2 Total Amount {{ number_format($transferredDeposits, 2) }}
Prepared By :
Signature :
Designation :
Verified By :
Signature :
Designation :
Approved By :
Signature :
Designation :