{{-- شريط الوردية أعلى شاشة البيع --}} @php $shReady = \App\Services\ShiftService::ready(); $shOn = $shReady && \App\Services\ShiftService::enabled(); $sh = $shReady ? \App\Services\ShiftService::current() : null; $canBypass = $shReady && $shOn && \App\Services\ShiftService::canBypassShift(); $shAdmin = auth()->check() && (auth()->user()->can('shifts_report') || auth()->user()->hasRole('Admin')); @endphp
php artisan migrate.
@elseif ($sh)
الوردية {{ $sh->number }} مفتوحة
— من {{ $sh->opened_at->format('Y-m-d H:i') }} ({{ $sh->duration }})
— الافتتاحي {{ number_format((float) $sh->opening_cash, 2) }}
@elseif ($canBypass)
لا توجد وردية مفتوحة — البيع متاح بصلاحية استثنائية (ستُسجل الفاتورة بدون وردية).
@elseif ($shOn)
مفيش وردية مفتوحة — البيع موقوف لحد ما تفتح ورديتك.
@else
نظام الورديات متوقف — تقدر تفتح وردية لمتابعة مبيعاتك (اختياري).
@endif
@php
$cashboxEnabled = \App\Services\Accounting\CashboxResolverService::isEnabled();
$userCashbox = $cashboxEnabled ? \App\Services\Accounting\CashboxResolverService::resolveAccount() : null;
@endphp
@if ($cashboxEnabled && $userCashbox)
الخزينة: {{ $userCashbox->name }} ({{ number_format((float) $userCashbox->current_balance, 2) }} ر.س)
@endif