[GNC] Easy way to delete old transactions

NoobAlice NoobAlice at airmail.cc
Sat May 6 12:45:57 EDT 2023


In my opinion, you are opening a can of worms, but if you are set on 
this course...

If you have separate tax returns or other documents that let you know 
the income/loss of each entity each year, you may need those to let you 
determine correct starting equity by entity.  You will need to figure 
out what the balances for each account are for each company before you 
get too far in so that you have something to check against.  Going 
forward after this you will need to make any transactions that affect 
multiple entities in multiple sets of books.

I will refer to the entities as "Companies" throughout this.  I am 
probably missing at least one step here, as I can't see your books or 
how you've set them up.

*****************************************
SPLIT OUT EXISTING BOOKS WITH HISTORY:
*****************************************
You could (first make a backup, and then):
* start with File 0
* copy to File 1
* copy to File 2
* in File 1, delete checking and other accounts related to Companies 2 & 3
* in File 2, delete checking and other accounts related to Company 1
* copy File 2 to File 3
* in File 2, delete checking and other accounts related to Company 3
* in File 3, delete checking and other accounts related to Company 2

When you delete the accounts, choose to delete the transactions, too.


BUT, if you have ANY transactions between companies, you will need to 
first, before anything else, split those transactions into one 
transaction for each company.

You may be able to prepare lists to find these transactions by, for 
example, running a transaction report for Company 1 checking, savings, 
etc. that is filtered by Company 2 checking, savings, etc.

* Create 6 accounts (3 companies x 2 related companies for each)
	* COMPANY 1: Due to/from Company 2
	* COMPANY 1: Due to/from Company 3
	* COMPANY 2: Due to/from Company 1
	* COMPANY 2: Due to/from Company 3
	* COMPANY 3: Due to/from Company 1
	* COMPANY 3: Due to/from Company 2
(or, instead of Due to/from you could use equity accounts, depending on 
entity structure, or perhaps new due to/from you personally as the 
single account for each company.)

* Split out entries manually as follows:
For sample entry "to move cash from Company 1 to Company 2"
Original:
Dr $100 Company 2 Checking
Cr $100 Company 1 Checking

Becomes two entries:
"Company 1 books: to move cash from Company 1 to Company 2"
Dr $100 COMPANY 1: Due to/from Company 2
Cr $100 Company 1 Checking

"Company 2 books: to move cash from Company 1 to Company 2"
Dr $100 Company 2 Checking
Cr $100 COMPANY 2: Due to/from Company 1

When you are done splitting out these entries, your balances for each 
pair of intercompany accounts (or your total of new due to/from you 
personally accounts) should net to zero.


Then you can start the process of copying the books.

There may be other manual entries that I've missed.  You will want to 
allow yourself many hours for this and to work slowly, ready to go back 
and fix things in File 0 and restart the rest of the process.


*****************************************
SPLIT OUT BOOKS WITH FRESH START:
*****************************************
Or, start three new books as of the beginning of your year with one 
entry each "To split out from combined file" that splits to the opening 
balances for that company.  Copy the chart of accounts from the original 
into each entity file and delete unneeded accounts as you choose.  You 
will still need to figure out opening balances and intercompany accounts.



On 2023-05-06 07:43 AM, Fred Tydeman wrote:
> I have been keeping the books for three separate related entities in the
> same file.
> I have decided it would be better to have each entity in its own file.
> So, one idea is to copy the large file 3 times, to three different names.
> Then delete the accounts and transactions of 2 entities, keeping the third.
> Do that three times so each file ends up with just the data for one entity.
> I have around 1915 accounts, so that might be too much work.
> 
> I believe I first tried: Export Transactions to CSV (for a subset of
> accounts),
> then Import Transactions from CSV
> but I got lots of errors about missing items (perhaps securities).
> (could be I did that wrong).
> 
> I am open to suggestions.
> 



More information about the gnucash-user mailing list