@extends('layouts.app') @section('title', __('Attendance Report')) @section('content')
@include('layouts.leftside-menubar')
@include('components.pages-bar',['pageTitle' =>''. trans('Attendance').' / '. trans('Report By Month').'']) @include('components.sectionbar.attendance')
{!! Form::open(['method' => 'POST']) !!}
{!! Form::label('section', trans('Section'), ['class' => 'control-label']) !!} {!! Form::select('section', $pluckSection , $section?? null , ['class' => 'select2 form-control','required','placeholder'=>'Choose']) !!} @error('section') {{ $message }} @enderror
{!! Form::label('month', trans('Month'), ['class' => 'control-label']) !!} {!! Form::selectMonth('month' , $month??(date('n',strtotime(now()))) , ['class' => 'form-control']) !!} @error('month') {{ $message }} @enderror
{!! Form::label('year', trans('Year'), ['class' => 'control-label']) !!} {!! Form::selectRange('year', date('Y'), 2000 , $year ?? (date('Y',strtotime(now()))) , ['class' => 'form-control']) !!} @error('year') {{ $message }} @enderror
{!! Form::close() !!} @if (isset($attendances) && $attendances->count())
@lang('Print')
@endif
@isset($attendances)
@if(isset($attendances) && $attendances->count())
@foreach($attendances as $key => $attendance) @foreach ($attendance as $field=> $value) @if ($field == 'classname') {{trans(school('country')->code == 'BD' ? 'Class' : 'Grade')}} - {{$value}} @elseif ($field == 'section_number')   @lang('Section') - {{$value}} @endif @if ( $field == 'exam_name')   @lang('Exam') - {{$value}} @endif @php $print = true; @endphp @endforeach @break($loop->first) @endforeach @lang('Attendance Report') {{date("F", strtotime($month)).', '.$year}}
@foreach($attendances as $key => $attendance) @foreach ($attendance as $field=> $value) @if ($field == 'classname' || $field == 'exam_name'|| $field == 'section_number') @elseif($field =='totalP') @elseif($field =='totalA') @elseif($field =='student_code') @elseif($field =='name') @else @endif @endforeach @break($loop->first) @endforeach @foreach($attendances as $key => $attendance) @foreach ($attendance as $field => $value) @if ($field == 'classname' || $field == 'exam_name'|| $field == 'section_number') @elseif($field =='totalP' || $field =='student_code'|| $field =='name' || $field =='totalA') @else @endif @endforeach @endforeach
#@lang('Total')
@lang('Present')
@lang('Total')
@lang('Absent')
@lang('Student Id')@lang('Name')@lang($field)
{{$loop->index +1}}{{$value}} @if ($value == null) @elseif ($value == 0) A @elseif ($value == 1) P @elseif ($value == 2) E @endif {{--{{$value == null ? '' : ($value == 1 ? 'P' : ($value == 0 ? 'A': 'E'))}}--}}
@push('script') @endpush @else @lang('No Related Data Found.') @endif
----------------------
@lang('Class Teacher')
----------------------
@lang('Head Teacher')
@endisset
@endsection