예제 #1
0
파일: gncEntry.c 프로젝트: mlq/gnucash
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());
}
예제 #2
0
파일: gncEntry.c 프로젝트: mlq/gnucash
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);
}
예제 #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);
}
예제 #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());
}
예제 #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);
}
예제 #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);
}
예제 #7
0
파일: gncEntry.c 프로젝트: mlq/gnucash
/* 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);
}