@extends('layouts/inventory_layout') @section('title', '| Issue Report') @section('content') @include('successMsg')
{!! Form::open(['url' => 'viewIssueReport','method' => 'get']) !!} @php $userBranchId = Auth::user()->branchId; @endphp @if($userBranchId==1)
{!! Form::label('', 'Project:', ['class' => 'control-label pull-left']) !!}
@endif @if($userBranchId==1)
{!! Form::label('', 'Pro. Type:', ['class' => 'control-label pull-left']) !!}
@endif @if($userBranchId==1)
{!! Form::label('', 'Branch:', ['class' => 'control-label pull-left']) !!}
@endif
{!! Form::label('', 'Bill No:', ['class' => 'control-label pull-left']) !!}
{!! 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 --}}

Issue Report

@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'); $selectedProjectTypeName = DB::table('gnr_project_type')->where('id',$projectTypeSelected)->value('name'); @endphp @if(!$firstRequest )

@php $totalIssueAmount = 0; $totalIssueQuantity = 0; @endphp @foreach($issue as $key => $issue) @php $branchName = DB::table('gnr_branch')->where('id',$issue->branchId)->value('name'); @endphp @php $totalIssueAmount = $totalIssueAmount + $issue->totalAmount; $totalIssueQuantity = $totalIssueQuantity + $issue->totalQuantity; @endphp @endforeach
SL# Issue Date Issue Bill No Branch Name Total Quantity Total Amount (Tk)
{{$key+1}} {{date('d-m-Y',strtotime($issue->issueDate))}} {{$issue->issueBillNo}} {{$branchName}} {{$issue->totalQuantity}} {{number_format($issue->totalAmount,2)}}
Total {{$totalIssueQuantity}} {{number_format($totalIssueAmount,2)}}
@endif
{{-- Filtering Mehod --}} {{-- End Filtering Mehod --}} {{-- Filtering --}}