@php $suma = 0; @endphp
@foreach($shipmentProducts as $shipment) @endforeach
Fecha de envio Producto Embarque Cantidad Costo
{{ $shipment->shipments->deliver_date }} {{ $shipment->products->no_part}} {{ $shipment->shipments_id }} {{ $shipment->quantity }} $ {{ number_format($shipment->quantity * $shipment->products->sale_price)}}
Total @php $totalCantidad = 0; foreach ($shipmentProducts as $shipment) { $totalCantidad += $shipment->quantity; } @endphp {{ number_format($totalCantidad) }} @php $totalCosto = 0; foreach ($shipmentProducts as $shipment) { $totalCosto += $shipment->quantity * $shipment->products->sale_price; } @endphp $ {{ number_format($totalCosto) }}