diff --git a/src/backend/xml/gnc-invoice-xml-v2.c b/src/backend/xml/gnc-invoice-xml-v2.c index 6f968ca71d..7062dd25ca 100644 --- a/src/backend/xml/gnc-invoice-xml-v2.c +++ b/src/backend/xml/gnc-invoice-xml-v2.c @@ -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[] =