[SOLVED] Calculation error?

MMEX4Android, Google Play, and F-Droid

Moderator: Renato

User avatar
Renato
MVP User
Posts: 876
Joined: Mon Apr 25, 2011 7:36 pm
Are you a spam bot?: No
Location: near Zurich

Re: Calculation error?

Post by Renato »

the hangup was caused by an incorrect assignment of a subcategory.
I have appended the subcategory 70 Cura della Persona = which pointed to itself, to the category 28 Altro.
Is this the solution to the other problems?
.
MMEX09.png
MMEX09.png (22.11 KiB) Viewed 129826 times
your_export_db.mmb
(272 KiB) Downloaded 867 times
Renato Forum Administrator (I'm not a developer)
User avatar
marcottt
Senior User
Posts: 38
Joined: Wed Jan 01, 2025 10:48 am
Are you a spam bot?: No

Re: Calculation error?

Post by marcottt »

i tried to use the mmb you attached, but i get this error on windows app.

Not tried into the android app
Attachments
Immagine 2025-01-12 204909.jpg
Immagine 2025-01-12 204909.jpg (23.06 KiB) Viewed 129783 times
User avatar
Renato
MVP User
Posts: 876
Joined: Mon Apr 25, 2011 7:36 pm
Are you a spam bot?: No
Location: near Zurich

Re: Calculation error?

Post by Renato »

Which mmex version are you using ?
Renato Forum Administrator (I'm not a developer)
User avatar
marcottt
Senior User
Posts: 38
Joined: Wed Jan 01, 2025 10:48 am
Are you a spam bot?: No

Re: Calculation error?

Post by marcottt »

Windows 64 1.8.1
wolfsolver
Super User
Posts: 51
Joined: Mon Mar 28, 2022 6:38 pm
Are you a spam bot?: No

Re: Calculation error?

Post by wolfsolver »

Hi guys. Two things from me:

1) Calculation error is not an issue. in your screen seems yes, but if you choose data --> all data (storico in italiano) you see all movement and the sum is correct. Keep in mind that "Saldo" means the actual amount present in the account. So is not influenced by selection different date range.
2) Category 70 that point itself is the main issue. From Android point of view this cause no issue (category 70 is exlcuded automatically from recursevie query), and since there is no record that use category 70 no issue.

On Android version we already implement a check in loadParentCategory by checking if parentID is equal ID
wolfsolver
Super User
Posts: 51
Joined: Mon Mar 28, 2022 6:38 pm
Are you a spam bot?: No

Re: Calculation error?

Post by wolfsolver »

BTW in attach fixed mmb with cat 70 manually set as unactive and binded to root.

Tested open on win 1.8.1
Attachments
CalcError_fixed_cat70_ok.mmb
(272 KiB) Downloaded 876 times
User avatar
marcottt
Senior User
Posts: 38
Joined: Wed Jan 01, 2025 10:48 am
Are you a spam bot?: No

Re: Calculation error?

Post by marcottt »

i'm at work now, but a birf check now seem to be ok.

Thank you, now i must compare your db with actual db and recreate the newer moviment, or there is somethink i can do simple repair my actual db ?

If is not simple, i'm faster to add newer moviment (maybe 10 ors so).
wolfsolver
Super User
Posts: 51
Joined: Mon Mar 28, 2022 6:38 pm
Are you a spam bot?: No

Re: Calculation error?

Post by wolfsolver »

you can repair db manually:

1) using a SQLlite browser on PC (if you need it you can use any dbBrowser like https://sqlitebrowser.org/dl/)
2) Open your DB with sqllite browser
3) navigate to category_v1 table
4) scrool to your record 70, and set "PARENTID" field from "70" to "-1" (you cannot have a category with category id itself.
4.a) since you have category 71 with same name you can also set "active" field to 0 so old wrong cateogry is not more used.
5) save

this is a simple sql script
update CATEGORY_V1
set active = 0 ,
PARENTID = -1,
CATEGNAME = "OLD - " || CATEGNAME
where CATEGID = PARENTID;
User avatar
marcottt
Senior User
Posts: 38
Joined: Wed Jan 01, 2025 10:48 am
Are you a spam bot?: No

Re: [SOLVED] Calculation error?

Post by marcottt »

Thanks @Renato and @wolfsolver now seem good again.

Thanks for your support and patience.

Marco
wolfsolver
Super User
Posts: 51
Joined: Mon Mar 28, 2022 6:38 pm
Are you a spam bot?: No

Re: [SOLVED] Calculation error?

Post by wolfsolver »

You are welcome....

Btw could be interesting to understand how the dirty record was created... Did you notice something? There was error that cause this? (Like reassign category...)

Who is online

Users browsing this forum: Claude [Bot] and 3 guests