@extends('layouts/microfin_layout') @section('title', '| Opening Loan Information List') @section('content') @php $branchSelected = isset($_GET['filBranch']) ? $_GET['filBranch'] : $userBranchId; @endphp

SAVINGS INFORMATION LIST

@if($userBranchId == 1) {!! Form::open(array('url' => 'mfn/branchOpeningSavingsInformation', 'role' => 'form', 'class'=>'form-horizontal form-groups', 'id' => 'filterFormId', 'method'=>'get')) !!}
{!! Form::label('', 'Branch:', ['class' => 'control-label pull-left']) !!}
{!! Form::select('filBranch', [''=>'--Select--']+$branchList, $branchSelected ,['id'=>'filBranch','class'=>'form-control input-sm','autocomplete'=>'off']) !!}
{!! Form::label('', '', ['class' => 'control-label col-md-12']) !!}
{!! Form::submit('Search', ['id' => 'searchButton', 'class' => 'btn btn-primary btn-xs']); !!}
{!! Form::close() !!} @endif @php $slNo = 0; @endphp @foreach ($branchInfos as $key => $branchId) @php $branchName = DB::table('gnr_branch') ->where('id', '=', $branchId) ->pluck('name') ->toArray(); $branchCode = DB::table('gnr_branch') ->where('id', '=', $branchId) ->pluck('branchCode') ->toArray(); $productInfos = DB::table('mfn_opening_info_savings') ->where('branchIdFk', $branchId) ->groupBy('productIdFk') ->pluck('productIdFk') ->toArray(); @endphp @foreach ($productInfos as $productId) @php $productName = DB::table('mfn_loans_product') ->where('id', $productId) ->pluck('name') ->toArray(); $savingsProduct = DB::table('mfn_opening_info_savings') ->where([['branchIdFk', $branchId], ['productIdFk', $productId]]) ->groupBy('savingProductIdFk') ->pluck('savingProductIdFk') ->toArray(); $countLoanProduct = 0; @endphp @foreach ($savingsProduct as $savingsProductId) @php $savingsProductName = DB::table('mfn_saving_product') ->where('id', $savingsProductId) // ->groupBy('name') ->pluck('name') ->toArray(); @endphp @if ($countLoanProduct == 0) @php $infoId = $branchId.'-'.$productId.'-'.$savingsProductId.'-1'; @endphp @php $infoId = $branchId.'-'.$productId.'-'.$savingsProductId.'-2'; @endphp @php ++$countLoanProduct; @endphp @endif @if ($countLoanProduct > 1) @php $infoId = $branchId.'-'.$productId.'-'.$savingsProductId.'-1'; @endphp @php $infoId = $branchId.'-'.$productId.'-'.$savingsProductId.'-2'; @endphp @endif @php ++$countLoanProduct; @endphp @endforeach @endforeach @endforeach {{-- @foreach ($openingData as $key => $opData) @endforeach --}}
SL# Loan Product Savings Product Gender Action
Branch Name & Code : {{$branchName[0]}} - {{ str_pad($branchCode[0],3,0,STR_PAD_LEFT) }}
{{++$slNo}} {{$productName[0]}} {{$savingsProductName[0]}} Male    
Female    
{{$savingsProductName[0]}} Male    
Female    
{{ $key+1 }} {{ $loanProducts->where('id',$opData->productIdFk)->first()->name }} {{ $genderList[$opData->genderTypeId] }}    
{{-- Delete Modal --}} {{-- End Delete Modal --}} @endsection