two oddnesses in new ledger
thb at net-bembel.de
thb at net-bembel.de
Fri Jul 1 16:58:29 BST 2022
Jack via KMyMoney-devel schrieb am 01.07.2022 15:49 (GMT +02:00):
> On 7/1/22 04:34, thb--- via KMyMoney-devel wrote:
>> 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?
> Yes, on startup, before I do anything. I have not yet tried it today,
> but that schedule is for today.
>>> 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.
> Yes, that was just a typo on my part. The date was correctly
> 2022-07-01. There are also schedules for 2 July, so we have one more
> day to diagnose before creating fake data. :-) The version I have
> currently compiled does have full debugging info, so I can run under gdb
> if you want to suggest where to set a breakpoint.
I would set it on mymoneyfile.cpp:1540 (that should be the throw statement) and
analyze the backtrace to find out where it came from. That should give us more
information.
[...]
>> 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?
> I'll check. I may well have done a csv import in the past to add some
> recurring historic transactions. I didn't even notice whether the
> online balance shown was anywhere near correct.
>> 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.
>>
>>
Thomas
More information about the KMyMoney-devel
mailing list