{{-- @if (@$delivery->user->coload_id == 1 || @$delivery->user->coload_id == 4) logo @endif @if (@$delivery->user->coload_id == 2) logo @endif @if (@$delivery->user->coload_id == 3) logo @endif --}} Delivery
No. Surat Jalan : {{$delivery->no_surat_jalan}} barcode

{{-- @if (\Auth::user()->id == 46 || \Auth::user()->role == 9) --}} {{-- @endif --}} {{-- @if (count($alamat) > 0) @foreach ($alamat as $addr) @endforeach @else @endif --}} {{-- --}}
Tanggal : {{date('d-m-Y', strtotime($delivery->created_at))}}
Customer : {{ucwords(@$delivery->user->nama)}}
Alamat Pengiriman : {{@$alamat}}
Alamat Pengiriman {{$loop->iteration}} : {{$addr}}
Alamat Pengiriman : -
Telp.: {{ucwords(@$delivery->user->telp)}}: {{ucwords(@$telp)}}

Detail Invoice
{{-- --}} {{-- --}} @php $i = 1; $last_inv = null; @endphp @if (count($delivery->invoice_detail) > 0) {{-- sistem data baru --}} @foreach ($delivery->invoice_detail as $detail) @if (@$detail->invoice->no_invoice == $last_inv) @continue; @endif {{-- --}} {{-- --}} @php $i++; $last_inv = @$detail->invoice->no_invoice; @endphp @endforeach @else {{-- handle data lama --}} @foreach ($delivery->delivery_detail as $detail) @php $i++; @endphp @endforeach @endif
No. Container Invoice Receipt Evatrack Resi ColoadContainerCtn.Total TagihanMarking Tanggal Lunas
{{ $i }} @if ($detail->invoice) @if (isset($containers[$detail->invoice->no_invoice])) {{$containers[$detail->invoice->no_invoice]}} @endif @endif {{@$detail->invoice->no_invoice?@$detail->invoice->no_invoice:'-'}} @if ($detail->invoice) @foreach ($detail->invoice->invoice_detail as $inv_detail) @if (!$loop->first)
@endif @if ($inv_detail->delivery_id != $delivery->id) @continue @endif {{-- {{@$inv_detail->receipt_detail->receipt->no_resi?@$inv_detail->receipt_detail->receipt->no_resi:'-'}} --}} {{@$inv_detail->no_resi}} @endforeach @endif
@if ($detail->invoice) @foreach ($detail->invoice->invoice_detail as $inv_detail2) @if (!$loop->first)
@endif @if ($inv_detail2->delivery_id != $delivery->id) @continue @endif {{@$inv_detail2->receipt_detail->receipt->no_resi_coload?@$inv_detail2->receipt_detail->receipt->no_resi_coload:'-'}} @endforeach @endif
@foreach ($detail->invoice->invoice_detail as $inv_d)@if (!$loop->first),@endif{{$inv_d->no_container?$inv_d->no_container:'-'}} @endforeach {{-- @php $jmlkarton = 0; if (isset($detail->invoice->invoice_detail)){ foreach($detail->invoice->invoice_detail as $invdetail) { $jmlkarton += $invdetail->jml_ctn; } } @endphp --}} {{-- {{$invdetail->jml_ctn}} --}} {{-- {{$jmlkarton}} --}} @if (isset($detail->invoice->invoice_detail)) @foreach($detail->invoice->invoice_detail as $invdetail) @if (!$loop->first)
@endif @if ($invdetail->delivery_id != $delivery->id) @continue @endif {{$invdetail->jml_ctn}} @endforeach @else - @endif
@if (isset($detail->invoice->invoice_detail)) @foreach ($detail->invoice->invoice_detail as $inv_detail3) @if (!$loop->first)
@endif @if ($inv_detail3->delivery_id != $delivery->id) @continue @endif {{@$inv_detail3->receipt_detail->receipt->shipping_mark}} @endforeach @endif
Rp {{ribuan(@$detail->invoice->total_tagihan)}}{{@$detail->invoice->tgl_lunas?@$detail->invoice->tgl_lunas:'-'}}
{{ $i }} @php $old_lastcontainer = ''; @endphp @if ($detail->invoice) @foreach ($detail->invoice->invoice_detail as $inv_detail) @if (!$loop->first)
@endif @if ($inv_detail->no_container == $old_lastcontainer) @continue @endif {{@$inv_detail->no_container?@$inv_detail->no_container:'-'}} @php $old_lastcontainer = @$inv_detail->no_container; @endphp @endforeach @endif
{{@$detail->invoice->no_invoice?@$detail->invoice->no_invoice:'-'}} @if ($detail->invoice) @php $lastresi = null; @endphp @foreach ($detail->invoice->invoice_detail as $inv_detail) @if (!$loop->first)
@endif @if ($inv_detail->no_resi == $lastresi) @continue @endif {{-- {{@$inv_detail->receipt_detail->receipt->no_resi?@$inv_detail->receipt_detail->receipt->no_resi:'-'}} --}} {{@$inv_detail->no_resi}} @php $lastresi = @$inv_detail->no_resi; @endphp @endforeach @endif
@if ($detail->invoice) @php $lastresicoload = null; @endphp @foreach ($detail->invoice->invoice_detail as $inv_detail2) @if (!$loop->first)
@endif @if ($inv_detail2->receipt_detail->receipt->no_resi_coload) @if ($inv_detail2->receipt_detail->receipt->no_resi_coload == $lastresicoload) @continue @endif @endif {{@$inv_detail2->receipt_detail->receipt->no_resi_coload?@$inv_detail2->receipt_detail->receipt->no_resi_coload:'-'}} @php $lastresicoload = $inv_detail2->receipt_detail->receipt->no_resi_coload?@$inv_detail2->receipt_detail->receipt->no_resi_coload:'-'; @endphp @endforeach @endif
@php $jmlkarton = 0; if (isset($detail->invoice->invoice_detail)){ foreach($detail->invoice->invoice_detail as $invdetail) { $jmlkarton += $invdetail->jml_ctn; } } @endphp {{$jmlkarton}} @if (isset($detail->invoice->invoice_detail)) @php $lastmarking = null; @endphp @foreach ($detail->invoice->invoice_detail as $inv_detail3) @if (!$loop->first)
@endif @if ($inv_detail3->receipt_detail->receipt->shipping_mark == $lastmarking) @continue @endif {{@$inv_detail3->receipt_detail->receipt->shipping_mark}} @php $lastmarking = @$inv_detail3->receipt_detail->receipt->shipping_mark; @endphp @endforeach @endif
{{@$detail->invoice->tgl_lunas?@$detail->invoice->tgl_lunas:'-'}}
{{-- --}} @if ($delivery->jenis_pengiriman == 2) @endif {{-- --}}
Driver : {{$delivery->jenis_pengiriman == 3 ? ucwords(@$delivery->driver->nama) : '-'}}
Instruksi Pengiriman : {{@config('custom.jenis_pengiriman.'.$delivery->jenis_pengiriman)}}
Ekspedisi : {{ @$delivery->ekspedisi_delivery->nama }}
Tanggal Kirim / Ambil : {{$delivery->tgl_kirimambil}}
Deskripsi Barang : {{@$inv_detail->receipt_detail->receipt->deskripsi?@$inv_detail->receipt_detail->receipt->deskripsi:'-'}}
Notes : {{$delivery->notes}}
  Tanda Tangan
 
 
 
 
 
Penerima   Driver