how to handle car costs? full refill?

Asked by spiral

I have a question how the car costs are supposed to be handled.
As far as I understand you need at least 1 constant. That could be that you always do full refills or the car is always nearly empty. Or maybe you refill at the same day every week, or you try to refill the same amount every time.
What is the formula behind it, and what do I have to keep in mind for an accurate calculation?

thank you:)

Question information

Language:
English Edit question
Status:
Solved
For:
HomeBank Edit question
Assignee:
No assignee Edit question
Solved by:
Maxime DOYEN
Solved:
Last query:
Last reply:
Revision history for this message
Maxime DOYEN (mdoyen) said :
#1

You simply fill additional datas when you refuel your car d= v=), and affect each cost for your car to the same category and/or subcategory.

Some users reported that the consumption for 100km on every refuel line (the listview) is sometimes false, if you mix partial/full refuel. There is an open bug about it. This is something I still to do but not high in my priorities.

What do you want to know exactly ?

Revision history for this message
spiral (perfectdrug) said :
#2

thanks for your answer,
and sorry for the doublepost:/ my internet connection was goofy.
Basicly my question was, what is the formula behind this calculation. As I said I thought you need at least one constant for this calculation to be accurate. And when I understand you correctly it is best to always do full refills, as recommended solution.
I try to wrap my head around this problem, to handle full and partial refuels correctly, and tell you if I come up with a solution.
thank you for your work!

(don't know if this question is solved yet, feel free to mark it as solved if you think so.)

Revision history for this message
spiral (perfectdrug) said :
#3

and as I just realized how unclear my original message was, I'm not asking how to add the data to the car cost view, but how your program handles this data for the calculation, and what I have to keep in mind for the best result in it.

Revision history for this message
Best Maxime DOYEN (mdoyen) said :
#4

You can have a look at the bug : https://bugs.launchpad.net/homebank/+bug/159066

If you want I can go back to the source code and tell you what I do exactly.
Briefly:
- I collect transaction with refuel data and order them by car meter ascending
- then for each transaction i compute the distance since line before
- and the 100km consumption is a simple 3 rule: fuel * 100 / distance

should be something like that.

Revision history for this message
spiral (perfectdrug) said :
#5

Thanks Maxime DOYEN, that solved my question.