@extends('layouts.backend') @section('extraCss') @endsection @section('mainContentArea')

Barcode Tracking

@csrf

Enter Barcodes line by line:

Barcode Tracking Details

@php ini_set('memory_limit', '-1'); function date_compare($element1, $element2) { $datetime1 = strtotime($element1['date']); $datetime2 = strtotime($element2['date']); return $datetime1 - $datetime2; } @endphp @foreach($barcodeHistory as $barcodeh) @php usort($barcodeh, 'date_compare'); @endphp @foreach($barcodeh as $bar=>$bar_value) @php //dump($bar_value); $wpro=\DB::table('oc_warehouse_product') ->select([ 'oc_warehouse_product.barcode', 'oc_warehouse_product.article', 'oc_warehouse_product.color', 'oc_warehouse_product.size', 'oc_warehouse_product.mrp', ]) ->where('oc_warehouse_product.barcode','=',$bar_value['barcode']) ->first(); @endphp @if($role_id == 3 || $role_id == 7 || in_array($role_id,array(20,21,27,57,56,52))) @elseif($pos_id == $bar_value['from'] || $pos_id ==$bar_value['to'] || $role_id == 1 || in_array($role_id,array(20,21,27,57,56,52)) ) @endif @endforeach @endforeach
# Source barcode Article Color Size Mrp From_type From TO Date REF
{{ $counter++ }} {{ $bar_value['source'] }} {{ $bar_value['barcode'] }} {{ $wpro->article }} {{ $wpro->color }} {{ $wpro->size }} {{ $wpro->mrp }} {{ $bar_value['from_type'] }} @php if($bar_value['from_type'] == "GR party" || $bar_value['from_type'] == "Supplier to Warehouse" || $bar_value['from_type'] == "Warehouse to Party"){ if($bar_value['from'] ==1 || $bar_value['from'] ==2){ $sql=\DB::table('oc_warehouses')->where('id',$bar_value['from'])->first(); $name = !empty($sql) ? $sql->name : $bar_value['from']; print_r($name); } else{ $sql=\DB::table('oc_wh_suppliers')->where('id',$bar_value['from'])->first(); $name = !empty($sql) ? $sql->company_name : $bar_value['from']; print_r($name); } }else{ $sql=\DB::table('oc_warehouses')->where('id',$bar_value['from'])->first(); $name = !empty($sql) ? $sql->name : $bar_value['from']; print_r($name); } @endphp @php if($bar_value['from_type'] == "GR party" || $bar_value['from_type'] == "Supplier to Warehouse" || $bar_value['from_type'] == "Warehouse to Party"){ if($bar_value['to'] ==1 || $bar_value['to'] ==2){ $sql=\DB::table('oc_warehouses')->where('id',$bar_value['to'])->first(); $name = !empty($sql) ? $sql->name : $bar_value['to']; print_r($name); } else{ $sql=\DB::table('oc_wh_suppliers')->where('id',$bar_value['to'])->first(); $name = !empty($sql) ? $sql->company_name : $bar_value['to']; print_r($name); } }else{ $sql=\DB::table('oc_warehouses')->where('id',$bar_value['to'])->first(); $name = !empty($sql) ? $sql->name : $bar_value['to']; print_r($name); } @endphp {{ $bar_value['date'] }} {{ $bar_value['ref'] }}
{{ $counter++ }} {{ $bar_value['source'] }} {{ $bar_value['barcode'] }} {{ $wpro->article }} {{ $wpro->color }} {{ $wpro->size }} {{ $wpro->mrp }} {{ $bar_value['from_type'] }} @php if($bar_value['from_type'] == "GR party" || $bar_value['from_type'] == "Supplier to Warehouse" || $bar_value['from_type'] == "Warehouse to Party"){ if($bar_value['from'] ==1 || $bar_value['from'] ==2){ $sql=\DB::table('oc_warehouses')->where('id',$bar_value['from'])->first(); $name = !empty($sql) ? $sql->name : $bar_value['from']; print_r($name); } else{ $sql=\DB::table('oc_wh_suppliers')->where('id',$bar_value['from'])->first(); $name = !empty($sql) ? $sql->company_name : $bar_value['from']; print_r($name); } }else{ $sql=\DB::table('oc_warehouses')->where('id',$bar_value['from'])->first(); $name = !empty($sql) ? $sql->name : $bar_value['from']; print_r($name); } @endphp @php if($bar_value['from_type'] == "GR party" || $bar_value['from_type'] == "Supplier to Warehouse" || $bar_value['from_type'] == "Warehouse to Party"){ if($bar_value['to'] ==1 || $bar_value['to'] ==2){ $sql=\DB::table('oc_warehouses')->where('id',$bar_value['to'])->first(); $name = !empty($sql) ? $sql->name : $bar_value['to']; print_r($name); } else{ $sql=\DB::table('oc_wh_suppliers')->where('id',$bar_value['to'])->first(); $name = !empty($sql) ? $sql->company_name : $bar_value['to']; print_r($name); } }else{ $sql=\DB::table('oc_warehouses')->where('id',$bar_value['to'])->first(); $name = !empty($sql) ? $sql->name : $bar_value['to']; print_r($name); } @endphp {{ $bar_value['date'] }} {{ $bar_value['ref'] }}
@endsection @section('extraJs') @endsection