From b6db29397aa518cd084bba3f5933644680604e01 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 9 Mar 2021 11:14:48 +0100 Subject: Container: manage calculated weight --- .../templates/ishtar/sheet_container.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'archaeological_warehouse/templates') 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 %} + + {% 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 "
" "
" %} {% include "ishtar/blocks/sheet_json.html" %} @@ -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 %} {% endif %} -- cgit v1.2.3