Issue when importing QIF file with splits

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue when importing QIF file with splits

Edward Bridges
Hello,

I am trying to import a QIF file with splits, but the splits are being created in an unexpected way.

Here is an example of the QIF file that I'm trying to import (these are being generated to create splits, so I have control over their format).

```
!Account
NAssets:Current Assets:Checking Account
TBank
^
!Type:Bank
C
D12/15/2008
NN/A
PSample Income (Imported)
T100.00
LIncome
SAssets:Budgeted Cash
$-50.00
SBudget:Food
$50.00
^
```

This is what I'm hoping to get as a result of the import (screenshot is available at the link):
https://imagebin.ca/v/3ml1P92nUJxa

However when the above QIF file is imported, I'm getting the following:
https://imagebin.ca/v/3ml2apQ0okqR

The problem I'm seeing is that the $100 is not being debited from the Checking Account and credited to Income.

I expected that additional split to be created because the record is in the context of the checking account (given the `N` field on line 2) and the transaction is categorized as "Income" (via the `L` field on line 11).

Please help me to understand what I'm doing wrong to make this import as I expect.

Thanks!
Ed
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: Issue when importing QIF file with splits

Jeffrey Black
On 1/1/2018 7:31 PM, Edward Bridges wrote:

> Hello,
>
> I am trying to import a QIF file with splits, but the splits are being created in an unexpected way.
>
> Here is an example of the QIF file that I'm trying to import (these are being generated to create splits, so I have control over their format).
>
> ```
> !Account
> NAssets:Current Assets:Checking Account
> TBank
> ^
> !Type:Bank
> C
> D12/15/2008
> NN/A
> PSample Income (Imported)
> T100.00
> LIncome
> SAssets:Budgeted Cash
> $-50.00
> SBudget:Food
> $50.00
> ^
> ```
>
> This is what I'm hoping to get as a result of the import (screenshot is available at the link):
> https://imagebin.ca/v/3ml1P92nUJxa
>
> However when the above QIF file is imported, I'm getting the following:
> https://imagebin.ca/v/3ml2apQ0okqR
>
> The problem I'm seeing is that the $100 is not being debited from the Checking Account and credited to Income.
>
> I expected that additional split to be created because the record is in the context of the checking account (given the `N` field on line 2) and the transaction is categorized as "Income" (via the `L` field on line 11).
>
> Please help me to understand what I'm doing wrong to make this import as I expect.
>
> Thanks!
> Ed
> _______________________________________________
> gnucash-devel mailing list
> [hidden email]
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
> .
>
Edward:

It's been a while since I manually worked the QIF format but; you are
not doing all of your splits.

Qif files are a little finicky about the order of the fields too.  I am
not sure if the qif importer recognizes the "T" entries.

The brackets { } are just my suggestions for change, not in the actual
import file.

!Account
NAssets:Current Assets:Checking Account
TBank                      {none of my qif files use the "T" line, optional? }
^
!Type:Bank
C
D12/15/2008
NN/A
PSample Income (Imported)   {I use "M" instead of "P" }
T100.00                     {none of my qif files use the "T" line, optional }
LIncome
SAssets:Budgeted Cash
$-50.00
SBudget:Food
$50.00
    { add the income split, I may have +- sign backwards, it's been a long day }
SIncome
$100.00
^
```

--JEffrey Black M.B.A.

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: Issue when importing QIF file with splits

Derek Atkins
In reply to this post by Edward Bridges
Hi,

Edward Bridges <[hidden email]> writes:

> Hello,
>
> I am trying to import a QIF file with splits, but the splits are being
> created in an unexpected way.
>
> Here is an example of the QIF file that I'm trying to import (these
> are being generated to create splits, so I have control over their
> format).
>
> ```
> !Account
> NAssets:Current Assets:Checking Account
> TBank
> ^
> !Type:Bank
> C
> D12/15/2008
> NN/A
> PSample Income (Imported)
> T100.00
> LIncome
> SAssets:Budgeted Cash
> $-50.00
> SBudget:Food
> $50.00
> ^
> ```
>
> This is what I'm hoping to get as a result of the import (screenshot
> is available at the link):
> https://imagebin.ca/v/3ml1P92nUJxa
>
> However when the above QIF file is imported, I'm getting the following:
> https://imagebin.ca/v/3ml2apQ0okqR
>
> The problem I'm seeing is that the $100 is not being debited from the
> Checking Account and credited to Income.
>
> I expected that additional split to be created because the record is
> in the context of the checking account (given the `N` field on line 2)
> and the transaction is categorized as "Income" (via the `L` field on
> line 11).

When doing splits, the "L" portion is ignored, which is why you're not
seeing anything to Income.  You need:

SIncome
$100.00

> Please help me to understand what I'm doing wrong to make this import
> as I expect.

I think if you remove the LIncome and add those two lines then it should
do what you want.  Try it out and let me know?

> Thanks!
> Ed

-derek

--
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       [hidden email]                        PGP key available
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel