updateeeeee

This commit is contained in:
lubiana 2025-06-10 20:14:19 +02:00
parent 0c758749e0
commit ca9819a436
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
12 changed files with 214 additions and 156 deletions

View file

@ -10,19 +10,18 @@
<tr>
<th>Name</th>
<th>Description</th>
<th>DesiredStock</th>
<th>DrinkStock</th>
<th>Wanted Stock</th>
<th>Current Stock</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for drink_stock in drink_stocks %}
{% set drink_type = drink_stock.record.drinkType %}
{% for drink_type in drink_types %}
<tr>
<td>{{ drink_type.name }}</td>
<td>{{ drink_type.description }}</td>
<td>{{ drink_type.desiredStock }}</td>
<td>{{ drink_stock.record.quantity }}</td>
<td>{{ drink_type.wantedStock }}</td>
<td>{{ drink_type.currentStock }}</td>
<td>
<a href="{{ path('app_drink_type_show', {'id': drink_type.id}) }}">show</a>
<a href="{{ path('app_drink_type_edit', {'id': drink_type.id}) }}">edit</a>

View file

@ -36,8 +36,12 @@
<td>{{ drink_type.description }}</td>
</tr>
<tr>
<th>DesiredStock</th>
<td>{{ drink_type.desiredStock }}</td>
<th>Current Stock</th>
<td>{{ drink_type.currentStock }}</td>
</tr>
<tr>
<th>Wanted Stock</th>
<td>{{ drink_type.wantedStock }}</td>
</tr>
</tbody>
</table>
@ -87,7 +91,7 @@
<h5 class="card-title">Inventory History</h5>
</div>
<div class="card-body">
{% if inventory_records|length > 0 %}
{% if stock_history|length > 0 %}
<table class="table table-striped">
<thead>
<tr>
@ -96,10 +100,10 @@
</tr>
</thead>
<tbody>
{% for record in inventory_records %}
{% for record in stock_history %}
<tr>
<td>{{ record.createdAt|date('Y-m-d H:i:s') }}</td>
<td>{{ record.quantity }}</td>
<td>{{ record.changeDate|date('Y-m-d H:i:s') }}</td>
<td>{{ record.newValue }}</td>
</tr>
{% endfor %}
</tbody>
@ -119,7 +123,7 @@
<h5 class="card-title">Desired Stock History</h5>
</div>
<div class="card-body">
{% if desired_stock_history|length > 0 %}
{% if wanted_history|length > 0 %}
<table class="table table-striped">
<thead>
<tr>
@ -128,7 +132,7 @@
</tr>
</thead>
<tbody>
{% for log in desired_stock_history %}
{% for log in wanted_history %}
<tr>
<td>{{ log.changeDate|date('Y-m-d H:i:s') }}</td>
<td>{{ log.newValue }}</td>