@extends('layouts/acc_layout') @section('title', '| Advance register Report') @section('content') @include('successMsg') @php $projectSelected = isset($_GET['searchproject']) ? $_GET['searchproject'] : null; $projectTypeSelected = isset($_GET['searchProjectType']) ? $_GET['searchProjectType'] : null; // var_dump($searchProjectType); @endphp
{!! Form::open(['url' => 'advanceRegister','method' => 'get']) !!}
{!! Form::label('', 'Project:', ['class' => 'control-label pull-left']) !!}
{!! Form::label('', 'Project Type:', ['class' => 'control-label pull-left']) !!}
{!! Form::label('', 'Advance Type:', ['class' => 'control-label pull-left']) !!}
{!! Form::label('', 'Category:', ['class' => 'control-label pull-left']) !!}
@php $searchcategoryList = array(''=>'All','1'=>'House Owner','2'=>'Supplier','3'=>'Employeer'); @endphp
{!! Form::select('searchcategory',$searchcategoryList,$categorySelected,['id'=>'searchcategory','class'=>'form-control input-sm']) !!}
{!! Form::label('', 'Search By:', ['class' => 'control-label pull-left']) !!}
{!! Form::select('searchMethod',[''=>'Please Select','1'=>'Fiscal Year','2'=>'Current Year','3'=>'Date Range'],$searchMethodSelected,['id'=>'searchMethod','class'=>'form-control input-sm']) !!}
{!! Form::submit('Search',['id'=>'search','class'=>'btn btn-primary btn-xs','style'=>'font-size:15px;']) !!}
{!! Form::close() !!}
{{--End Filtering Group --}}

Advance Register Report

@if(!$firstRequest )

@php $totalAmount= 0; @endphp @foreach ($registerType as $reg) @php $subtotal= 0; $index=1; @endphp @foreach($accAdvRegister as $accAdvReg) @php $project= DB::table('gnr_project')->where('id',$accAdvReg->projectId)->value('name'); $projectType= DB::table('gnr_project_type')->where('id',$accAdvReg->projectTypeId)->value('name'); $result=''; if($accAdvReg->houseOwnerId){ $houseOwner= DB::table('gnr_house_Owner')->where('id',$accAdvReg->houseOwnerId)->value('houseOwnerName'); $result=$houseOwner; } elseif($accAdvReg->supplierId){ $supplir=DB::table('gnr_supplier')->where('id',$accAdvReg->supplierId)->value('name'); $result =$supplir; } elseif($accAdvReg->employeeId){ $employee = DB::table('hr_emp_general_info')->where('id',$accAdvReg->employeeId)->value('emp_name_english'); $result =$employee; } @endphp @if($reg->id==$accAdvReg->advRegType) @php $subtotal=$subtotal+$accAdvReg->amount; @endphp @endif @endforeach @php $totalAmount=$totalAmount+$subtotal; @endphp @endforeach
SL# Date Name Project Name Amount (Tk)
{{$reg->name}}:
{{$index++}} {{date('d-m-Y',strtotime($accAdvReg->advPaymentDate))}} {{$result}} {{$project}} {{number_format($accAdvReg->amount,2)}}
Sub Total {{number_format($subtotal,2)}}
Total {{number_format($totalAmount,2)}}
@endif