arif670's picture
Upload 7 files
cf10b3a verified
{% extends 'base.html' %}
{% block content %}
<div class="container">
<h2 class="my-4">Inventory</h2>
<form method="POST">
<div class="mb-3">
<label for="item_name" class="form-label">Item Name</label>
<input type="text" class="form-control" id="item_name" name="item_name" required>
</div>
<div class="mb-3">
<label for="quantity" class="form-label">Quantity</label>
<input type="number" class="form-control" id="quantity" name="quantity" required>
</div>
<div class="mb-3">
<label for="unit_price" class="form-label">Unit Price</label>
<input type="number" class="form-control" id="unit_price" name="unit_price" step="0.01" required>
</div>
<button type="submit" class="btn btn-primary">Add Item</button>
</form>
<h3 class="my-4">Inventory List</h3>
<table class="table table-striped">
<thead>
<tr>
<th>Item Name</th>
<th>Quantity</th>
<th>Unit Price</th>
</tr>
</thead>
<tbody>
{% for item in inventory_items %}
<tr>
<td>{{ item.item_name }}</td>
<td>{{ item.quantity }}</td>
<td>${{ item.unit_price }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}