Possible bug with split transactions

Bob B's Avatar

Bob B

21 Jul, 2020 03:35 AM

I'm using MD 2020. I was attempting to load a transaction into an Investment account to handlle non-security related fees. So I"m using Parent/Split. I was going crazy because the parent tx was being created with an amount of 0 and the default Category, that is, the split info was being lost. It took forever to figure out that I had to set the split.description for it to work (even if I set it to an empty string). Is this a bug?

                    s.setAccount(feeAccount);
                    s.setAmount(txnAmount, txnAmount);
                    s.negateAmount();
                    // above fails without a description
                    s.setDescription("");

The absolute only difference in the code between a working split and one that fails is the presence of the setDescription. If I comment that out that line, it doesn't work.
I haven't included the code that creates the parent and synchs it but I'm happy to include it if that helps diagnose the problem.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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