Working Hour Allocation Data List Working Hour Allocation Data
@if (is_null($whas) || empty($whas))

Currently No Information Available!

@else {{-- --}}
Back @can('QC-CURD') @endcan Old Data
{{-- whas Table goes here --}} @php $sl=0 @endphp {{-- @dd($whas); --}} @foreach ($whas as $key => $whas) @endforeach
Sl# Date Floor Line Section Buyer Style Item Hours Actions
{{ ++$sl }} {{ \Carbon\Carbon::parse($whas->date)->format('d-M-Y') }} {{ $whas->line }} {{ $whas->section }} {{ $whas->buyer }} {{ $whas->style }} {{ $whas->item }} @php $hpd_timeEntry = DB::table('working_hour_allocations') ->where('date', now()->format('Y-m-d')) ->where('floor', $whas->floor) ->where('buyer', $whas->buyer) ->where('style', $whas->style) ->where('item', $whas->item) ->where('line', $whas->line) ->distinct('start_time', 'end_time') ->get(); // dd($hpd_timeEntry->count()); // dd($hpd_timeEntry); @endphp @if ($hpd_timeEntry->count() > 0) @foreach ($hpd_timeEntry as $timeEntry) {{-- @dd($timeEntry); --}} @if ($timeEntry->Total_Alter == null)
@csrf
@else {{ $timeEntry->start_time }},   @endif @endforeach @endif
@php // Query to get the latest entry for the given conditions $hpd_timeEntry = DB::table('working_hour_allocations') ->where('date', now()->format('Y-m-d')) ->where('floor', $whas->floor) ->where('buyer', $whas->buyer) ->where('style', $whas->style) ->where('item', $whas->item) ->where('line', $whas->line) ->latest('id') ->first(); // Use first() to get the single latest record @endphp @if ($hpd_timeEntry) @if ($hpd_timeEntry->Total_Alter === null) @else
@csrf
@endif @endif @can('QC-EDIT')
@csrf @method('DELETE')
@endcan
@endif {{-- --}}