Handle ruptures

This commit is contained in:
Alexis M 2019-09-24 10:17:11 +02:00
parent 11c755fb18
commit bca36da70c
2 changed files with 6 additions and 2 deletions

View file

@ -543,3 +543,7 @@ dt.mandatory:after {
details summary { details summary {
cursor: pointer; cursor: pointer;
} }
.rupture {
background-color: #ff000083;
}

View file

@ -25,7 +25,7 @@
<tbody> <tbody>
{% for product in delivery.get_products_by(producer) %} {% for product in delivery.get_products_by(producer) %}
<tr> <tr>
<th class="product">{{ product }} <th class="product {% if product.rupture %}rupture{% endif %}">{{ product }} {% if product.rupture %}(RUPTURE !){% endif %}
{% if product.description or product.img %} {% if product.description or product.img %}
{% with unique_id=loop.index %} {% with unique_id=loop.index %}
{% include "includes/modal_product.html" %} {% include "includes/modal_product.html" %}
@ -36,7 +36,7 @@
{% if delivery.has_packing %} {% if delivery.has_packing %}
<td {% if delivery.status == delivery.ADJUSTMENT and delivery.product_missing(product) %} class="missing" title="Les commandes individuelles ne correspondent pas aux conditionnements"{% endif %}>{{ product.packing or "—" }}{% if delivery.status == delivery.ADJUSTMENT and delivery.product_missing(product) %} (manque {{ delivery.product_missing(product) }}){% endif %}</td> <td {% if delivery.status == delivery.ADJUSTMENT and delivery.product_missing(product) %} class="missing" title="Les commandes individuelles ne correspondent pas aux conditionnements"{% endif %}>{{ product.packing or "—" }}{% if delivery.status == delivery.ADJUSTMENT and delivery.product_missing(product) %} (manque {{ delivery.product_missing(product) }}){% endif %}</td>
{% endif %} {% endif %}
<td class="with-input"><input {% if delivery.status != delivery.OPEN %}type="text" readonly{% else%}type="number"{% endif%} min=0 name="wanted:{{ product.ref }}" value="{{ order[product].wanted }}"> x {{ product.unit }}</td> <td class="with-input"><input {% if delivery.status != delivery.OPEN or product.rupture %}type="text" readonly{% else%}type="number"{% endif%} min=0 name="wanted:{{ product.ref }}" value="{{ order[product].wanted }}"> x {{ product.unit }}</td>
{% if delivery.status == delivery.ADJUSTMENT or order.has_adjustments %} {% if delivery.status == delivery.ADJUSTMENT or order.has_adjustments %}
<td class="with-input"><input type="number" name="adjustment:{{ product.ref }}" value="{{ order[product].adjustment }}" {% if not delivery.product_missing(product) %}readonly{% endif %}></td> <td class="with-input"><input type="number" name="adjustment:{{ product.ref }}" value="{{ order[product].adjustment }}" {% if not delivery.product_missing(product) %}readonly{% endif %}></td>
{% endif %} {% endif %}