@extends('layouts/microfin_layout') @section('title', '| Opening Interest') @section('content')
Add Opening Interest
{!! Form::open(array('url' => '', 'role' => 'form', 'class' => 'form-horizontal form-groups')) !!} {!! Form::hidden('memberId',null,['id'=>'memberId']) !!} @if(Auth::user()->branchId==1)
{!! Form::label('branch_id', 'Branch:', ['class' => 'col-md-3 control-label required']) !!}
{!! Form::select('branch_id', $branchList,null, ['id'=>'branch_id', 'class'=>'form-control', 'required' => 'required']) !!}
@endif
{!! Form::label('member', 'Member:', ['class' => 'col-md-3 control-label required']) !!}
{!! Form::text('member',null, ['id'=>'member', 'class'=>'form-control', 'required' => 'required', 'autocomplete' => 'off']) !!}
{!! Form::label('accountId', 'Savings Code:', ['class' => 'col-md-3 control-label required']) !!}
{!! Form::select('accountId',[''=>'Select'], null, ['id'=>'accountId', 'class'=>'form-control', 'required' => 'required', 'autocomplete' => 'off']) !!}
{!! Form::label('generate_date', 'Generate Date:', ['class' => 'col-md-3 control-label required']) !!}
{!! Form::text('generate_date',null,['id'=>'generate_date','class'=>'form-control','readonly', 'placeholder' => 'Generate Date', 'required' => 'required']) !!}
{!! Form::label('interestAmount', 'Interest Amount:', ['class' => 'col-md-3 control-label required']) !!}
{!! Form::text('interestAmount',null,['id'=>'interestAmount','class'=>'form-control', 'placeholder' => 'Interest Amount', 'required' => 'required', 'autocomplete' => 'off']) !!}
    {!! Form::submit('Submit', ['id' => 'submit', 'class' => 'btn btn-info']) !!} Close
{!! Form::close() !!}
@php $userBranchId = Auth::user()->branchId; if ($userBranchId==1) { $members = []; } else{ $members = DB::table('mfn_member_information') ->where('softDel',0) ->where('status',1) ->where('branchId',$userBranchId) ->where('admissionDate','<=',$softDate) // ->select('id','name','code','branchId','samityId') ->selectRaw('id, name, case when oldMemberCode = "" then code else concat(code, " [ ", oldMemberCode, " ]") end as code, branchId, samityId') ->get(); } @endphp @endsection