v.1.3.6 - Incorrect balance sometimes shown ...

Vista, 7, 8, 8.1. Unicode builds: x86, x64, ia64 versions available.

Moderator: Renato

paulcroft
Super MMEX User
Posts: 42
Joined: Fri Oct 29, 2010 9:48 pm
Are you a spam bot?: No
Location: London, England

v.1.3.6 - Incorrect balance sometimes shown ...

Post by paulcroft »

I'm using v.1.3.6 64 bit with win10 and I've recently experienced, for the second time, a weird balance error.

When two entries are made on the same day the balance after the first entry shows the balance which should be shown were the entry to have been the second one but this is reversed when the second entry is made so the day's balance is correct.
For example:

15/3/21 balance = £1000.
15/3/21 Deposit = £50, new balance = £500
15/3/21 Withdrawal = £500, new balance = £550

Normally I don't check to see the correct balance has been applied when making an individual entry. I generally make several entries at a time which may be for different dates and only check the balance itself when I reconcile the account each month. It only came to light when the reconciliation date was the same as an entry for that date. The first time this happened, about 3 months ago, I noted it and did nothing more. When it happened again yesterday I reverted to v.1.3.5 and the problem resolved itself. I then re-installed v.1.3.6 and the problem remained corrected but I am guessing this is because the database had saved itself.

The problem is not major as long as it is self-correcting but obviously something wrong is happening behind the scenes and needs fixing. Has anyone else noticed this?

FWIW I am continuing with v.1.3.6 and, if it recurs, I'll send you a screenshot.
Paul, MMEX user since April 2010
User avatar
Renato
MVP MMEX User
Posts: 330
Joined: Mon Apr 25, 2011 7:36 pm
Are you a spam bot?: No
Location: near Zurich
Contact:

Re: v.1.3.6 - Incorrect balance sometimes shown ...

Post by Renato »

regards Renato use MMEX since 2009, now with Windows 11
Nikolay
MMEX Developer
Posts: 1511
Joined: Sat Dec 06, 2008 2:27 pm
Are you a spam bot?: No
Location: Sankt-Petersburg, Russia

Re: v.1.3.6 - Incorrect balance sometimes shown ...

Post by Nikolay »

Could you try to sort records by ID the by DATE?
paulcroft
Super MMEX User
Posts: 42
Joined: Fri Oct 29, 2010 9:48 pm
Are you a spam bot?: No
Location: London, England

Re: v.1.3.6 - Incorrect balance sometimes shown ...

Post by paulcroft »

Hi Nicolay

Sorry I've not responded sooner, life got in the way, I've not used MMEX since I posted about this problem and I forgot about my message until just now when I sat down to add another several records.

I did not sort by ID then DATE before entering the new records because when I first opened the database today it was all as it should be and, after I'd entered the new records all balances tallied with their matching entries.

I then did what you asked and sorted on ID then DATE and everything got well and truly muddled up. One of the reasons for this is surely because ID values will never all be sequential for a number of reasons, e.g. entries not being entered in date sequence. Another reason, in my case, is because when I have several entries for the same payee I look for a previous entry for that payee then copy and paste it as necessary and amend the date and value accordingly. Today I had 6 new entries from the same shop and two from another regularly used shop. This entry method has always worked OK before.

To restore the values I then sorted on BALANCE then DATE. This did not restore the entries to the order they had been in initially but did, at least, mean that the values in the BALANCE column were now accurate for the withdrawal amounts.

I've no idea what's changed between v.1.3.5 and v.1.3.6 but it appears that the orders of sorting have fallen out of sync. Irrespective of anything else surely they should be sorted on balance first and foremost. However, I will have to leave that to your expertise.

Until this is resolved I will revert to v.1.3.5. Although I could continue to use v.1.3.6 and monitor the balance values as I put in new records what is to stop them becoming jumbled once more if I change the sort order, which I often do, and do it in the 'wrong' sequence?

I hope this is a straightforward fix and it certainly won't stop me using MMEX - it's far too good a program. This is the first noteable problem I've encountered since I first started using MMEX over 11 years ago and I'm sure it will be resolved.

Cheers for now

Paul
Paul, MMEX user since April 2010
Nikolay
MMEX Developer
Posts: 1511
Joined: Sat Dec 06, 2008 2:27 pm
Are you a spam bot?: No
Location: Sankt-Petersburg, Russia

Re: v.1.3.6 - Incorrect balance sometimes shown ...

Post by Nikolay »

Hi Paul,

Now I understand one user who assigned a number for each transaction and sorted it not by date, but by the numbers.
I checked whether it is really possible to "break" the balance column by sorting.
But, it turns out, you can also help sorting by assigning numbers to transactions within one day. Sort by number (not ID) and then by date.

Regards,
Nikolay
paulcroft
Super MMEX User
Posts: 42
Joined: Fri Oct 29, 2010 9:48 pm
Are you a spam bot?: No
Location: London, England

Re: v.1.3.6 - Incorrect balance sometimes shown ...

Post by paulcroft »

Hi Nicolay

The user who assigned a number to each transaction might have been on to something but only if the balance column 'adjusted' properly if the database was sorted on 'entry' number.

I'm sure I'm not alone in sorting on various headers over time to look for a specific item, e.g. withdrawal / deposit value, or payee, or category, etc. after which I revert to my default of sorted upwards by date. And this is what screws it up. It's fine if no sorting is done after entries are added.

As it turns out I've done some more digging and it's now clear that this glitch has probably been around for a long time because I set up a test database using v.1.3.5 and the same thing happened, i.e. sort on ID then DATE and the balance column will probably be wrong for any entry unless it is the sole entry for a specific date or the last entry for multiple entries on the same date.

I've just upgraded to v.1.5.0 and, unsurprisingly, this problem remains. My only work around at the moment is, if the balances are 'misaligned', to toggle the balance column to sort up then down, or vice versa, then do the same with the date. It sometimes corrects itself just by toggling the date sort up then down or vice versa.

I'm not sure I'm clever enough to work out how to correct this but I'll do some digging when I get a moment.

Paul
P.S. Loving the blue and yellow colour scheme in v.1.5.0 :-)
Paul, MMEX user since April 2010
dbolton
MVP MMEX User
Posts: 75
Joined: Fri Jan 03, 2020 3:24 pm
Are you a spam bot?: No
Contact:

Re: v.1.3.6 - Incorrect balance sometimes shown ...

Post by dbolton »

Here's a feature request: https://github.com/moneymanagerex/money ... ssues/3251 Subscribe to the issue to receive any updates.
paulcroft
Super MMEX User
Posts: 42
Joined: Fri Oct 29, 2010 9:48 pm
Are you a spam bot?: No
Location: London, England

Re: v.1.3.6 - Incorrect balance sometimes shown ...

Post by paulcroft »

@ dbolton

If you read my comments above you'll find that your workaround will only succeed if entries are made in date order so that IDs increase in line with the date. In my case, and possibly many others, this is often not so with the result that a sort on ID then date will fail. However, a sort on balance then date, at least for me, is more effective.

Notwithstanding the above it's an error which should not be present, the balance should always be accurate.
Paul, MMEX user since April 2010
Nikolay
MMEX Developer
Posts: 1511
Joined: Sat Dec 06, 2008 2:27 pm
Are you a spam bot?: No
Location: Sankt-Petersburg, Russia

Re: v.1.3.6 - Incorrect balance sometimes shown ...

Post by Nikolay »

How the program works. It ranks all transactions by date and counts the balance of each transaction, starting with the first one. The balance of each subsequent transaction is the balance of the previous one + its value. And so on.
When you sort the table, the balances do not change (although I may be wrong here). This situation can be corrected by adding transaction time. Then the order of transactions will be reinforced concrete.

https://github.com/moneymanagerex/money ... ssues/2729
Nikolay
MMEX Developer
Posts: 1511
Joined: Sat Dec 06, 2008 2:27 pm
Are you a spam bot?: No
Location: Sankt-Petersburg, Russia

Re: v.1.3.6 - Incorrect balance sometimes shown ...

Post by Nikolay »

Have I come to the right conclusion? The transaction balance is always correct, but sometimes, the order of transactions within the day changes and the balance looks wrong.
Post Reply