{{-- @if ($screen == 'index') --}}
الرئيسية
العقود
من
إلى
@can('create_contracts') إضافة عقد @endcan
عدد العقود المنتهية: {{ $expiredCount }}
{{-- --}}
@forelse ($contracts as $contract) {{-- --}} {{-- --}} @empty @endforelse
# العميل الخدمة تاريخ العقد قيمة العقد تاريخ الانتهاء أُضيف بواسطة الملاحظات كم متبقي الحالة العمليات
{{ $contract->formatted_code }} {{ $contract->client?->name }} @include('livewire.admin.contracts.deals-modal') {{ $contract->contract_date->format('Y-m-d') }} @if ($contract->contract_value) {{ number_format($contract->contract_value, 2) }} ريال @else غير محدد @endif {{ $contract->end_date->format('Y-m-d') }} {{ $contract->user->name }} @if ($contract->notes) {!! Str::limit($contract->notes, 50) !!} @else لا توجد ملاحظات @endif @php $remainingDays = now()->diffInDays($contract->end_date, false); @endphp @if ($remainingDays < 0) منتهي منذ {{ abs($remainingDays) }} يوم @elseif($remainingDays === 0) ينتهي اليوم @else {{ $remainingDays }} يوم @endif @php $end = Carbon\Carbon::parse($contract->end_date); $now = now(); $diff = $now->diff($end); $months = $diff->m + ($diff->y * 12); $days = $diff->d; $isPast = $end->isPast(); @endphp @if ($isPast) منتهي منذ {{ $months > 0 ? $months . ' شهر' : '' }} {{ $days > 0 ? $days . ' يوم' : '' }} @elseif($months === 0 && $days === 0) ينتهي اليوم @else متبقي {{ $months > 0 ? $months . ' شهر' : '' }} {{ $days > 0 ? $days . ' يوم' : '' }} @endif @php $end = \Carbon\Carbon::parse($contract->end_date)->startOfDay(); $now = \Carbon\Carbon::now()->startOfDay(); $diff = $now->diff($end); $months = $diff->y * 12 + $diff->m; $days = $diff->d; $isPast = $end->isBefore($now); @endphp @if ($isPast) منتهي منذ {{ $months > 0 ? $months . ' شهر' : '' }} {{ $days > 0 ? $days . ' يوم' : '' }} @elseif($end->isSameDay($now)) ينتهي اليوم @else متبقي {{ $months > 0 ? $months . ' شهر' : '' }} {{ $days > 0 ? $days . ' يوم' : '' }} @endif
{{ __($contract->status) }}
{{ $contract->procedures_count }} الاجرائات @can('update_contracts') تعديل @endcan @can('delete_contracts') @endcan
لا توجد عقود
{{ $contracts->links() }}
@foreach ($contracts as $contract) @endforeach
{{-- @else --}}
@include('livewire.admin.contracts.createOrUpdate')
{{-- @endif --}}