@extends('layouts.admin') @section('title','New purchase order') @section('content') Purchase orders @if($errors->any()) {{ $errors->first() }} @endif @csrf Supplier & destination Supplier Select supplier… @foreach($suppliers as $supplier) id)>{{ $supplier->name }} @endforeach Or supplier name Receive into @foreach($locations as $location) firstWhere('is_default', true)?->id) === $location->id)> {{ $location->name }} ({{ $location->code }}) @endforeach Expected delivery Supplier reference Currency Notes {{ old('notes') }} Estimated total AUD 0.00 Updates as you edit quantities and unit costs. 1. Draft the PO with SKUs and unit costs. 2. Mark ordered — inventory incoming increases. 3. Receive — incoming converts to available. Lines Add line @php $oldLines = old('lines', [['variant_id' => '', 'quantity' => 10, 'unit_cost' => ''], ['variant_id' => '', 'quantity' => 5, 'unit_cost' => '']]); @endphp @foreach($oldLines as $i => $line) SKU Select catalog SKU… @foreach($catalog as $item) {{ $item['sku'] }} — {{ $item['title'] }} @endforeach Qty Unit cost (AUD) × @endforeach Create draft PO SKU Select catalog SKU… @foreach($catalog as $item) {{ $item['sku'] }} — {{ $item['title'] }} @endforeach Qty Unit cost (AUD) × @endsection
Updates as you edit quantities and unit costs.