GnuCash
Contact   Instructions
Bug 797216 - The order of multi-split journal entries in the CSV-importfile is blocking a valid import
Summary: The order of multi-split journal entries in the CSV-importfile is blocking a ...
Status: RESOLVED INCOMPLETE
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Import - CSV (show other bugs)
Version: 3.5
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: import
QA Contact: import
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-25 05:21 EDT by Herman
Modified: 2020-05-04 08:05 EDT (History)
3 users (show)

See Also:


Attachments
Sample csv file that imports successfully (1.13 KB, text/plain)
2019-05-27 12:20 EDT, Geert Janssens
no flags Details

Description Herman 2019-04-25 05:21:38 EDT
Hi all, fipo here after using GNU Cash for 1 week. Love the software!

When trying to import a CSV file with multi-split journal entries, the first time I tried it went smoothly. For a second file, I had all kinds of error messages from GNUCash that the multi-split entries were not balancing, or that another balancing account was required. The import did not work, whatever I tried.

When comparing the 2 csv import files and testing the import, I noticed that the order in which journal entry lines are put into the file determine the behavior of GNUCash.

In short, the multi-split journal entries must be put into the CSV file in this order;

1. Assets
2. Liabilities
3. Expenses
3. Revenue

So for example this balancing journal entry which is 100% valid relating to a send sales invoice will go wrong;

1. Invoices to be received (current assets) EUR 100 debit
2. Net revenue (P/L account)                EUR  80 credit
3. VAT to be paid (current liabilities)     EUR  20 credit 

And this one too;

1. Net revenue (P/L account)                EUR  80 credit
2. VAT to be paid (current liabilities)     EUR  20 credit
3. Invoices to be received (current assets) EUR 100 debit

And this one with a different order will be OK;

1. Invoices to be received (current assets) EUR 100 debit
2. VAT to be paid (current liabilities)     EUR  20 credit 
3. Net revenue (P/L account)                EUR  80 credit

Solutions

Plan A would be to reprogram the validations in GnuCash so the order of the journal entry lines is irrelevant for the testing if the journal entry lines are balancing as a whole.

Plan B would be to update the help files relating to importing CSV files with multiple split journal entries, so users know beforehand that they could run into trouble when not putting the lines in an acceptabel order.

Let me know if more info is needed or not,I could provide if necessary. 

Cheers,

Herman
Comment 1 Geert Janssens 2019-05-27 12:20:40 EDT
Created attachment 373290 [details]
Sample csv file that imports successfully

Thank you for your report. However I'm unable to reproduce the issue.
I created an import files with data similar to your first example (see attachment), containing all 3 of the sequences you suggest. I have used File->Import->Transactions from CSV.

My sample file was generated by starting with an export from gnucash of one single invoice and then duplicating and rearranging the lines.

I have used the GnuCash Compatible Export format as import setting (though I have to manually correct the date format still). With these settings the file imports fine.

So can you please add a few more details, like a sample csv file that fails, and then detailing which steps you took to come to the failure ?
Thank you.
Comment 2 Geert Janssens 2020-05-04 08:05:38 EDT
Closing this report as no further details to reproduce have been provided. Feel free to open if you can provide additional information.

Note You need to log in before you can comment on or make changes to this bug.