-
-
Notifications
You must be signed in to change notification settings - Fork 317
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
hledger print -X doesn't properly convert balance assertions/assignments #1429
Comments
@aragaer thanks for the report! Normally we expect print's output to be valid and parseable. There are a few cases where it may not be, and you are right, this is one of them. I feel that this may be one where an exception to that rule is justified. A balance assertion is a definite statement made by the user and I'm not sure it's right to be changing it in any way. |
I was expecting that all amounts would be converted to the one specified, including the asserted one. However even without assertions there is a rounding problem when converted entries do not balance to zero. |
Got an example of the rounding problem ? Feel free to open a separate issue for that. |
Re the balance assertion, perhaps we'll get some more opinions in coming days. Meanwhile.. We could automatically remove or comment balance assertions when using valuation with print. But balance assignments would remain problematic, I think. We could provide a flag allowing the user to remove or comment balance assertions when they are getting in the way. Of course we already have -I/--ignore-assertions to ignore them when reading. We should be guided by solving real-world problem(s). Has this come up for you as a real problem in practice yet ? |
It was more like an attempt to work around the #1417 using |
We should update docs, which currently say "print's output is always a valid hledger journal." I've done that: https://hledger.org/hledger.html#print |
hledger print
with-X
option only converts changes but not asserions/assignments. Resulting output is not a correct entry. See an example below.The text was updated successfully, but these errors were encountered: