{% extends "layout.html.twig" %} {% block title %}{{ gruppo.nome }} · {{ app_name }}{% endblock %} {% set can_write = current_user.ruolo in ['admin', 'editor'] %} {% set tipo_label = { 'nascita': 'Nascita', 'morte': 'Morte', 'acquisto': 'Acquisto', 'trasferimento_in': 'Trasferimento in', 'trasferimento_out': 'Trasferimento out', 'spostamento_luogo': 'Spostamento luogo' } %} {% set entrate = ['nascita', 'acquisto', 'trasferimento_in'] %} {% block content %}
Gruppi / {{ gruppo.nome }}
{{ gruppo.note|nl2br }}
{% endif %} {# Consistenza attuale #}Nessun movimento registrato.
{% else %}| Data | Tipo | Quantità | Dettagli |
|---|---|---|---|
| {{ m.data|date('d/m/Y') }} | {{ tipo_label[m.tipo] ?? m.tipo }} | {% if m.tipo == 'spostamento_luogo' %}— {% elseif m.tipo in entrate %}+{{ m.quantita }} {% else %}−{{ m.quantita }}{% endif %} | {%- if m.causa_morte %}{{ m.causa_morte }}{% endif -%} {%- if m.tipo == 'morte' and m.causa_morte == 'macellazione' and m.peso_lavorato_kg %} · {{ m.peso_lavorato_kg }} kg{% if m.quantita > 0 %} ({{ (m.peso_lavorato_kg / m.quantita)|round(3) }} kg/capo){% endif %} {% endif -%} {%- if m.origine_tipo %} · {{ m.origine_tipo }}{% endif -%} {%- if m.venditore %} · {{ m.venditore }}{% endif -%} {%- if m.fonte %} · {{ m.fonte }}{% endif -%} {%- if m.costo %} · € {{ m.costo }}{% endif -%} {%- if m.collegato_nome %} · ↔ {{ m.collegato_nome }}{% endif -%} {%- if m.luogo_nome %} · → {{ m.luogo_nome }}{% endif -%} {%- if m.fonte_link %} · link ↗{% endif -%} {%- if m.note %} · {{ m.note }}{% endif -%} |