@extends('layouts.app')
@php $user = auth()->user(); @endphp
@section('content')
| Serviciu |
Ultimul Index |
Ultima Inregistrare |
Consum |
Noul Index |
@foreach($services as $service)
@php
$last_index =\App\Models\Utility::where('branch_id',$user->branch_id)->where('status',1)->where('service_id',$service->id)->first();
$created_at = NULL;
$consum=0;
@endphp
| {{$service->name}} |
@if($last_index)
@php $created_at=\Carbon\Carbon::parse($last_index->created_at)->format('Y-m-d'); $consum=$last_index->consum; @endphp
{{$last_index->index}} |
{{\Carbon\Carbon::parse($last_index->created_at)->format('d-m-Y')}} |
@else
0 |
Lipsa de index |
@endif
{{$consum}} |
@csrf
@if($created_at !== date('Y-m-d'))
@else
@endif
|
@endforeach
@if($user->myRole)
@endif
@endsection
@push('scripts')
@endpush