@extends('layouts.app', ['page' => 'Bill of Materials', 'pageSlug' => 'bill-of-materials', 'section' => 'manufacturing']) @section('content')

Bill of Materials

Overview of all Bill of Materials. Click on actions to view, edit, or manage raw materials.

@php $groupedBoms = $billOfMaterials->groupBy(function($bom) { return $bom->product_id . '-' . $bom->batch_size; }); @endphp @foreach($groupedBoms as $groupKey => $bomGroup) @php $firstBom = $bomGroup->first(); $rawMaterialsCount = $bomGroup->count(); @endphp @endforeach
Name Product Batch Size Raw Materials Count Created Actions
{{ $firstBom->name }} {{ $firstBom->product->name }} @if($firstBom->product->description)
{{ $firstBom->product->description }} @endif
{{ number_format($firstBom->batch_size, 0) }} {{ $rawMaterialsCount }} raw materials {{ $firstBom->created_at->format('M d, Y') }}
@csrf @method('delete')
@endsection @push('js') @endpush