|
GnuCash c935c2f+
|
Define an object to track tax properties for invoices. More...
Files | |
| file | gncTaxTable.h |
| Tax Table programming interface. | |
Data Structures | |
| struct | GncAccountValue |
| struct | GncTaxTable |
| modtime is the internal date of the last modtime See libgnucash/engine/TaxTableBillTermImmutability.txt for an explanation of the following Code that handles refcount, parent, child, invisible and children is identical to that in ::GncBillTerm More... | |
| struct | GncTaxTableEntry |
Macros | |
| #define | GNC_ID_TAXTABLE "gncTaxTable" |
| #define | GNC_TYPE_TAXTABLE (gnc_taxtable_get_type ()) |
| #define | GNC_TAXTABLE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_TAXTABLE, GncTaxTable)) |
| #define | GNC_TAXTABLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GNC_TYPE_TAXTABLE, GncTaxTableClass)) |
| #define | GNC_IS_TAXTABLE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_TAXTABLE)) |
| #define | GNC_IS_TAXTABLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GNC_TYPE_TAXTABLE)) |
| #define | GNC_TAXTABLE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GNC_TYPE_TAXTABLE, GncTaxTableClass)) |
| #define | GNC_TT_NAME "tax table name" |
| QOF parameter definitions. | |
| #define | GNC_TT_REFCOUNT "reference count" |
| #define | gncTaxTableGetGUID(x) qof_instance_get_guid(QOF_INSTANCE(x)) |
| #define | gncTaxTableRetGUID(x) (x ? *(qof_instance_get_guid(QOF_INSTANCE(x))) : *(guid_null())) |
| #define | gncTaxTableLookupDirect(G, B) gncTaxTableLookup((B), &(G)) |
Enumerations | |
| enum | GncAmountType { GNC_AMT_TYPE_VALUE = 1 , GNC_AMT_TYPE_PERCENT } |
| How to interpret the amount. More... | |
| enum | GncTaxIncluded { GNC_TAXINCLUDED_YES = 1 , GNC_TAXINCLUDED_NO , GNC_TAXINCLUDED_USEGLOBAL } |
| How to interpret the TaxIncluded. More... | |
Functions | |
| GType | gnc_taxtable_get_type (void) |
| const char * | gncAmountTypeToString (GncAmountType type) |
| gboolean | gncAmountStringToType (const char *str, GncAmountType *type) |
| const char * | gncTaxIncludedTypeToString (GncTaxIncluded type) |
| gboolean | gncTaxIncludedStringToType (const char *str, GncTaxIncluded *type) |
| void | gncTaxTableAddEntry (GncTaxTable *table, GncTaxTableEntry *entry) |
| void | gncTaxTableRemoveEntry (GncTaxTable *table, GncTaxTableEntry *entry) |
| void | gncTaxTableChanged (GncTaxTable *table) |
| void | gncTaxTableBeginEdit (GncTaxTable *table) |
| void | gncTaxTableCommitEdit (GncTaxTable *table) |
| gboolean | gncTaxTableEqual (const GncTaxTable *a, const GncTaxTable *b) |
| int | gncTaxTableCompare (const GncTaxTable *a, const GncTaxTable *b) |
| int | gncTaxTableEntryCompare (const GncTaxTableEntry *a, const GncTaxTableEntry *b) |
| gboolean | gncTaxTableEntryEqual (const GncTaxTableEntry *a, const GncTaxTableEntry *b) |
| GList * | gncAccountValueAdd (GList *list, Account *acc, gnc_numeric value) |
| This will add value to the account-value for acc, creating a new list object if necessary. | |
| GList * | gncAccountValueAddList (GList *l1, GList *l2) |
| Merge l2 into l1. | |
| gnc_numeric | gncAccountValueTotal (GList *list) |
| return the total for this list | |
| void | gncAccountValueDestroy (GList *list) |
| Destroy a list of accountvalues. | |
Get Functions | |
| typedef GList | GncTaxTableList |
| typedef GList | GncTaxTableEntryList |
| GncTaxTable * | gncTaxTableLookupByName (QofBook *book, const char *name) |
| GncTaxTable * | gncTaxTableGetDefault (QofBook *book, GncOwnerType type) |
| GncTaxTableList * | gncTaxTableGetTables (QofBook *book) |
| const char * | gncTaxTableGetName (const GncTaxTable *table) |
| GncTaxTable * | gncTaxTableGetParent (const GncTaxTable *table) |
| GncTaxTable * | gncTaxTableReturnChild (GncTaxTable *table, gboolean make_new) |
| GncTaxTableEntryList * | gncTaxTableGetEntries (const GncTaxTable *table) |
| gint64 | gncTaxTableGetRefcount (const GncTaxTable *table) |
| time64 | gncTaxTableLastModifiedSecs (const GncTaxTable *table) |
| Account * | gncTaxTableEntryGetAccount (const GncTaxTableEntry *entry) |
| GncAmountType | gncTaxTableEntryGetType (const GncTaxTableEntry *entry) |
| gnc_numeric | gncTaxTableEntryGetAmount (const GncTaxTableEntry *entry) |
| #define | gncTaxTableGetChild(t) gncTaxTableReturnChild((t),FALSE) |
Create/Destroy Functions | |
| GncTaxTable * | gncTaxTableCreate (QofBook *book) |
| void | gncTaxTableDestroy (GncTaxTable *table) |
| GncTaxTableEntry * | gncTaxTableEntryCreate (void) |
| void | gncTaxTableEntryDestroy (GncTaxTableEntry *entry) |
Set Functions | |
| void | gncTaxTableSetName (GncTaxTable *table, const char *name) |
| void | gncTaxTableIncRef (GncTaxTable *table) |
| void | gncTaxTableDecRef (GncTaxTable *table) |
| void | gncTaxTableEntrySetAccount (GncTaxTableEntry *entry, Account *account) |
| void | gncTaxTableEntrySetType (GncTaxTableEntry *entry, GncAmountType type) |
| void | gncTaxTableEntrySetAmount (GncTaxTableEntry *entry, gnc_numeric amount) |
Define an object to track tax properties for invoices.
| #define GNC_ID_TAXTABLE "gncTaxTable" |
Definition at line 101 of file gncTaxTable.h.
| #define GNC_IS_TAXTABLE | ( | o | ) | (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_TAXTABLE)) |
Definition at line 109 of file gncTaxTable.h.
| #define GNC_IS_TAXTABLE_CLASS | ( | k | ) | (G_TYPE_CHECK_CLASS_TYPE ((k), GNC_TYPE_TAXTABLE)) |
Definition at line 111 of file gncTaxTable.h.
| #define GNC_TAXTABLE | ( | o | ) | (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_TAXTABLE, GncTaxTable)) |
Definition at line 105 of file gncTaxTable.h.
| #define GNC_TAXTABLE_CLASS | ( | k | ) | (G_TYPE_CHECK_CLASS_CAST((k), GNC_TYPE_TAXTABLE, GncTaxTableClass)) |
Definition at line 107 of file gncTaxTable.h.
| #define GNC_TAXTABLE_GET_CLASS | ( | o | ) | (G_TYPE_INSTANCE_GET_CLASS ((o), GNC_TYPE_TAXTABLE, GncTaxTableClass)) |
Definition at line 113 of file gncTaxTable.h.
| #define GNC_TT_NAME "tax table name" |
QOF parameter definitions.
Definition at line 210 of file gncTaxTable.h.
| #define GNC_TT_REFCOUNT "reference count" |
Definition at line 211 of file gncTaxTable.h.
| #define GNC_TYPE_TAXTABLE (gnc_taxtable_get_type ()) |
Definition at line 104 of file gncTaxTable.h.
| #define gncTaxTableGetChild | ( | t | ) | gncTaxTableReturnChild((t),FALSE) |
Definition at line 171 of file gncTaxTable.h.
| #define gncTaxTableGetGUID | ( | x | ) | qof_instance_get_guid(QOF_INSTANCE(x)) |
Definition at line 214 of file gncTaxTable.h.
| #define gncTaxTableLookupDirect | ( | G, | |
| B | |||
| ) | gncTaxTableLookup((B), &(G)) |
Definition at line 216 of file gncTaxTable.h.
| #define gncTaxTableRetGUID | ( | x | ) | (x ? *(qof_instance_get_guid(QOF_INSTANCE(x))) : *(guid_null())) |
Definition at line 215 of file gncTaxTable.h.
| typedef GList GncTaxTableEntryList |
Definition at line 172 of file gncTaxTable.h.
| typedef GList GncTaxTableList |
Definition at line 165 of file gncTaxTable.h.
| enum GncAmountType |
How to interpret the amount.
You can interpret it as a VALUE or a PERCENT.
| Enumerator | |
|---|---|
| GNC_AMT_TYPE_VALUE | tax is a number |
| GNC_AMT_TYPE_PERCENT | tax is a percentage |
Definition at line 78 of file gncTaxTable.h.
| enum GncTaxIncluded |
How to interpret the TaxIncluded.
| Enumerator | |
|---|---|
| GNC_TAXINCLUDED_YES | tax is included |
| GNC_TAXINCLUDED_NO | tax is not included |
| GNC_TAXINCLUDED_USEGLOBAL | use the global setting |
Definition at line 85 of file gncTaxTable.h.
| GList * gncAccountValueAdd | ( | GList * | list, |
| Account * | acc, | ||
| gnc_numeric | value | ||
| ) |
This will add value to the account-value for acc, creating a new list object if necessary.
Definition at line 942 of file gncTaxTable.c.
| GList * gncAccountValueAddList | ( | GList * | l1, |
| GList * | l2 | ||
| ) |
Merge l2 into l1.
l2 is not touched.
Definition at line 970 of file gncTaxTable.c.
| void gncAccountValueDestroy | ( | GList * | list | ) |
Destroy a list of accountvalues.
Definition at line 997 of file gncTaxTable.c.
| gnc_numeric gncAccountValueTotal | ( | GList * | list | ) |
return the total for this list
Definition at line 984 of file gncTaxTable.c.
| gboolean gncAmountStringToType | ( | const char * | str, |
| GncAmountType * | type | ||
| ) |
Definition at line 110 of file gncTaxTable.c.
| const char * gncAmountTypeToString | ( | GncAmountType | type | ) |
Definition at line 79 of file gncTaxTable.c.
| gboolean gncTaxIncludedStringToType | ( | const char * | str, |
| GncTaxIncluded * | type | ||
| ) |
Definition at line 121 of file gncTaxTable.c.
| const char * gncTaxIncludedTypeToString | ( | GncTaxIncluded | type | ) |
Definition at line 93 of file gncTaxTable.c.
| void gncTaxTableAddEntry | ( | GncTaxTable * | table, |
| GncTaxTableEntry * | entry | ||
| ) |
Definition at line 594 of file gncTaxTable.c.
| void gncTaxTableBeginEdit | ( | GncTaxTable * | table | ) |
Definition at line 632 of file gncTaxTable.c.
| void gncTaxTableChanged | ( | GncTaxTable * | table | ) |
| void gncTaxTableCommitEdit | ( | GncTaxTable * | table | ) |
Definition at line 651 of file gncTaxTable.c.
| int gncTaxTableCompare | ( | const GncTaxTable * | a, |
| const GncTaxTable * | b | ||
| ) |
Definition at line 842 of file gncTaxTable.c.
| GncTaxTable * gncTaxTableCreate | ( | QofBook * | book | ) |
Definition at line 406 of file gncTaxTable.c.
| void gncTaxTableDecRef | ( | GncTaxTable * | table | ) |
Definition at line 526 of file gncTaxTable.c.
| void gncTaxTableDestroy | ( | GncTaxTable * | table | ) |
| int gncTaxTableEntryCompare | ( | const GncTaxTableEntry * | a, |
| const GncTaxTableEntry * | b | ||
| ) |
Definition at line 821 of file gncTaxTable.c.
| GncTaxTableEntry * gncTaxTableEntryCreate | ( | void | ) |
Definition at line 466 of file gncTaxTable.c.
| void gncTaxTableEntryDestroy | ( | GncTaxTableEntry * | entry | ) |
Definition at line 474 of file gncTaxTable.c.
| gboolean gncTaxTableEntryEqual | ( | const GncTaxTableEntry * | a, |
| const GncTaxTableEntry * | b | ||
| ) |
Definition at line 850 of file gncTaxTable.c.
| Account * gncTaxTableEntryGetAccount | ( | const GncTaxTableEntry * | entry | ) |
Definition at line 795 of file gncTaxTable.c.
| gnc_numeric gncTaxTableEntryGetAmount | ( | const GncTaxTableEntry * | entry | ) |
Definition at line 807 of file gncTaxTable.c.
| GncAmountType gncTaxTableEntryGetType | ( | const GncTaxTableEntry * | entry | ) |
Definition at line 801 of file gncTaxTable.c.
| void gncTaxTableEntrySetAccount | ( | GncTaxTableEntry * | entry, |
| Account * | account | ||
| ) |
Definition at line 558 of file gncTaxTable.c.
| void gncTaxTableEntrySetAmount | ( | GncTaxTableEntry * | entry, |
| gnc_numeric | amount | ||
| ) |
Definition at line 582 of file gncTaxTable.c.
| void gncTaxTableEntrySetType | ( | GncTaxTableEntry * | entry, |
| GncAmountType | type | ||
| ) |
Definition at line 570 of file gncTaxTable.c.
| gboolean gncTaxTableEqual | ( | const GncTaxTable * | a, |
| const GncTaxTable * | b | ||
| ) |
Definition at line 876 of file gncTaxTable.c.
| GncTaxTable * gncTaxTableGetDefault | ( | QofBook * | book, |
| GncOwnerType | type | ||
| ) |
Definition at line 681 of file gncTaxTable.c.
| GncTaxTableEntryList * gncTaxTableGetEntries | ( | const GncTaxTable * | table | ) |
Definition at line 771 of file gncTaxTable.c.
| const char * gncTaxTableGetName | ( | const GncTaxTable * | table | ) |
Definition at line 710 of file gncTaxTable.c.
| GncTaxTable * gncTaxTableGetParent | ( | const GncTaxTable * | table | ) |
Definition at line 765 of file gncTaxTable.c.
| gint64 gncTaxTableGetRefcount | ( | const GncTaxTable * | table | ) |
Definition at line 777 of file gncTaxTable.c.
| GncTaxTableList * gncTaxTableGetTables | ( | QofBook * | book | ) |
Definition at line 701 of file gncTaxTable.c.
| void gncTaxTableIncRef | ( | GncTaxTable * | table | ) |
| time64 gncTaxTableLastModifiedSecs | ( | const GncTaxTable * | table | ) |
Definition at line 783 of file gncTaxTable.c.
| GncTaxTable * gncTaxTableLookupByName | ( | QofBook * | book, |
| const char * | name | ||
| ) |
Definition at line 667 of file gncTaxTable.c.
| void gncTaxTableRemoveEntry | ( | GncTaxTable * | table, |
| GncTaxTableEntry * | entry | ||
| ) |
| GncTaxTable * gncTaxTableReturnChild | ( | GncTaxTable * | table, |
| gboolean | make_new | ||
| ) |
Definition at line 749 of file gncTaxTable.c.
| void gncTaxTableSetName | ( | GncTaxTable * | table, |
| const char * | name | ||
| ) |