@foreach ($query as $data) @php $notes = $data->notes; if ($data->store_id == env('STORE_PUSAT_LAKUEMAS')) { $created_at = substr($data->created_at, 0, 10); if ((int) str_replace('-', '', $created_at) > 20230530) { if($data->notes_store_po && $data->notes_store_po->cmk_store) { $notes = $data->notes_store_po->cmk_store->m_nama; } } } $loc_store = $data->loc_store; if ($data->store_id != env('STORE_PUSAT_LAKUEMAS')) { $created_at = substr($data->created_at, 0, 10); if ((int) str_replace('-', '', $created_at) > 20230530) { if($data->store && $data->store->cmk_store) { $loc_store = $data->store->cmk_store->m_nama; } } } @endphp @foreach($data->item as $item) @php $weight = preg_replace('/[^0-9.]/', '', $item->weight_goldbar); $status = "Menunggu Barang"; if ($data->type_so == 'stock' && $data->payment_status == 'sudah') { $status = "Sudah diambil"; } elseif ($data->move_bo && $data->move_bo->move_approved_by && $data->move_bo->move_approved_at) { if ($data->is_customer_received_at && $data->is_customer_received_by) { $status = "Sudah diambil"; } else { $status = "Menunggu diambil"; } } elseif ($data->move_bo) { if (!$data->move_bo->move_approved_by && $data->move_bo->status == 'done') { $status = "Dalam Pengiriman"; } } elseif ($data->is_customer_received_at && $data->is_customer_received_by) { $status = "Sudah diambil"; } @endphp @if ($data->store_id == env('STORE_PUSAT_LAKUEMAS')) @if ($data->store) @else @endif @else @if ($data->store) @else {{-- --}} @endif @if ( $data->type_so == 'cicil') @else @endif @endif @endforeach @endforeach
Dates Notes Brand Location Payment Method SO Type Data Sales Customer Name Customer Phone Customer Email Customer Address NO NPWP NO KTP Invoice Number No Move Unit Price Total Sebelum Pajak Total PPH Total Net Status Barang Brand LM Item Name Weight Previous Total Certificate PLU CODE Previous Total Total Changed By Changed Reason Created Time Created By Approve Incoming print invoice Barang Diambil Status Status Invoice No Invoice Blibli
{{ \Carbon\Carbon::parse($data->transaction_date)->format('d F Y') }}~ {{ $notes }} dua{{ $data->store->brand ? $data->store->brand->name : '-'}}-{{ $notes }}{{ $data->store->brand ? $data->store->brand->name : '-'}}-{{$data->store_id}}{{$data->store->name}}{{ $data->store->cmk_store->code ?? '-' }} - {{ $loc_store }}{{ $data->payment_method }} {{ $data->type_so }} @if ($data->created_by) {{ $data->created_by->username . ' - ' . $data->created_by->name }} @else - @endif {{ $data->customer_name ?? '' }} {{ $data->customer_phone }} {{ $data->customer_email }} {{ $data->customer_address }} {{ $data->npwp }} '{{ $data->nik }} {{-- @if($loop->first) --}} {{ $data->invoice_sell }} {{-- @endif --}} @if($loop->first) {{ $data->move_bo->reference_number ?? '' }} @endif {{ $item->price }} @if($loop->first) {{ $data->total }} @endif @if($loop->first) {{ $data->pph_amount }} @endif @if($loop->first) {{ $data->grand_total }} @endif @if ($data->type_so == 'po') @if ($data->move_bo && $data->move_bo->status == 'done') Sudah Ada Sertifikat @else Belum Ada Sertifikat @endif @endif {{ $item->item_brand }} {{ $item->item_name }} {{ $weight }} {{ $item->old_price }} {{ $item->item_certificates }} {{ $item->plu_code }} {{ $item->old_price }} {{ $item->est_tot_price }} {{ $item->users_bo ? $item->users_bo->name : '' }} {{ $item->reason }} {{ \Carbon\Carbon::parse($data->created_at)->format('d F Y') }} {{ $data->created_by ? $data->created_by->name : '-' }} {{ $data->move_bo ? $data->move_bo->move_approved_at : '-' }} {{ $data->is_customer_received }} @if ($data->scan_qr_at != null) {{ $data->scan_qr_at ?? '-' }} @elseif($data->check_otp_at != null) {{ $data->check_otp_at ?? '-' }} @else - @endif {{ $status }} @if (isset($data->payment) && $data->payment->invoice_photo) Sudah Upload Invoice @else Belum Upload Invoice @endif {{ $data->payment->no_invoice_blibli ?? '' }}