summaryrefslogtreecommitdiff
path: root/archaeological_warehouse/templates
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2021-03-09 11:14:48 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-03-09 11:14:48 +0100
commitb6db29397aa518cd084bba3f5933644680604e01 (patch)
treeb742211e062221e851c04f6ddcf580ac3faf395c /archaeological_warehouse/templates
parent698bc976af6db131a7b0f7468dc12b0313dce198 (diff)
downloadIshtar-b6db29397aa518cd084bba3f5933644680604e01.tar.bz2
Ishtar-b6db29397aa518cd084bba3f5933644680604e01.zip
Container: manage calculated weight
Diffstat (limited to 'archaeological_warehouse/templates')
-rw-r--r--archaeological_warehouse/templates/ishtar/sheet_container.html15
1 files changed, 15 insertions, 0 deletions
diff --git a/archaeological_warehouse/templates/ishtar/sheet_container.html b/archaeological_warehouse/templates/ishtar/sheet_container.html
index 98b640936..686bd08ff 100644
--- a/archaeological_warehouse/templates/ishtar/sheet_container.html
+++ b/archaeological_warehouse/templates/ishtar/sheet_container.html
@@ -111,6 +111,20 @@
{% endif %}
{% include "ishtar/blocks/sheet_creation_section.html" %}
{% field_flex "Old reference" item.old_reference %}
+ {% if item.get_calculated_weight_percent > 5 %}
+ <div class="alert alert-warning" role="alert">
+ <i class="fa fa-exclamation-triangle" aria-hidden="true"></i> &nbsp;
+ {% trans "Calculated weight is bigger than entered weight (over 5%)." %}
+ </div>
+ {% field_flex "Weight (g)" item.weight %}
+ {% field_flex "Calculated weight (g)" item.calculated_weight %}
+ {% else %}
+ {% if item.weight %}
+ {% field_flex "Weight (g)" item.weight %}
+ {% elif item.calculated_weight %}
+ {% field_flex "Calculated weight (g)" item.calculated_weight %}
+ {% endif %}
+ {% endif %}
{% field_flex_full "Comment" item.comment "<pre>" "</pre>" %}
{% include "ishtar/blocks/sheet_json.html" %}
</div>
@@ -124,6 +138,7 @@
{% field_flex "Width (mm)" container_type.width %}
{% field_flex "Height (mm)" container_type.height %}
{% field_flex "Volume (l)" container_type.volume %}
+ {% field_flex "Tare weight (g)" container_type.tare_weight %}
{% field_flex "Reference" container_type.reference %}
</div>
{% endif %}