104 lines
4.6 KiB
PHP
104 lines
4.6 KiB
PHP
@php
|
|
/** @var \App\Models\Production $model */
|
|
@endphp
|
|
|
|
@extends('layouts.layout-2')
|
|
|
|
@section('content')
|
|
<h4 class="font-weight-bold py-2 mb-2">{{ __('Produktion') }} #{{ $model->id }}</h4>
|
|
|
|
<div class="card mb-3">
|
|
<h6 class="card-header d-flex justify-content-between align-items-center">
|
|
<span>{{ __('Übersicht') }}</span>
|
|
<div>
|
|
<a href="{{ route('admin.inventory.productions.edit', $model) }}" class="btn btn-sm btn-primary">{{ __('Bearbeiten') }}</a>
|
|
<a href="{{ route('admin.inventory.productions.copy', $model) }}" class="btn btn-sm btn-outline-primary">{{ __('Kopieren') }}</a>
|
|
<a href="{{ route('admin.inventory.productions.index') }}" class="btn btn-sm btn-outline-secondary">{{ __('Zurück') }}</a>
|
|
</div>
|
|
</h6>
|
|
<div class="card-body">
|
|
<dl class="row mb-0">
|
|
<dt class="col-sm-3">{{ __('Produkt') }}</dt>
|
|
<dd class="col-sm-9">{{ $model->product?->name ?? '—' }}</dd>
|
|
<dt class="col-sm-3">{{ __('Produktionsdatum') }}</dt>
|
|
<dd class="col-sm-9">{{ $model->produced_at?->format('d.m.Y') }}</dd>
|
|
<dt class="col-sm-3">{{ __('Stückzahl') }}</dt>
|
|
<dd class="col-sm-9">{{ $model->quantity }}</dd>
|
|
<dt class="col-sm-3">{{ __('Standort') }}</dt>
|
|
<dd class="col-sm-9">{{ $model->location?->name ?? '—' }}</dd>
|
|
<dt class="col-sm-3">{{ __('Erfasst von') }}</dt>
|
|
<dd class="col-sm-9">{{ $model->producedByUser?->getFullName(false) ?: $model->producedByUser?->email ?? '—' }}</dd>
|
|
<dt class="col-sm-3">{{ __('MHD-Hinweis') }}</dt>
|
|
<dd class="col-sm-9">
|
|
@if($model->mhd_warning)
|
|
<span class="badge badge-warning">{{ __('Rohstoff-MHD kürzer als Produkt-MHD') }}</span>
|
|
@else
|
|
—
|
|
@endif
|
|
</dd>
|
|
@if($model->notes)
|
|
<dt class="col-sm-3">{{ __('Notizen') }}</dt>
|
|
<dd class="col-sm-9">{{ $model->notes }}</dd>
|
|
@endif
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card mb-3">
|
|
<h6 class="card-header">{{ __('Rohstoff-Verbrauch (Chargen)') }}</h6>
|
|
<div class="card-body p-0">
|
|
<div class="table-responsive">
|
|
<table class="table table-striped mb-0">
|
|
<thead>
|
|
<tr>
|
|
<th>{{ __('Inhaltsstoff') }}</th>
|
|
<th>{{ __('Charge / Wareneingang') }}</th>
|
|
<th>{{ __('Menge (g)') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($model->productionIngredients as $line)
|
|
<tr>
|
|
<td>{{ $line->ingredient?->name ?? '—' }}</td>
|
|
<td>
|
|
#{{ $line->stock_entry_id }}
|
|
@if($line->stockEntry?->batch_number)
|
|
— {{ $line->stockEntry->batch_number }}
|
|
@endif
|
|
@if($line->stockEntry?->best_before)
|
|
(MHD {{ $line->stockEntry->best_before->format('d.m.Y') }})
|
|
@endif
|
|
</td>
|
|
<td>{{ \App\Services\Util::formatNumber($line->quantity_used) }}</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h6 class="card-header">{{ __('Verpackung (Snapshot)') }}</h6>
|
|
<div class="card-body p-0">
|
|
<div class="table-responsive">
|
|
<table class="table table-striped mb-0">
|
|
<thead>
|
|
<tr>
|
|
<th>{{ __('Artikel') }}</th>
|
|
<th>{{ __('Verbrauch (Stk.)') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($model->productionPackagings as $line)
|
|
<tr>
|
|
<td>{{ $line->packagingItem?->name ?? '—' }}</td>
|
|
<td>{{ $line->quantity_used }}</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|