-
Notifications
You must be signed in to change notification settings - Fork 504
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
trading between commodities in automatic transaction does not balance #2268
Comments
Seeing the same issue. Scares me off of using the commodities feature. I suppose I will just do the math myself and use sub accounts.
|
@tdenny What issue are you seeing exactly? From your example, it doesn't look like you are using automated transactions. |
My fault. I think I misunderstood your OP. I'm seeing the error Apologies for the noise. |
I recommend you put this directive at the top of your journal:
If you do this, then transactions will only have to balance to the nearest cent. For example:
Ledger shouldn't complain about the unbalanced $0.0039 because the format directive specifies only two decimal places. If you still have problems where there is an unbalanced penny or two, then I would recommend any of 1) adding an adjustements posting with a blank amount to soak up the residual pennies, 2) omitting the explicit $-11.57 and let ledger calculate that automatically, or 3) omitting the explicit $3.07. If you still have issues, then it's probably from a syntax mistake like a wrong whitespace. |
When an automatic transaction deals with trading between commodities -- even with an explicit price -- the transaction will not balance. For example, the following does not balance when the automatic transaction is applied even though 100 apples at $0.20 per apple is clearly $20.
The text was updated successfully, but these errors were encountered: