Error Importing Quicken QIF file

linas@linas.org linas@linas.org
Mon, 29 Jan 2001 10:39:20 -0600 (CST)


Grib,

If you go to fix this problem, you might find the following two new 
utility functions  helpful (i.e. will do the right thing).

xacAccountSetCommodity(Account *,gnc_commodity *) which sets the 
account currency for bank types, and security for invst. types.

xaccTransSetCurrency (Trans *, gnc_commodity*) which will check to
see if the account secrity is set, but the account currency is null.
It will then set the account currency.   Assuming you somehow know
the 'common currency' a priori, then call this function *after*
all the splits have been put in a transaction, but before any call to 
'FindCommonCurrency' or 'Rebalance'.

These routines always do the right thing for where I've tested them 
(in the sql code).  They print warnings if the system gets is in some
unexpected state (e.g. if the common currency doesn't match the 'trans
currency').  

Don't know if they'll help you, but I thought I'd advertise them a bit.

--linas

It's been rumoured that Roland Roberts said:
> 
> >>>>> "rbr" == Roland Roberts <roland@astrofoto.org> writes:
> 
>     rbr> Well, I've found another occasion where this blows up.  I guess it is
>     rbr> the same thing, but what I get is
> 
>     rbr>     Error: xaccSplitRebalance: no common split currencies
>     rbr>     Error: xaccSplitRebalance:      account=Sequoia currency=USD security=
>     rbr>     Error: xaccSplitRebalance:      account=Sequoia currency=Sequoia security=
>     rbr>     gnucash: Transaction.c:956: xaccSplitRebalance: Assertion `0' failed.
> 
>     rbr> Sequoia is a mutual fund.  But, because the Quicken "opening balance"
>     rbr> was not zero I have a problem
>     [...]
>     rbr> So, how can I fake out gnucash?
>     [...]
>     rbr> I'm not averse to editing the QIF file directly.
> 
> Okay, just as an FYI for anyone else with this problem, I during the
> import, I told gnucash that the "Retained Earnings:Sequoia" account
> (which it created for the Sequoia "opening balance" was of type Mutual
> Fund instead of its default of Equity.  That allowed it to do the
> import successfully.  Once it's imported, then I could move things
> around to get everything in the right places....
>