@foreach ($orders as $order) @foreach ($order->items->chunk(10) as $items)

Invoice

بيانات العميل
{{$order->name}}
{{implode(',', json_decode($order->phone) ? json_decode($order->phone) : [])}}
بيانات التوصيل
{{$order->Shipping_to}}
{{implode(',', json_decode($order->address) ? json_decode($order->address) : [])}}

{{$order->created_at}} تاريخ الانشاء

{{$order->updated_at}} تاريخ أخر تحديث



{{$order->status}} الحالة {{$order->id}} طلب رقم      

@foreach ((object)$items as $item) @endforeach
السعر الاجمالي سعر القطعة الكمية اللون المقاس المنتج
{{$item->needed_price * $item->needed}} {{$item->needed_price}} {{$item->needed}} {{($item->color)}} {{($item->size)}} {{$item->product_name}}
الملاحظات
                                @php
                                $notes =  ($order->notes);
                               
                                if (sizeof($notes) > 0){
                                    echo ($notes[sizeof($notes) - 1])->note;
                                } else {
                                    $order->note ? $order->note : 'لا يوجد ملاحظات';
                                }
                                @endphp
                                

صافي السعر {{$order->totalWithoutShipping}}

الخصم {{$order->discount}}

الشحن {{$order->Shipping_fees}}

الاجمالي {{$order->total - ($order->discount )}}

@endforeach @endforeach