@php $antamTotalSum = $antamNetSum = 0; $ubsTotalSum = $ubsNetSum = 0; $hartadinataTotalSum = $hartadinataNetSum = 0; @endphp {{-- ANTAM --}} @php $antamRowCount = count($antam->where('item_brand', 'lm_certieye')); @endphp @foreach ($antam as $index => $data) @if ($data->item_brand == 'lm_certieye') @if ($index == 0) @endif @php $antamTotalSum += $data->total_antam; $antamNetSum += $data->harga_antam; @endphp @endif @endforeach {{-- ANTAM SHIO --}} @php $antamShioRowCount = count($antam_shio->where('item_brand', 'lm_certieye_shio')); @endphp @foreach ($antam_shio as $index => $data) @if ($data->item_brand == 'lm_certieye_shio') @if ($index == 0) @endif @php $antamTotalSum += $data->total_ubs; $antamNetSum += $data->harga_ubs; @endphp @endif @endforeach @php $star_goldRowCount = count($star_gold->where('item_brand', 'star_gold')); @endphp @foreach ($star_gold as $index => $data) @if ($data->item_brand == 'star_gold') @if ($index == 0) @endif @php $antamTotalSum += $data->total_star_gold; $antamNetSum += $data->harga_star_gold; @endphp @endif @endforeach @php $idn_spesialRowCount = count($idn_spesial->where('item_brand', 'IDN_Spesial')); @endphp @foreach ($idn_spesial as $index => $data) @if ($data->item_brand == 'IDN_Spesial') @if ($index == 0) @endif @php $antamTotalSum += $data->total_idn_spesial; $antamNetSum += $data->harga_idn_spesial; @endphp @endif @endforeach {{-- LM OTHER --}} @php $lmOtherCount = count($lm_other->where('item_brand', 'lm_other')); @endphp @foreach ($lm_other as $index => $data) @if ($data->item_brand == 'lm_other') @if ($index == 0) @endif @php $antamTotalSum += $data->total_weight; $antamNetSum += $data->harga; @endphp @endif @endforeach {{-- LM RETRO --}} @php $retroRowCount = count($lm_retro); @endphp @foreach ($lm_retro as $index => $data) @if ($index == 0) @endif @php $ubsTotalSum += $data->total_ubs; $ubsNetSum += $data->harga_ubs; @endphp @endforeach {{-- UBS --}} @php $ubsRowCount = count($ubs->where('item_brand', 'ubs')); @endphp @foreach ($ubs as $index => $data) @if ($index == 0) @endif @php $ubsTotalSum += $data->total_ubs; $ubsNetSum += $data->harga_ubs; @endphp @endforeach {{-- HARTADINATA --}} @php $hartadinataRowCount = count($hartadinata); @endphp @foreach ($hartadinata as $index => $data) @if ($index == 0) @endif @php $ubsTotalSum += $data->total_ubs; $ubsNetSum += $data->harga_ubs; @endphp @endforeach @php $grandTotalSum = $antamTotalSum + $ubsTotalSum + $hartadinataTotalSum; $grandNetSum = $antamNetSum + $ubsNetSum + $hartadinataNetSum; @endphp
Brand Item QTY Total Nett
ANTAM{{ $data->weight_goldbar }} {{ number_format($data->total_antam) }} {{ number_format($data->harga_antam) }}
ANTAM SHIO{{ $data->weight_goldbar }} {{ number_format($data->total_ubs) }} {{ number_format($data->harga_ubs) }}
Star Gold{{ $data->weight_goldbar }} {{ number_format($data->total_star_gold) }} {{ number_format($data->harga_star_gold) }}
IDN Spesial{{ $data->weight_goldbar }} {{ number_format($data->total_idn_spesial) }} {{ number_format($data->harga_idn_spesial) }}
LM OTHER{{ $data->weight_goldbar }} {{ number_format($data->total_weight) }} {{ number_format($data->harga) }}
{{ $data->item_brand }} {{ $data->weight_goldbar }} {{ number_format($data->total_ubs) }} {{ number_format($data->harga_ubs) }}
{{ $data->item_brand }} {{ $data->weight_goldbar }} {{ number_format($data->total_ubs) }} {{ number_format($data->harga_ubs) }}
{{ $data->item_brand }} {{ $data->weight_goldbar }} {{ number_format($data->total_ubs) }} {{ number_format($data->harga_ubs) }}
TOTAL {{ number_format($grandTotalSum) }} {{ number_format($grandNetSum) }}