{% extends "layout.html" %} {% block title %}OptiWarm - Fuel Type: {{ fuel_type.name }}{% endblock %} {% block content %}

{{ fuel_type.name }}

Add Cost Record Edit Back to Fuel Types
Fuel Type Details
Name: {{ fuel_type.name }}
Unit Type: {{ fuel_type.unit_name }}
Description: {{ fuel_type.description or "-" }}
Update URL: {% if fuel_type.update_url %} {{ fuel_type.update_url|truncate(45) }} {% else %} - {% endif %}
Update Interval: {{ fuel_type.update_interval.strftime('%H:%M') if fuel_type.update_interval else "-" }}
Additional Fee Per {{ fuel_type.unit_name }}: {{ fuel_type.add_cost_unit or "-" }}
Additional Fee Per {{ fuel_type.period_type_name }}: {{ fuel_type.add_cost_period or "-" }}
Actual Price
{% set latest = fuel_type.actual_cost %} {% if latest %} Last updated: {{ latest.updated.strftime('%Y-%m-%d') }} {% endif %}
{% if latest %}
{{ latest.price }}

for {{ latest.unit }} {{ fuel_type.unit_name }}

{{ "%.2f"|format(latest.price / latest.unit) }} per {{ fuel_type.unit_name }}

{% if latest.from_date and latest.to_date %} Valid from {{ latest.from_date.strftime('%Y-%m-%d %H:%M') }} to {{ latest.to_date.strftime('%Y-%m-%d %H:%M') }} {% elif latest.from_date %} Valid from {{ latest.from_date.strftime('%Y-%m-%d') }} {% elif latest.to_date %} Valid until {{ latest.to_date.strftime('%Y-%m-%d') }} {% else %} No date restrictions {% endif %}
{% else %}
No price information available
Add Price Record {% endif %}
Related Boilers
{% set related_boilers = [] %} {% for boiler_type in fuel_type.boiler_types %} {% for boiler in boiler_type.boilers %} {% set _ = related_boilers.append(boiler) %} {% endfor %} {% endfor %} {% if related_boilers %} {% for boiler in related_boilers %} {% endfor %}
{{ boiler.name }}
{{ boiler.locationid.name }}{% if boiler.zoneid %} / {{ boiler.zoneid.name }}{% endif %}
{{ boiler.boilertypeid.name }} {% if boiler.is_active %} Active {% elif boiler.is_available %} Available {% elif boiler.is_maintenance %} Maintenance {% else %} Inactive {% endif %}
{% else %}
No boilers are currently using this fuel type.
{% endif %}
Price History
{% if costs_count > 0 %} {{ costs_count }} record{{ 's' if costs_count != 1 else '' }} {% if costs_date_range.min_date or costs_date_range.max_date %} {% if costs_date_range.min_date and costs_date_range.max_date %} {{ costs_date_range.min_date.strftime('%Y-%m-%d') }} - {{ costs_date_range.max_date.strftime('%Y-%m-%d') }} {% elif costs_date_range.min_date %} From {{ costs_date_range.min_date.strftime('%Y-%m-%d') }} {% elif costs_date_range.max_date %} Until {{ costs_date_range.max_date.strftime('%Y-%m-%d') }} {% endif %} {% endif %} {% else %} No records {% endif %}
Add Price Record
{% if costs %}
{% for cost in costs %} {% endfor %}
Price Unit From Date To Date Updated Status Actions
{{ cost.price }} {{ cost.unit }} {{ fuel_type.unit_name }} {{ cost.from_date.strftime('%Y-%m-%d %H:%M') if cost.from_date else "-" }} {{ cost.to_date.strftime('%Y-%m-%d %H:%M') if cost.to_date else "-" }} {{ cost.updated.strftime('%Y-%m-%d %H:%M') }} {% if cost.is_current %} Current {% else %} Inactive {% endif %}
{% else %}
No price records found. Add a price record to get started.
{% endif %}
{% endblock %}