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

Returns for Income:Interest:{name} not showing up when transactions have multiple postings #121

Open
rohitagarwal003 opened this issue Dec 30, 2023 · 6 comments

Comments

@rohitagarwal003
Copy link

rohitagarwal003 commented Dec 30, 2023

Describe your Environment
OS: macOS 14.2 (apple silicon)
Paisa Version: 0.6.2
App Variant: Desktop

Describe the bug
I have accounts like:

account Assets:Debt:1234
account Assets:Debt:5678

account Income:Interest:1234
account Income:Interest:5678

and transactions like:

2023/06/02 Interest
    Income:Interest:1234                   -4,339.00 INR
    Expenses:Tax:Income                        83.00 INR
    Assets:Debt:1234

Theses transactions don't show up as "Gain" in the UI as described in https://paisa.fyi/reference/accounts/#interest.

This seems to be because I am deducting tax in the same transaction.

It shows up as "Gain" in the UI if I make tax as a different transaction.

@ananthakumaran
Copy link
Owner

ananthakumaran commented Dec 30, 2023

@rohitagarwal003 could you try if the below works? I think the current logic doesn't handle more than 2 postings well when it comes to interest calculation.

2023/06/02 Interest
    Income:Interest:1234                   -4,339.00 INR
    Assets:Debt:1234

I will look into it, there is some general ambiguity in figuring out how money goes from which account to which account when it comes to transactions with multiple postings.

@rohitagarwal003
Copy link
Author

Yeah, that works. I filed a bug because I wanted to avoid making TDS as a separate transaction. But I can update my ledger to use different transactions for TDS if this is going to be hard to fix.

@ananthakumaran
Copy link
Owner

What is your expectation here? Do you want to treat (interest - tax) as the gain for the debt account? This might be a little more complicated. For now suggest sticking with 2 transactions, I will fix some cases like having 2 interest postings & 1 debt posting. But having interest - tax might be more complicated and I need to think through how it will work out.

@rohitagarwal003
Copy link
Author

What is your expectation here? Do you want to treat (interest - tax) as the gain for the debt account?

No. I think I wanted to treat just the interest as gain.

My reason for keeping interest+tax in the same transaction was because that's what I was did with my salary transaction (where the single transaction has multiple postings for tax, epf, espp, bank).

So, as long as we can recognize interest in >2 posting transaction, it would fix my case.


I just started using ledger + paisa since yesterday, so I am still figuring out how to correctly use it.

@ananthakumaran
Copy link
Owner

With 2 transactions, you would first move money from interest account to debt, then debt to expense. The debt to expense would be considered as a withdrawal. In this way, you would be calculating the returns on pre-tax gain.

If you use 1 transaction, it technically means the amount from the interest account is split and part of it goes to the expense account and part to the debt account. In this way, you would be kind of calculating returns on post-tax gain.

Based on what you want, you can decide on the format.

I will try to fix the bug though, because it currently consider the split transaction as investment (which is wrong)

@rohitagarwal003
Copy link
Author

Makes sense. Thanks for the explanation!

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