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

SAVINGS ADJUSTMENT LIST

@if($userBranchId == 1) {!! Form::open(array('url' => 'mfn/openingAdjustment/savings', '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-sm']); !!}
{!! Form::close() !!} @endif @php $productInfos = DB::table('mfn_opening_adjustment_savings') ->where('branchIdFk', $branchId) ->groupBy('productIdFk') ->pluck('productIdFk') ->toArray(); @endphp @foreach ($productInfos as $key => $productId) @php $slLoanProduct = 1; $productName = DB::table('mfn_loans_product') ->where('id', $productId) ->value('name'); $savingsProduct = DB::table('mfn_opening_adjustment_savings') ->where([['branchIdFk', $branchId], ['productIdFk', $productId]]) ->groupBy('savingProductIdFk') ->pluck('savingProductIdFk') ->toArray(); @endphp @foreach ($savingsProduct as $savingsProductId) @php $savingsProductName = DB::table('mfn_saving_product') ->where('id', $savingsProductId) ->value('name'); $genders = DB::table('mfn_opening_adjustment_savings') ->where([ ['branchIdFk', $branchId], ['productIdFk', $productId], ['savingProductIdFk', $savingsProductId], ]) ->pluck('genderTypeId') ->toArray(); @endphp @foreach($genders as $key => $gender) @php $opData = DB::table('mfn_opening_adjustment_savings') ->where([ ['branchIdFk', $branchId], ['productIdFk', $productId], ['savingProductIdFk', $savingsProductId], ['genderTypeId', $gender], ]) ->first(); @endphp @if($slLoanProduct == 1) @endif @php $slLoanProduct++; @endphp @endforeach @endforeach @endforeach
SL# Loan Product Savings Product Gender Action
{{ $key+1 }}{{ $productName }}{{ $savingsProductName }} {{ $genderList[$opData->genderTypeId] }}    
{{-- Delete Modal --}} {{-- End Delete Modal --}} @endsection