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
Incorrect behaviour when changing from un-split to split and vice-versa #12
Comments
That definitely sounds like a bug, but I'm not able to reproduce it. In theory, the only code path that sets the memo to
Probably not. In all likelihood when you deleted the foreign transaction and the difference transaction wasn't reset to 0 as it should have been, the tool would have created an adjustment transaction to compensate for that. So when you deleted the difference transaction, it has to make a new adjustment to "undo" that earlier adjustment. |
What I meant was that I deleted the non-zero transaction tagged If this happens again, I'll try to get a screenshot/log. It created a couple deleted difference transactions when I put in a payment for an NOK credit card, but those were properly zeroed out. |
I just observed this bug, although unfortunately I didn't have debug logging enabled at the time. In this case, it happened after a transaction was imported (and a difference transaction was created) and I then changed it to a split transaction (which means a new difference transaction was created for the split, and the difference transaction for the parent was "deleted"). This is the regular log that shows the difference transaction update:
I confirmed in the code that what is displayed for the Amount is definitely exactly the same as what is being put into the |
I've now been able to reproduce, and it does indeed seem to be a case of the YNAB API ignoring the amount change: Note the amount is 0 in the
But in the response, the amount is
In this case, I believe we can work around this by un-setting the category in this case of a regular transaction that's turned into a split. |
Actually, this sounds right. I probably imported some inflows, then I split the transaction because I allocate some money for taxes and such. |
Opened pull request #15 that should fix this. With this change, deleted difference transactions will just keep their old category, which means there's no chance of it being changed to the special "split" category ID. After this change, the YNAB API correctly changes the amount to 0, as expected. |
There also seems to be a problem when you change a split transaction back to an un-split transaction. It "deletes" the difference transaction for the split, but doesn't create a new difference transaction for the parent. |
I've pushed a fix to #15 for this second problem as well. |
Will existing users need to fix anything?
…On Sat, Dec 14, 2019, 14:07 Emanuel Borsboom ***@***.***> wrote:
I've pushed a fix to #15
<#15>
for this second problem as well.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#12?email_source=notifications&email_token=AACUANBPYU53HGB4DYQVFKDQYTLAHA5CNFSM4JTLYBN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEG4CDUQ#issuecomment-565715410>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACUANCFEGT4TZEMBLAM5KLQYTLAHANCNFSM4JTLYBNQ>
.
|
Probably not, it's a pretty uncommon edge case. If it did happen, the worst case is that a difference amount was miscategorized. |
Fix released in v0.1.8. |
On https://borsboom.io/foreign-currency-accounts-for-ynab/#deleted-transactions, it says:
What I'm finding, though, is that the difference amount is not set to 0. There is still an inflow or outflow. The part about the memo is true.
When I deleted the deleted transactions, it did seem to add another adjustment transaction with the total of the deleted amounts, which I assume means everything is OK?
The text was updated successfully, but these errors were encountered: