mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
added tracing; misc lot-related bug fix
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6915 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
f47b53a310
commit
be8c5855d8
@ -77,9 +77,9 @@ gnc_account_dom_tree_create(Account *act)
|
|||||||
const char *str;
|
const char *str;
|
||||||
kvp_frame *kf;
|
kvp_frame *kf;
|
||||||
xmlNodePtr ret;
|
xmlNodePtr ret;
|
||||||
xmlNodePtr toaddto;
|
|
||||||
GList *n;
|
GList *n;
|
||||||
|
|
||||||
|
ENTER ("(account=%p)", act);
|
||||||
|
|
||||||
ret = xmlNewNode(NULL, gnc_account_string);
|
ret = xmlNewNode(NULL, gnc_account_string);
|
||||||
xmlSetProp(ret, "version", account_version_string);
|
xmlSetProp(ret, "version", account_version_string);
|
||||||
@ -128,12 +128,17 @@ gnc_account_dom_tree_create(Account *act)
|
|||||||
xaccAccountGetGUID(xaccAccountGetParentAccount(act))));
|
xaccAccountGetGUID(xaccAccountGetParentAccount(act))));
|
||||||
}
|
}
|
||||||
|
|
||||||
toaddto = xmlNewChild(ret, NULL, act_lots_string, NULL);
|
n = xaccAccountGetLotList (act);
|
||||||
|
PINFO ("lot list=%p", n);
|
||||||
for (n=xaccAccountGetLotList(act); n; n=n->next)
|
if (n)
|
||||||
{
|
{
|
||||||
GNCLot * lot =n->data;
|
xmlNodePtr toaddto = xmlNewChild(ret, NULL, act_lots_string, NULL);
|
||||||
xmlAddChild(toaddto, gnc_lot_dom_tree_create(lot));
|
|
||||||
|
for (; n; n=n->next)
|
||||||
|
{
|
||||||
|
GNCLot * lot = n->data;
|
||||||
|
xmlAddChild(toaddto, gnc_lot_dom_tree_create(lot));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -62,6 +62,7 @@ gnc_lot_dom_tree_create(GNCLot *lot)
|
|||||||
xmlNodePtr ret;
|
xmlNodePtr ret;
|
||||||
kvp_frame *kf;
|
kvp_frame *kf;
|
||||||
|
|
||||||
|
ENTER("(lot=%p)", lot);
|
||||||
ret = xmlNewNode(NULL, gnc_lot_string);
|
ret = xmlNewNode(NULL, gnc_lot_string);
|
||||||
xmlSetProp(ret, "version", lot_version_string);
|
xmlSetProp(ret, "version", lot_version_string);
|
||||||
|
|
||||||
@ -94,6 +95,7 @@ lot_id_handler (xmlNodePtr node, gpointer p)
|
|||||||
struct lot_pdata *pdata = p;
|
struct lot_pdata *pdata = p;
|
||||||
GUID *guid;
|
GUID *guid;
|
||||||
|
|
||||||
|
ENTER("(lot=%p)", pdata->lot);
|
||||||
guid = dom_tree_to_guid(node);
|
guid = dom_tree_to_guid(node);
|
||||||
gnc_lot_set_guid(pdata->lot, *guid);
|
gnc_lot_set_guid(pdata->lot, *guid);
|
||||||
|
|
||||||
@ -108,6 +110,7 @@ lot_slots_handler (xmlNodePtr node, gpointer p)
|
|||||||
struct lot_pdata *pdata = p;
|
struct lot_pdata *pdata = p;
|
||||||
gboolean success;
|
gboolean success;
|
||||||
|
|
||||||
|
ENTER("(lot=%p)", pdata->lot);
|
||||||
success = dom_tree_to_kvp_frame_given
|
success = dom_tree_to_kvp_frame_given
|
||||||
(node, gnc_lot_get_slots (pdata->lot));
|
(node, gnc_lot_get_slots (pdata->lot));
|
||||||
|
|
||||||
@ -135,6 +138,7 @@ gnc_lot_end_handler(gpointer data_for_children,
|
|||||||
gxpf_data *gdata = (gxpf_data*)global_data;
|
gxpf_data *gdata = (gxpf_data*)global_data;
|
||||||
GNCBook *book = gdata->bookdata;
|
GNCBook *book = gdata->bookdata;
|
||||||
|
|
||||||
|
ENTER("(lot=%p)", lot);
|
||||||
successful = TRUE;
|
successful = TRUE;
|
||||||
|
|
||||||
if(parent_data)
|
if(parent_data)
|
||||||
@ -169,6 +173,7 @@ dom_tree_to_lot (xmlNodePtr node, GNCBook *book)
|
|||||||
GNCLot *lot;
|
GNCLot *lot;
|
||||||
gboolean successful;
|
gboolean successful;
|
||||||
|
|
||||||
|
ENTER("(lot=%p)", lot);
|
||||||
lot = gnc_lot_new(book);
|
lot = gnc_lot_new(book);
|
||||||
|
|
||||||
pdata.lot = lot;
|
pdata.lot = lot;
|
||||||
@ -191,3 +196,5 @@ gnc_lot_sixtp_parser_create(void)
|
|||||||
{
|
{
|
||||||
return sixtp_dom_parser_new(gnc_lot_end_handler, NULL, NULL);
|
return sixtp_dom_parser_new(gnc_lot_end_handler, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ================== END OF FILE ========================== */
|
||||||
|
Loading…
Reference in New Issue
Block a user