Fix xml backend to load and save invoice kvp values.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21577 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens 2011-11-18 10:26:02 +00:00
parent f1ac0f18ac
commit 921bba1ad2

View File

@ -90,6 +90,7 @@ static xmlNodePtr
invoice_dom_tree_create (GncInvoice *invoice)
{
xmlNodePtr ret;
kvp_frame *kf;
Timespec ts;
Transaction *txn;
GNCLot *lot;
@ -156,6 +157,16 @@ invoice_dom_tree_create (GncInvoice *invoice)
if (! gnc_numeric_zero_p (amt))
xmlAddChild (ret, gnc_numeric_to_dom_tree (invoice_tochargeamt_string, &amt));
kf = qof_instance_get_slots (QOF_INSTANCE(invoice));
if (kf)
{
xmlNodePtr kvpnode = kvp_frame_to_dom_tree(invoice_slots_string, kf);
if (kvpnode)
{
xmlAddChild(ret, kvpnode);
}
}
return ret;
}
@ -396,7 +407,10 @@ invoice_tochargeamt_handler (xmlNodePtr node, gpointer invoice_pdata)
static gboolean
invoice_slots_handler (xmlNodePtr node, gpointer invoice_pdata)
{
return TRUE;
struct invoice_pdata *pdata = invoice_pdata;
return dom_tree_to_kvp_frame_given
(node, xaccAccountGetSlots (pdata->invoice));
}
static struct dom_tree_handler invoice_handlers_v2[] =