-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support expiry field #8
Comments
I just realized there's one problem with this approach that I'm not sure how to solve. If you set But setting one I'm not sure what the right solution is. |
Setting |
Isn't expiration for miles and points and such, commodity specific? For example, Hooli Airlines always expires in 18months from the last transaction. Your partner and yourself would use two separate accounts to track your respective miles, and each account will have separate expiry dates based on the latest transaction. That's how this plugin works already, so I may be failing to see what you're pointing at. Could you please explain? I can see the need for |
The problem is that the rules can be much more complicated than this. I wanted to write a plugin that implements the exact expiration policies. For example, BA has an expiration policy if 36 months, but transfers (you can transfer miles between BA, Iberia and Avios) do not change the expiration, so simply taking 36 months from the last transaction won't work. Another example is that a lot of airlines and hotels have extended expiration to a certain date in the future due to COVID. The idea was to write a plugin that knows the exact rules. My problem is that I'm not sure how to codify the calculated expiration date in order to communicate it to fava_miler. Adding to to metadata of the commodity would be one way, but this doesn't work if you have two accounts (you and partner) with the same commodity -- they may have different expiration dates. |
Ah, got it now, thank you for the explanation! If we make the assumptions that:
then here are some ideas:
A user could use a plugin to attach that metadata, or do it manually if it's simple. This solves your first problem. The second problem is hopefully a rare exception, which can be solved by inserting a dummy (0 BAMILE) transaction at the appropriate date. Or perhaps a
These overrides would be per account, unless the metadata appeared in the commodity, where it would apply to the commodity regardless of account. Of course, the latter option would require some changes to fava_miler, and I'd be happy to review a PR. What do you think? |
The
expiry-months
sort of works, but I'd like a much more accurate calculation of the expiration date.I am thinking of creating a beancount plugin that would calculate the exact expiration date. That could calculate the exact expiry date and set the
expiry
metadata for the commodity, so fava_miler could make use of it.Does that sound like a good approach to you? (If so, I can create a patch. I haven't though about the design of the beancount plugin yet, but that's a separate question)
The text was updated successfully, but these errors were encountered: