From 277930acde913f9bb73b8f330672356f7ca6457c Mon Sep 17 00:00:00 2001 From: ahosking Date: Fri, 4 Nov 2022 15:17:16 -0400 Subject: [PATCH] Add Fuel costs when they exist --- templates/index.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/index.html b/templates/index.html index 3d45a39..9b1cbe3 100644 --- a/templates/index.html +++ b/templates/index.html @@ -77,6 +77,7 @@ Last Mileage Oil Litres $/Litre + $ Total @@ -87,6 +88,9 @@ Last Mileage {{ point['oilhealth'] }} {{ point['fuel'] }} {{ point['fuelcost'] }} + {% if point['fuel'] %} + {{ '%0.2f' % ((point['fuel'] | float) * (point['fuelcost'] | float)) }} + {% endif %} {% endfor %}