QC Cashbox

Filter (Unload Date)
@foreach($query as $key => $data) @php $has_pg_qry = $data->store_resell_invoice(); $has_pg = $has_pg_qry->whereHas('detail', function($detail) { $detail->where('item_brand_id', '15'); })->count(); $count_pg = 0; if($has_pg) { $count_pg = \App\Models\Butik\Butik_store_resell_invoice_detail_model::whereHas('invoice', function($invoice) use($data){ $invoice->where('store_resellbox_unload_id', $data->id) ->where('status', '4'); }) ->where('item_brand_id', 15) ->count(); } $has_new_plu = $has_pg_qry->has('detail.new_item_plu')->count(); @endphp @endforeach
No. Delivery Order Receive From Unload Date QC Done At QC Status Actions
{{ $query->firstItem()+$key }} {{ $data->delivery_code }} @if($has_pg)
PG | {{ $count_pg }} Items
@endif
{{ $data->receive_from_store->name }}
{{ $data->receive_from_store->brand->name }}
{{ \Carbon\Carbon::parse($data->unload_date)->format('d M Y H:i') }} @if($data->qc_status == 'done') @php $qc_detail = \App\Models\Butik\Butik_store_resell_invoice_detail_model::whereHas('invoice.resellbox_unload', function($resellbox_unload) use($data) { $resellbox_unload->where('qc_status', 'done') ->whereId($data->id); }) ->orderBy('qc_at', 'desc') ->first(); @endphp @if($qc_detail) {{ $qc_detail->qc_at }} @endif @endif @php $label = ''; switch($data->qc_status) { case 'cancelled': $label = 'info'; break; case 'uncompleted': $label = 'danger'; break; case 'in_progress': $label = 'warning'; break; case 'done': $label = 'success'; break; case 'moved_central': $label = 'warning'; break; case 'unloaded': $label = 'default'; break; case 'refinery': $label = 'info'; break; } @endphp @if($data->qc_status != 'cancelled') @php $disabled = 0; if(in_array($data->received_from_store_id, $store_hub_member) && !in_array($data->received_from_store_id, [61, 53, 55, 67, 63])){ $disabled = 0; if($data->received_by && $data->received_at) { $disabled = 0; } } $request_add_url = '?page=' . $request['page'] . '&from_date=' . $request['from_date'] . '&end_date=' . $request['end_date'] . '&do=' . $request['do'] . '&status=' . $request['status'] . '&store=' . $request['store']; @endphp @if($data->qc_status == 'done') {{-- @if(in_array(auth()->user()->username, explode(',', env('USER_SEND_QC_RESULT_JAWS')))) --}} @if(!$data->response_pushed_jaws) @if($has_pg) @if($has_new_plu) Send to Jaws @else ~Generate New PLU~ @endif @endif @else @endif {{-- @endif --}} @endif @endif
{{ $query->appends($_GET)->links() }}