-
Notifications
You must be signed in to change notification settings - Fork 9
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
Auto-suggest account-appropriate commodity balance rather than balance of all commodities #65
Comments
Hm, I wonder if this is common practice or if the behaviour that you suggest use would then in turn confuse other users that want to have both currencies suggested. Otherwise, it sounds reasonable to do. |
If a sub-account has a history of holding multiple currencies, then there's no issue at all. Those who would want both suggested would probably have a sub-account with multiple currencies (or zero currencies). But for those sub-accounts with only one currency, pressing "enter" once should use the appropriate one of the two/more currencies. So if there's a fast programmatic way of determining if a sub-account has only one or multiple currencies, then that should be used. Or else, checking which currency was used the previous time with that sub-account. Frankly, I would prefer that latter approach: automatically using the currency that was last associated with the sub-account. |
I structure my accounts such that different sub-accounts contain only a single commodity. So, for instance,
Assets:Cash:INR
andAssets:Cash:USD
, and so on.When I have a transaction with postings having multiple commodities (for instance, if I have a single transaction involving purchases in both
INR
andUSD
, the auto-suggested default amounts (i.e., the amounts if I simply press "Enter"/"Return") would be applied to a single account, whereas I would usually have two separate accounts to which they ought to be applied (i.e.,Assets:Cash:INR
andAssets:Cash:USD
, rather then both theINR
andUSD
balances from a single account).If hledger-iadd could be smarter about which commodity to apply to which account (e.g., by checking if past transactions to that account only involve a single commodity), that would be very helpful. Currently, I have to manually enter the commodity and the amount instead of using the default auto-suggestions.
The text was updated successfully, but these errors were encountered: