@extends('layouts.app') @section('title', 'New Purchase') @section('content')

New Purchase

Back
@if(session('error'))
{{ session('error') }}
@endif
@csrf
Product Qty Unit price (₹) Total
Search and click a product to add. Edit qty and unit price as needed.
Subtotal0.00

Total0.00
Cancel
@php $productsList = $products->map(fn($p) => [ 'id' => $p->id, 'name' => $p->name, 'purchase_price' => (float) $p->purchase_price, 'barcode' => trim((string) ($p->barcode ?? '')), 'search' => strtolower($p->name . ' ' . trim((string) ($p->barcode ?? ''))), ]); @endphp @push('scripts') @endpush @endsection