Page 2 of 3

Re: Calculation error?

Posted: Sun Jan 12, 2025 2:34 pm
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 129944 times
your_export_db.mmb
(272 KiB) Downloaded 936 times

Re: Calculation error?

Posted: Sun Jan 12, 2025 7:49 pm
by marcottt
i tried to use the mmb you attached, but i get this error on windows app.

Not tried into the android app

Re: Calculation error?

Posted: Sun Jan 12, 2025 8:14 pm
by Renato
Which mmex version are you using ?

Re: Calculation error?

Posted: Mon Jan 13, 2025 6:45 am
by marcottt
Windows 64 1.8.1

Re: Calculation error?

Posted: Mon Jan 13, 2025 7:24 am
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

Re: Calculation error?

Posted: Mon Jan 13, 2025 7:35 am
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

Re: Calculation error?

Posted: Mon Jan 13, 2025 9:04 am
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).

Re: Calculation error?

Posted: Mon Jan 13, 2025 10:00 am
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;

Re: [SOLVED] Calculation error?

Posted: Mon Jan 13, 2025 8:35 pm
by marcottt
Thanks @Renato and @wolfsolver now seem good again.

Thanks for your support and patience.

Marco

Re: [SOLVED] Calculation error?

Posted: Mon Jan 13, 2025 10:00 pm
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...)