two oddnesses in new ledger

thb at net-bembel.de thb at net-bembel.de
Fri Jul 1 09:34:28 BST 2022


Jack,

Jack via KMyMoney-devel schrieb am 30.06.2022 18:42 (GMT +02:00):

> This is compiled from git master a few days ago:
> 
> First, on startup (multiple times) I get a pop-up: Unable to enter  
> scheduled transaction 'Patreon Podcast'  with details "Unable to add  
> transaction with invalid postdate  
> /var/tmp/portage/app-office/kmymoney-9999/work/kmymoney-9999/kmymoney/mymoney/mymoneyfile.cpp:1540." 

Hmm, that happens indeed when the postdate is invalid. So we have to figure out why that is.
Is this caused by an auto-enter upon start of the application?

> Both in the ledger and the Scheduled transactions View, that schedule  
> seems to correctly show the next date as 20222-07-01, or tomorrow.

I expect that 4th digit '2' in the date to be a typo. Then July 1st is
in fact a valid date, but it does not seem to be setup when the transaction
is actually created. We need to figure out where that happens. That is why
I asked above about the auto start feature.

> Second, at the bottom of the "real" entries, below the line for "Online  
> Balance" (which makes no sense for a cash account) is the line "Next  
> month" followed by four scheduled entries for the next two days, then  
> "Next week" and further future scheduled entries.  Somehow, these two  
> section titles are reversed.

I don't think so. Next month is on the 1st (this week) and the next week
starts on the 3rd or 4th depending on your settings. I don't see a problem
with that.

The online balance header will only be shown if there is a "lastImportedTransactionDate"
and a "lastStatementBalance" available for the account. Can you check if
that is the case for your cash account? Maybe some leftover from tests?


OnlineBalanceProxyModel::filterAcceptsRow() controls if the line will be
shown. It calls AccountsModel::data() to retrieve the date and data() which uses

    bool AccountsModelPrivate::hasOnlineBalance(const MyMoneyAccount& account)
    {
        return !(account.value("lastImportedTransactionDate").isEmpty()
                 || account.value("lastStatementBalance").isEmpty());
    }

to detect if it should return the date or an empty string. The latter case
will result in filterAcceptsRow() to return false in case it is not.


> Both seem relatively minor.  I have no idea what causes the first, and  
> hopefully the second is easy to fix.  (I have not looked in the code  
> for this.)

Regards

Thomas


More information about the KMyMoney-devel mailing list