VEH-52: Fuellog numbers don't add up



Issue Information

Issue Type: Bug
 
Priority: Major
Status: Closed

Reported By:
Ben Tasker
Assigned To:
Ben Tasker
Project: VehMan (VEH)
Resolution: Fixed (2014-01-12 13:25:24)
Affects Version: 1.0.15,
Target version: 1.0.2,
Components: Charts , Fuel ,

Created: 2013-12-01 18:58:39
Time Spent Working


Description
The Financial figures on the Fuellog don't seem to add up, and Octobers figure doesn't match what's displayed on the chart.


Attachments

Issue Links

Toggle State Changes

Activity


Attaching screenshot
btasker added 'Screenshot.png' to Attachments
The total expenditure field does actually add up - the very first fuellog entry is excluded as it's the baseline.

However, the chart is incorrect

|Month|Chart|Log|
|Oct|356.29|275.86|
|Nov|335.03|335.03|

The chart appears to be including the baseline fill (£80.43), which it shouldn't.

Along the same lines, the Monthly Avg Fuel economy for Oct is lower than Nov, but Nov's cost per mile is higher - not quite sure how that's possible given the fuel price hasn't really changed.
The historic monthly mileage chart is only displaying 468 miles for November, again not sure why as there should be > 1000 miles recorded
Having a slow moment, the Historic Monthly Mileage chart is generated from the Statistics objects, which would be why the number was initially low - the stats run was under way.
It does differ from the value displayed in the Monthly mileage chart though

|Month|Monthly|Historic|
|Oct|2060|2281|
|Nov|1454|1922|

Novembers Historic value adds up and tallies against the log for Historic. In the Monthly, the first 468 miles appear to be being assigned back to October.
October's Historic won't tally because it includes mileage done in another car, the monthly value tallies with 468 miles having been credited back from November.

The two charts need to be consistent....
Raised VEH-53 to resolve the issue
Need to confirm whether this is definitely still an issue, preferably against a dev build
Commit 54bb809 prevents the baseline fill from being included in the expenditure chart.
VehMan_API_Charts_Maths::monthlyCostPerMile suffers from a very similar issue that isn't quite as easily resolved.
btasker changed status from 'Open' to 'Resolved'
btasker added 'Fixed' to resolution
btasker changed status from 'Resolved' to 'Closed'