{{-- @if (@$delivery->user->coload_id == 1 || @$delivery->user->coload_id == 4)
@endif
@if (@$delivery->user->coload_id == 2)
@endif
@if (@$delivery->user->coload_id == 3)
@endif --}}
|
Delivery |
| No. Surat Jalan | : {{$delivery->no_surat_jalan}} |
| Tanggal | : {{date('d-m-Y', strtotime($delivery->created_at))}} | |
| @if ($delivery->nama_customer != null) @if ($delivery->tipe_customer == 'customer') Customer @else Customer PIC @endif @else Customer @endif | : @if ($delivery->nama_customer != null) {{ucwords($delivery->nama_customer)}} @else {{ucwords(@$delivery->user->nama)}} @endif | |
| Alamat Pengiriman | : {{@$alamat}} | |
| Alamat Pengiriman {{$loop->iteration}} | : {{$addr}} | |
| Alamat Pengiriman | : - | |
| Telp. | {{--: {{ucwords(@$delivery->user->telp)}} | --}}: {{@$telp}} |
| Pengirim Titip Impor | {{--: {{ucwords(@$delivery->user->telp)}} | --}}: 0858 9262 6294 |
Detail Invoice
| No. | Container | Invoice | Receipt Evatrack | Resi Coload | {{--Container | --}}Ctn. | {{--Total Tagihan | --}}Marking | 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:'-'}} |
@php
$lastnoresi = null;
$jmlcarton = 0;
$arr_resi = [];
@endphp
@if ($detail->invoice)
@php
$invDetails = $detail->invoice->invoice_detail
->where('delivery_id', $delivery->id);
$groupedResi = $invDetails->groupBy('no_resi');
@endphp
@foreach ($groupedResi as $resi => $items)
{{ $resi }}
@php
$arr_resi[$resi] = $items->sum(fn($d) => $d->invdet_carton->count());
@endphp
@if (!$loop->last) @endif @endforeach @endif |
@if ($detail->invoice)
@php
$resiColoads = [];
foreach ($detail->invoice->invoice_detail as $inv_detail2) {
if ($inv_detail2->delivery_id != $delivery->id) {
continue;
}
$value = @$inv_detail2->receipt_detail->receipt->no_resi_coload ?: '-';
if (!in_array($value, $resiColoads)) {
$resiColoads[] = $value;
}
}
@endphp
{!! implode(' ', $resiColoads) !!} @endif |
{{-- @foreach ($detail->invoice->invoice_detail as $inv_d)@if (!$loop->first),@endif{{$inv_d->no_container?$inv_d->no_container:'-'}} @endforeach | --}}
@if (count($arr_resi) > 0)
@foreach ($arr_resi as $arr)
{{$arr}}@if (!$loop->last) @endif @endforeach @endif |
@if (isset($detail->invoice->invoice_detail))
@php
$markings = [];
foreach ($detail->invoice->invoice_detail as $inv_detail3) {
if ($inv_detail3->delivery_id != $delivery->id) {
continue;
}
$value = @$inv_detail3->receipt_detail->receipt->shipping_mark ?: '-';
if (!in_array($value, $markings)) {
$markings[] = $value;
}
}
@endphp
{!! implode(' ', $markings) !!} @endif | {{-- Rp {{ribuan(@$detail->invoice->total_tagihan)}} | --}}{{@$detail->invoice->tgl_lunas?@$detail->invoice->tgl_lunas:'-'}} |
| {{ $i }} |
@php
$old_lastcontainer = '';
@endphp
@if ($detail->invoice)
@php
$containersOld = [];
foreach ($detail->invoice->invoice_detail as $inv_detail) {
$value = @$inv_detail->no_container ?: '-';
if (!in_array($value, $containersOld)) {
$containersOld[] = $value;
}
}
@endphp
{!! implode(' ', $containersOld) !!} @endif |
{{@$detail->invoice->no_invoice?@$detail->invoice->no_invoice:'-'}} |
@if ($detail->invoice)
@php
$resiList = [];
foreach ($detail->invoice->invoice_detail as $inv_detail) {
$value = @$inv_detail->no_resi ?: '-';
if (!in_array($value, $resiList)) {
$resiList[] = $value;
}
}
@endphp
{!! implode(' ', $resiList) !!} @endif |
@if ($detail->invoice)
@php
$resiColoadsOld = [];
foreach ($detail->invoice->invoice_detail as $inv_detail2) {
$value = @$inv_detail2->receipt_detail->receipt->no_resi_coload ?: '-';
if (!in_array($value, $resiColoadsOld)) {
$resiColoadsOld[] = $value;
}
}
@endphp
{!! implode(' ', $resiColoadsOld) !!} @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
$markingsOld = [];
foreach ($detail->invoice->invoice_detail as $inv_detail3) {
$value = @$inv_detail3->receipt_detail->receipt->shipping_mark ?: '-';
if (!in_array($value, $markingsOld)) {
$markingsOld[] = $value;
}
}
@endphp
{!! implode(' ', $markingsOld) !!} @endif |
{{@$detail->invoice->tgl_lunas?@$detail->invoice->tgl_lunas:'-'}} |
| 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 | ||||||
|
||||||
@endif
@if (@$delivery->user->coload_id == 2)
@endif
@if (@$delivery->user->coload_id == 3)
@endif --}}