Ejemplo n.º 1
0
static gnc_numeric gncEntryGetIntDiscountValue (GncEntry *entry, gboolean round, gboolean is_cust_doc)
{
    if (!entry) return gnc_numeric_zero();
    gncEntryRecomputeValues (entry);
    if (round)
        return (is_cust_doc ? entry->i_disc_value_rounded : gnc_numeric_zero());
    else
        return (is_cust_doc ? entry->i_disc_value : gnc_numeric_zero());
}
Ejemplo n.º 2
0
static gnc_numeric gncEntryGetIntTaxValue (GncEntry *entry, gboolean round, gboolean is_cust_doc)
{
    if (!entry) return gnc_numeric_zero();
    gncEntryRecomputeValues (entry);
    if (round)
        return (is_cust_doc ? entry->i_tax_value_rounded : entry->b_tax_value_rounded);
    else
        return (is_cust_doc ? entry->i_tax_value : entry->b_tax_value);
}
Ejemplo n.º 3
0
void gncEntryGetValue (GncEntry *entry, gboolean is_inv, gnc_numeric *value,
                       gnc_numeric *discount_value, gnc_numeric *tax_value,
                       GList **tax_values)
{
    if (!entry) return;
    gncEntryRecomputeValues (entry);
    if (value)
        *value = (is_inv ? entry->i_value : entry->b_value);
    if (discount_value)
        *discount_value = (is_inv ? entry->i_disc_value : gnc_numeric_zero());
    if (tax_value)
        *tax_value = (is_inv ? entry->i_tax_value : entry->b_tax_value);
    if (tax_values)
        *tax_values = (is_inv ? entry->i_tax_values : entry->b_tax_values);
}
Ejemplo n.º 4
0
gnc_numeric gncEntryReturnDiscountValue (GncEntry *entry, gboolean is_inv)
{
    if (!entry) return gnc_numeric_zero();
    gncEntryRecomputeValues (entry);
    return (is_inv ? entry->i_disc_value_rounded : gnc_numeric_zero());
}
Ejemplo n.º 5
0
AccountValueList * gncEntryReturnTaxValues (GncEntry *entry, gboolean is_inv)
{
    if (!entry) return NULL;
    gncEntryRecomputeValues (entry);
    return (is_inv ? entry->i_tax_values : entry->b_tax_values);
}
Ejemplo n.º 6
0
gnc_numeric gncEntryReturnTaxValue (GncEntry *entry, gboolean is_inv)
{
    if (!entry) return gnc_numeric_zero();
    gncEntryRecomputeValues (entry);
    return (is_inv ? entry->i_tax_value_rounded : entry->b_tax_value_rounded);
}
Ejemplo n.º 7
0
/* Careful: the returned list is managed by the entry, and will only be valid for a short time */
static AccountValueList * gncEntryGetIntTaxValues (GncEntry *entry, gboolean is_cust_doc)
{
    if (!entry) return NULL;
    gncEntryRecomputeValues (entry);
    return (is_cust_doc ? entry->i_tax_values : entry->b_tax_values);
}