@foreach ($directDeliveries as $directDelivery)
{{--

{{ Auth::user()->company_profile->name }}

{{ Auth::user()->company_profile->address }}
PH:{{ Auth::user()->company_profile->phone }}       GST NO:{{ Auth::user()->company_profile->gst }}

Direct Delivery

--}}
Date:{{ \Carbon\Carbon::parse($directDelivery->date)->format('d M Y') }}
Transaction Type:{{ $directDelivery->stock_type == 0 ? 'Assign Stock' : ($directDelivery->order_id != null ? 'Sale' : 'Return Stock') }}
Staff Name:{{ $directDelivery->user->name }}
Stock Location: {{ $directDelivery->stockLocation?->name ?? '--' }}
Remarks: {{ $directDelivery->remarks }}
@if($seperate_lines == 0) @else @endif @php $weightTotal = 0; @endphp @foreach ($directDelivery->items as $item) @if($seperate_lines == 0) @else @php $weightSum = 0; if(is_numeric($item->stockItem->weight)){ $weightSum += $item->stockItem->weight * $item->base_qty; } $weightTotal += $weightSum; @endphp @endif @endforeach @if($seperate_lines == 0) @else @endif
sno Items QtyUnit DamageWeight
{{ $loop->iteration }} {{ $item->stockItem->name }} {{ $item->quantity }}{{ $item->unit->symbol }} {{ $item->is_damage == 1 ? 'Yes' : 'No' }}{{ $weightSum }}
{{ $directDelivery->items->sum('quantity') }} {{ $weightTotal }}
@endforeach