[GNC-dev] Transactions vs Splits

David Cousens davidcousens at bigpond.com
Tue Mar 5 07:57:59 EST 2019


Each exported transaction occupies at least 2 or more lines, one for each
split in the transaction.

The following is an exported multiline format single transaction for a
credit of $100 to the Savings account with splits which debit the Checking
account by $50 and the cash in Wallet account by $50. The formatting may not
survive the posting but I will separate each line with two newlines:

Date,Transaction ID,Number,Description,Notes,Commodity/Currency,Void
Reason,Action,Memo,Full Account Name,Account Name,Amount With Sym,Amount
Num.,Reconcile,Reconcile Date,Rate/Price

04/03/2019,2a9b1f7950ab4f388e2c4ae3ac8fe1c3,,Tfr to Cash in 
Wallet,,CURRENCY::AUD,,,,Assets:Current Assets:Cash in Wallet,Cash in

,,,,,,,,,Assets:Current Assets:Checking Account,Checking

,,,,,,,,,Assets:Current Assets:Savings Account,Savings

If during export you select the Simple Layout in the first window of the
export procedure you will get a single line format but this does not work
for transactions which have more than 2 splits e.g. it only exports the

Date,Account Name,Number,Description,Full Category Path,Reconcile,Amount
With Sym,Amount Num.,Rate/Price

04/03/2019,Assets:Current Assets:Savings Account,,Tfr to Cash in  Wallet,--
Split Transaction --,n,-$100.00,-100.00,1.00

It cannot deal with more than 2 splits in a transaction. This is why Geert
has been setting up the multi-line export and import. 

I will get to testing the import of these transactions either tomorrow
morning or Thursday. I don't know yet whether it is possible to import them
in the multiline format with 2 or more splits yet. i am working slowly and
documenting everything i do so the developers have enough data to start
identifying where the problems are. Once I understand it I will update the
wiki and then get the Help/Guide docs up to date for the next release.  I
suspect the bug fixes might not make it until the next release comes out

If you are only exporting and importing transactions with 2 splits you
should be able to get it to work. I would create a dummy transaction first
and export it, delete it in the book and then reimport it. There is an
identified bug in the Export Transactions to CSV where transactions cannot
be exported on the date they are created so it is better to use Export
Transactions from Active Window to export a dummy transaction. Bob Fewel is
already working on a fix for this. 

I normally setup a test datafile to work with while exploring this rather
than use a real datafile so that other transactions don't complicate life.

David Cousens

David Cousens
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-Dev-f1435356.html

More information about the gnucash-devel mailing list