Merging books

Neil Williams linux at codehelp.co.uk
Wed May 4 16:55:02 EDT 2005


On Wednesday 04 May 2005 8:36 pm, Blair Lowe wrote:
> Hi,
>
> Our accountant had our books for quite some time, and now we have two
> versions and would like to put all the new customers and invoices into
> the new file.

If you can wait for the next release (late this year), this will be solved.

> Is there an easy way of doing this from the xml file,

No - it is a lot more complex than that. If you try to do this, you are likely 
to end up with badly corrupted data. Of course, you may be lucky.
:-(

> or should we just 
> re-enter the hundred or so bills again?

This functionality is already in the CVS code but it is not setup for this 
kind of merge, yet.

I'm currently working on getting the invoices to be exportable in the first 
place.

In the Gnome2 version, the procedure would be:

1. Make a backup of each file.
2. Open the old file in GnuCash (the one from the accountant).
3. Export the customers and invoices as XML files (using the QSF format).
4. Close that file and open the new file in GnuCash (the latest data).
5. Import the QSF data and merge it into the data in the new file.
6. Check your data and save!

The code will show you any collisions or any instance where there is an 
ambiguous match between the new data and the existing data.

Currently, I need to flesh out the exported invoices a little more (a lot more 
difficult than it sounds!) and there is a bug in the merge handler in GnuCash 
- it works as a test routine but something in the Gnome2 interface is 
stalling.

The finished code will do a lot more than what you need right now - it's the 
mechanism for importing data from various other sources, like a Palm PDA and 
probably applications like GnoTime etc. It needs to meet the needs of a wide 
range of users so I can't just make a shortsighted leap to a cut-down 
version.

It'll also support merging two complete books (without exporting anything) 
although merging two books from different users is likely to generate quite a 
lot of collisions. Where possible, export just the changed data, it'll save 
time overall.

-- 

Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-user/attachments/20050504/cdc0f270/attachment.bin


More information about the gnucash-user mailing list