gruene-seele/resources/views/admin/ingredient/form.blade.php
Kevin Adametz 78679e0c55 Warenwirtschaft: AP-00 bis AP-08 + aktualisierter Entwicklungsplan
Umsetzung der Warenwirtschafts-/Produktmanagement-Erweiterung gemaess
Entwicklungsplan V4.0:

- AP-00: Regressionsbasis fuer 5.1-Features (ProductPhase51Test)
- AP-01: URL-Bugfixes B1/B2 (suppliers/packaging-items, breitere url-Spalten)
- AP-04/04.1: iPad-taugliche, vereinheitlichte Tabellen-Aktionen
- AP-05: Einstellungen "Allgemein" mit UST-Saetzen (tax_rates) und
  Lieferzeit-Vorlagen (delivery_times, inkl. Tage-Feld)
- AP-06: Lieferanten um Bestellweg, Bestell-Mail/-URL und Lieferzeit erweitert
- AP-07/07.1: INCI um Lieferanten-Mehrfachwahl, UST und Lieferzeit erweitert;
  Lieferanten-Detailansicht im Modal mit pflegbaren INCI-/Verpackungslisten
- AP-08: Einkauf um UST-Snapshot, Netto/Brutto-Automatik und Duplizieren erweitert

Entwicklungsplan aktualisiert: alle Klaerungspunkte (§5) vom Kunden beantwortet
und in die jeweiligen APs eingearbeitet (AP-02/03/09/13/15), neues AP-18
(Hinweise-Doku unter Einstellungen) ergaenzt. Naechster Schritt eindeutig
markiert: AP-09 (Produktion auf Hersteller-Rezeptur, kein Fallback, Warnung).
2026-06-02 16:30:42 +00:00

113 lines
No EOL
6 KiB
PHP
Executable file
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="card mb-2">
<h5 class="card-header">
{{ __('Inhaltsstoff') }}
</h5>
<div class="card-body">
<div class="form-row">
<div class="form-group col">
<label class="custom-control custom-checkbox float-right">
{!! Form::checkbox('active', 1, $model->active, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('aktiv')}}</span>
</label>
<label class="form-label" for="name">{{ __('Name') }}*</label>
{{ Form::text('name', $model->name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'id'=>'name', 'required')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label class="form-label" for="headline">{{ __('INCI') }}</label>
{{ Form::textarea('inci', $model->inci, array('placeholder'=>__('INCI'), 'class'=>'form-control', 'id'=>'inci', 'rows'=>3)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label class="form-label" for="headline">{{ __('Wirkung') }}</label>
{{ Form::textarea('effect', $model->effect, array('placeholder'=>__('Wirkung'), 'class'=>'form-control', 'id'=>'inci', 'rows'=>3)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-4">
<label class="form-label" for="material_quality_id">{{ __('Rohstoffqualität') }}</label>
<select name="material_quality_id" id="material_quality_id" class="form-control">
<option value="">{{ __('— keine Angabe —') }}</option>
@foreach(\App\Models\MaterialQuality::orderBy('pos')->orderBy('name')->get() as $quality)
<option value="{{ $quality->id }}" @selected((string)old('material_quality_id', $model->material_quality_id) === (string)$quality->id)>{{ $quality->name }}</option>
@endforeach
</select>
</div>
<div class="form-group col-sm-4">
<label class="form-label" for="tax_rate_id">{{ __('Umsatzsteuer') }}</label>
<select name="tax_rate_id" id="tax_rate_id" class="form-control">
<option value="">{{ __('— keine Angabe —') }}</option>
@foreach($taxRates as $taxRate)
<option value="{{ $taxRate->id }}" @selected((string)old('tax_rate_id', $model->tax_rate_id) === (string)$taxRate->id)>{{ $taxRate->name }} ({{ formatNumber($taxRate->percent) }} %)</option>
@endforeach
</select>
</div>
</div>
@php
$selectedSupplierIds = old(
'supplier_ids',
$model->exists ? $model->suppliers->pluck('id')->all() : [],
);
@endphp
<div class="form-row">
<div class="form-group col">
<label class="form-label" for="supplier_ids">{{ __('Lieferanten') }}</label>
<div class="light-style">
<select name="supplier_ids[]" id="supplier_ids" class="w-100" multiple="multiple"
data-placeholder="{{ __('Lieferanten wählen') }}">
@foreach($suppliers as $supplier)
<option value="{{ $supplier->id }}" @selected(in_array($supplier->id, $selectedSupplierIds, false))>{{ $supplier->name }}</option>
@endforeach
</select>
</div>
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-6">
<label class="form-label" for="delivery_time">{{ __('Lieferzeit') }}</label>
<input type="text" name="delivery_time" id="delivery_time" list="ingredient_delivery_time_options"
class="form-control" value="{{ old('delivery_time', $model->delivery_time) }}"
placeholder="{{ __('z. B. 35 Werktage') }}">
<datalist id="ingredient_delivery_time_options">
@foreach($deliveryTimes as $deliveryTime)
<option value="{{ $deliveryTime->label }}" data-days="{{ $deliveryTime->days }}"></option>
@endforeach
</datalist>
<small class="text-muted">{{ __('Lieferzeit des Rohstoffs (hat Vorrang vor der Lieferanten-Lieferzeit).') }}</small>
</div>
<div class="form-group col-sm-2">
<label class="form-label" for="delivery_time_days">{{ __('Tage') }}</label>
<input type="number" name="delivery_time_days" id="delivery_time_days" min="0" max="65535"
class="form-control" value="{{ old('delivery_time_days', $model->delivery_time_days) }}"
placeholder="{{ __('z. B. 5') }}">
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-2">
<label class="form-label" for="pos">{{ __('pos') }}</label>
{{ Form::text('pos', $model->pos, array('placeholder'=>__('pos'), 'class'=>'form-control', 'id'=>'pos')) }}
</div>
<div class="form-group col-sm-3">
<label class="form-label" for="default_factor">{{ __('Standard-Schwundfaktor') }}</label>
{{ Form::text('default_factor', $model->default_factor !== null ? formatNumber($model->default_factor) : formatNumber(1.10), array('placeholder'=>'1,10', 'class'=>'form-control', 'id'=>'default_factor')) }}
</div>
<div class="form-group col-sm-3">
<label class="form-label" for="min_stock_alert">{{ __('Meldebestand (g)') }}</label>
{{ Form::text('min_stock_alert', $model->min_stock_alert !== null ? formatNumber($model->min_stock_alert) : '', array('placeholder'=>__('optional'), 'class'=>'form-control', 'id'=>'min_stock_alert')) }}
</div>
</div>
</div>
</div>