@extends('layouts.app') @php $editing = $assignment->exists; $title = $editing ? 'Edit '.$assignment->number() : 'Assign orders to a vendor'; $formData = [ 'single' => $editing, 'rows' => array_values(array_map(fn ($r) => $editing ? array_merge($r, ['order_id' => $assignment->order_id]) : $r, $rows)), 'orders' => $orders->map(fn ($o) => [ 'id' => $o->id, 'label' => $o->order_no.' — '.$o->client->name.' ('.money($o->total).')', 'items' => $o->items->map(fn ($i) => ['id' => $i->id, 'label' => trim($i->design_name.($i->sizeText() ? ' · '.$i->sizeText() : '').($i->color ? ' · '.$i->color : '').' ×'.rtrim(rtrim((string) $i->quantity, '0'), '.'))])->values(), ])->values(), ]; @endphp @section('title', $title) @section('content')
@csrf @if ($editing) @method('PUT') @endif @include('partials.error-summary')
@if ($editing)
{{ $assignment->vendor->name }}
@else @foreach ($vendors as $v)@endforeach @endif @foreach ($managers as $m)@endforeach @if ($editing) @foreach (\App\Models\VendorAssignment::STATUSES as $key => [$label])@endforeach @endif
@unless ($editing) @endunless
Type the agreed amount for the whole order, or open Specific products only to agree an amount per product.
@include('partials.assign-to', ['value' => $assignment->assigned_to])
How this works
  • The agreed amount is what you will owe the vendor for the order.
  • Extra costs can be added later from the assignment page.
  • Pay for a specific order, or pay the vendor in general and allocate later.
Cancel
@endsection @push('modals') @include('partials.quick-add', ['type' => 'vendor']) @endpush