#{{ $product->id }}
{{ $product->user->name ?? '---' }}
{{ $product->customer->name ?? '---' }}
{{ $product->created_at }}
{{ $product->production_date ?? '---' }}
{{ $product->employee->name_ar ?? 'لا يوجد' }}
@switch($product->status_invoice)
@case('NOT_STARTED')
لم يبدأ
@break
@case('IN_PROGRESS')
قيد التنفيذ
@break
@case('COMPLETED')
مكتمل
@break
@default
غير محدد
@endswitch
@if($product->type == 'fabric')
@if($product->is_cut)
تم القص
@else
لم يقص
@endif
@else
---
@endif
{{ $product->branch->name ?? '---' }}
@php
$totalPaid =
($product->cashamount ?? 0) +
($product->creaditamount ?? 0) +
($product->bankamount ?? 0) +
($product->Bank_transfer ?? 0);
@endphp
{{ number_format($totalPaid, 2) }}
{{ number_format($product->Pay ?? 0, 2) }}
@php
$methods = [];
$currentMethod = strtolower($product->payment_methods_text ?? '');
if ($currentMethod == 'cash') {
$methods[] = __('report.cash');
} elseif ($currentMethod == 'span' || $currentMethod == 'network (mada)') {
$methods[] = __('report.shabka');
} elseif ($currentMethod == 'credit') {
$methods[] = 'آجل (Credit)';
} elseif ($currentMethod == 'bank_transfer') {
$methods[] = __('home.Bank_transfer');
} elseif ($currentMethod == 'tabby') {
$methods[] = 'تابي (Tabby)';
} elseif ($currentMethod == 'tamara') {
$methods[] = 'تمارا (Tamara)';
} else {
if (($product->cashamount ?? 0) > 0) $methods[] = __('report.cash');
if (($product->bankamount ?? 0) > 0) $methods[] = __('report.shabka');
if (($product->Bank_transfer ?? 0) > 0) $methods[] = __('home.Bank_transfer');
}
$methods = array_unique($methods);
@endphp
@if(count($methods) > 1)
{{ __('sales.Partition of the amount') }}
@elseif(count($methods) == 1)
{{ $methods[0] }}
@else
---
@endif
@if($product->type == 'ready')
@else
@endif
@php
$customerPhone = $product->customer->phone ?? '';
$phone = "966" . substr($customerPhone, 1);
$link = "https://demoo.ebdeaclients.online/ar/generate_pdf/" . $product->id;
$message = "يسرنا خدمتك مرفق لكم فاتورتكم " . "فضلا لتحميل فاتورتك رقم : {$product->id}: {$link}\n" . "For download your invoice number :{$product->id } press here : {$link}";
$waLink = "https://web.whatsapp.com/send?phone={$phone}&text=" . urlencode($message);
@endphp
@if($product->type == 'fabric')
@endif
@endforeach