@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); }; $maxT = max(1, (float) $byTruck->max('total')); @endphp @if (session('trip_ok'))
{{ session('trip_ok') }}
@endif @if ($errors->any())
@foreach ($errors->all() as $e)
{{ $e }}
@endforeach
@endif @include('transport_reports._tabs')

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

مصروفات الشاحنات من {{ $from }} إلى {{ $to }}
{{-- تسجيل مصروف --}}
تسجيل مصروف على شاحنة
@csrf
لو اخترت «مدفوع من»: القيد بيترحّل تلقائياً — «مصروفات الشاحنات» مدين والخزينة/البنك دائن. الحذف بيعكس القيد.
{{-- الفلتر --}}
إجمالي المصروفات{{ $m($total) }} ر.س
عدد المصروفات{{ $expenses->count() }}
شاحنات عليها مصروفات{{ $byTruck->count() }}
مصروفات كل شاحنة
@forelse ($byTruck as $r) @empty @endforelse
{{ $r['plate'] }}{{ $r['count'] }} مصروف
{{ $m($r['total']) }}
لا توجد مصروفات
حسب نوع المصروف
@forelse ($byType as $r) @empty @endforelse
{{ $r['type'] }}{{ $m($r['total']) }}{{ $total ? round($r['total'] / $total * 100) : 0 }}%
لا توجد مصروفات
@forelse ($expenses as $e) @empty @endforelse @if ($expenses->count())@endif
التاريخالشاحنةالنوعالبيانالموردالمبلغمدفوع منالمرفقسجلها
{{ $e->expense_date->format('Y/m/d') }} {{ optional($e->truck)->plate_number }} {{ \App\Models\truck_expense::typeLabel($e->type) }} {{ $e->description ?: '—' }} {{ $e->vendor ?: '—' }} {{ $m($e->amount) }} @if ($e->posted){{ optional($e->payAccount)->name }}@elseبدون ترحيل@endif @if ($e->attachment) عرض@else — @endif {{ optional($e->user)->name }}
@csrf
لا توجد مصروفات في الفترة دي
الإجمالي{{ $m($total) }}
@endsection @section('js') @endsection