{% extends "base.html" %} {% block title %}{{ t('Dashboard') }}{% endblock %} {% block content %} {% if bridge_status or bridge_error %}
{{ t('Sin bridge') if bridge_error else (t('Conectado') if bridge_status and bridge_status.connected else t('Degradado')) }} {% if bridge_status %} {{ t('Ultimo dato:') }} {{ bridge_status.last_message_at | datetime_local }} {% endif %} {% if bridge_error %} {{ bridge_error }} {% endif %}
{% endif %} {% if not periods %}

{{ t('No hay periodos configurados') }}

{{ t('Empieza creando el primer periodo de facturacion para delimitar el consumo a calcular.') }}

{{ t('Ir a periodos') }}
{% else %} {% if current_summary %}
{{ t('Periodo actual') }} {{ current_summary.period.name }} {{ current_summary.period.effective_start }} - {{ current_summary.period.effective_end }}
{{ t('Costo total factura') }} {{ current_summary.total | money }} {{ t('Servicio + IVA y otros conceptos') }}
{{ t('Costo total energia') }} {{ current_summary.service_total | money }} {{ t('Energia + cargos y formulas de servicio') }}
{{ t('Energia electrica') }} {{ current_summary.energy_cost | money }} {{ t('Tarifa {scope} con {label}', scope=current_summary.config_source.bands_scope, label=current_summary.selected_variant.label | lower) }}
{{ t('Red') }} {{ current_summary.inverter_consumption_kwh | kwh }} kWh {{ current_summary.daily_points | length }} {{ t('dias') }} con registro
{{ t('Compania') }} {% if current_summary.utility_consumption_kwh is not none %}{{ current_summary.utility_consumption_kwh | kwh }} kWh{% else %}{{ t('Sin dato') }}{% endif %} {% if current_summary.consumption_difference_kwh is not none %} {{ t('Diferencia: {value} kWh', value=kwh_text(current_summary.consumption_difference_kwh)) }} {% else %} {{ t('Aun no cargaste la lectura real') }} {% endif %}
{{ t('Consumo facturable') }} {{ current_summary.billing_consumption_kwh | kwh }} kWh {{ t('Tomado de la compania') if current_summary.consumption_source == 'utility' else t('Tomado de la red del inversor') }}
{{ t('Cobertura') }} {{ current_summary.coverage_observed_day_count }}/{{ current_summary.coverage_expected_day_count }} {{ t('Dias con medicion considerados para validar') }}
{% if yearly_change %}
{{ t('Variacion anual') }} {{ t('Hasta 12 meses') }} {{ t('Comparado con {period_name}', period_name=yearly_change.baseline_period_name) }} {{ t('Tarifas:') }} {% if yearly_change.energy_rate_change_percent is not none %}{{ yearly_change.energy_rate_change_percent | percent }}{% else %}{{ t('n/d') }}{% endif %} {% if yearly_change.energy_rate_baseline > 0 %} | {{ yearly_change.energy_rate_baseline | money }}/kWh -> {{ yearly_change.energy_rate_current | money }}/kWh {% endif %} {{ t('Cargos fijos:') }} {% if yearly_change.fixed_total_change_percent is not none %}{{ yearly_change.fixed_total_change_percent | percent }}{% else %}{{ t('n/d') }}{% endif %} {% if yearly_change.fixed_total_baseline > 0 %} | {{ yearly_change.fixed_total_baseline | money }} -> {{ yearly_change.fixed_total_current | money }} {% endif %}
{% endif %}
{{ t('Integridad inversor') }} {{ t('Revisar') if current_summary.has_inverter_issue else t('OK') }} {{ current_summary.inverter_issue_summary }}
{% endif %}

{{ t('Periodos') }}

{{ t('Detalle calculado') }}

{% if can_manage %} {{ t('Administrar periodos') }} {% endif %}
{% for summary in summaries %} {% endfor %}
{{ t('Periodo') }} {{ t('Rango') }} {{ t('Red') }} {{ t('Compania') }} {{ t('Facturable') }} {{ t('Medicion') }} {{ t('Energia electrica') }} {{ t('Total servicio') }} {{ t('IVA y otros') }} {{ t('Total') }}
{{ summary.period.name }} {% if summary.period.is_open %} {{ t('Abierto') }} {% endif %} {% if summary.has_inverter_issue %} {{ t('Revisar') }} {% endif %} {{ summary.period.effective_start }} - {{ summary.period.effective_end }} {{ summary.inverter_consumption_kwh | kwh }} kWh {% if summary.utility_consumption_kwh is not none %} {{ summary.utility_consumption_kwh | kwh }} kWh {% else %} {{ t('Sin dato') }} {% endif %} {{ summary.billing_consumption_kwh | kwh }} kWh {{ t('Revisar') if summary.has_inverter_issue else t('OK') }}
{{ summary.inverter_issue_summary }}
{{ summary.energy_cost | money }} {{ summary.service_total | money }} {{ summary.other_concepts_total | money }} {{ summary.total | money }}
{% if consumption_chart or costs_chart or tariff_price_chart or fixed_charge_chart %}

{{ t('Graficos') }}

{{ t('Comparativos por periodo') }}

{{ t('Puedes alternar entre barras y una vista de area similar a la del inversor.') }}

{% if consumption_chart %}

{{ consumption_chart.title }}

{{ consumption_chart.subtitle }}

{% for item in consumption_chart.legend %} {{ item.label }} {% endfor %}
{% endif %} {% if costs_chart %}

{{ costs_chart.title }}

{{ costs_chart.subtitle }}

{% for item in costs_chart.legend %} {{ item.label }} {% endfor %}
{% endif %} {% if tariff_price_chart %}

{{ tariff_price_chart.title }}

{{ tariff_price_chart.subtitle }}

{% for item in tariff_price_chart.legend %} {{ item.label }} {% endfor %}
{% endif %} {% if fixed_charge_chart %}

{{ fixed_charge_chart.title }}

{{ fixed_charge_chart.subtitle }}

{% for item in fixed_charge_chart.legend %} {{ item.label }} {% endfor %}
{% endif %}
{% endif %} {% endif %} {% endblock %}