@php // تعيين اللغة بناءً على لغة النظام الحالية لضمان استمرارها في طلبات الـ AJAX app()->setLocale($getLocale); @endphp @if (isset($data) && !empty($data) && count($data) > 0) @php $i = 1; @endphp
{{-- أعمدة التكلفة لـ مستخدمين محددين --}} @if(Auth()->user()->id == 17 || Auth()->user()->id == 28 || Auth()->user()->id == 11) @endif {{-- تبديل عمود السعر بناءً على رقم المستخدم 30 أو المستخدمين الآخرين --}} @if(Auth()->user()->id == 30) @else @endif {{-- الأعمدة الثابتة لجميع المستخدمين لمنع انكسار تصميم الجدول --}} @foreach ($data as $product) {{-- قيم تكلفة الشراء للمستخدمين المحددين --}} @if(Auth()->user()->id == 17 || Auth()->user()->id == 28 || Auth()->user()->id == 11) @endif {{-- طباعة القيمة المالية للسعر حسب الصلاحية --}} @if(Auth()->user()->id == 30) @else @endif {{-- الحقول المشتركة لجميع الحسابات لتقابل الـ thead بدقة --}} @endforeach
# {{ __('home.productNo') }} {{ __('home.product') }} {{ __('home.productlocation') }} {{ __('home.quantity') }}{{__('home.purchaseproductwithouttax')}} {{__('home.average_cost')}}{{__('home.Wholesale_price')}}{{ __('home.sellingproduct without tax') }}{{ __('home.refnumber') }} {{ __('home.notesClient') }} {{ __('home.Add') }}
{{ $product->id }} {{ $product->Product_Code }} {{ $product->product_name }} {{ $product->Product_Location }} @if($product->numberofpice <= 0) {{ $product->numberofpice }} / {{ __('home.notavailable') }} @else {{ $product->numberofpice }} @endif {{ $product->purchasingـprice }} {{ $product->average_cost }}{{ $product->Wholesale_price }}{{ $product->sale_price }}{{ $product->refnumber == null ? __('home.notdata') : str_replace("+", " - ", $product->refnumber) }} {{ $product->notes }} {{-- تمرير سعر الجملة ديناميكياً في حال كان المستخدم رقم 30 ليعمل زر chooseProduct بشكل سليم --}} @php $passedPrice = (Auth()->user()->id == 30) ? $product->Wholesale_price : $product->sale_price; @endphp
@php $count = App\Models\products::where('main_product', $product->main_product)->where('main_product', '!=', 0)->count(); @endphp @if($count > 1)
@endif
@else
{{ __('home.notfounddata') }}
@endif