Closed krpradeep closed 2 years ago
Hi; So we don't have a split like that in the test folder, but I do have many in my personal folder, with income offset by taxes, etc and a deposit to a 401k. The transactions on the investment side went correctly, i.e. the entire amount deposited to 401k shows up as a purchase of cash in the 401k account (which cash is then 'sold' to buy and offsetting value of securities. So something is different in your case. Two questions:
Hi
I am able to recreate issue in test dataset. You can check here.
New 2022 txn. Salary coming into Checking account with one tax entry and some part of salary going to Saving account and some going into Brokerage Account 3. When you run report for Brokerage Account 3, cash balance is wrong.
So your forked repo shows as even with mine--could you commit your changes?...I cloned it, but the transactions in the TestMD02 datafile under resources are of course the same as mine. I did a quick test, in checking, a split with 1000 Salary, 100 Income Tax, and 200 transfer to StockBrokerage2 on 08/15/2009...still got the expected result in the investment reports transactions (Buy 200 cash)...details below. Anyway, if you can commit your changes, I'll pull them from your repo and take a look.
0.acctid: 8d8ea535-6943-4028-8e78-57c9ea9fa28b 0.desc: Split Transaction Test 0.id: 13dc0481-0362-4011-b9e3-2d81536ac85c 0.obj_type: 0.oldid: -1 0.pamt: 100000 0.samt: -100000 0.tags: 1.acctid: ec6ebdfb-28fb-4362-868e-1e4fb886a2b8 1.desc: Income Tax Trnsfer 1.id: f71670a8-ab0a-47e3-bd57-06945e5322a1 1.obj_type: 1.oldid: -1 1.pamt: -10000 1.samt: 10000 1.tags: 2.acctid: dde35e39-c1fd-4ef4-8458-44fa671c340c 2.desc: 401(k) Transfer 2.id: c88dc193-683f-44e7-93b4-c707868a149b 2.obj_type: 2.oldid: -1 2.pamt: -20000 2.samt: 20000 2.tags: acctid: 44626d42-89fc-44bd-ab3b-6c871d13c7ac chk: desc: Split Transaction Test dt: 20090815 dtentered: 1649783549005 id: 71e6c2fe-10ca-4e97-8919-b699d6cce471 memo: obj_type: txn oldid: -1 td: 20090815 ts: 1649783708081
I think issue happen when you have one more bank account in your salary txn. In your case try adding another split like 150 to saving account.
1000 salary 100 tax 200 transfer to Brokerage and 150 to saving effectively 550 coming to checking account.
I commit all file that git was showing me as changed. Anyway I am attaching screenshot of transaction and report.
Okay, got it--you still haven't pushed your changes, but I was able to replicate. The problem is in the SplitValues class of the TransactionsValues module...we implicitly assumed that each transaction would have only one investment account, and only one account in the type of Investment, Bank, Asset, or Liability...and your case has 2 banks and 1 investment account in the chain. So we need to ignore that savings account split. That's in that long embedded switch statement that goes through Transaction Type and Account Type...my take me a bit to test this out.
Okay, please have a look at branch 'fix2' and the associated bundled mxt files here. It worked on the test folder, transaction records show buy 700 cash in StockBrokerage3 with correct balance. If that seems right I'll update the test and merge that branch on to master. Thanks!
Sorry got busy with something else. Will check after 3-4 days.
I am still getting 721.38 as End Pos
Steps -
I pushed my changes into "SplitTxn-Issue" branch of my repo. (which is fork of your repo)
Comparison to master branch of your repo.
So for whatever reason, when I pulled up the test file in your repo, no accounts came up...but in any case, I think the problem was that I didn't recompile the correct mxt file, so that is fixed in my 'fix2' branch here.. For avoidance of doubt, I updated the version number to 221, so if you're running it in application, that's what you should see. I also recorded a desktop video, showing the test transaction and detailing the balances in both the moneydance app and in the extension. Hopefully, you're seeing the same numbers and that the rest of the transactions in your personal file are coming through correctly.
After taking new mkt file. It working fine.
Please put fix into master branch.
Recently installed this plugin and till now most of the number looks correct in report expect one I noticed.
Report showing 401k account cash balance wrong. After spending 3-4 hours figuring out what is the reason.
This is the scenario - Receiving paycheck into checking account. In order to capture all deduction from salary I am then splitting that transaction into various category (like fed, state, medical insurance deduction, 401k, commuter account etc). Tax, medical related category are configured as expense in Moneydance but 401k, commuter account are investment and bank account. Now looks like in order to calculate Cash balance it is using not only just 401 amount it is picking all other account (expect expense) from split category and causing cash balance to be in negative.
Lets says for a date 401K - $56 Commuter - $12
Instead of using 56 as Cash balance for that date, it is using 44 (56-12) as cash balance subtracting all bank account from 401k contribution. I was able to use csv to figure out what is happening below is csv relevant extract.
I tried to look into code but since there is not much documentation I kind of got lost.
If someone can guide me where to look for I would be able to create pull request.