@extends('layouts.master') @section('css') @endsection @section('title') تقرير الأحمال @stop @section('page-header') @endsection @section('content') @php $lp = Mcamara\LaravelLocalization\Facades\LaravelLocalization::getCurrentLocale(); $fmt = function ($d) { return $d ? $d->format('Y/m/d h:i A') : '—'; }; $maxRoute = max(1, (int) $routes->max('count')); $maxType = max(1, (int) $types->max('count')); @endphp

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

تقرير الأحمال من {{ $from }} إلى {{ $to }}
{{-- الفلاتر --}}
{{-- الملخص --}}
عدد الأحمال{{ $summary['total'] }}
محمّلة الآن{{ $summary['loaded'] }}
تم التفريغ{{ $summary['done'] }}
متأخرة حالياً{{ $summary['overdue'] }}
اتفرغت متأخر{{ $summary['late'] }}
متوسط مدة الرحلة{{ $summary['avg_hours'] }} ساعة
إجمالي السعر{{ number_format($summary['price'], 2) }} ر.س
شاحنات المؤسسة{{ number_format($summary['price_own'], 2) }} ر.س
إيجار خارجي{{ number_format($summary['price_ext'], 2) }} ر.س
أكثر المسارات
    @forelse ($routes as $r)
  • {{ $r['from'] }} {{ $r['to'] }}{{ $r['count'] }}
  • @empty
  • لا توجد بيانات
  • @endforelse
أنواع التحميل
    @forelse ($types as $r)
  • {{ $r['type'] }}{{ $r['count'] }}
  • @empty
  • لا توجد بيانات
  • @endforelse
{{-- التفاصيل --}}
@forelse ($trips as $tr) @php $late = $tr->status == 2 && $tr->unloaded_at && $tr->expected_unloading_at && $tr->unloaded_at->gt($tr->expected_unloading_at); @endphp @empty @endforelse
التاريخاسم السائقرقم اللوحةايجار خارجي / خاصمنالى رقم الفاتورةمرجعالسعراسم الشركةالمرفق نوع التحميلالتنزيل المتوقعالتنزيل الفعليالحالة
{{ $fmt($tr->loading_at) }} {{ $tr->driver_name ?: '—' }}@if (optional($tr->driver)->phone)
{{ $tr->driver->phone }}@endif
{{ optional($tr->truck)->plate_number }} {{ \App\Models\truck_trip::ownershipLabel($tr->ownership) }} {{ $tr->from_region }}{{ $tr->from_city ? ' - ' . $tr->from_city : '' }} {{ $tr->to_region }}{{ $tr->to_city ? ' - ' . $tr->to_city : '' }} {{ $tr->invoice_number ?: '—' }} {{ $tr->reference_no ?: '—' }} {{ $tr->price > 0 ? number_format($tr->price, 2) : '—' }} {{ $tr->customer_name ?: '—' }} @if ($tr->attachment) الحمولة@endif @if ($tr->unload_attachment)@if ($tr->attachment)
@endif التفريغ@endif @if (!$tr->attachment && !$tr->unload_attachment) — @endif
{{ $tr->load_type }}{{ $tr->load_weight ? ' (' . $tr->load_weight . ')' : '' }} {{ $fmt($tr->expected_unloading_at) }} {{ $fmt($tr->unloaded_at) }} @if ($tr->status == 1) @if ($tr->is_overdue) محمّلة - متأخرة @else محمّلة@endif @elseif ($late) اتفرغت متأخر @else تم التفريغ@endif @if ($tr->status == 1) @endif
لا توجد أحمال في الفترة دي
@include('trucks._unload_quick') @include('trucks._load_quick') @endsection