@extends('layouts.master') @section('css') @include('transport_reports._style') @endsection @section('title') سجل صيانة الشاحنات @stop @section('page-header') @endsection @section('content') @php $lp = Mcamara\LaravelLocalization\Facades\LaravelLocalization::getCurrentLocale(); $m = function ($v) { return number_format((float) $v, 2); }; $fmt = function ($d) { return $d ? $d->format('Y/m/d h:i A') : '—'; }; @endphp @if (session('trip_ok'))
{{ session('trip_ok') }}
@endif @if ($errors->any())
@foreach ($errors->all() as $e)
{{ $e }}
@endforeach
@endif

{{ defined('Namear') ? Namear : '' }}

سجل صيانة الشاحنات {{ $status === 'open' ? '(في الصيانة حالياً)' : 'من ' . $from . ' إلى ' . $to }}
في الصيانة دلوقتي{{ $openCount }}
عدد مرات الصيانة{{ $rows->count() }}
إجمالي تكلفة الصيانة{{ $m($total) }} ر.س
@forelse ($rows as $r) @empty @endforelse @if ($rows->count())@endif
الشاحنةالسببالورشةالعدادالدخولالخروجالمدةالتكلفةالحالةسجلها
{{ optional($r->truck)->plate_number }} {{ $r->reason }}@if ($r->notes)
{{ $r->notes }}
@endif @if ($r->end_notes)
{{ $r->end_notes }}
@endif
{{ $r->workshop ?: '—' }} {{ $r->odometer ?: '—' }} {{ $fmt($r->started_at) }} @if ($r->ended_at) {{ $fmt($r->ended_at) }} @elseif ($r->expected_end_at) متوقع: {{ $fmt($r->expected_end_at) }} @else — @endif {{ $r->days }} يوم {{ $r->ended_at ? $m($r->cost) : '—' }} @if ($r->truck_expense_id)
{{ optional($r->expense)->posted ? 'مترحّل' : 'مصروف بدون ترحيل' }}
@endif
@if (!$r->ended_at) {{ $r->is_overdue ? 'متأخرة في الورشة' : 'في الصيانة' }} @else خرجت @endif {{ optional($r->user)->name }}@if ($r->endedBy)
خروج: {{ $r->endedBy->name }}@endif
@if (!$r->ended_at)
@csrf
@endif
مفيش صيانة متسجلة في الفترة دي
الإجمالي{{ $m($total) }}
{{-- خروج من الصيانة --}} @endsection @section('js') @endsection