QIF spec ambiguity in example file

Daniel White twinbee42 at skytopia.com
Tue Apr 29 12:11:57 EDT 2014


Hi Derek,

On Tue, 29 Apr 2014 16:10:58 +0100, Derek Atkins <warlord at mit.edu> wrote:

>> And here's the example. There's no "!Type" after "!Account" as you can  
>> see:
>>
>> ***********************************BEGIN:
>> !Account
>> NAssets:Investments:Mutual Fund
>> TInvst
>> D10/30/2006
>> Q0.9
>> T500
>> PPurchase
>> NBuyX
>> L[Assets:Investments:Mutual Fund:Cash]
>> YFOO
>> ^
>> D11/28/2006
>> Q0.897
>> T100
>> PSale
>> NSellX
>> L[Assets:Investments:Mutual Fund:Cash]
>> YFOO
>> ^
>> **************************************END
>
> This example is wrong.  If you try to import this example you'll find it
> wont work.
>
> You need to have a !Type in there.

Right, and it needs to go right after the initial N and T lines, and just  
before
the D line right? I'd be very grateful if you could edit it so that it is  
right
if you have permission. If not, maybe just give me the corrected version  
here in your
next email. Unfortunately, corrupted QIF files such as this seem to be  
fairly common
out in the wild, so I'll probably have to use a little AI/guesswork to  
interpret them correctly.

Can you confirm whether "!Account" can use 'B', as you said before it  
could, but
the URL I gave only lists N,T,D,L (and arguably / $). If so, what is the  
purpose
of B?

Am I right in saying any transactions are under the nearest account  
defined?
For example in the QIF just below, I presume both the transaction amounts  
for the amounts 20 and 30
are for the 'Foo' account, whilst the 40 transaction is for the 'Foo2'  
account?

!Account
NFoo
^
!Type:Bank
D01/01/07
T20.00
C*
^
!Type:Bank
D02/01/07
T30.00
C*
^
!Account
NFoo2
!Type:Bank
D03/01/07
T40.00
^

Also, here's an example I found out in the wild (I've edited the amounts  
slightly out of paranoia):

!Account
NMutual funds
DSample funds
X
ANote
TMutual funds
B120.50
^
!Type:Invst
D1/10/02
NShrsIn
YMutual
Q78
^

For the "!Account" section, is "Mutual funds" valid for T, and "120.50"  
for B?
I don't think X and A should exist at all under !Account, and maybe not B  
either.

Regards, Daniel


More information about the gnucash-user mailing list