@php $totalQuantity = $products->sum('quantity'); $totalOrders = $products->count(); $deliveryCount = $products->where('LocationID', null)->count(); $collectionCount = $products->where('LocationID', '!=', null)->count(); @endphp
| Order | Qty | Customer | Type | Contact | Location |
|---|---|---|---|---|---|
| #{{$order->id}} | {{$order->quantity}} | {{$order->DeliveryFirstName}} {{$order->DeliveryLastName}} | @if($order->LocationID !== null) Collection @else Delivery @endif |
@if($order->DeliveryMobileNumber)
@endif
@if($order->DeliveryEmail)
@endif
|
@if($order->LocationID !== null)
Collection Point
@else
@php
$addressParts = array_filter([
$order->DeliveryAddressLine1,
$order->DeliveryAddressLine2,
$order->DeliveryAddressLine3,
$order->DeliveryCity,
$order->DeliveryCounty,
$order->DeliveryPostcode
]);
@endphp
{{ implode(', ', $addressParts) }}
@endif
|