Incorrect balance after deleting a payment in database

Bug and problem reporting on Cyclos 4 version

Moderators: rmvanarkel, hugo, alexandre

Post Reply
Xebax
Posts: 23
Joined: Fri Nov 16, 2012 1:19 pm

Incorrect balance after deleting a payment in database

Post by Xebax »

Hi,

I canceled a payment by error and to fix that, I deleted the CHARGEBACK transaction and the related transfer directly in the database. Then I purged the closed_account_balances table to force Cyclos to recompute the balances. Now the balance of the account in closed_account_balances is correct (354.24 EUS) but the balance displayed in the application is incorrect (204.24 EUS). To be more precise, the balance is incorrect but the others balances (at the end of the period, etc.) are correct, as one can see in this screenshot:
pb solde.png
pb solde.png (26.23 KiB) Viewed 480 times

What I am missing ? Is there somewhere a cache that must be cleaned?

Thank you.
Best regards,
Xebax
alexandre
Posts: 950
Joined: Wed Sep 06, 2006 9:06 am

Re: Incorrect balance after deleting a payment in database

Post by alexandre »

Hi,

The system use closed account balances to show the balances faster.
If you delete a payment you need to delete all closed account balances for this account after this payment date, this way the system will calculate again the correct balance.

regards
Alexandre Caurrinhos
Cyclos development team.
Xebax
Posts: 23
Joined: Fri Nov 16, 2012 1:19 pm

Re: Incorrect balance after deleting a payment in database

Post by Xebax »

Hi Alexandre,

Thank you for your message.

I already purged the closed_account_balances table (deleted all the rows) and this didn't fix the amount displayed in the account.
In fact, the balance displayed in the account is different from the last value in closed_account_balances for this account, as if the payment I canceled by error was not included. What I am missing?

Best regards,
Xebax
Xebax
Posts: 23
Joined: Fri Nov 16, 2012 1:19 pm

Re: Incorrect balance after deleting a payment in database

Post by Xebax »

Hi,

To be more clear, the balance displayed in the app is incorrect even when the closed_account_balances table is empty.
This issue is related to the payment I canceled by error. I canceled a payment of 150 eusko and then I deleted the CHARGEBACK payment and the related transaction, but it seems that the original payment is still ignored in the amount displayed.

Best regards,
Xebax
alexandre
Posts: 950
Joined: Wed Sep 06, 2006 9:06 am

Re: Incorrect balance after deleting a payment in database

Post by alexandre »

hi,

Check on your database the tables account_balances and dirty_account_balances
Need to clear this tables too.

Regards
Alexandre Caurrinhos
Cyclos development team.
Xebax
Posts: 23
Joined: Fri Nov 16, 2012 1:19 pm

Re: Incorrect balance after deleting a payment in database

Post by Xebax »

Hi,

dirty_account_balances was empty and clearing the account_balances table solved the problem.
Thanks a lot!

Best regards,
Xebax
Post Reply