powerpaul17 / nc_money

Nextcloud app for finance management
GNU Affero General Public License v3.0
96 stars 9 forks source link

Unexpected transaction entries after update to 0.11.1 #25

Closed adicirstei closed 1 year ago

adicirstei commented 1 year ago

Hi Paul,

After updating the Money app to version 0.11.1 (I might have skipped the previous version) some of the existing transactions became yellow and they seem to be split in a weird way. They no longer have two entries but sometimes they have four or sometimes the other account just got missing. Please see the image below as it a lot clearer than my words.

This also happen with new entries I try to insert and, so far, I found no method to have the transactions corrected.

Please let me know if I can provide anything to help you diagnose because I found nothing relevant in the nextcloud logs.

image

Thanks a lot, Adrian

powerpaul17 commented 1 year ago

Hello, it seems that the first transaction has the split for "Medeea" twice, so if you delete the last one, it should become balanced again (yellow means unbalanced transaction). The second one is unbalanced because it's missing the second part of the transaction.

Unfortunately I cannot tell what happened here if you tell me it was right before. It might be some kind of rounding error (I am working on it..) but it hasn't happened to me to get double splits I have not created myself.. Do you enter the data manually or do you import it from a file?

Also, for most "simple" transactions you don't need to expand the entry and enter the splits, you can just use the account select. The detailed view (gray lines) is just for transactions with multiple splits. For example if you want to put taxes into a dedicated account and so.. I am thinking about moving this into the sidebar since it's not used very often and the current design has some issues..

adicirstei commented 1 year ago

Hi Paul,

I enter the transactions manually by filling in the fields at the top of the page. I did not input the splits in the expanded view.

I expanded those two for you to better see what's going on.

If I delete the unnecessary entries in the splits, the transaction looks ok until I refresh the page. Then all this happen again for the same transaction or for different ones.

Let me try and use it without decimals. I'll let you know.

michalroxorpl commented 1 year ago

Hello,

the same happened to me, I have tried several times to balance my transactions, but each time I refresh it seems to be worse instead of better. With each correction my banking account was reflecting less and less money and with each refresh of the page (after seeing everything balanced) it reappeared showing bigger mayhem then before. I suppose my whole transactions structure is ruined now and there is no coming back...

powerpaul17 commented 1 year ago

Ok, thanks for your information. It seems there are errors in saving the corrections in the database. Do you see any failed requests in the network log of the browser console?

powerpaul17 commented 1 year ago

And just to be sure: what database are you using?

michalroxorpl commented 1 year ago

I am using MySQL, there indeed are some errors reported:

[Vue warn]: Duplicate keys detected: '106'. This may cause an update error.
adicirstei commented 1 year ago

And just to be sure: what database are you using?

I'm on Postgresql.

Although on network tab I get the 200 status on the DELETE request, in console, I get below warning:

[Vue warn]: Duplicate keys detected: '337'. This may cause an update error.

found in

---> <TransactionListItem>
       <DynamicScrollerItem>
         <RecycleScroller>
           <DynamicScroller>
             <Anonymous>
               <AccountDetails>
                 <Anonymous>
                   <NcAppContent>
                     <Anonymous>
                       <App>
                         <Root>
powerpaul17 commented 1 year ago

Okay, so there seems to be a transaction with a duplicate id. This should not be possible in the database, so I suppose it's a frontend error we're looking at. Can you please look at the requests in the "network" tab of the developer tools in the browser to see if there are any errors? I'm sorry but it's really hard to debug from the distance and I don't have gotten this problem.. :slightly_frowning_face:

powerpaul17 commented 1 year ago

"Good" news, I could recreate the errors, so I can check it locally what's happening here.. thanks for your replies :slightly_smiling_face:

powerpaul17 commented 1 year ago

Should be fixed in 68d1f524805785405d80102007eb1f45b7a7eb9d. Please update to 0.11.2 when it's available and report back if there are still problems..

adicirstei commented 1 year ago

Hi Paul,

Will you release the latest version for NextCloud 25 also? Or should I upgrade to NC 25?

image

Thanks,

powerpaul17 commented 1 year ago

@adicirstei Can you upgrade please if it's not too much trouble for you. They made some breaking changes for app development and since the app is still far from mature (in my opinion) I would like to avoid complications with older versions of NC. Once I consider the app "stable" I'll try of course to maintain all currently supported NC versions..

adicirstei commented 1 year ago

For the last hour I was looking for guides on how to upgrade my NC instance. I have the All In One version on docker and I don't get the update the usual way. I even tried to updated it from portainer but it pulled the 24.0.7 version. Any Idea how should I upgrade?

adicirstei commented 1 year ago

found it. :-)

adicirstei commented 1 year ago

Hi Paul, I upgraded and all is good now.

Thank you so much! I wasn't even aware that the NC 25 was out :)