@extends('procurement::layouts.master') @section('title',$project->name) @section('content')

{{ $project->name }} {{ ucfirst(str_replace('_',' ',$project->status)) }}

Edit ← Back
Code
{{ $project->code ?? '—' }}
Launch
{{ $project->target_launch_date?->format('M j, Y') ?? '—' }}
Description
{{ $project->description ?? '—' }}
Notes
{{ $project->notes ?? '—' }}
Production Runs
@forelse($project->runs as $run) @empty @endforelse
Run Target Qty Status Target COGS Sell Price
{{ $run->run_number }} {{ $run->target_qty }} {{ ucfirst(str_replace('_',' ',$run->status)) }} ${{ number_format($run->target_cogs,2) }} ${{ number_format($run->sell_price,2) }}
No runs yet
Bill of Materials
{{ $bomLines->count() }} line(s) · ${{ number_format($bomCost,2) }} / board
@forelse($bomLines as $line) @php $onHand = $line->stock->qty_on_hand ?? 0; @endphp @empty @endforelse
Category Ref Des Description Part # Qty/Board Unit Cost Line Cost On Hand Source
{{ ucwords(str_replace('_',' ',$line->category ?? 'other')) }} {{ $line->description }} {{ $line->part_number ?? '—' }} ${{ number_format($line->unit_cost,4) }} ${{ number_format($line->line_cost,2) }} {{ $onHand }} {{ $line->is_home ? 'Home' : 'Shared' }}
No BOM items yet — import a KiCad BOM or add one below.
{{-- One update/remove form per line, referenced by id from the buttons/inputs above via the form="" attribute — kept outside since
isn't valid there. --}} @foreach($bomLines as $line) @csrf @method('PATCH')
@csrf @method('DELETE')
@endforeach
Build History
@if($finishedGoods) {{ $builds->sum('quantity') }} unit(s) built total · {{ $finishedGoods->stock->qty_on_hand ?? 0 }} on hand @endif
@forelse($builds as $build) @empty @endforelse
Date Boards Built Reference Performed By Notes
{{ $build->movement_date->format('M j, Y') }} {{ $build->quantity }} {{ $build->reference }} {{ $build->performed_by ?: '—' }} {{ $build->notes ?: '—' }}
Consumed ({{ $build->consumed->count() }})
@forelse($build->consumed as $line)
{{ $line->component->description }} ({{ $line->component->ref_designator ?: '—' }}) {{ abs($line->quantity) }}
@empty

No parts recorded for this build.

@endforelse
Excluded from this build ({{ $build->excluded->count() }})
@forelse($build->excluded as $line)
{{ $line->description }} ({{ $line->ref_designator ?: '—' }})
@empty

Every current BOM line was included.

@endforelse

Measured against today's BOM — a line added or removed from the project since this build will show up here even if the choice at build time was different.

No builds logged yet.
@endsection