{% extends "report/inventree_report_base.html" %} {% load i18n report barcode %} {# Magazine register — the standing record of what explosive is held in a magazine, and how that compares to its licence. Model: StockLocation Install: Admin Center > Reports > Report Templates > new template, model "Stock Location", and upload this file. All values come from the explosives plugin via ReportMixin (see core.py). `explosives` is the plugin's single namespaced context key. #} {% block style %} body { font-family: sans-serif; font-size: 10pt; } h1 { font-size: 16pt; margin-bottom: 2mm; } .meta { color: #555; margin-bottom: 6mm; } table { width: 100%; border-collapse: collapse; margin-top: 4mm; } th, td { border: 1px solid #999; padding: 2mm; text-align: left; } th { background: #eee; } td.num, th.num { text-align: right; } .breach { color: #b00; font-weight: bold; } .summary td { border: none; padding: 1mm 4mm 1mm 0; } .summary { width: auto; margin-bottom: 4mm; } {% endblock style %} {% block page_content %}

{% trans "Magazine Register" %}

{{ location.name }} {% if location.description %} — {{ location.description }}{% endif %}
{% trans "Generated" %}: {% now "Y-m-d H:i" %}
{% if explosives.limit_kg %} {% endif %}
{% trans "Net explosive quantity held" %} {{ explosives.neq_kg|floatformat:3 }} kg
{% trans "Licensed maximum" %} {% if explosives.limit_kg %} {{ explosives.limit_kg|floatformat:3 }} kg {% else %} {% trans "Not licensed" %} {% endif %}
{% trans "Utilisation" %} {{ explosives.utilisation|floatformat:3 }} {% if explosives.over_limit %} — {% trans "OVER LIMIT" %}{% endif %}
{% trans "Gross mass held" %} {{ explosives.gross_mass_kg|floatformat:3 }} kg
{% if explosives.by_division %}

{% trans "By hazard division" %}

{% for division, mass in explosives.by_division.items %} {% endfor %}
{% trans "Division" %} {% trans "NEQ (kg)" %}
{{ division }} {{ mass|floatformat:3 }}
{% endif %}

{% trans "Contents" %}

{% for item in explosives.items %} {% empty %} {% endfor %}
{% trans "Part" %} {% trans "Location" %} {% trans "Class" %} {% trans "UN No." %} {% trans "Quantity" %} {% trans "NEQ/unit (kg)" %} {% trans "NEQ (kg)" %}
{{ item.part_name }} {{ item.location_name|default:"-" }} {{ item.classification_code|default:"-" }} {{ item.un_number|default:"-" }} {{ item.quantity }} {{ item.neq_per_unit_kg|floatformat:4 }} {{ item.neq_total_kg|floatformat:3 }}
{% trans "No explosive stock held in this location." %}
{% trans "Total" %} {{ explosives.neq_kg|floatformat:3 }}
{% if explosives.config_errors %}

{% trans "Configuration warnings" %}

{% endif %} {% endblock page_content %}