88 lines
No EOL
3.8 KiB
Twig
88 lines
No EOL
3.8 KiB
Twig
{% extends 'layout.twig' %}
|
|
{% import 'components/form.twig' as form %}
|
|
|
|
{% block title %}Update Stock - {{ parent() }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="row mb-4">
|
|
<div class="col">
|
|
<h2>Update Stock Levels</h2>
|
|
</div>
|
|
<div class="col-auto">
|
|
<a href="/inventory" class="btn btn-secondary">
|
|
<i class="fas fa-arrow-left"></i> Back to Inventory
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h5 class="card-title mb-0">Update Single Item</h5>
|
|
</div>
|
|
<div class="card-body">
|
|
{{ form.errors(error) }}
|
|
|
|
<form action="/inventory/update" method="post">
|
|
<div class="form-group mb-3">
|
|
<label for="drink_type_id">Drink Type</label>
|
|
<select id="drink_type_id" name="drink_type_id" class="form-control" required>
|
|
<option value="">-- Select Drink Type --</option>
|
|
{% for drinkType in drinkTypes %}
|
|
<option value="{{ drinkType.id }}">{{ drinkType.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group mb-3">
|
|
<label for="quantity">New Quantity</label>
|
|
<input type="number" id="quantity" name="quantity" class="form-control" min="0" required>
|
|
<small class="form-text text-muted">Enter the new total quantity, not the amount to add/remove.</small>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ form.submit('Update Stock') }}
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
<div class="card">
|
|
<div class="card-header bg-info text-white">
|
|
<h5 class="card-title mb-0">Stock Update Tips</h5>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="alert alert-info">
|
|
<h6 class="alert-heading">How to update stock:</h6>
|
|
<ol>
|
|
<li>Select the drink type you want to update</li>
|
|
<li>Enter the <strong>total</strong> current quantity (not the difference)</li>
|
|
<li>Click "Update Stock" to save the changes</li>
|
|
</ol>
|
|
</div>
|
|
|
|
<div class="alert alert-warning">
|
|
<h6 class="alert-heading">Important Notes:</h6>
|
|
<ul>
|
|
<li>Stock updates are logged in the inventory history</li>
|
|
<li>The system will calculate the difference from the previous stock level</li>
|
|
<li>If stock falls below desired levels, it will appear in low stock alerts</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="mt-4">
|
|
<h6>Quick Links:</h6>
|
|
<ul>
|
|
<li><a href="/inventory/history">View inventory history</a></li>
|
|
<li><a href="/inventory/low-stock">View low stock items</a></li>
|
|
<li><a href="/orders/create-from-stock">Create order from stock levels</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %} |