Skip to content
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

Take point value from pricedb instead of points-value #3

Open
tbm opened this issue May 6, 2020 · 8 comments
Open

Take point value from pricedb instead of points-value #3

tbm opened this issue May 6, 2020 · 8 comments

Comments

@tbm
Copy link

tbm commented May 6, 2020

You require a points-value on the commodity definition.

But since beancount has a price directive, wouldn't it make more sense to take the price from there?

@tbm
Copy link
Author

tbm commented May 6, 2020

I can implement this if you agree.

@redstreet
Copy link
Owner

redstreet commented May 6, 2020

Good idea, but I need to think about this more. Doing so brings up a few issues:

  • do we want to be able to have changing prices (I can see arguments for both sides)
  • what if the pricedb specifies prices in multiple currencies?
  • would specifying it in the pricedb cause unintended conversions (eg: in net worth)

@tbm
Copy link
Author

tbm commented May 7, 2020

These are good points, thanks.

  • I believe point values can change (i.e. multiple pricedb entries). We should just use the latest value.
  • Multiple currencies? I think just use the latest pricedb entry
  • Yes, they would show up in net worth. But either they have a value or they don't. Maybe there should be a way to exclude certain commodities from net worth. That's probably a fava-wide feature that might be nice.

@redstreet
Copy link
Owner

Multiple currencies? I think just use the latest pricedb entry

I don't think this is a good idea. Letting the user specify a currency via the UI would be better. The problem is when a conversion is not available in that currency but available in another.

The current solution side steps all of this by forcing the user to specify a single conversion at the cost of a bit of flexibility.

Yes, they would show up in net worth. But either they have a value or they don't.

I'm not sure I agree. My points values are estimates, which are between "having a value" and not. I'd rather see my miles separately in net worth than a conversion that's an estimate.

One solution is to use priced, but allow commodity metadata to override it. The UI issue would still need to be solved.

@tbm
Copy link
Author

tbm commented May 8, 2020

I don't think this is a good idea. Letting the user specify a currency via the UI would be better

Right, this is similar to the discussion at redstreet/fava_investor#32
I'm not sure if Fava's interface for currency selection is available for plugins, but it seems like using the same approach would be best.

One solution is to use priced, but allow commodity metadata to override it

Right, that sounds sensible to me.

@redstreet
Copy link
Owner

Sure, feel free to send a PR.

The conversion menu is available to extensions. Currencies is available only as a part of a chart.

@tbm
Copy link
Author

tbm commented May 8, 2020

Sure, feel free to send a PR.

I'll try but I can't promise since I don't know how the conversion menu works

@redstreet
Copy link
Owner

The example that ships with Fava should help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants