|
|
QOF parameter definitions Definition at line 182 of file gncTaxTable.h. |
|
|
Definition at line 186 of file gncTaxTable.h. |
|
|
Return a pointer to the instance gncTaxTable that is identified by the guid, and is residing in the book. Returns NULL if the instance can't be found. Equivalent function prototype is GncTaxTable * gncTaxTableLookup (QofBook *book, const GUID *guid); Definition at line 136 of file gncTaxTable.h. |
|
|
How to interpret the amount. You can interpret it as a VALUE or a PERCENT. Definition at line 84 of file gncTaxTable.h. 00084 { 00085 GNC_AMT_TYPE_VALUE = 1, 00086 GNC_AMT_TYPE_PERCENT 00087 } GncAmountType;
|
|
|
How to interpret the TaxIncluded
Definition at line 90 of file gncTaxTable.h. 00090 { 00091 GNC_TAXINCLUDED_YES = 1, 00092 GNC_TAXINCLUDED_NO, 00093 GNC_TAXINCLUDED_USEGLOBAL, 00094 } GncTaxIncluded;
|
|
||||||||||||||||
|
This will add value to the account-value for acc, creating a new list object if necessary Definition at line 712 of file gncTaxTable.c. 00713 { 00714 GList *li; 00715 GncAccountValue *res = NULL; 00716 00717 g_return_val_if_fail (acc, list); 00718 g_return_val_if_fail (gnc_numeric_check (value) == GNC_ERROR_OK, list); 00719 00720 /* Try to find the account in the list */ 00721 for (li = list; li; li = li->next) { 00722 res = li->data; 00723 if (res->account == acc) { 00724 res->value = gnc_numeric_add (res->value, value, GNC_DENOM_AUTO, 00725 GNC_DENOM_LCD); 00726 return list; 00727 } 00728 } 00729 /* Nope, didn't find it. */ 00730 00731 res = g_new0 (GncAccountValue, 1); 00732 res->account = acc; 00733 res->value = value; 00734 return g_list_prepend (list, res); 00735 }
|
|
||||||||||||
|
Merge l2 into l1. l2 is not touched. Definition at line 738 of file gncTaxTable.c. 00739 { 00740 GList *li; 00741 00742 for (li = l2; li; li = li->next ) { 00743 GncAccountValue *val = li->data; 00744 l1 = gncAccountValueAdd (l1, val->account, val->value); 00745 } 00746 00747 return l1; 00748 }
|
|
|
Destroy a list of accountvalues Definition at line 763 of file gncTaxTable.c. 00764 { 00765 GList *node; 00766 for ( node = list; node ; node = node->next) 00767 g_free (node->data); 00768 00769 g_list_free (list); 00770 }
|
|
|
return the total for this list Definition at line 751 of file gncTaxTable.c. 00752 { 00753 gnc_numeric total = gnc_numeric_zero (); 00754 00755 for ( ; list ; list = list->next) { 00756 GncAccountValue *val = list->data; 00757 total = gnc_numeric_add (total, val->value, GNC_DENOM_AUTO, GNC_DENOM_LCD); 00758 } 00759 return total; 00760 }
|
1.4.3-20050530