Investment Transaction Merger
So I decided to write my own extension to merge transactions in investment accounts for transfers between the investment account and our regular checking account.
The normal condition is that after merging downloaded transaction data with a manually entered one in the Checking account, is 2 transactions in the investment account:
txn1. A SplitTxn in the investment account who's "Other Side" is the ParentTxn in the Checking account that has the checking account's downloaded data. This transaction has the correct memo and description, but no online transaction data (OriginalOnlineTxn is null).
txn2. A ParentTxn in the investment account that has the downloaded data, but blank description and memo.
I can successfully match these transactions, and copy FIID, FiTxnId, and OriginalOnlineTxn from txn2 to txn1. Then I delete txn2. After these steps, everything looks good in the registers of both accounts. Only txn1 is listed in the investment account with the hollow blue circle for downloaded data. When I look at raw transaction details in the investment account, I can see the downloaded data from the brokerage account on "this side", and downloaded data from the bank on the "other side". It all looks and acts right. If I import the same brokerage transactions a second time, nothing new is imported ("Zero new transactions after duplicates removed.")
But when I close Moneydance and re-open it, the online data for the investment transaction disappears. The blue circles in the investment register are gone. There are no online details in raw transaction details. If I import the brokerage OFX file again, txn2 is imported fresh and I'm back to the beginning.
Any suggestions what I'm missing that's causing Moneydance to delete the merged data?
Here's the code that does the merging:
txn1.setFIID(txn2.getFIID());
txn1.setFiTxnId(1, txn2.getFiTxnId(1));
txn1.setOriginalOnlineTxn(txn2.getOriginalOnlineTxn());
txn2.setOriginalOnlineTxn(null);
txn2.getOtherTxn(0).deleteItem();
txn2.deleteItem();
Thanks
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 Maddy on 18 Apr, 2025 03:23 PM
Hi Mike,
Thank you for contacting Moneydance support.
The automatic categorisation that applies to downloaded or imported transactions in bank, credit card, and other account types doesn't also apply to investment transactions. We have plans to improve this as well as to allow merging of likely duplicate investment transactions, but the support is currently pretty basic.
There is one thing that might provide a more immediate solution, which is to set the default category for your investment account. When viewing your investment account register, select the Account -> Edit menu, which will show the settings for your account, as in the attached screenshot. In this window you can choose a different "Default Category", and future transactions will have your selection for the category.
To more easily change the already-entered transactions, you can select a range of those transactions in the Bank Register by doing the following:
1. click the first transaction you'd like to change 2. shift-click the last transaction you'd like to change, which will select all of the transactions between the first and last 3. Right-click (or control click) on the register and select the Batch Change -> Category menu, then select the category you'd like for the selected transactions
Hopefully this helps improve things in the short term, and we'll try to improve investment account categorisation in a future update
--
Maddy, Infinite Kind Support
2 Posted by dtd on 18 Apr, 2025 04:31 PM
I can't speak to MD extensions specifically, but might there be a "commit" process that needs to be done to insure your changes stick?
3 Posted by mike on 24 Apr, 2025 03:49 PM
Maddy, your answer doesn't address my question. My problem isn't categorizing transactions, it's merging the two downloaded versions (one from the Checking account, and one from the investment account).
Does anyone know the meaning of these parameters:
ol.match-status: 0 ol.match-type: 0
Is there any explanation for what would cause the transaction details to change when Moneydance is closed and re-opened?