@if(!$receipts->isEmpty()) @php $no=1; @endphp @foreach ($receipts as $receipt) @php $grandtotal_jml = $grandtotal_usd = $grandtotal_rmb = 0; foreach($receipt->receipt_detail as $detail){ foreach($detail->detail_barang as $detbar){ $grandtotal_jml += $detbar->jumlah; if($detbar->currency_code == 'USD'){ $grandtotal_usd += $detbar->harga; } else { $grandtotal_rmb += $detbar->harga; } } } @endphp @php $no++; @endphp @endforeach @endif
No. Tanggal No. Resi Eva Marking Nama Barang Kategori Barang Jumlah Karton Total Berat Total Cbm No. Resi Lokal Storage Number WH Number Brand Qty Barang Value Barang Status Resi
{{ $no }} {{$receipt->created_at}} {{ $receipt->no_resi }} {{$receipt->shipping_mark}} {{-- @if ($receipt->receipt_detail->count() > 0) @foreach ($receipt->receipt_detail as $rdetail) @if (!$loop->first) // @endif @if ($rdetail->detail_barang->count() > 0) @foreach ($rdetail->detail_barang as $barang) {{$barang->deskripsi}} @endforeach @else - @endif @endforeach @else - @endif --}} {{ $receipt->deskbarangs }} {{-- @if ($receipt->receipt_detail->count() > 0) @foreach ($receipt->receipt_detail as $rdetail) @if (!$loop->first) , @endif @if ($rdetail->detail_barang->count() > 0) @foreach ($rdetail->detail_barang as $barang) {{$barang->ekspedisi?@$barang->ekspedisi->tipe_barang:'-'}} @endforeach @else - @endif @endforeach @else - @endif --}} {{$receipt->tipebarangs}} {{$receipt->carton_count}} {{$receipt->getcartonstat(2)->sum('carton_numbers.berat')}} {{number_format($receipt->getcartonstat(6)->sum('carton_numbers.volume'), 3, '.', '')}} {{$receipt->no_local_cina}} {{$receipt->storage_number}} {{$receipt->wh_number?$receipt->wh_number:'-'}} {{$receipt->brand}}{{$grandtotal_jml}} {{$grandtotal_usd.' USD, '}}
{{$grandtotal_rmb.' RMB'}}
{{ config('custom.status_resi.'.$receipt->status) }}