{% extends "base.html" %} {% block title %}{{ period.name }}{% endblock %} {% block content %}

{{ t('Periodo facturado') }}

{{ period.name }}

{% if bridge_error %} {{ t('Sin bridge') }} {% elif summary %} {{ t('Revisar medicion') if summary.has_inverter_issue else t('Medicion OK') }} {% else %} {{ t('Sin calculo') }} {% endif %}
{{ t('Inicio') }} {{ period.starts_on }} {{ t('Rango') }} {% if summary %} {{ summary.period.effective_start }} - {{ summary.period.effective_end }} {% else %} {{ t('Pendiente de calculo') }} {% endif %} {{ t('Fuente') }} {% if summary %} {{ summary.selected_variant.label }} {% else %} {{ t('Sin definir') }} {% endif %} {% if period.notes %} {{ t('Notas') }} {{ period.notes }} {% endif %}

{{ t('Resumen') }}

{{ t('Consumo calculado') }}

{% if summary %} {{ t('Abierto') if summary.period.is_open else t('Cerrado') }} {% endif %}
{% if bridge_error %}
{{ bridge_error }}
{% elif summary %}
{{ t('Facturable') }} {{ summary.billing_consumption_kwh | kwh }} kWh {{ t('Servicio') }} {{ summary.selected_variant.service_total | money }} {{ t('Factura') }} {{ summary.selected_variant.total | money }} {{ t('Solar') }} {{ summary.solar_pv_kwh | kwh }} kWh
{{ t('Red') }}: {{ summary.inverter_consumption_kwh | kwh }} kWh {{ t('Carga total') }}: {{ summary.inverter_load_kwh | kwh }} kWh {{ t('Medicion') }}: {{ summary.inverter_issue_summary }}
{% else %}
{{ t('Aun no hay datos suficientes para este periodo.') }}
{% endif %}
{% if summary %}
{{ t('Total factura') }} {{ summary.selected_variant.total | money }} {{ summary.daily_points | length }} {{ t('registros diarios') }} {% if summary.alternate_variant %} {{ t('Con {label}: {value}', label=(summary.alternate_variant.label | lower), value=money_text(summary.alternate_variant.total)) }} {% endif %}
{{ t('Red') }} {{ summary.inverter_consumption_kwh | kwh }} kWh {{ t('Consumo de red medido por SolarAssistant') }}
{{ t('Energia electrica') }} {{ summary.selected_variant.energy_cost | money }} {{ t('Tarifa {scope} con {label}', scope=summary.config_source.bands_scope, label=(summary.selected_variant.label | lower)) }} {% if summary.alternate_variant %} {{ t('Con {label}: {value}', label=(summary.alternate_variant.label | lower), value=money_text(summary.alternate_variant.energy_cost)) }} {% endif %}
{{ t('Compania') }} {% if summary.utility_consumption_kwh is not none %}{{ summary.utility_consumption_kwh | kwh }} kWh{% else %}{{ t('Sin dato') }}{% endif %} {% if summary.utility_consumption_kwh is not none %}{{ t('Lectura cargada manualmente') }}{% else %}{{ t('Todavia no cargaste lectura') }}{% endif %}
{{ t('Diferencia') }} {% if summary.consumption_difference_kwh is not none %} {{ summary.consumption_difference_kwh | kwh }} kWh {% else %} {{ t('Sin dato') }} {% endif %} {% if summary.consumption_difference_percent is not none %} {{ summary.consumption_difference_percent | percent }} {% else %} {{ t('Carga una lectura para comparar') }} {% endif %}
{{ t('Total servicio energia') }} {{ summary.selected_variant.service_total | money }} {{ t('Energia + conceptos de servicio') }} {% if summary.alternate_variant %} {{ t('Con {label}: {value}', label=(summary.alternate_variant.label | lower), value=money_text(summary.alternate_variant.service_total)) }} {% endif %}
{{ t('IVA y otros conceptos') }} {{ summary.selected_variant.other_concepts_total | money }} {{ t('Conceptos fuera del servicio') }} {% if summary.alternate_variant %} {{ t('Con {label}: {value}', label=(summary.alternate_variant.label | lower), value=money_text(summary.alternate_variant.other_concepts_total)) }} {% endif %}
{{ t('Carga total del inversor') }} {{ summary.inverter_load_kwh | kwh }} kWh {{ t('Energia total consumida segun el inversor durante este periodo') }}
{{ t('Generacion solar') }} {{ summary.solar_pv_kwh | kwh }} kWh {{ t('Energia generada por los paneles en este periodo') }}
{{ t('Integridad inversor') }} {{ t('Revisar') if summary.has_inverter_issue else t('OK') }} {{ summary.inverter_issue_summary }}
{{ t('Usado para calcular') }} {{ summary.billing_consumption_kwh | kwh }} kWh {{ t('Tomado de la compania') if summary.consumption_source == 'utility' else t('Tomado de la red del inversor') }} {% if can_manage %}
{% if summary.utility_consumption_kwh is not none %}
{% else %} {{ t('Compania') }} {% endif %}
{% endif %}
{{ t('Factura teorica sin solar') }} {{ summary.load_variant.total | money }} {{ t('Calculada con la carga total del inversor: {value} kWh', value=kwh_text(summary.inverter_load_kwh)) }}
{{ t('Ahorro solar estimado') }} {{ summary.solar_savings_total | money }} {{ t('Diferencia entre la factura actual y la factura teorica sin aporte solar.') }} {{ t('Factura actual: {current} | Sin solar: {without_solar}', current=money_text(summary.selected_variant.total), without_solar=money_text(summary.load_variant.total)) }}

{{ t('Integridad') }}

{{ t('Mediciones del inversor') }}

{{ t('Estado:') }} {{ t('Revisar') if summary.has_inverter_issue else t('OK') }}

{{ t('Cobertura:') }} {{ summary.coverage_observed_day_count }}/{{ summary.coverage_expected_day_count }} {{ t('dias con medicion.') }}

{% if summary.has_missing_days %}

{{ t('Faltantes detectados:') }} {{ summary.missing_day_count }} {{ t('dias sin medicion.') }}

{{ t('Fechas:') }} {{ summary.missing_dates_preview | join(', ') }} {% if summary.missing_day_count > summary.missing_dates_preview | length %}...{% endif %}

{% else %}

{{ t('No se detectaron dias faltantes automaticamente. Un valor diario en 0 no se considera error.') }}

{% endif %}
{% if period_comparison %}

{{ t('Comparacion') }}

{{ t('Red vs compania') }}

{{ t('Consumo mensual') }} {% if period_comparison.source == 'utility' %} {{ t('El calculo usa la lectura de la compania.') }} {% else %} {{ t('El calculo usa la red medida por el inversor.') }} {% endif %}
{{ t('Red') }}{{ period_comparison.inverter_kwh | kwh }} kWh
{{ t('Compania') }}{% if period_comparison.utility_kwh is not none %}{{ period_comparison.utility_kwh | kwh }} kWh{% else %}{{ t('Sin dato') }}{% endif %}
{% if period_comparison.utility_kwh is not none %}
{% else %}
{% endif %}
{{ t('Usado para calcular') }}: {{ period_comparison.billing_kwh | kwh }} kWh {% if period_comparison.difference_kwh is not none %} {{ t('Diferencia: {value} kWh', value=kwh_text(period_comparison.difference_kwh)) }} {% if period_comparison.difference_percent is not none %}({{ period_comparison.difference_percent | percent }}){% endif %} {% else %} {{ t('Carga la lectura de la compania para comparar.') }} {% endif %}
{% endif %}

{{ t('Desglose') }}

{{ t('Franjas aplicadas') }}

{% for item in summary.energy_breakdown %} {% else %} {% endfor %}
{{ t('Franja') }} {{ t('Usado') }} {{ t('Precio') }} {{ t('Subtotal') }}
{{ item.label }} {{ item.used_kwh | kwh }} kWh {{ item.price_per_kwh | money }} {{ item.subtotal | money }}
{{ t('No hay franjas para calcular.') }}
{% for section in summary.section_breakdowns %}

{{ t('Desglose') }}

{{ section.display_name or section_label(section.code, section.name) }}

{% if not section.enabled %} {{ t('Deshabilitada') }} {% endif %}
{% for item in section["items"] %} {% else %} {% endfor %}
{{ t('Concepto') }} {{ t('Tipo') }} {{ t('Configuracion') }} {{ t('Resultado') }}
{{ item.name }} {% if item.alias %} {{ item.alias }} {% endif %} {% if item.kind == 'energy' %}{{ t('Tarifa') }}{% elif item.kind == 'fixed' %}{{ t('Fijo') }}{% else %}{{ t('Formula') }}{% endif %} {% if item.kind == 'fixed' %} {{ item.configured_value | money }} {% else %} {{ item.configured_value }} {% endif %} {{ item.amount | money }}
{{ t('No hay conceptos en esta seccion.') }}
{{ t('Total de la seccion') }}: {{ section.display_name or section_label(section.code, section.name) }} {{ section.total | money }}
{% endfor %}
{% endif %}
{{ t('Edicion') if can_manage else t('Datos') }} {{ t('Periodo facturado') }} {{ t('Editar') if can_manage else t('Ver') }}
{% if can_manage %}
{% else %}
{{ t('Nombre') }}{{ period.name }}
{{ t('Inicio') }}{{ period.starts_on }}
{{ t('Medido por la compania (kWh)') }}{% if period.utility_measured_kwh is not none %}{{ period.utility_measured_kwh | kwh }} kWh{% else %}{{ t('Sin dato') }}{% endif %}
{{ t('Error manual') }}{{ t('Si') if period.has_inverter_data_issue else t('No') }}
{{ t('Notas') }}{{ period.notes or t('Sin notas') }}
{% endif %}
{{ t('Tarifa mensual') }} {{ t('Franjas de este periodo') }} {{ t('Editar') if can_manage else t('Ver') }}

{{ t('Configuracion efectiva de tarifas de este periodo.') }}

{% for band in effective_bands %} {% else %} {% endfor %}
{{ t('Etiqueta') }} {{ t('Desde') }} {{ t('Hasta') }} {{ t('Precio por kWh') }}
{{ band.label or t('Franja') }} {{ band.from_kwh | kwh }} kWh {% if band.to_kwh is none %}{{ t('Sin limite') }}{% else %}{{ band.to_kwh | kwh }} kWh{% endif %} {{ band.price_per_kwh | money }}
{{ t('No hay franjas configuradas.') }}
{% if can_manage %}

{{ t('Estas franjas quedan guardadas para este mes. Los cambios no afectan a otros periodos.') }}

{% for band in period_bands %}
{% else %}

{{ t('Este periodo todavia no tiene una tarifa propia.') }}

{% endfor %}
{% endif %}
{{ t('Cargo mensual') }} {{ t('Cargos fijos del periodo') }} {{ t('Editar') if can_manage else t('Ver') }}
{% for rule in effective_fixed %} {% else %} {% endfor %}
{{ t('Nombre') }} {{ t('Seccion') }} {{ t('Importe') }} {{ t('Dashboard') }}
{{ rule.name }} {{ section_label(rule.section, rule.section) }} {{ rule.amount | money }} {{ t('Si') if rule.show_on_dashboard else t('No') }}
{{ t('No hay cargos fijos configurados.') }}
{% if can_manage %}

{{ t('Estos importes fijos quedan guardados para este mes. Los cambios no afectan a otros periodos.') }}

{% for rule in override_fixed %}
{% else %}

{{ t('Este periodo todavia no tiene cargos fijos propios.') }}

{% endfor %}
{% endif %}
{{ t('Reglas por formula') }} {{ t('Conceptos calculados del periodo') }} {{ t('Editar') if can_manage else t('Ver') }}
{% for rule in effective_taxes %} {% else %} {% endfor %}
{{ t('Nombre') }} {{ t('Seccion') }} {{ t('Alias') }} {{ t('Expresion') }}
{{ rule.name }} {{ section_label(rule.section, rule.section) }} {{ rule.alias or '-' }} {{ rule.expression }}
{{ t('No hay conceptos calculados configurados.') }}
{% if can_manage %}
{% for rule in override_taxes %}
{% else %}

{{ t('Sin overrides de impuestos. Se usa la configuracion base.') }}

{% endfor %}
{% endif %}
{% if summary and summary.daily_energy_cost_breakdown %}

{{ t('Detalle diario') }}

{{ t('Costo de energia por dia') }}

{{ summary.daily_cost_note }}

{% for item in summary.daily_energy_cost_breakdown %} {% endfor %}
{{ t('Fecha') }} {{ t('Medicion') }} {{ t('Red inversor') }} {{ t('Usado para calcular') }} {{ t('Carga total') }} Solar PV {{ t('Costo energia') }} {{ t('Acumulado') }}
{{ item.date }} {% if item.has_measurement %} {{ t('Con medicion') }} {% else %} {{ t('Sin medicion') }} {% endif %} {{ item.inverter_grid_kwh | kwh }} kWh {{ item.billed_kwh | kwh }} kWh {{ item.load_kwh | kwh }} kWh {{ item.solar_pv_kwh | kwh }} kWh {{ item.energy_cost | money }} {{ item.cumulative_energy_cost | money }}
{{ t('Total costo de energia del periodo') }} {{ summary.energy_cost | money }}
{% if daily_cost_chart or daily_energy_chart %}

{{ t('Graficos diarios') }}

{{ t('Evolucion diaria') }}

{{ t('Visualiza el costo diario y el comportamiento de la red del inversor junto a la generacion solar.') }}

{% if daily_cost_chart %}

{{ daily_cost_chart.title }}

{{ daily_cost_chart.subtitle }}

{% for item in daily_cost_chart.legend %} {{ item.label }} {% endfor %}
{% endif %} {% if daily_energy_chart %}

{{ daily_energy_chart.title }}

{{ daily_energy_chart.subtitle }}

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