@if (isset($data) && !empty($data) && count($data) > 0)
@php $avtSetting = App\Models\Avt::find(1); $saleavt = $avtSetting ? $avtSetting->AVT : 0.15; @endphp @foreach ($data as $product) @php $netPrice = $product->Price - $product->discount; $taxAmount = $netPrice * $saleavt; $totalWithTax = $product->cashamount + $product->bankamount + $product->creaditamount + $product->Bank_transfer; $payText = match($product->Pay) { 'Cash' => __('report.cash'), 'Shabka' => __('report.shabka'), 'Credit' => __('report.credit'), 'Bank_transfer' => __('home.Bank_transfer'), default => __('home.Partition of the amount'), }; $cleanPhone = "966" . ltrim($product->customer->phone ?? '', '0'); $pdfLink = "https://demoo.ebdeaclients.online/ar/generate_pdf/" . $product->id; $waMessage = "يسرنا خدمتكم. فاتورتكم رقم {$product->id} جاهزة للتحميل:\n" . $pdfLink; $waFullUrl = "https://wa.me/{$cleanPhone}?text=" . urlencode($waMessage); $saleDetail = $product->sales->first(); $endDateValue = ($saleDetail && $saleDetail->subscription_end_date) ? $saleDetail->subscription_end_date : ''; @endphp {{-- رقم الفاتورة --}} {{-- البائع / المستخدم --}} {{-- اسم العميل --}} {{-- نوع البرنامج --}} {{-- تاريخ البدء --}} {{-- تاريخ الانتهاء --}} {{-- حالة الدفع وتاريخ السداد --}} {{-- الإجمالي --}} {{-- طريقة الدفع --}} {{-- العمليات والأزرار --}} @endforeach
{{ __('home.Invoice_no') }} {{ __('home.sallerName') }} {{ __('home.clietName') }} نوع البرنامج تاريخ البدء تاريخ الانتهاء حالة الدفع {{ __('home.total') }} {{ __('home.paymentmethod') }} {{ __('home.operations') }}
#{{ $product->id }} {{ $product->user->name ?? '---' }} {{ $product->customer->name ?? '---' }} @if(($saleDetail->software_type ?? 'cloud') == 'cloud') سحابي @else محلي @endif {{ $saleDetail->subscription_start_date ?? '---' }} @if($saleDetail) @if(($saleDetail->software_type ?? 'cloud') == 'local') مدى الحياة @else @if($saleDetail->subscription_end_date) @if(\Carbon\Carbon::parse($saleDetail->subscription_end_date)->isPast()) {{ $saleDetail->subscription_end_date }} (منتهي) @else {{ $saleDetail->subscription_end_date }} (نشط) @endif @else --- @endif @endif @else --- @endif
{{ $product->payment_status == 1 ? 'تم الدفع' : 'لم يتم الدفع' }} {{ $product->payment_date ? \Carbon\Carbon::parse($product->payment_date)->format('Y-m-d') : '' }}
@if($product->Price == 0) {{ __('home.return') }} @else {{ number_format($totalWithTax, 2) }} ريال @endif {{ $payText }} @if($product->Pay == "Partition")
@if(!empty($product->cashamount) && $product->cashamount > 0) نقدي: {{ number_format($product->cashamount, 2) }} @endif @if(!empty($product->bankamount) && $product->bankamount > 0) شبكة: {{ number_format($product->bankamount, 2) }} @endif @if(!empty($product->Bank_transfer) && $product->Bank_transfer > 0) تحويل: {{ number_format($product->Bank_transfer, 2) }} @endif
@endif
{{-- 1. طباعة --}} {{-- 2. واتساب --}} {{-- 3. تعديل الدفع --}} {{-- 4. تبديل حالة السداد لايف --}} {{-- 5. مرتجع --}} {{-- 6. تعديل بيانات العميل --}} {{-- 7. تعديل تواريخ الاشتراك --}}
{{-- روابط الترقيم بالـ AJAX --}} @else
لا توجد أي نتائج مطابقة

{{ __('home.notfounddata') }}

@endif