|
11 | 11 | </div> |
12 | 12 | {% endif %} |
13 | 13 |
|
14 | | -<table class="table"> |
15 | | -<tr><th scope="row">Stock ID</th><td>{{stock.id}}</td></tr> |
16 | | -<tr><th scope="row">Check digits</th><td>{{stock.checkdigits}}</td></tr> |
17 | | -<tr><th scope="row">Manufacturer</th><td><a href="{% url "tillweb-stocktype-search" %}?manufacturer={{stock.stocktype.manufacturer|urlencode}}">{{stock.stocktype.manufacturer}}</a></td></tr> |
18 | | -<tr><th scope="row">Name</th><td><a href="{{stock.stocktype.get_absolute_url}}">{{stock.stocktype.name}}</a></td></tr> |
19 | | -<tr><th scope="row">ABV</th><td>{{stock.stocktype.abvstr}}</td></tr> |
20 | | -{% if stock.delivery %} |
21 | | -<tr><th scope="row">Supplier</th><td><a href="{{stock.delivery.supplier.get_absolute_url}}">{{stock.delivery.supplier.name}}</a></td></tr> |
22 | | -<tr><th scope="row">Delivery date</th><td>{{stock.delivery.date}}</td></tr> |
23 | | -<tr><th scope="row">Delivery ID</th><td><a href="{{stock.delivery.get_absolute_url}}">{{stock.delivery.id}}</a>{% if not stock.checked %} <span class="badge bg-warning">Not confirmed</span>{% endif %}</td></tr> |
24 | | -{% else %} |
25 | | -<tr><th scope="row">Discovered in stock take</th><td><a href="{{stock.stocktake.get_absolute_url}}">{{stock.stocktake.id}}</a>{% if not stock.checked %} <span class="badge bg-warning">Not committed</span>{% endif %}</td></tr> |
26 | | -{% endif %} |
27 | | -<tr><th scope="row">Department</th><td><a href="{{stock.stocktype.department.get_absolute_url}}">{{stock.stocktype.department.description}}</a></td></tr> |
28 | | -<tr><th scope="row">Stock unit</th><td>{{stock.description}} ({{stock.size}} {{stock.stocktype.unit.name}}s)</td></tr> |
29 | | -<tr><th scope="row">Cost price</th> |
30 | | -{% if stock.costprice %} |
31 | | -<td>{{money}}{{stock.costprice}} (ex-VAT)</td> |
32 | | -{% else %}<td>Unknown</td>{% endif %}</tr> |
33 | | -<tr><th scope="row">Sale price</th><td>{% if stock.stocktype.saleprice != None %}{{money}}{{stock.stocktype.pricestr}} (inc-VAT){% else %}Not set{% endif %}</td></tr> |
34 | | -{% if stock.onsale %} |
35 | | -<tr><th scope="row">Put on sale</th><td>{{stock.onsale}} |
36 | | -{% if stock.stockonsale %} on line <a href="{{stock.stockonsale.stockline.get_absolute_url}}">{{stock.stockonsale.stockline.name}}</a> |
37 | | -{% endif %} |
38 | | -</td></tr> |
39 | | -{% endif %} |
40 | | -{% if stock.finished %} |
41 | | -<tr><th scope="row">Finished</th><td>{{stock.finished}} ({{stock.finishcode.description}})</td></tr> |
42 | | -{% endif %} |
43 | | -{% if stock.bestbefore %} |
44 | | -<tr><th scope="row">Best before</th><td>{{stock.bestbefore}}</td></tr> |
45 | | -{% endif %} |
46 | | -<tr><th scope="row">Amount used</th><td>{{stock.used}} {{stock.stocktype.unit.name}}s</td></tr> |
47 | | -<tr><th scope="row">Amount remaining</th><td>{{stock.remaining}} {{stock.stocktype.unit.name}}s</td></tr> |
48 | | -{% if stock.annotations %} |
49 | | -<tr><th scope="row">Notes</th><td> |
50 | | -{% with annotationlist=stock.annotations excluded_column="stock" %} |
51 | | -{% include "tillweb/annotationlist.html" %} |
| 14 | +{% with dtc="col-4 col-sm-2 text-sm-end" ddc="col-8 col-sm-10" %} |
| 15 | +<dl class="row lh-1"> |
| 16 | + <dt class="{{dtc}}">Stock ID</dt> |
| 17 | + <dd class="{{ddc}}">{{stock.id}}</dd> |
| 18 | + |
| 19 | + <dt class="{{dtc}}">Check digits</dt> |
| 20 | + <dd class="{{ddc}}">{{stock.checkdigits}}</dd> |
| 21 | + |
| 22 | + <dt class="{{dtc}}">Manufacturer</dt> |
| 23 | + <dd class="{{ddc}}"><a href="{% url "tillweb-stocktype-search" %}?manufacturer={{stock.stocktype.manufacturer|urlencode}}">{{stock.stocktype.manufacturer}}</a></dd> |
| 24 | + |
| 25 | + <dt class="{{dtc}}">Name</dt> |
| 26 | + <dd class="{{ddc}}"><a href="{{stock.stocktype.get_absolute_url}}">{{stock.stocktype.name}}</a></dd> |
| 27 | + |
| 28 | + <dt class="{{dtc}}">ABV</dt> |
| 29 | + <dd class="{{ddc}}">{{stock.stocktype.abvstr}}</dd> |
| 30 | + |
| 31 | + {% if stock.delivery %} |
| 32 | + <dt class="{{dtc}}">Supplier</dt> |
| 33 | + <dd class="{{ddc}}"><a href="{{stock.delivery.supplier.get_absolute_url}}">{{stock.delivery.supplier.name}}</a></dd> |
| 34 | + |
| 35 | + <dt class="{{dtc}}">Delivery date</dt> |
| 36 | + <dd class="{{ddc}}">{{stock.delivery.date}}</dd> |
| 37 | + |
| 38 | + <dt class="{{dtc}}">Delivery ID</dt> |
| 39 | + <dd class="{{ddc}}"><a href="{{stock.delivery.get_absolute_url}}">{{stock.delivery.id}}</a>{% if not stock.checked %} <span class="badge bg-warning">Not confirmed</span>{% endif %}</dd> |
| 40 | + |
| 41 | + {% else %} |
| 42 | + <dt class="{{dtc}}">Discovered in stock take</dt> |
| 43 | + <dd class="{{ddc}}"><a href="{{stock.stocktake.get_absolute_url}}">{{stock.stocktake.id}}</a>{% if not stock.checked %} <span class="badge bg-warning">Not committed</span>{% endif %}</dd> |
| 44 | + {% endif %} |
| 45 | + |
| 46 | + <dt class="{{dtc}}">Department</dt> |
| 47 | + <dd class="{{ddc}}"><a href="{{stock.stocktype.department.get_absolute_url}}">{{stock.stocktype.department.description}}</a></dd> |
| 48 | + |
| 49 | + <dt class="{{dtc}}">Stock unit</dt> |
| 50 | + <dd class="{{ddc}}">{{stock.description}} ({{stock.size}} {{stock.stocktype.unit.name}}s)</dd> |
| 51 | + |
| 52 | + <dt class="{{dtc}}">Cost price</dt> |
| 53 | + <dd class="{{ddc}}">{% if stock.costprice %}{{money}}{{stock.costprice}} (ex-VAT){% else %}Unknown{% endif %}</dd> |
| 54 | + |
| 55 | + <dt class="{{dtc}}">Sale price</dt> |
| 56 | + <dd class="{{ddc}}">{% if stock.stocktype.saleprice != None %}{{money}}{{stock.stocktype.pricestr}} (inc-VAT){% else %}Not set{% endif %}</dd> |
| 57 | + |
| 58 | + {% if stock.onsale %} |
| 59 | + <dt class="{{dtc}}">Put on sale</dt> |
| 60 | + <dd class="{{ddc}}">{{stock.onsale}} |
| 61 | + {% if stock.stockonsale %} on line <a href="{{stock.stockonsale.stockline.get_absolute_url}}">{{stock.stockonsale.stockline.name}}</a> |
| 62 | + {% endif %}</dd> |
| 63 | + {% endif %} |
| 64 | + |
| 65 | + {% if stock.finished %} |
| 66 | + <dt class="{{dtc}}">Finished</dt> |
| 67 | + <dd class="{{ddc}}">{{stock.finished}} ({{stock.finishcode.description}})</dd> |
| 68 | + {% endif %} |
| 69 | + |
| 70 | + {% if stock.bestbefore %} |
| 71 | + <dt class="{{dtc}}">Best before</dt> |
| 72 | + <dd class="{{ddc}}">{{stock.bestbefore}}</dd> |
| 73 | + {% endif %} |
| 74 | + |
| 75 | + <dt class="{{dtc}}">Amount used</dt> |
| 76 | + <dd class="{{ddc}}">{{stock.used}} {{stock.stocktype.unit.name}}s</dd> |
| 77 | + |
| 78 | + <dt class="{{dtc}}">Amount remaining</dt> |
| 79 | + <dd class="{{ddc}}">{{stock.remaining}} {{stock.stocktype.unit.name}}s</dd> |
| 80 | + |
| 81 | + {% if stock.annotations %} |
| 82 | + <dt class="{{dtc}}">Notes</dt> |
| 83 | + <dd class="{{ddc}}"> |
| 84 | + {% with annotationlist=stock.annotations excluded_column="stock" %} |
| 85 | + {% include "tillweb/annotationlist.html" %} |
| 86 | + {% endwith %} |
| 87 | + </dd> |
| 88 | + {% endif %} |
| 89 | +</dl> |
52 | 90 | {% endwith %} |
53 | | -</td></tr>{% endif %} |
54 | | -</table> |
55 | 91 |
|
56 | 92 | {% if aform %} |
57 | | -<button type="button" class="btn btn-secondary" data-bs-toggle="modal" data-bs-target="#noteModal"> |
| 93 | +<button type="button" class="btn btn-secondary mb-2" data-bs-toggle="modal" data-bs-target="#noteModal"> |
58 | 94 | Add a note |
59 | 95 | </button> |
60 | 96 | {% endif %} |
61 | 97 | {% if wform %} |
62 | | -<button type="button" class="btn btn-secondary" data-bs-toggle="modal" data-bs-target="#wasteModal"> |
| 98 | +<button type="button" class="btn btn-secondary mb-2" data-bs-toggle="modal" data-bs-target="#wasteModal"> |
63 | 99 | Record waste |
64 | 100 | </button> |
65 | 101 | {% endif %} |
|
101 | 137 | {% if stock.out %} |
102 | 138 | <div class="mb-3"> |
103 | 139 | <h2>Usage summary</h2> |
104 | | - <table class="table w-auto"> |
105 | | - {% for rc,qty in stock.removed %} |
106 | | - <tr> |
107 | | - <th scope="row">{{rc.reason}}</th> |
108 | | - <td>{{qty}} {{stock.stocktype.unit.name}}s</td> |
109 | | - </tr> |
| 140 | + {% with dtc="col-4 col-sm-2 text-sm-end" ddc="col-8 col-sm-10" %} |
| 141 | + <dl class="row lh-1"> |
| 142 | + {% for rc, qty in stock.removed %} |
| 143 | + <dt class="{{dtc}}">{{rc.reason}}</dt> |
| 144 | + <dd class="{{ddc}}">{{qty}} {{stock.stocktype.unit.name}}s</dd> |
110 | 145 | {% endfor %} |
111 | | - </table> |
| 146 | + </dl> |
| 147 | + {% endwith %} |
112 | 148 | </div> |
113 | 149 |
|
114 | 150 | <div class="row mb-3"> |
|
0 commit comments