{% for panel_data in panels %}
{{ panel_data.name }}
{{ panel_data.description }}
BARRA: {{ panel_data.bar }}
TENSIÓN: {{ panel_data.voltage }}
FASE: {{ panel_data.phase }}
HILOS: {{ panel_data.wires }}
CÓDIGO: {{ panel_data.code }}
POLOS: {{ panel_data.poles }}
CIRCUITOS: {{ panel_data.circuits|length }}
PROTECCIÓN: {{ panel_data.protection }}
FUENTE: {{ panel_data.source }}
{% if panel_data.phase_num == 3 %} {% else %} {% endif %} {% for circuit in panel_data.circuits %} {% if circuit.is_multirow_start_left %} {% elif not circuit.is_continuation_left %} {% else %} {% endif %} {% if panel_data.phase_num == 3 %} {% endif %} {% if circuit.is_continuation_left and not circuit.num_right %} {% elif circuit.is_multirow_start_right %} {% elif not circuit.is_continuation_right %} {% else %} {% endif %} {% endfor %} {% if panel_data.phase_num == 3 %} {% else %} {% endif %}
kVA DESCRIPCIÓN CAL. T BRK A B C BRK T CAL. DESCRIPCIÓN kVA
kVA DESCRIPCIÓN CAL. T BRK L1 L2 BRK T CAL. DESCRIPCIÓN kVA
{{ (circuit.va_left / 1000)|round(2) }} {{ circuit.desc_left }} {% if circuit.nota_left and circuit.nota_left.strip() %} {{ circuit.nota_left }} {% endif %} {{ circuit.wire_left|safe }} {{ circuit.conduit_left }} {{ circuit.brk_left }} {{ circuit.num_left }}{{ (circuit.va_left / 1000)|round(2) }} {{ circuit.desc_left }} {% if circuit.nota_left and circuit.nota_left.strip() %} {{ circuit.nota_left }} {% endif %} {{ circuit.wire_left|safe }} {{ circuit.conduit_left }} {{ circuit.brk_left }} {{ circuit.num_left }}{{ (circuit.va_left / 1000)|round(2) }} {{ circuit.num_left }} {{ circuit.conn_a_left }} {{ circuit.conn_b }} {{ circuit.conn_c_right }} {{ circuit.num_right }} {{ circuit.brk_right }} {{ circuit.conduit_right }} {{ circuit.wire_right|safe }} {{ circuit.desc_right }} {% if circuit.nota_right and circuit.nota_right.strip() %} {{ circuit.nota_right }} {% endif %} {{ (circuit.va_right / 1000)|round(2) }}{{ circuit.num_right }} {{ circuit.brk_right }} {{ circuit.conduit_right }} {{ circuit.wire_right|safe }} {{ circuit.desc_right }} {% if circuit.nota_right and circuit.nota_right.strip() %} {{ circuit.nota_right }} {% endif %} {{ (circuit.va_right / 1000)|round(2) }} {{ circuit.num_right }} {{ (circuit.va_right / 1000)|round(2) }}
TOTAL{{ panel_data.phase_totals.a }} kVA {{ panel_data.phase_totals.b }} kVA {{ panel_data.phase_totals.c }} kVA {{ panel_data.phase_totals.l1 }} kVA {{ panel_data.phase_totals.l2 }} kVA
CÁLCULO DE FACTOR DE DEMANDA
{% for calc in panel_data.demand_calculations %} {% if calc.codigo == "ME" %} {% set notas_me = calc.notas or (calc.detalle["Notas"] if calc.detalle and calc.detalle["Notas"] is defined else '') %} {% if notas_me and ("reserva" in notas_me.lower() or "RESERVA" in notas_me) %} {% endif %} {% endif %} {% endfor %} {% set total_instalada = (panel_data.carga_total)|round(0) if panel_data.carga_total else 0 %} {% set total_demanda = (panel_data.carga_diseno)|round(0) %} {% set fd_value = panel_data.fd_reserve %}
Tipo de Carga Cant. Carga Total (VA) Factor (%) Demanda (VA)
{{ calc.codigo }}
{{ calc.nombre }} {% if calc.detalle %} {% set ref = calc.referencia or '' %} {% set notas = calc.notas or (calc.detalle["Notas"] if calc.detalle["Notas"] is defined else '') %} {% if calc.codigo == "IL" %} {% set primero = calc.detalle["Primeros 3000 VA a 100%"] if calc.detalle["Primeros 3000 VA a 100%"] is defined else 0 %} {% set segundo = calc.detalle["Entre 3001 y 120000 VA a 35%"] if calc.detalle["Entre 3001 y 120000 VA a 35%"] is defined else 0 %} {% set tercero = calc.detalle["Resto despues de 120000 VA a 25%"] if calc.detalle["Resto despues de 120000 VA a 25%"] is defined else 0 %} {% if primero is not none and primero > 0 %} {{ ref }} | Primeros 3000 VA: 100% ({{ primero|round(0) }} VA), 3001-120000: 35% ({{ segundo|round(0) }} VA){% if tercero > 0 %}, Resto: 25% ({{ tercero|round(0) }} VA){% endif %} {% elif ref %} {{ ref }}{% if notas %} | {{ notas[:100] }}{% if notas|length > 100 %}...{% endif %}{% endif %} {% endif %} {% elif calc.codigo == "AF" %} {% if notas %} {{ ref }} | {{ notas[:100] }}{% if notas|length > 100 %}...{% endif %} {% elif ref %} {{ ref }} {% endif %} {% elif ref %} {{ ref }}{% if notas %} | {{ notas[:100] }}{% if notas|length > 100 %}...{% endif %}{% endif %} {% endif %} {% elif calc.referencia %} {{ calc.referencia }}{% if calc.notas %} | {{ calc.notas[:100] }}{% if calc.notas|length > 100 %}...{% endif %}{% endif %} {% endif %} {% if calc.codigo == "PB" and calc.paneles %}
Incluye: {% for p in calc.paneles %}{{ p.nombre }}{% if p.carga_va %} ({{ (p.carga_va / 1000)|round(2) }} kVA){% endif %}{% if not loop.last %}, {% endif %}{% endfor %}
{% endif %}
{{ calc.cantidad if calc.cantidad else '-' }} {{ calc.total_va|round(0) if calc.total_va else '-' }} {% set factor_pct = (calc.factor_demanda * 100)|round(0) %} {% if calc.factor_demanda < 0.6 %} {{ factor_pct }}% {% elif calc.factor_demanda <= 0.85 %} {{ factor_pct }}% {% else %} {{ factor_pct }}% {% endif %} {{ calc.demanda_va|round(0) if calc.demanda_va else '-' }}
{{ notas_me }}
TOTAL INSTALADA / TOTAL DEMANDA - {{ total_instalada }} VA {{ fd_value }} {{ total_demanda }} VA
{% endfor %}