getFlipSide()
Hi, I've been trying to create a variation on the 'Income and Expenses, Detailed' report.
I wanted to show both the Income/Expense account ('category'), and also the account for the bank.
I'm grabbing all the account with getAccountType() == INCOME and then going through those transactions, In order to find out which bank account they are in I'm using txn.getFlipSide().getAccount().getAccountName() .
So to summarize:
txn.getAccount().getFullAccountName() gets me Income/expense category and
txn.getFlipSide().getAccount().getFullAccountName() gets me the bank account where the transaction was entered.
That seems to work fine, but I noticed here: https://infinitekind.com/dev/apidoc/com/infinitekind/moneydance/model/SplitTxn.html#getFlipSide()
it states:
'This is experimental, so please don't use it for any extensions yet.'
So...is there a better or recommended way to do this other than using the getFlipSide() call?
Should have mentioned I'm using Python.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Sean Reilly on 03 Aug, 2020 10:53 PM
Hi Jim,
That's a really good question. That comment should be removed as that API has been stable for many years now and I'm happy with how it works.
The difference between that an getOtherTxn(int) is that getFlipSide() will return the reverse part of the SplitTxn, meaning that the amount it reports will be specific to that split, not the overall ParentTxn.
Thanks!
Sean
--
Sean Reilly
Developer, The Infinite Kind
https://infinitekind.com
2 Posted by Jim on 04 Aug, 2020 01:50 AM
Thank for the reply. For what I'm doing...which is just looking for the bank account the transaction is in...either method works out the same all the time??
Support Staff 3 Posted by Sean Reilly on 04 Aug, 2020 08:15 AM
Yes, for that purpose these are identical.
System closed this discussion on 03 Nov, 2020 08:20 AM.