[Kmymoney-devel] Strange error on first time use.
Alvaro Soliverez
asoliverez at kde.org
Mon Aug 16 03:48:44 CEST 2010
The problem seems to be that on new files, account templates may not
have a currency at all, which confuses the consistency check.
This patch should fix it.
--- mymoneyfile.cpp (revision: 1164110)
+++ mymoneyfile.cpp (working copy)
@@ -1781,7 +1781,8 @@
QList<MyMoneyAccount>::const_iterator account_it;
for (account_it = accList.constBegin(); account_it !=
accList.constEnd(); ++account_it) {
MyMoneyAccount account = *account_it;
- if (!currencyList.contains(account.currencyId()) &&
account.currencyId() != baseCurrency().id()) {
+ if (!currencyList.contains(account.currencyId()) &&
+ (account.currencyId() != baseCurrency().id() &&
!account.currencyId().isEmpty())) {
//add the currency and the account-currency pair
currencyList.append(account.currencyId());
accountForeignCurrency.append(account);
Basically, skip the account if the currency is empty.
Regards,
Alvaro
On Sun, Aug 15, 2010 at 10:19 PM, Brendan Coupe <brendan at coupeware.com> wrote:
> When I saw this I decided to give it a try.
>
> I installed KDE 4.5 on Fedora 13 yesterday. SVN is from this morning
> (2010.08.15-10.42.31 in California). I created a new user and then a new KMM
> file as that user. I added all of the US categories.
>
> I got the same error at the end of the process. See attached screen capture.
>
> I immediately ran a consistency check which was clean.
>
> ----
> Brendan
>
>
> On Sun, Aug 15, 2010 at 4:14 PM, Jack <ostroffjh at users.sourceforge.net>
> wrote:
>>
>> I just tested the latest svn with a newly created user - so no .kde4
>> files at all.
>>
>> Everything went well, except that when I hit 'finish' on the new file
>> wizard, I got a consistency check error "The account 'Job' in currenty
>> 'US Dollar' has no price set for the opening date '2010-08-15'. Please
>> enter a price for the currency on or before the opening date."
>>
>> The strange thing about this is that there is no account 'job' and the
>> income category job should not need a currency. (USDollar is the base
>> currency.)
>>
>> There is no error on any further consistency check.
>>
>> I tried this twice with the same result, using slightly different
>> selected categories.\
>>
>> Jack
>> _______________________________________________
>> KMyMoney-devel mailing list
>> KMyMoney-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/kmymoney-devel
>
>
> _______________________________________________
> KMyMoney-devel mailing list
> KMyMoney-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kmymoney-devel
>
>
More information about the KMyMoney-devel
mailing list