@extends('layouts.app') @section('content')

Search Product for Return

{{-- Search Form --}}
{{-- Search Results --}} @if(isset($billItems))

Search Results from Bills

@foreach($billItems as $billItem) @php $product = $billItem->product; $customer = $billItem->bill->customer; $productJson = json_encode([ 'id' => $product->id, 'name' => $product->name, 'company' => $product->company, 'unit_type' => $product->unit_type, 'salt' => $product->salt, 'stock' => $product->quantity, 'category' => is_array($product->categories) ? implode(', ', $product->categories) : $product->categories, 'bill_item_id' => $billItem->id, 'max_qty' => $billItem->qty ]); @endphp

{{ $product->name }}

Company: {{ $product->company }}

Customer: {{ $billItem->bill->customer_name }}

Bill ID: {{ $billItem->bill_id }}

Qty Purchased: {{ $billItem->qty }}

@endforeach
@endif {{-- Cart Section --}}

Return Cart

@csrf
@endsection @section('scripts') @endsection