{{ __('Produkt') }}
{{ Form::text('name', $product->name, ['placeholder' => __('Name'), 'class' => 'form-control', 'id' => 'name', 'required']) }}
{{--
{{ Form::select('show_at', \App\Services\Type::$showATs, $product->show_at, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'show_at') ) }}
--}}
{{ Form::text('pos', $product->pos, ['placeholder' => __('1, 2, 3, etc'), 'class' => 'form-control', 'id' => 'pos']) }}
{{ Form::select('show_on[]', \App\Services\Type::$showONs, $product->show_on, ['data-live-search' => 'false', 'class' => 'selectpicker', 'id' => 'show_on', 'multiple']) }}
{{ Form::textarea('copy', $product->copy, ['placeholder' => __('Produktbeschreibung'), 'class' => 'form-control summernote', 'id' => 'copy']) }}
{{ Form::textarea('short_copy', $product->short_copy, ['placeholder' => __('Kurzbeschreibung'), 'class' => 'form-control summernote', 'id' => 'short_copy']) }}
{{ Form::text('max_buy_num', $product->max_buy_num, ['placeholder' => __('in Stück'), 'class' => 'form-control', 'id' => 'max_buy_num']) }}

 
{{ __('Verfügbarkeit') }}
@php $outOfStockActive = $product->out_of_stock_until !== null && $product->out_of_stock_until->endOfDay()->isFuture(); @endphp

{{ __('Zeigt im Shop den Hinweis „In ca. X Tagen wieder da!" – die Tage zählen täglich automatisch herunter. Der Kauf bleibt weiterhin möglich.') }}


{{ __('Daueranzeige ohne Zeitangabe (hat Vorrang vor der Tagesangabe). Der Kauf bleibt weiterhin möglich.') }}


 
{{ __('Set / Produktart') }}

{{ __('Bei aktivem Set werden Rezeptur, Verpackung und Warenwirtschaft ausgeblendet. Ein Set wird nicht produziert; beim Verkauf werden später die enthaltenen Einzelprodukte abgebucht.') }}


 
{{ __('Preise in EUR') }}
{{ Form::text('price', $product->getFormattedPrice(), ['placeholder' => __('Preis VK in EUR (Brutto)'), 'class' => 'form-control', 'id' => 'price']) }}
{{ Form::text('tax', $product->getFormattedTax(), ['placeholder' => __('MwSt in %'), 'class' => 'form-control', 'id' => 'tax']) }}
{{ Form::text('price_old', $product->getFormattedPriceOld(), ['placeholder' => __('Streichpreis'), 'class' => 'form-control', 'id' => 'price_old']) }}
{{ Form::text('weight', $product->weight, ['placeholder' => __('Gewicht in g'), 'class' => 'form-control', 'id' => 'weight']) }}
{{--
{{ Form::text('points', $product->points, array('placeholder'=>__('Points pro Produkt'), 'class'=>'form-control', 'id'=>'points')) }}
--}}
{{ Form::text('amount', $product->amount, ['placeholder' => __('Anzahl/Verfügbarkeit'), 'class' => 'form-control', 'id' => 'amount']) }}
{{ Form::text('price_ek', $product->getFormattedPriceEk(), ['placeholder' => __('Preis EK in EUR'), 'class' => 'form-control', 'id' => 'price_ek']) }}
{{ Form::text('value_commission', $product->getFormattedValueCommission(), ['placeholder' => __('Einzelrabatt in %'), 'class' => 'form-control', 'id' => 'value_commission']) }}
{{ Form::text('partner_commission', $product->getFormattedPartnerCommission(), ['placeholder' => __('Vertriebspartner Einzelrabatt in %'), 'class' => 'form-control', 'id' => 'partner_commission']) }}

 
Landesspezifische Preise
@foreach ($country_for_prices as $country) {{ Form::hidden('country_prices[]', $country->id) }}
{{ $country->de }}
@if ($country->own_eur)

{{ Form::text('c_price[' . $country->id . ']', formatNumber($product->getCPrice($country->id)), ['placeholder' => __('Preis VK in EUR Brutto'), 'class' => 'form-control', 'id' => 'c_price_' . $country->id]) }}
{{ Form::text('c_tax[' . $country->id . ']', formatNumber($product->getCTax($country->id)), ['placeholder' => __('MwSt in %'), 'class' => 'form-control', 'id' => 'c_tax' . $country->id]) }}
{{ Form::text('c_price_old[' . $country->id . ']', formatNumber($product->getCPriceOld($country->id)), ['placeholder' => __('Streichpreis'), 'class' => 'form-control', 'id' => 'c_price_old' . $country->id]) }}
@endif @if ($country->currency)

@if ($country->currency_calc) Preis Berechnung automatisch @else Preis manuell angegeben @endif

@if ($country->currency_calc) {{-- NUR Anzeige vom automatisch berechneten Preis currency_faktor Auf Basis vom price Wenn own_eur auf basis vom own_eur price --}}
{{ Form::text('c_currency[' . $country->id . ']', formatNumber($product->getRealPrice($country) * $country->currency_faktor), ['class' => 'form-control', 'readonly']) }}
@else {{-- Eingabe Währungs Namen aus currency_name currency_faktor als Hinweis ausgeben Auf Basis vom price Wenn own_eur auf basis vom own_eur price --}}
{{ Form::text('c_currency[' . $country->id . ']', formatNumber($product->getCCurrency($country->id)), ['placeholder' => __('Preis VK in ') . $country->currency_unit, 'class' => 'form-control']) }}
@endif
{{ Form::text('currency_faktor[' . $country->id . ']', formatNumber($country->currency_faktor, 4), ['class' => 'form-control', 'readonly']) }}
{{ Form::text('preis_eur[' . $country->id . ']', formatNumber($product->getRealPrice($country)), ['class' => 'form-control', 'readonly']) }}
{{ Form::text('currency_unit[' . $country->id . ']', $country->currency_unit, ['class' => 'form-control', 'readonly']) }}
@endif
@endforeach für die Einstellung von landesspezifischen Preisen müssen diese unter Länder -> Land aktiviert werden.

 
{{ __('White-Label') }}
{{ Form::text('whitelabel_name', $product->whitelabel_name, ['placeholder' => __('Bezeichnung'), 'class' => 'form-control', 'id' => 'whitelabel_name']) }}
Bestimmt die Farbe auf dem Lieferschein („Tiegel: Schwarz“). Ohne Auswahl wird die Farbe wie bisher aus dem Etikett abgeleitet.
Die nur die möglichen Varianten die ausgewählt sind, können einzelnen VP und Etiketten zugeordnet werden.
@foreach ($product->whitelabel_images as $image)

{{ Form::text('image_wl_size['.$image->id.']', $image->size_cm !== null ? formatNumber($image->size_cm, 1) : '', ['class' => 'form-control', 'id' => 'image_wl_size_'.$image->id, 'placeholder' => 'aus Variante']) }}
Etikett löschen
@endforeach

 
{{ __('Details') }}
{{ Form::text('contents', $product->contents, ['placeholder' => __('Bsp: 150 ml'), 'class' => 'form-control', 'id' => 'contents']) }}
{{ Form::text('contents_total', $product->contents_total, ['placeholder' => __('Bsp: 150'), 'class' => 'form-control', 'id' => 'contents_total']) }}
{{ Form::text('fill_weight', $product->fill_weight !== null ? rtrim(rtrim(number_format((float) $product->fill_weight, 3, ',', '.'), '0'), ',') : null, ['placeholder' => __('leer = Menge = Gramm (1 g/ml)'), 'class' => 'form-control'.($errors->has('fill_weight') ? ' is-invalid' : ''), 'id' => 'fill_weight', 'inputmode' => 'decimal']) }} @error('fill_weight')
{{ $message }}
@enderror {{ __('Basis für die Rezeptur-Mengenberechnung (Prozent × Füllgewicht).') }}
{{ Form::select('unit', $product->unitTypes, $product->unit, ['data-live-search' => 'false', 'class' => 'selectpicker', 'id' => 'unit']) }}
{{ Form::text('base_price', $product->getBasePriceFormattedFull(), ['placeholder' => __(''), 'class' => 'form-control', 'id' => 'base_price', 'readonly']) }}
{{ Form::text('number', $product->number, ['placeholder' => __('number'), 'class' => 'form-control', 'id' => 'number']) }}
{{ Form::text('icons', $product->icons, ['placeholder' => __('icons'), 'class' => 'form-control', 'id' => 'icons']) }}
{{--
--}}
{{ Form::textarea('description', $product->description, ['placeholder' => __('description'), 'class' => 'form-control summernote', 'id' => 'description']) }}
{{ Form::textarea('usage', $product->usage, ['placeholder' => __('usage'), 'class' => 'form-control summernote', 'id' => 'usage']) }}
{{ Form::textarea('ingredients', $product->ingredients, ['placeholder' => __('ingredients'), 'class' => 'form-control summernote', 'id' => 'ingredients']) }}

 
{{ __('Inhaltsstoffe') }} {{ __('Rezeptur') }}

{{ __('Bei aktiver Option werden die Rezeptur-Felder ausgeblendet und in der Produktion wird keine Rezeptur abgefragt.') }}

{{ __('Reihenfolge per Drag & Drop ändern, danach speichern.') }}

@foreach ($product->p_ingredients as $ingredient) @endforeach
{{ __('Name') }} {{ __('Qualität') }} {{ __('INCI') }} {{ __('Anteil (%)') }} {{ __('Faktor') }} {{ __('Effektiv') }}
☰ {{ $ingredient->name }} {{ $ingredient->materialQuality?->name ?? '—' }} {{ $ingredient->inci }} — @if ($product->id) {{-- Kein
hier: der Button liegt im Produkt-Formular, verschachtelte Formulare würden _method=DELETE ins Speichern-Formular leaken. --}} @else @endif
{{ __('Gesamt:') }} —
{{ __('Inhaltsstoffe anlegen') }}
{{-- /.js-recipe-fields --}}

 
{{ __('Hersteller Rezeptur') }}

{{ __('Eigene Hersteller-Rezeptur (separate INCI-Liste), gegliedert in Phasen (Phase A, B …). Rohstoffe und Phasen per Drag & Drop sortieren, danach speichern. Die Gesamtsumme über alle Phasen muss 100 % ergeben.') }}

@php $mfgPhaseList = $product->exists ? $product->recipePhases()->get() : collect(); $mfgRowsByPhase = $product->manufacturer_ingredients->groupBy(fn ($i) => (int) ($i->pivot->recipe_phase_id ?? 0)); $mfgBlocks = []; if (($mfgRowsByPhase[0] ?? collect())->isNotEmpty() || $mfgPhaseList->isEmpty()) { // Altbestand ohne Phase bzw. leere Rezeptur => impliziter erster Block $mfgBlocks[] = ['id' => null, 'name' => '', 'note' => '', 'rows' => $mfgRowsByPhase[0] ?? collect()]; } foreach ($mfgPhaseList as $mfgPhase) { $mfgBlocks[] = ['id' => $mfgPhase->id, 'name' => $mfgPhase->name, 'note' => $mfgPhase->note, 'rows' => $mfgRowsByPhase[$mfgPhase->id] ?? collect()]; } @endphp
@foreach ($mfgBlocks as $blockIndex => $block)
☰ {{-- R-01: stabile Phasen-ID — Umbenennen/Umordnen/Einfügen wechselt die Identität nicht --}}
@foreach ($block['rows'] as $ingredient) @endforeach
{{ __('Name') }} {{ __('Qualität') }} {{ __('INCI') }} {{ __('Anteil (%)') }} {{ __('Faktor') }} {{ __('Effektiv') }}
☰ {{ $ingredient->name }} {{ $ingredient->materialQuality?->name ?? '—' }} {{ $ingredient->inci }} —
@endforeach
{{ __('Gesamt:') }} —
{{-- /.js-recipe-fields --}}

 
{{ __('Verpackung & Material') }}

{{ __('Reihenfolge per Drag & Drop ändern, danach speichern.') }}

@foreach ($product->packagings as $pitem) @endforeach
{{ __('Name') }} {{ __('Material') }} {{ __('Gewicht') }} (g) {{ __('Menge') }}
☰ {{ $pitem->name }} {{ $pitem->packagingMaterial?->name ?? '—' }} {{ $pitem->weight_grams !== null ? formatNumber($pitem->weight_grams) : '—' }}
@if (Auth::user()->isAdmin()) {{ __('Verpackungsartikel verwalten') }} @endif

 
{{ __('Warenwirtschaft') }}

{{ __('Abwählen für Positionen ohne Lagerführung (z. B. Abrechnung Druckkosten, Logo-Etiketten).') }}

{{-- AP-47 (verschoben 09.09.2026 in die Card „Warenwirtschaft", ausformuliert): nur so markierte Produkte erscheinen in der Produktions-Planung und in der „Enthalten in"-Box des Rohstoffbestands. --}}

{{ __('Abwählen für Zukaufartikel und Handelsware (z. B. Aloe-vera-Produkte): Das Produkt erscheint dann nicht mehr in der Produkt-Auswahl einer neuen Produktion und nicht in der Box „Enthalten in" des Rohstoffbestands. Im Produktionsergebnis bleibt es wählbar (z. B. Zweitgröße aus derselben Masse). Produktbestand und Verkauf sind davon nicht betroffen.') }}

{{ Form::text('batch_prefix', old('batch_prefix', $product->batch_prefix), ['placeholder' => __('z. B. TP1'), 'class' => 'form-control', 'id' => 'batch_prefix', 'maxlength' => 20]) }} {{ __('Kategorie-Kürzel + Produkt-Nr. (z. B. TP1). Die Produktion schlägt daraus Präfix + Produktionsdatum vor: TP1 → Charge TP1150626 (15.06.26). Der Vorschlag bleibt editierbar.') }}

{{ __('Produktbestand-Schwellwerte (Stück). Bei Erreichen wird das Produkt im Produktbestand farblich markiert.') }}

{{ Form::number('min_product_stock', old('min_product_stock', $product->min_product_stock), ['placeholder' => __('z. B. 20'), 'class' => 'form-control', 'id' => 'min_product_stock', 'min' => 0, 'step' => 1]) }}
{{ Form::number('critical_product_stock', old('critical_product_stock', $product->critical_product_stock), ['placeholder' => __('z. B. 10'), 'class' => 'form-control', 'id' => 'critical_product_stock', 'min' => 0, 'step' => 1]) }}

{{ __('Lagerplatz (Raum / Regal / Fach). Bausteine zentral pflegbar unter Einstellungen → Allgemein.') }}


{{ __('Optional: dieses Einzelprodukt einem Hauptprodukt zuordnen (z. B. „50 × 15 ml"). Der Produktbestand führt nur Haupt-/Einzelprodukte.') }}

{{ Form::number('main_product_quantity', old('main_product_quantity', $product->main_product_quantity), ['placeholder' => __('z. B. 50'), 'class' => 'form-control', 'id' => 'main_product_quantity', 'min' => 1, 'step' => 1]) }}

 
@if (Auth::user()->isSySAdmin())
{{ __('SySAdmin Einstellungen') }}
{{ Form::select('action[]', $product->actions, $product->action, ['data-live-search' => 'false', 'class' => 'selectpicker', 'id' => 'action', 'multiple']) }}
{{ Form::select('identifier', $product->identifiers_types, $product->identifier, ['data-live-search' => 'false', 'class' => 'selectpicker', 'id' => 'identifier']) }}
{{ Form::text('upgrade_to_id', $product->upgrade_to_id, ['placeholder' => __('Produkt-ID auf das geupdatet werden soll'), 'class' => 'form-control', 'id' => 'upgrade_to_id']) }}
{{ Form::text('wp_number', $product->wp_number, ['placeholder' => __('WP Number'), 'class' => 'form-control', 'id' => 'wp_number']) }}

 
@endif