Warenwirtschaft: F-14 — „Enthalten in“ mit Anteil (%) und Verbrauch je Stück
Nur Hersteller-Rezeptur, alle Phasenzeilen je Produkt summiert, Skalierung über Füllgewicht und Faktor wie in der Produktion; kein roher Pivot-Wert mehr. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
1e7ebfb77b
commit
8808ff538f
4 changed files with 92 additions and 9 deletions
|
|
@ -95,25 +95,35 @@
|
|||
<tr>
|
||||
<th>{{ __('Produkt') }}</th>
|
||||
<th class="text-right">{{ __('Produktbestand') }}</th>
|
||||
<th class="text-right">{{ __('Rezeptur-Anteil (g/Stück)') }}</th>
|
||||
<th class="text-right">{{ __('Anteil (%)') }}</th>
|
||||
<th class="text-right" title="{{ __('Anteil × Füllgewicht × Überschuss-Faktor — wie in der Produktion gerechnet') }}">{{ __('Verbrauch (g/Stück)') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse($ingredient->products as $product)
|
||||
@php $usage = $recipeUsage[$product->id] ?? null; @endphp
|
||||
<tr>
|
||||
<td>{{ $product->name }}</td>
|
||||
<td class="text-right">{{ \App\Services\Util::formatNumber($productStock[$product->id] ?? 0, 0) }} {{ __('Stück') }}</td>
|
||||
<td class="text-right">
|
||||
@if($product->pivot->gram !== null && $product->pivot->gram !== '')
|
||||
{{ \App\Services\Util::formatNumber($product->pivot->gram, 2) }} g
|
||||
@if($usage)
|
||||
{{ \App\Services\Util::formatNumber($usage['percent'], 2) }} %
|
||||
@else
|
||||
<span class="text-muted">—</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-right">
|
||||
@if($usage && $usage['consumption_per_piece'] !== null)
|
||||
{{ \App\Services\Util::formatNumber($usage['consumption_per_piece'], 2) }} g
|
||||
<span class="text-muted small">({{ __('netto') }} {{ \App\Services\Util::formatNumber($usage['grams_per_piece'], 2) }} g)</span>
|
||||
@else
|
||||
<span class="text-muted" title="{{ __('Kein Füllgewicht hinterlegt') }}">—</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="3"><div class="wawi-empty">{{ __('Dieser Rohstoff wird in keiner aktiven Rezeptur verwendet.') }}</div></td>
|
||||
<td colspan="4"><div class="wawi-empty">{{ __('Dieser Rohstoff wird in keiner aktiven Rezeptur verwendet.') }}</div></td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue