Compare commits

..

No commits in common. "158c41974785c9c755cac042dc785438e538262b" and "a9338805e240976bcb7ced82f382b35c0fc6aff2" have entirely different histories.

2 changed files with 0 additions and 14 deletions

View File

@ -164,7 +164,6 @@
<ul id="consumable_{{vehicle.id}}_{{consumable.id}}_tabs" class="nav nav-tabs" data-tabs="tabs"> <ul id="consumable_{{vehicle.id}}_{{consumable.id}}_tabs" class="nav nav-tabs" data-tabs="tabs">
{{ nav_tab(vehicle.id|string + '_' + consumable.id|string + '_consumption', 'Consumption', true) }} {{ nav_tab(vehicle.id|string + '_' + consumable.id|string + '_consumption', 'Consumption', true) }}
{{ nav_tab(vehicle.id|string + '_' + consumable.id|string + '_amount', 'Amount', false) }} {{ nav_tab(vehicle.id|string + '_' + consumable.id|string + '_amount', 'Amount', false) }}
{{ nav_tab(vehicle.id|string + '_' + consumable.id|string + '_price', 'Price', false) }}
</ul> </ul>
<div id="consumable_{{vehicle.id}}_{{consumable.id}}_content" class="tab-content "> <div id="consumable_{{vehicle.id}}_{{consumable.id}}_content" class="tab-content ">
{{ tab_pane( {{ tab_pane(
@ -189,17 +188,6 @@
false false
) )
}} }}
{{ tab_pane(
vehicle.id|string + '_' + consumable.id|string + '_price',
chart(
consumable.price,
'ref_' + vehicle.id|string + '_' + consumable.id|string + '_price',
'€ / '+consumable.unit,
url_for('create_pit_stop_form', vid=vehicle.id, cid=consumable.id)
),
false
)
}}
</div> </div>
{{ tab_script('vehicle_' + vehicle.id|string + '_' + consumable.id|string + '_tabs') }} {{ tab_script('vehicle_' + vehicle.id|string + '_' + consumable.id|string + '_tabs') }}
</div> </div>

View File

@ -27,7 +27,6 @@ class ConsumableStats:
self.average_amount_used = 0 self.average_amount_used = 0
self.average_amount = [] self.average_amount = []
self.amounts = [] self.amounts = []
self.price = []
pitstops = [ pitstops = [
stop for stop in vehicle.pitstops if stop.consumable_id == consumable.id stop for stop in vehicle.pitstops if stop.consumable_id == consumable.id
@ -38,7 +37,6 @@ class ConsumableStats:
for pitstop in pitstops: for pitstop in pitstops:
self.overall_amount += pitstop.amount self.overall_amount += pitstop.amount
self.amounts.append(StatsEvent(pitstop.date, pitstop.amount)) self.amounts.append(StatsEvent(pitstop.date, pitstop.amount))
self.price.append(StatsEvent(pitstop.date, pitstop.costs/pitstop.amount))
self.average_amount_fuelled = self.overall_amount / pitstop_count self.average_amount_fuelled = self.overall_amount / pitstop_count
if pitstop_count > 1: if pitstop_count > 1:
overall_distance = ( overall_distance = (