New data field for invoice object

Graham Leggett minfrin at
Sat Oct 8 20:47:26 EDT 2011

On 08 Oct 2011, at 8:18 PM, John Ralls wrote:

> The way you'd implement an optional type field in an RDB is to  
> create a new table for it with two fields, a key (which would be the  
> invoice GUID) and the type, and the code for handling that table  
> would have to examine the database version and not use it if it's an  
> older version. Similarly, your new credit note code would have to  
> check with the backend to see if it's OK to create the note, because  
> an older version of Gnucash will do the wrong thing with the data.

In my experience, I have been forced to manually change debit notes  
into credit notes when they become necessary by editing the XML  
directly, and gnucash "does the right thing" with the data afterwards.

What gnucash can't handle is applying payments, because the payment  
code naively assumes all amounts are positive, instead of handling  
both the cases of positive payments and negative payments. But the  
payment is done by this point, so in my case it doesn't matter.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4365 bytes
Desc: not available
URL: <>

More information about the gnucash-devel mailing list