@extends('admin/layouts/default') @section('title') Cafe & Store Reports @parent @stop @section('header_styles') @stop @section('content')

View Store Reports

Debre Markos University Cafe Management System

{!! Form::open(['url' => session::get('role_name').'/report', 'class' => 'form-inline']) !!}
{!! Form::close() !!}

Material Stored In Store

@foreach (DB::table('materials')->get() as $m) @endforeach
ID Date Material Name Amount
{{ $m->id }} {{ $m->date }} {{ $m->materialname }} {{ $m->amount }}

Total Material Used

@foreach (DB::table('regtodays')->groupBy('materialname')->get() as $u) @endforeach
ID Date Material Name Amount Used
{{ $u->id }} {{ $u->date }} {{ $u->materialname }} {{ $u->amount }}

Total Students Used (By Date)

@php $selectedDate = request('report_date'); $query = DB::table('mealcards') ->select( 'date', DB::raw('COUNT(DISTINCT std_id) as total_students') ); if($selectedDate){ $query->where('date', $selectedDate); } $usedReport = $query->groupBy('date') ->orderBy('date','desc') ->get(); @endphp
@forelse($usedReport as $key => $row) @empty @endforelse
# Date Total Students Used
{{ $key + 1 }} {{ $row->date }} {{ $row->total_students }}
No data found

Active Cafe Student Lists

@php $cafeCount = DB::table('students')->where('std_status', '0')->count(); @endphp
Total Active Cafe Students: {{ $cafeCount }}
@foreach (DB::table('students')->where('std_status', '0')->get() as $std) @endforeach
ID Student Name Sex Status Action
{{ $std->id }} {{ $std->firstname }} {{ $std->lastname }} {{ $std->sex }} In Cafe

Non-Cafe Students Lists

@php $nonCount = DB::table('students')->where('std_status', '1')->count(); @endphp
Total Non-Cafe Students: {{ $nonCount }}
@foreach (DB::table('students')->where('std_status', '1')->get() as $std) @endforeach
Student ID Student Name Sex Cafe Status Action
{{ $std->id }} {{ $std->firstname }} {{ $std->lastname }} {{ $std->sex }} Non-Cafe
@stop @section('footer_scripts') @stop