@php $totalAmount = 0; @endphp @foreach($data as $item) @php $itemAmount = floatval($item->quantity) * ($item->product ? floatval($item->product->cost_of_products_sold) : 0); $totalAmount += floatval($itemAmount); @endphp @endforeach
Gudang : {{ $warehouse->name ?? "-" }}
Kode Nama Spec Supplier Cogs Stok Total Nilai Stok
{{$item->product ? $item->product->code : '-'}} {{$item->product ? $item->product->name : '-'}} {{$item->product ? $item->product->shape : '-' }} {{$item->product ? $item->product->detail_1 : '-'}} {{$item->product ? $item->product->detail_2 : '-'}} {{$item->product ? $item->product->finishing : '-'}} {{$item->product ? $item->product->dominant : '-'}} {{$item->product ? $item->product->category : '-'}} @if($item->product) {{ $item->product->supplier ? $item->product->supplier->name : "-" }} @else - @endif {{ number_format(($item->product ? $item->product->cost_of_products_sold : 0),2,',','.') }} {{$item->quantity}} {{ number_format($itemAmount,2,',','.') }}
Total Nilai Barang {{ number_format($totalAmount,2,',','.') }}