Beispiel #1
0
static gboolean
customer_taxincluded_handler (xmlNodePtr node, gpointer cust_pdata)
{
    struct customer_pdata *pdata = cust_pdata;
    GncTaxIncluded type;
    char *str;
    gboolean ret;

    str = dom_tree_to_text (node);
    g_return_val_if_fail (str, FALSE);

    ret = gncTaxIncludedStringToType (str, &type);
    g_free (str);

    if (ret)
        gncCustomerSetTaxIncluded(pdata->customer, type);

    return ret;
}
Beispiel #2
0
static gboolean
vendor_taxincluded_handler (xmlNodePtr node, gpointer vendor_pdata)
{
    struct vendor_pdata* pdata = static_cast<decltype (pdata)> (vendor_pdata);
    GncTaxIncluded type;
    char* str;
    gboolean ret;

    str = dom_tree_to_text (node);
    g_return_val_if_fail (str, FALSE);

    ret = gncTaxIncludedStringToType (str, &type);
    g_free (str);

    if (ret)
        gncVendorSetTaxIncluded (pdata->vendor, type);

    return ret;
}