{{-- {{$softwareDate}} --}} {{-- @php exit(); @endphp --}} @extends('layouts/acc_layout') @section('title', '| Register Report') @section('content')

OTS Balance Report

{{--
kxghixd
--}}
{!! Form::open(['url' => 'viewOtsRegisterBalanceReport','method' => 'get']) !!} {!! Form::hidden('firstRequest',1) !!}
{!! Form::label('', 'Branch Location:', ['class' => 'control-label pull-left']) !!}
{!! Form::label('searchAccNature', 'Account Nature:', ['class' => 'control-label pull-left']) !!}
@php $accNature = array(''=>'All') + DB::table('acc_ots_period')->pluck('name','id')->toArray(); @endphp {!! Form::select('searchAccNature',$accNature,$accNatureSelected,['id'=>'searchAccNature','class'=>'form-control']) !!}
{!! Form::label('searchAccId', 'Account Id:', ['class' => 'control-label pull-left']) !!}
{!! Form::select('searchAccId',$searchAccId,$accIdSelected,['id'=>'searchAccId','class'=>'form-control']) !!}

Warning: Undefined variable $softwareDate in /home/shikkhaplus/public_html/guk_bk/resources/views/accounting/registerReport/ots/otsRegisterBalanceReport.blade.php on line 122

Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /home/shikkhaplus/public_html/guk_bk/resources/views/accounting/registerReport/ots/otsRegisterBalanceReport.blade.php on line 122
{!! Form::label('', ' ', ['class' => 'control-label']) !!}
{{--
{!! Form::text('dateFrom',$dateFromSelected,['id'=>'dateFrom','placeholder'=>'From','class'=>'form-control input-sm','readonly','style'=>'cursor:pointer']) !!}
--}}
{!! Form::text('dateTo',$dateToSelected,['id'=>'dateTo','placeholder'=>'To','class'=>'form-control input-sm','readonly','style'=>'cursor:pointer']) !!}
{!! Form::submit('Search',['id'=>'search','class'=>'btn btn-primary btn-xs','style'=>'font-size:15px;']) !!}
{!! Form::close() !!}
{{-- End Filtering Group --}} @if(!$firstRequest) @php if($branchSelected===0){ $selectedBranchName = "All Branches"; } else{ $selectedBranchName = DB::table('gnr_branch')->where('id',$branchSelected)->value('name'); } $selectedProjectName = DB::table('gnr_project')->where('id',$projectSelected)->value('name'); @endphp

@php //$gTinterestPrevious = 0; $gTinterestCurrent = 0; //$gTinterestTotal = 0; //$gTpaymentPrevious = 0; $gTpaymentCurrent = 0; //$gTpaymentTotal = 0; $gTecashmentPrincipal = 0; $gTecashmentInterest = 0; $gTsavings = 0; $gTdueInterest = 0; $gTtotal = 0; @endphp @foreach($accounts as $key => $account) @php $memberName = DB::table('acc_ots_member')->where('id',$account->memberId_fk)->value('name'); $branchName = DB::table('gnr_branch')->where('id',$account->branchId_fk)->value('name'); $paymentNatureName = DB::table('acc_ots_period')->where('id',$account->periodId_fk)->value('name'); $memberName = DB::table('acc_ots_member')->where('id',$account->memberId_fk)->value('name'); $lastPaidInterestRate = DB::table('acc_ots_payment_details')->where('accId_fk',$account->id)->orderBy('id','desc')->value('interestRate'); if ($lastPaidInterestRate==null) { $lastPaidInterestRate = DB::table('acc_ots_period')->where('id',$account->periodId_fk)->value('interestRate'); } /* $interestPrevious = DB::table('acc_ots_interest_details')->where('accId_fk',$account->id)->where('generateDate','<',$startDate)->sum('amount') + (float) DB::table('acc_ots_account')->where('id',$account->id)->where('openingBalanceDate','<',$startDate)->value('openingBalance');*/ /*$interestTotal = $interestPrevious + $interestCurrent;*/ /*$paymentPrevious = DB::table('acc_ots_payment_details')->where('accId_fk',$account->id)->where('paymentDate','<',$startDate)->sum('amount');*/ if ($account->closingDate==$endDate) { $interestCurrent = 0; $paymentCurrent = 0; $encashmentDate = date('Y-m-d', strtotime($account->closingDate)); $encashmentPrincipal = $account->amount; $encashmentInterest = DB::table('acc_ots_interest_details')->where('accId_fk',$account->id)->where('generateDate','>=',$startDate)->where('generateDate','<=',$endDate)->sum('amount') + (float) DB::table('acc_ots_account')->where('id',$account->id)->where('openingBalanceDate','>=',$startDate)->where('openingBalanceDate','<=',$endDate)->value('openingBalance'); $closingPricipal = 0; $closingInterest = 0; $closingTotal = 0; } else{ $interestCurrent = DB::table('acc_ots_interest_details')->where('accId_fk',$account->id)->where('generateDate','>=',$startDate)->where('generateDate','<=',$endDate)->sum('amount') + (float) DB::table('acc_ots_account')->where('id',$account->id)->where('openingBalanceDate','>=',$startDate)->where('openingBalanceDate','<=',$endDate)->value('openingBalance'); $paymentCurrent = DB::table('acc_ots_payment_details')->where('accId_fk',$account->id)->where('paymentDate','>=',$startDate)->where('paymentDate','<=',$endDate)->sum('amount'); $encashmentDate = '-'; $encashmentPrincipal = 0; $encashmentInterest = 0; $closingPricipal = $account->amount; $closingInterest = $interestCurrent - $paymentCurrent; $closingTotal = $account->amount + $interestCurrent - $paymentCurrent; } /*$paymentTotal = $paymentPrevious + $paymentCurrent;*/ /*$dueInterest = $interestTotal - $paymentTotal;*/ /*$dueInterest = $interestCurrent - $paymentCurrent; $total = $account->amount + $dueInterest;*/ @endphp @php /*$gTinterestPrevious = $gTinterestPrevious + $interestPrevious;*/ $gTinterestCurrent = $gTinterestCurrent + $interestCurrent; /*$gTinterestTotal = $gTinterestTotal + $interestTotal;*/ /*$gTpaymentPrevious = $gTpaymentPrevious + $paymentPrevious;*/ $gTpaymentCurrent = $gTpaymentCurrent + $paymentCurrent; /*$gTpaymentTotal = $gTpaymentTotal + $paymentTotal;*/ $gTecashmentPrincipal = $gTecashmentPrincipal + $encashmentPrincipal; $gTecashmentInterest = $gTecashmentInterest + $encashmentInterest; $gTsavings = $gTsavings + $closingPricipal; $gTdueInterest = $gTdueInterest + $closingInterest; $gTtotal = $gTtotal + $closingTotal; @endphp @endforeach {{-- --}} {{-- --}} {{-- --}} {{-- --}}
SL# Opening Date Account Name Account Number Branch Payment Nature Interest Rate (%) Principal Amount (Tk) Interest Gen.
Amount (Tk)
Interest Payment
Amount (Tk)
OTS Encashment Closing Balance (Pri. + Int.)
Date Principal Interest Principal Interest Total
{{$key+1}} {{date('d-m-Y',strtotime($account->openingDate))}} {{$memberName}} {{$account->accNo}} {{$branchName}} {{$paymentNatureName}} {{number_format($lastPaidInterestRate,2)}} {{number_format($account->amount,2,'.',',')}} {{number_format($interestCurrent,2,'.',',')}} {{number_format($paymentCurrent,2,'.',',')}} {{$encashmentDate}} {{number_format($encashmentPrincipal,2,'.',',')}} {{number_format($encashmentInterest,2,'.',',')}} {{number_format($closingPricipal,2,'.',',')}} {{number_format($closingInterest,2,'.',',')}} {{number_format($closingTotal,2,'.',',')}}
Total {{number_format($gTsavings,2,'.',',')}}{{number_format($gTinterestPrevious,2,'.',',')}}{{number_format($gTinterestCurrent,2,'.',',')}}{{number_format($gTinterestTotal,2,'.',',')}}{{number_format($gTpaymentPrevious,2,'.',',')}}{{number_format($gTpaymentCurrent,2,'.',',')}}{{number_format($gTpaymentTotal,2,'.',',')}} {{number_format($gTecashmentPrincipal,2,'.',',')}} {{number_format($gTecashmentInterest,2,'.',',')}} {{number_format($gTsavings,2,'.',',')}} {{number_format($gTdueInterest,2,'.',',')}} {{number_format($gTtotal,2,'.',',')}}
@endif
{{-- Filtering --}}