@extends('layouts.app') @section('title', $product->exists ? 'Edit Product' : 'New Product') @php $restaurantDepartmentId = $departments->firstWhere('slug', 'restaurant')?->id; $barDepartmentId = $departments->firstWhere('slug', 'bar')?->id; $restaurantSections = $sections->where('type', 'restaurant')->values(); $barSections = $sections->where('type', 'bar')->values(); $restaurantCategories = $categories->where('department_id', $restaurantDepartmentId)->values(); $barCategories = $categories->where('department_id', $barDepartmentId)->values(); @endphp @section('content')

{{ $product->exists ? 'Edit product' : 'New Product' }}

Choose the department first. Restaurant and Bar are separate departments, and each can have many sections.

@csrf @if ($product->exists) @method('PUT') @endif
Restaurant: menu item — enter selling price only; stock, buying cost and reorder control come from ingredients/recipes.
Bar: stocked product — enter buying price, selling price and opening quantity.

Optional.

Restaurant products use Restaurant sections. Bar products use Bar sections.

@if ($product->image_path) @endif
Bar stock: enter the buying price, selling price and opening quantity. The quantity is tracked as normal product stock.
@if ($product->exists)

For later stock changes, use Stock → Opening stock / adjustments.

@endif
Restaurant menu item: no stock quantity, buying price or reorder level is required here. The recipe consumes ingredient stock automatically when the item is sold/produced.
Cancel
@endsection