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).
This commit is contained in:
Kevin Adametz 2026-06-02 16:30:42 +00:00
parent ca3eb663fe
commit 78679e0c55
67 changed files with 3523 additions and 101 deletions

View file

@ -35,3 +35,27 @@
{!! Form::close() !!}
@endsection
@section('scripts')
<script>
$(document).ready(function() {
$('#supplier_ids').select2({
theme: 'default',
placeholder: '{{ __('Lieferanten wählen') }}',
width: '100%',
closeOnSelect: false
});
$('#delivery_time').on('input change', function() {
var value = $(this).val();
var option = $('#ingredient_delivery_time_options option').filter(function() {
return this.value === value;
}).first();
if (option.length && option.data('days') !== undefined && option.data('days') !== '') {
$('#delivery_time_days').val(option.data('days'));
}
});
});
</script>
@endsection

View file

@ -42,6 +42,56 @@
@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">

View file

@ -0,0 +1,56 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<h6 class="card-header">{{ $model->exists ? __('Lieferzeit-Vorlage bearbeiten') : __('Lieferzeit-Vorlage anlegen') }}</h6>
<div class="card-body">
<form method="post" action="{{ $model->exists ? route('admin.inventory.delivery-times.update', $model) : route('admin.inventory.delivery-times.store') }}">
@csrf
@if($model->exists)
@method('PUT')
@endif
<div class="form-group">
<label for="label">{{ __('Bezeichnung') }}</label>
<input type="text" name="label" id="label" class="form-control @error('label') is-invalid @enderror"
value="{{ old('label', $model->label) }}" placeholder="{{ __('z. B. 35 Werktage') }}" required>
@error('label')
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
<div class="form-group">
<label for="days">{{ __('Lieferzeit in Tagen') }}</label>
<input type="number" name="days" id="days" min="0" max="65535"
class="form-control @error('days') is-invalid @enderror"
value="{{ old('days', $model->days) }}" placeholder="{{ __('z. B. 5') }}">
<small class="form-text text-muted">{{ __('Ganze Tage bis zum Wareneingang. Wird später für „rechtzeitig bestellen"-Hinweise verwendet.') }}</small>
@error('days')
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
<div class="form-group">
<label for="pos">{{ __('Sortierung') }}</label>
<input type="number" name="pos" id="pos" min="0" max="255"
class="form-control @error('pos') is-invalid @enderror"
value="{{ old('pos', $model->pos) }}">
@error('pos')
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
<div class="form-group">
<label class="custom-control custom-checkbox">
<input type="checkbox" name="active" value="1" class="custom-control-input"
@checked(old('active', $model->active))>
<span class="custom-control-label">{{ __('Aktiv') }}</span>
</label>
</div>
<button type="submit" class="btn btn-primary">{{ __('Speichern') }}</button>
<a href="{{ route('admin.inventory.general') }}" class="btn btn-outline-secondary">{{ __('Zurück') }}</a>
</form>
</div>
</div>
@endsection

View file

@ -0,0 +1,118 @@
@extends('layouts.layout-2')
@section('content')
@include('admin.inventory.partials.table-actions-style')
<div class="card mb-4">
<h6 class="card-header d-flex justify-content-between align-items-center">
<span>{{ __('Umsatzsteuersätze') }}</span>
<a href="{{ route('admin.inventory.tax-rates.create') }}"
class="btn btn-sm btn-primary">{{ __('Neu anlegen') }}</a>
</h6>
<div class="card-datatable table-responsive">
<table class="table table-striped table-bordered wawi-table mb-0">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{ __('Name') }}</th>
<th>{{ __('Satz') }}</th>
<th>{{ __('Status') }}</th>
<th></th>
</tr>
</thead>
<tbody>
@forelse($taxRates as $taxRate)
<tr>
<td>
<a href="{{ route('admin.inventory.tax-rates.edit', $taxRate) }}"
class="btn icon-btn btn-sm btn-primary">
<span class="far fa-edit"></span>
</a>
</td>
<td>{{ $taxRate->name }}</td>
<td>{{ number_format($taxRate->percent, 2, ',', '.') }}&nbsp;%</td>
<td>
@if ($taxRate->active)
<span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>
@else
<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>
@endif
</td>
<td>
<form action="{{ route('admin.inventory.tax-rates.destroy', $taxRate) }}" method="post"
class="d-inline" onsubmit="return confirm('{{ __('Really delete entry?') }}');">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-link text-danger p-0"
title="{{ __('Delete') }}"><i class="far fa-trash-alt"></i></button>
</form>
</td>
</tr>
@empty
<tr>
<td colspan="5" class="text-center text-muted">
{{ __('Noch keine Umsatzsteuersätze angelegt.') }}</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
<div class="card">
<h6 class="card-header d-flex justify-content-between align-items-center">
<span>{{ __('Lieferzeit-Vorlagen') }}</span>
<a href="{{ route('admin.inventory.delivery-times.create') }}"
class="btn btn-sm btn-primary">{{ __('Neu anlegen') }}</a>
</h6>
<div class="card-datatable table-responsive">
<table class="table table-striped table-bordered wawi-table mb-0">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{ __('Bezeichnung') }}</th>
<th>{{ __('Tage') }}</th>
<th>{{ __('Status') }}</th>
<th></th>
</tr>
</thead>
<tbody>
@forelse($deliveryTimes as $deliveryTime)
<tr>
<td>
<a href="{{ route('admin.inventory.delivery-times.edit', $deliveryTime) }}"
class="btn icon-btn btn-sm btn-primary">
<span class="far fa-edit"></span>
</a>
</td>
<td>{{ $deliveryTime->label }}</td>
<td>{{ $deliveryTime->days !== null ? $deliveryTime->days : '' }}</td>
<td>
@if ($deliveryTime->active)
<span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>
@else
<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>
@endif
</td>
<td>
<form action="{{ route('admin.inventory.delivery-times.destroy', $deliveryTime) }}"
method="post" class="d-inline"
onsubmit="return confirm('{{ __('Really delete entry?') }}');">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-link text-danger p-0"
title="{{ __('Delete') }}"><i class="far fa-trash-alt"></i></button>
</form>
</td>
</tr>
@empty
<tr>
<td colspan="5" class="text-center text-muted">
{{ __('Noch keine Lieferzeit-Vorlagen angelegt.') }}</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
@endsection

View file

@ -1,13 +1,14 @@
@extends('layouts.layout-2')
@section('content')
@include('admin.inventory.partials.table-actions-style')
<div class="card">
<h6 class="card-header d-flex justify-content-between align-items-center">
<span>{{ __('Lagerorte') }}</span>
<a href="{{ route('admin.inventory.locations.create') }}" class="btn btn-sm btn-primary">{{ __('Neu anlegen') }}</a>
</h6>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<table class="datatables-style table table-striped table-bordered wawi-table">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>

View file

@ -1,13 +1,14 @@
@extends('layouts.layout-2')
@section('content')
@include('admin.inventory.partials.table-actions-style')
<div class="card">
<h6 class="card-header d-flex justify-content-between align-items-center">
<span>{{ __('Rohstoffqualität') }}</span>
<a href="{{ route('admin.inventory.material-qualities.create') }}" class="btn btn-sm btn-primary">{{ __('Neu anlegen') }}</a>
</h6>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<table class="datatables-style table table-striped table-bordered wawi-table">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>

View file

@ -77,7 +77,7 @@
<div class="form-group">
<label for="url">{{ __('URL (Onlineshop)') }}</label>
<input type="url" name="url" id="url" class="form-control @error('url') is-invalid @enderror"
<input type="text" name="url" id="url" class="form-control @error('url') is-invalid @enderror"
value="{{ old('url', $model->url) }}" placeholder="https://">
@error('url')
<div class="invalid-feedback">{{ $message }}</div>

View file

@ -1,13 +1,14 @@
@extends('layouts.layout-2')
@section('content')
@include('admin.inventory.partials.table-actions-style')
<div class="card">
<h6 class="card-header d-flex justify-content-between align-items-center">
<span>{{ $pageTitle }}</span>
<a href="{{ route('admin.inventory.packaging-items.create', ['category' => $category]) }}" class="btn btn-sm btn-primary">{{ __('Neu anlegen') }}</a>
</h6>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<table class="datatables-style table table-striped table-bordered wawi-table">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>

View file

@ -1,13 +1,14 @@
@extends('layouts.layout-2')
@section('content')
@include('admin.inventory.partials.table-actions-style')
<div class="card">
<h6 class="card-header d-flex justify-content-between align-items-center">
<span>{{ __('Verpackungsmaterial') }}</span>
<a href="{{ route('admin.inventory.packaging-materials.create') }}" class="btn btn-sm btn-primary">{{ __('Neu anlegen') }}</a>
</h6>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<table class="datatables-style table table-striped table-bordered wawi-table">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>

View file

@ -0,0 +1,37 @@
@once
<style>
/* AP-04: iPad-taugliche Aktions-Buttons in Warenwirtschafts-Tabellen */
.wawi-table1 td .btn {
min-width: 42px;
min-height: 42px;
padding: 0.5rem 0.65rem !important;
font-size: 1.05rem;
line-height: 1.2;
margin: 0.15rem 0.55rem 0.15rem 0;
vertical-align: middle;
}
.wawi-table1 td .btn:last-child {
margin-right: 0;
}
.wawi-table1 td form.d-inline {
display: inline-block;
margin: 0;
}
.wawi-table1 td .btn .far,
.wawi-table1 td .btn .fa,
.wawi-table1 td .btn span {
font-size: 1.05rem;
line-height: 1;
}
.wawi-table td .btn {
margin: 0.15rem 0.65rem 0.45rem 0;
vertical-align: middle;
}
</style>
@endonce

View file

@ -1,26 +1,38 @@
@extends('layouts.layout-2')
@section('content')
@include('admin.inventory.partials.table-actions-style')
<div class="card">
<h6 class="card-header d-flex justify-content-between align-items-center">
<span>{{ __('Produktionen') }}</span>
<a href="{{ route('admin.inventory.productions.create') }}" class="btn btn-sm btn-primary">{{ __('Neue Produktion') }}</a>
</h6>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<table class="datatables-style table table-striped table-bordered wawi-table">
<thead>
<tr>
<th style="max-width: 130px;"></th>
<th>{{ __('Datum') }}</th>
<th>{{ __('Produkt') }}</th>
<th>{{ __('Stück') }}</th>
<th>{{ __('Standort') }}</th>
<th>{{ __('MHD-Hinweis') }}</th>
<th style="max-width: 80px;"></th>
</tr>
</thead>
<tbody>
@foreach($values as $row)
<tr>
<td class="text-nowrap">
<a href="{{ route('admin.inventory.productions.show', $row) }}" class="btn icon-btn btn-sm btn-primary" title="{{ __('Ansicht') }}">
<span class="far fa-eye"></span>
</a>
<a href="{{ route('admin.inventory.productions.edit', $row) }}" class="btn icon-btn btn-sm btn-secondary" title="{{ __('Bearbeiten') }}">
<span class="far fa-edit"></span>
</a>
<a href="{{ route('admin.inventory.productions.copy', $row) }}" class="btn icon-btn btn-sm btn-outline-secondary" title="{{ __('Kopieren') }}">
<span class="far fa-copy"></span>
</a>
</td>
<td data-sort="{{ $row->produced_at?->timestamp ?? 0 }}">{{ $row->produced_at?->format('d.m.Y') }}</td>
<td>{{ $row->product?->name ?? '—' }}</td>
<td>{{ $row->quantity }}</td>
@ -32,17 +44,6 @@
<span class="text-muted"></span>
@endif
</td>
<td class="text-nowrap">
<a href="{{ route('admin.inventory.productions.show', $row) }}" class="btn icon-btn btn-sm btn-primary" title="{{ __('Details') }}">
<span class="far fa-eye"></span>
</a>
<a href="{{ route('admin.inventory.productions.edit', $row) }}" class="btn icon-btn btn-sm btn-outline-primary" title="{{ __('Bearbeiten') }}">
<span class="far fa-edit"></span>
</a>
<a href="{{ route('admin.inventory.productions.copy', $row) }}" class="btn icon-btn btn-sm btn-outline-secondary" title="{{ __('Kopieren') }}">
<span class="far fa-copy"></span>
</a>
</td>
</tr>
@endforeach
</tbody>
@ -54,7 +55,8 @@
$('.datatables-style').dataTable({
"bLengthChange": false,
"iDisplayLength": 100,
"order": [[0, "desc"]],
"order": [[1, "desc"]],
"columnDefs": [{"orderable": false, "targets": [0]}],
"language": {"url": "/js/German.json"}
});
});

View file

@ -115,14 +115,51 @@
@enderror
</div>
<div id="price-per-kg-block" class="form-group" style="display:none;">
<label for="price_per_kg">{{ __('Netto-Preis pro kg') }} <span class="text-danger">*</span></label>
<input type="text" name="price_per_kg" id="price_per_kg"
class="form-control @error('price_per_kg') is-invalid @enderror"
value="{{ old('price_per_kg', $model->price_per_kg !== null ? \App\Services\Util::formatNumber($model->price_per_kg) : '') }}">
@error('price_per_kg')
<div class="invalid-feedback">{{ $message }}</div>
@enderror
<div id="price-per-kg-block" style="display:none;">
<div class="form-group">
<label for="tax_rate_id">{{ __('Umsatzsteuer') }}</label>
<select name="tax_rate_id" id="tax_rate_id" class="form-control @error('tax_rate_id') is-invalid @enderror">
<option value="" data-percent="0">{{ __('— keine Angabe —') }}</option>
@foreach ($taxRates as $taxRate)
<option value="{{ $taxRate->id }}" data-percent="{{ $taxRate->percent }}"
@selected((string) old('tax_rate_id', $model->tax_rate_id) === (string) $taxRate->id)>
{{ $taxRate->name }} ({{ \App\Services\Util::formatNumber($taxRate->percent) }} %)
</option>
@endforeach
</select>
<small class="text-muted">{{ __('Steuersatz zur Umrechnung zwischen Netto und Brutto.') }}</small>
@error('tax_rate_id')
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label for="price_per_kg">{{ __('Netto-Preis pro kg') }} <span class="text-danger">*</span></label>
<div class="input-group">
<input type="text" name="price_per_kg" id="price_per_kg"
class="form-control @error('price_per_kg') is-invalid @enderror"
value="{{ old('price_per_kg', $model->price_per_kg !== null ? \App\Services\Util::formatNumber($model->price_per_kg) : '') }}">
<div class="input-group-append"><span class="input-group-text"></span></div>
@error('price_per_kg')
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
</div>
<div class="form-group col-md-6">
<label for="price_per_kg_gross">{{ __('Brutto-Preis pro kg') }}</label>
<div class="input-group">
<input type="text" name="price_per_kg_gross" id="price_per_kg_gross"
class="form-control @error('price_per_kg_gross') is-invalid @enderror"
value="{{ old('price_per_kg_gross', $model->price_per_kg_gross !== null ? \App\Services\Util::formatNumber($model->price_per_kg_gross) : '') }}">
<div class="input-group-append"><span class="input-group-text"></span></div>
@error('price_per_kg_gross')
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
</div>
</div>
<small class="text-muted d-block mb-2">{{ __('Netto oder Brutto genügt der jeweils andere Wert wird automatisch berechnet.') }}</small>
</div>
<div id="price-total-block" class="form-group" style="display:none;">

View file

@ -65,6 +65,43 @@
});
}
function parseNumber(value) {
if (value === null || value === undefined) {
return null;
}
var normalized = String(value).trim().replace(/\./g, '').replace(',', '.');
if (normalized === '' || isNaN(normalized)) {
return null;
}
return parseFloat(normalized);
}
function formatNumber(value) {
return value.toFixed(2).replace('.', ',');
}
function currentFactor() {
var percent = parseFloat($('#tax_rate_id option:selected').data('percent')) || 0;
return 1 + percent / 100;
}
function recalcFromNet() {
var net = parseNumber($('#price_per_kg').val());
if (net === null) {
return;
}
$('#price_per_kg_gross').val(formatNumber(net * currentFactor()));
}
function recalcFromGross() {
var gross = parseNumber($('#price_per_kg_gross').val());
if (gross === null) {
return;
}
var factor = currentFactor();
$('#price_per_kg').val(formatNumber(factor > 0 ? gross / factor : gross));
}
$(document).ready(function () {
toggleBlocks();
initIngredientSelect2();
@ -75,6 +112,16 @@
$('#packaging_item_id').val(null).trigger('change');
initPackagingSelect2();
});
$('#price_per_kg').on('input', recalcFromNet);
$('#price_per_kg_gross').on('input', recalcFromGross);
$('#tax_rate_id').on('change', function () {
if (parseNumber($('#price_per_kg').val()) !== null) {
recalcFromNet();
} else {
recalcFromGross();
}
});
});
})(jQuery);
</script>

View file

@ -1,6 +1,7 @@
@extends('layouts.layout-2')
@section('content')
@include('admin.inventory.partials.table-actions-style')
<div class="card">
<h6 class="card-header d-flex justify-content-between align-items-center">
<span>{{ __('Wareneingang') }}</span>
@ -9,21 +10,37 @@
@endif
</h6>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<table class="datatables-style table table-striped table-bordered wawi-table">
<thead>
<tr>
<th style="max-width: 90px;"></th>
<th>{{ __('Status') }}</th>
<th>{{ __('Bestellt') }}</th>
<th>{{ __('Art') }}</th>
<th>{{ __('Artikel') }}</th>
<th>{{ __('Lieferant') }}</th>
<th>{{ __('Menge') }}</th>
<th style="max-width: 80px;"></th>
<th style="max-width: 60px;"></th>
</tr>
</thead>
<tbody>
@foreach($values as $row)
<tr>
<td class="text-nowrap">
<a href="{{ route('admin.inventory.stock-entries.show', $row) }}" class="btn icon-btn btn-sm btn-primary" title="{{ __('Ansicht') }}">
<span class="far fa-eye"></span>
</a>
@if(Auth::user()->isAdmin() && $row->status === 'pending')
<a href="{{ route('admin.inventory.stock-entries.edit', $row) }}" class="btn icon-btn btn-sm btn-secondary" title="{{ __('Bearbeiten') }}">
<span class="far fa-edit"></span>
</a>
@endif
@if(Auth::user()->isAdmin())
<a href="{{ route('admin.inventory.stock-entries.copy', $row) }}" class="btn icon-btn btn-sm btn-info" title="{{ __('Duplizieren') }}">
<span class="far fa-copy"></span>
</a>
@endif
</td>
<td data-sort="{{ $row->status === 'pending' ? 0 : 1 }}">
@if($row->status === 'pending')
<span class="badge badge-warning">{{ __('Offen') }}</span>
@ -51,18 +68,12 @@
@endif
</td>
<td>
<a href="{{ route('admin.inventory.stock-entries.show', $row) }}" class="btn icon-btn btn-sm btn-primary" title="{{ __('Details') }}">
<span class="far fa-eye"></span>
</a>
@if(Auth::user()->isAdmin() && $row->status === 'pending')
<a href="{{ route('admin.inventory.stock-entries.edit', $row) }}" class="btn icon-btn btn-sm btn-secondary">
<span class="far fa-edit"></span>
</a>
<form action="{{ route('admin.inventory.stock-entries.destroy', $row) }}" method="post" class="d-inline"
onsubmit="return confirm(@json(__('Eintrag wirklich löschen?')));">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-link text-danger p-0" title="{{ __('Delete') }}"><i class="far fa-trash-alt"></i></button>
<button type="submit" class="btn btn-link text-danger p-0" title="{{ __('Löschen') }}"><i class="far fa-trash-alt"></i></button>
</form>
@endif
</td>
@ -77,7 +88,8 @@
$('.datatables-style').dataTable({
"bLengthChange": false,
"iDisplayLength": 100,
"order": [[0, "asc"], [1, "desc"]],
"order": [[1, "asc"], [2, "desc"]],
"columnDefs": [{"orderable": false, "targets": [0, 7]}],
"language": {"url": "/js/German.json"}
});
});

View file

@ -18,6 +18,9 @@
</span>
<span>
<a href="{{ route('admin.inventory.stock-entries.index') }}" class="btn btn-sm btn-outline-secondary">{{ __('Zurück zur Liste') }}</a>
@if(Auth::user()->isAdmin())
<a href="{{ route('admin.inventory.stock-entries.copy', $model) }}" class="btn btn-sm btn-outline-info">{{ __('Duplizieren') }}</a>
@endif
@if(Auth::user()->isAdmin() && $model->isPending())
<a href="{{ route('admin.inventory.stock-entries.edit', $model) }}" class="btn btn-sm btn-primary">{{ __('Bearbeiten') }}</a>
@endif
@ -70,10 +73,16 @@
<dd class="col-sm-9">
@if($model->entry_type === 'ingredient')
@if($model->price_per_kg !== null)
{{ \App\Services\Util::formatNumber($model->price_per_kg) }} / kg
{{ \App\Services\Util::formatNumber($model->price_per_kg) }} / kg {{ __('netto') }}
@else
@endif
@if($model->price_per_kg_gross !== null)
<span class="text-muted">· {{ \App\Services\Util::formatNumber($model->price_per_kg_gross) }} / kg {{ __('brutto') }}</span>
@endif
@if($model->tax_rate_percent !== null)
<span class="text-muted">· {{ __('USt.') }} {{ \App\Services\Util::formatNumber($model->tax_rate_percent) }} %</span>
@endif
@else
@if($model->price_total !== null)
{{ \App\Services\Util::formatNumber($model->price_total) }} {{ __('netto') }}

View file

@ -1,13 +1,14 @@
@extends('layouts.layout-2')
@section('content')
@include('admin.inventory.partials.table-actions-style')
<div class="card">
<h6 class="card-header d-flex justify-content-between align-items-center">
<span>{{ __('Lieferanten-Kategorien') }}</span>
<a href="{{ route('admin.inventory.supplier-categories.create') }}" class="btn btn-sm btn-primary">{{ __('Neu anlegen') }}</a>
</h6>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<table class="datatables-style table table-striped table-bordered wawi-table">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>

View file

@ -0,0 +1,161 @@
@php
$orderMethodLabels = [
'email' => __('Per E-Mail'),
'online_shop' => __('Online-Shop'),
];
@endphp
<div id="supplier-details" data-supplier-id="{{ $supplier->id }}">
<div class="row">
<div class="col-md-6">
<dl class="row mb-0">
<dt class="col-sm-5">{{ __('Name') }}</dt>
<dd class="col-sm-7">{{ $supplier->name }}</dd>
<dt class="col-sm-5">{{ __('Land') }}</dt>
<dd class="col-sm-7">{{ $supplier->country?->de ?? '—' }}</dd>
<dt class="col-sm-5">{{ __('Kategorien') }}</dt>
<dd class="col-sm-7">
@forelse($supplier->supplierCategories as $cat)
<span class="badge badge-secondary">{{ $cat->name }}</span>
@empty
@endforelse
</dd>
<dt class="col-sm-5">{{ __('Webseite') }}</dt>
<dd class="col-sm-7">
@if($supplier->url)
<a href="{{ $supplier->url }}" target="_blank" rel="noopener">{{ $supplier->url }}</a>
@else
@endif
</dd>
</dl>
</div>
<div class="col-md-6">
<dl class="row mb-0">
<dt class="col-sm-5">{{ __('Bestellweg') }}</dt>
<dd class="col-sm-7">{{ $orderMethodLabels[$supplier->order_method] ?? '—' }}</dd>
<dt class="col-sm-5">{{ __('Bestell-E-Mail') }}</dt>
<dd class="col-sm-7">{{ $supplier->order_email ?: '—' }}</dd>
<dt class="col-sm-5">{{ __('Bestell-URL') }}</dt>
<dd class="col-sm-7">
@if($supplier->order_url)
<a href="{{ $supplier->order_url }}" target="_blank" rel="noopener">{{ $supplier->order_url }}</a>
@else
@endif
</dd>
<dt class="col-sm-5">{{ __('Lieferzeit') }}</dt>
<dd class="col-sm-7">
{{ $supplier->delivery_time ?: '—' }}
@if($supplier->delivery_time_days !== null)
<span class="text-muted">({{ $supplier->delivery_time_days }} {{ __('Tage') }})</span>
@endif
</dd>
<dt class="col-sm-5">{{ __('Ansprechpartner') }}</dt>
<dd class="col-sm-7">{{ $supplier->contact_person ?: '—' }}</dd>
<dt class="col-sm-5">{{ __('E-Mail') }}</dt>
<dd class="col-sm-7">{{ $supplier->email ?: '—' }}</dd>
<dt class="col-sm-5">{{ __('Telefon') }}</dt>
<dd class="col-sm-7">{{ $supplier->phone ?: '—' }}</dd>
</dl>
</div>
</div>
@if($supplier->notes)
<div class="mt-2">
<strong>{{ __('Notizen') }}:</strong>
<div class="text-muted">{!! nl2br(e($supplier->notes)) !!}</div>
</div>
@endif
<hr>
<div class="row">
<div class="col-md-6 mb-3">
<h6 class="font-weight-bold">{{ __('Zugeordnete INCIs') }}</h6>
<ul class="list-group mb-2" id="supplier-ingredient-list">
@forelse($supplier->ingredients as $ingredient)
<li class="list-group-item d-flex justify-content-between align-items-center py-1">
<span>{{ $ingredient->name }}</span>
<span class="text-nowrap">
<a href="{{ route('admin_product_ingredient_edit', $ingredient->id) }}" target="_blank"
class="btn btn-link p-0 mr-2" title="{{ __('Zur Bearbeitung') }}">
<i class="fas fa-arrow-right"></i>
</a>
<button type="button" class="btn btn-link text-danger p-0 js-detach-ingredient"
data-url="{{ route('admin.inventory.suppliers.ingredients.detach', [$supplier, $ingredient]) }}"
title="{{ __('Entfernen') }}">
<i class="far fa-trash-alt"></i>
</button>
</span>
</li>
@empty
<li class="list-group-item text-muted py-1">{{ __('Noch keine INCIs zugeordnet.') }}</li>
@endforelse
</ul>
<div class="input-group input-group-sm">
<select class="form-control" id="add-ingredient-select">
<option value="">{{ __('INCI wählen …') }}</option>
@foreach($availableIngredients as $ingredient)
<option value="{{ $ingredient->id }}">{{ $ingredient->name }}</option>
@endforeach
</select>
<div class="input-group-append">
<button type="button" class="btn btn-primary js-attach-ingredient"
data-url="{{ route('admin.inventory.suppliers.ingredients.attach', $supplier) }}"
data-select="#add-ingredient-select">
{{ __('Hinzufügen') }}
</button>
</div>
</div>
</div>
<div class="col-md-6 mb-3">
<h6 class="font-weight-bold">{{ __('Zugeordnete Verpackungsartikel') }}</h6>
<ul class="list-group mb-2" id="supplier-packaging-list">
@forelse($supplier->packagingItems as $item)
<li class="list-group-item d-flex justify-content-between align-items-center py-1">
<span>{{ $item->name }}</span>
<span class="text-nowrap">
<a href="{{ route('admin.inventory.packaging-items.edit', $item) }}" target="_blank"
class="btn btn-link p-0 mr-2" title="{{ __('Zur Bearbeitung') }}">
<i class="fas fa-arrow-right"></i>
</a>
<button type="button" class="btn btn-link text-danger p-0 js-detach-packaging"
data-url="{{ route('admin.inventory.suppliers.packaging-items.detach', [$supplier, $item]) }}"
title="{{ __('Entfernen') }}">
<i class="far fa-trash-alt"></i>
</button>
</span>
</li>
@empty
<li class="list-group-item text-muted py-1">{{ __('Noch keine Verpackungsartikel zugeordnet.') }}</li>
@endforelse
</ul>
<div class="input-group input-group-sm">
<select class="form-control" id="add-packaging-select">
<option value="">{{ __('Verpackungsartikel wählen …') }}</option>
@foreach($availablePackagingItems as $item)
<option value="{{ $item->id }}">{{ $item->name }}</option>
@endforeach
</select>
<div class="input-group-append">
<button type="button" class="btn btn-primary js-attach-packaging"
data-url="{{ route('admin.inventory.suppliers.packaging-items.attach', $supplier) }}"
data-select="#add-packaging-select">
{{ __('Hinzufügen') }}
</button>
</div>
</div>
</div>
</div>
</div>

View file

@ -2,89 +2,166 @@
@section('content')
@php
$selectedCategoryIds = old('supplier_category_ids', $model->exists ? $model->supplierCategories->pluck('id')->all() : []);
$selectedCategoryIds = old(
'supplier_category_ids',
$model->exists ? $model->supplierCategories->pluck('id')->all() : [],
);
@endphp
<div class="card">
<h6 class="card-header">{{ $model->exists ? __('Lieferant bearbeiten') : __('Lieferant anlegen') }}</h6>
<div class="card-body">
<form method="post" action="{{ $model->exists ? route('admin.inventory.suppliers.update', $model) : route('admin.inventory.suppliers.store') }}">
<form method="post"
action="{{ $model->exists ? route('admin.inventory.suppliers.update', $model) : route('admin.inventory.suppliers.store') }}">
@csrf
@if($model->exists)
@if ($model->exists)
@method('PUT')
@endif
<div class="form-group">
<label for="name">{{ __('Name') }}</label>
<input type="text" name="name" id="name" class="form-control @error('name') is-invalid @enderror"
value="{{ old('name', $model->name) }}" required>
<input type="text" name="name" id="name"
class="form-control @error('name') is-invalid @enderror" value="{{ old('name', $model->name) }}"
required>
@error('name')
<div class="invalid-feedback">{{ $message }}</div>
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
<div class="form-group">
<label for="supplier_category_ids">{{ __('Kategorien') }}</label>
<div class="light-style">
<select name="supplier_category_ids[]" id="supplier_category_ids" class="w-100" multiple="multiple" data-placeholder="{{ __('Kategorien wählen') }}">
@foreach($supplierCategories as $cat)
<option value="{{ $cat->id }}" @selected(in_array($cat->id, $selectedCategoryIds, true))>{{ $cat->name }}</option>
<select name="supplier_category_ids[]" id="supplier_category_ids" class="w-100" multiple="multiple"
data-placeholder="{{ __('Kategorien wählen') }}">
@foreach ($supplierCategories as $cat)
<option value="{{ $cat->id }}" @selected(in_array($cat->id, $selectedCategoryIds, true))>{{ $cat->name }}
</option>
@endforeach
</select>
</div>
@error('supplier_category_ids')
<div class="text-danger small">{{ $message }}</div>
<div class="text-danger small">{{ $message }}</div>
@enderror
</div>
<div class="form-group">
<label for="country_id">{{ __('Land') }}</label>
<select name="country_id" id="country_id" class="form-control @error('country_id') is-invalid @enderror" required>
<select name="country_id" id="country_id" class="form-control @error('country_id') is-invalid @enderror"
required>
<option value="">{{ __('Bitte wählen') }}</option>
@foreach($countries as $country)
<option value="{{ $country->id }}" @selected((string)old('country_id', $model->country_id) === (string)$country->id)>
@foreach ($countries as $country)
<option value="{{ $country->id }}" @selected((string) old('country_id', $model->country_id) === (string) $country->id)>
{{ $country->de }} ({{ $country->code }})
</option>
@endforeach
</select>
@error('country_id')
<div class="invalid-feedback">{{ $message }}</div>
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
<div class="form-group">
<label for="url">{{ __('Webseite') }}</label>
<input type="url" name="url" id="url" class="form-control @error('url') is-invalid @enderror"
value="{{ old('url', $model->url) }}">
<input type="text" name="url" id="url"
class="form-control @error('url') is-invalid @enderror" value="{{ old('url', $model->url) }}"
placeholder="https://">
@error('url')
<div class="invalid-feedback">{{ $message }}</div>
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
@php
$orderMethod = old('order_method', $model->order_method);
@endphp
<div class="form-row">
<div class="form-group col-md-6">
<label for="order_method">{{ __('Bestellweg') }}</label>
<select name="order_method" id="order_method"
class="form-control custom-select @error('order_method') is-invalid @enderror">
<option value="" @selected($orderMethod === null || $orderMethod === '')>{{ __('Keine Angabe') }}</option>
<option value="email" @selected($orderMethod === 'email')>{{ __('Per E-Mail') }}</option>
<option value="online_shop" @selected($orderMethod === 'online_shop')>{{ __('Online-Shop') }}</option>
</select>
@error('order_method')
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
<div class="form-group col-md-4">
<label for="delivery_time">{{ __('Lieferzeit') }}</label>
<input type="text" name="delivery_time" id="delivery_time" list="delivery_time_options"
class="form-control @error('delivery_time') is-invalid @enderror"
value="{{ old('delivery_time', $model->delivery_time) }}"
placeholder="{{ __('z. B. 35 Werktage') }}">
<datalist id="delivery_time_options">
@foreach ($deliveryTimes as $deliveryTime)
<option value="{{ $deliveryTime->label }}" data-days="{{ $deliveryTime->days }}"></option>
@endforeach
</datalist>
@error('delivery_time')
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
<div class="form-group col-md-2">
<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 @error('delivery_time_days') is-invalid @enderror"
value="{{ old('delivery_time_days', $model->delivery_time_days) }}"
placeholder="{{ __('z. B. 5') }}">
@error('delivery_time_days')
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
</div>
<div class="form-group js-order-email" @if ($orderMethod !== 'email') style="display: none;" @endif>
<label for="order_email">{{ __('Bestell-E-Mail') }} <small
class="text-muted">{{ __('(falls abweichend)') }}</small></label>
<input type="email" name="order_email" id="order_email"
class="form-control @error('order_email') is-invalid @enderror"
value="{{ old('order_email', $model->order_email) }}">
@error('order_email')
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
<div class="form-group js-order-url" @if ($orderMethod !== 'online_shop') style="display: none;" @endif>
<label for="order_url">{{ __('Bestell-URL') }} <small
class="text-muted">{{ __('(falls abweichend)') }}</small></label>
<input type="text" name="order_url" id="order_url"
class="form-control @error('order_url') is-invalid @enderror"
value="{{ old('order_url', $model->order_url) }}" placeholder="https://">
@error('order_url')
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label for="contact_person">{{ __('Ansprechpartner') }}</label>
<input type="text" name="contact_person" id="contact_person" class="form-control @error('contact_person') is-invalid @enderror"
value="{{ old('contact_person', $model->contact_person) }}">
<input type="text" name="contact_person" id="contact_person"
class="form-control @error('contact_person') is-invalid @enderror"
value="{{ old('contact_person', $model->contact_person) }}">
@error('contact_person')
<div class="invalid-feedback">{{ $message }}</div>
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
<div class="form-group col-md-6">
<label for="email">{{ __('E-Mail') }}</label>
<input type="email" name="email" id="email" class="form-control @error('email') is-invalid @enderror"
value="{{ old('email', $model->email) }}">
<input type="email" name="email" id="email"
class="form-control @error('email') is-invalid @enderror"
value="{{ old('email', $model->email) }}">
@error('email')
<div class="invalid-feedback">{{ $message }}</div>
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
</div>
<div class="form-group">
<label for="phone">{{ __('Telefon') }}</label>
<input type="text" name="phone" id="phone" class="form-control @error('phone') is-invalid @enderror"
value="{{ old('phone', $model->phone) }}">
<input type="text" name="phone" id="phone"
class="form-control @error('phone') is-invalid @enderror"
value="{{ old('phone', $model->phone) }}">
@error('phone')
<div class="invalid-feedback">{{ $message }}</div>
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
@ -92,20 +169,21 @@
<label for="notes">{{ __('Notizen') }}</label>
<textarea name="notes" id="notes" rows="3" class="form-control @error('notes') is-invalid @enderror">{{ old('notes', $model->notes) }}</textarea>
@error('notes')
<div class="invalid-feedback">{{ $message }}</div>
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
<div class="form-group">
<label class="custom-control custom-checkbox">
<input type="checkbox" name="active" value="1" class="custom-control-input"
@checked(old('active', $model->active))>
@checked(old('active', $model->active))>
<span class="custom-control-label">{{ __('Aktiv') }}</span>
</label>
</div>
<button type="submit" class="btn btn-primary">{{ __('Speichern') }}</button>
<a href="{{ route('admin.inventory.suppliers.index') }}" class="btn btn-outline-secondary">{{ __('Zurück') }}</a>
<a href="{{ route('admin.inventory.suppliers.index') }}"
class="btn btn-outline-secondary">{{ __('Zurück') }}</a>
</form>
</div>
</div>
@ -113,13 +191,33 @@
@section('scripts')
<script>
$(document).ready(function () {
$(document).ready(function() {
$('#supplier_category_ids').select2({
theme: 'default',
placeholder: '{{ __('Kategorien wählen') }}',
width: '100%',
closeOnSelect: false
});
function toggleOrderFields() {
var method = $('#order_method').val();
$('.js-order-email').toggle(method === 'email');
$('.js-order-url').toggle(method === 'online_shop');
}
$('#order_method').on('change', toggleOrderFields);
toggleOrderFields();
$('#delivery_time').on('input change', function () {
var value = $(this).val();
var option = $('#delivery_time_options option').filter(function () {
return this.value === value;
}).first();
if (option.length && option.data('days') !== undefined && option.data('days') !== '') {
$('#delivery_time_days').val(option.data('days'));
}
});
});
</script>
@endsection

View file

@ -1,13 +1,14 @@
@extends('layouts.layout-2')
@section('content')
@include('admin.inventory.partials.table-actions-style')
<div class="card">
<h6 class="card-header d-flex justify-content-between align-items-center">
<span>{{ __('Lieferanten') }}</span>
<a href="{{ route('admin.inventory.suppliers.create') }}" class="btn btn-sm btn-primary">{{ __('Neu anlegen') }}</a>
</h6>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<table class="datatables-style table table-striped table-bordered wawi-table">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
@ -21,8 +22,13 @@
<tbody>
@foreach($values as $value)
<tr>
<td>
<a href="{{ route('admin.inventory.suppliers.edit', $value) }}" class="btn icon-btn btn-sm btn-primary">
<td class="text-nowrap">
<button type="button" class="btn icon-btn btn-sm btn-info js-show-supplier"
data-url="{{ route('admin.inventory.suppliers.show', $value) }}"
data-name="{{ $value->name }}" title="{{ __('Ansicht') }}">
<span class="far fa-eye"></span>
</button>
<a href="{{ route('admin.inventory.suppliers.edit', $value) }}" class="btn icon-btn btn-sm btn-primary" title="{{ __('Bearbeiten') }}">
<span class="far fa-edit"></span>
</a>
</td>
@ -54,6 +60,22 @@
</table>
</div>
</div>
<div class="modal fade" id="supplierShowModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{{ __('Lieferant') }}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body" id="supplierShowBody">
<div class="text-center text-muted py-4">{{ __('Lädt …') }}</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function () {
$('.datatables-style').dataTable({
@ -62,6 +84,46 @@
"order": [[1, "asc"]],
"language": {"url": "/js/German.json"}
});
var csrfToken = $('meta[name="csrf-token"]').attr('content');
var $modal = $('#supplierShowModal');
var $body = $('#supplierShowBody');
function loadDetails(url, method) {
$.ajax({
url: url,
method: method || 'GET',
headers: {'X-CSRF-TOKEN': csrfToken},
data: method && method !== 'GET' ? arguments[2] : undefined
}).done(function (html) {
$body.html(html);
}).fail(function () {
$body.html('<div class="alert alert-danger mb-0">{{ __('Fehler beim Laden.') }}</div>');
});
}
$(document).on('click', '.js-show-supplier', function () {
$modal.find('.modal-title').text($(this).data('name'));
$body.html('<div class="text-center text-muted py-4">{{ __('Lädt ') }}</div>');
loadDetails($(this).data('url'), 'GET');
$modal.modal('show');
});
$(document).on('click', '.js-attach-ingredient, .js-attach-packaging', function () {
var $btn = $(this);
var value = $($btn.data('select')).val();
if (!value) {
return;
}
var payload = $btn.hasClass('js-attach-ingredient')
? {ingredient_id: value}
: {packaging_item_id: value};
loadDetails($btn.data('url'), 'POST', payload);
});
$(document).on('click', '.js-detach-ingredient, .js-detach-packaging', function () {
loadDetails($(this).data('url'), 'DELETE');
});
});
</script>
@endsection

View file

@ -0,0 +1,60 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<h6 class="card-header">{{ $model->exists ? __('Umsatzsteuersatz bearbeiten') : __('Umsatzsteuersatz anlegen') }}</h6>
<div class="card-body">
<form method="post" action="{{ $model->exists ? route('admin.inventory.tax-rates.update', $model) : route('admin.inventory.tax-rates.store') }}">
@csrf
@if($model->exists)
@method('PUT')
@endif
<div class="form-group">
<label for="name">{{ __('Name') }}</label>
<input type="text" name="name" id="name" class="form-control @error('name') is-invalid @enderror"
value="{{ old('name', $model->name) }}" placeholder="{{ __('z. B. Standard') }}" required>
@error('name')
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
<div class="form-group">
<label for="percent">{{ __('Satz in %') }}</label>
<div class="input-group">
<input type="number" name="percent" id="percent" step="0.01" min="0" max="100"
class="form-control @error('percent') is-invalid @enderror"
value="{{ old('percent', $model->percent) }}" required>
<div class="input-group-append">
<span class="input-group-text">%</span>
</div>
@error('percent')
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
</div>
<div class="form-group">
<label for="pos">{{ __('Sortierung') }}</label>
<input type="number" name="pos" id="pos" min="0" max="255"
class="form-control @error('pos') is-invalid @enderror"
value="{{ old('pos', $model->pos) }}">
@error('pos')
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
<div class="form-group">
<label class="custom-control custom-checkbox">
<input type="checkbox" name="active" value="1" class="custom-control-input"
@checked(old('active', $model->active))>
<span class="custom-control-label">{{ __('Aktiv') }}</span>
</label>
</div>
<button type="submit" class="btn btn-primary">{{ __('Speichern') }}</button>
<a href="{{ route('admin.inventory.general') }}" class="btn btn-outline-secondary">{{ __('Zurück') }}</a>
</form>
</div>
</div>
@endsection

View file

@ -263,6 +263,9 @@
@endif
@if (Auth::user()->isSuperAdmin())
<li class="sidenav-item @if (Request::is(
'admin/inventory/general*',
'admin/inventory/tax-rates*',
'admin/inventory/delivery-times*',
'admin/inventory/locations*',
'admin/inventory/material-qualities*',
'admin/inventory/packaging-materials*')) open @endif">
@ -271,6 +274,12 @@
<div>Einstellungen</div>
</a>
<ul class="sidenav-menu">
<li class="sidenav-item{{ Request::is('admin/inventory/general*', 'admin/inventory/tax-rates*', 'admin/inventory/delivery-times*') ? ' active' : '' }}">
<a href="{{ route('admin.inventory.general') }}" class="sidenav-link"><i
class="sidenav-icon ion ion-md-options"></i>
<div>{{ __('Allgemein') }}</div>
</a>
</li>
<li class="sidenav-item{{ Request::is('admin/inventory/locations*') ? ' active' : '' }}">
<a href="{{ route('admin.inventory.locations.index') }}" class="sidenav-link"><i
class="sidenav-icon ion ion-ios-pin"></i>