|
GnuCash
5.6-150-g038405b370+
|
Describes billing terms, that is when a bill is due, and what sort of discount is applied (if any). More...
Files | |
| file | gncBillTerm.h |
| Billing Term interface. | |
Macros | |
| #define | GNC_ID_BILLTERM "gncBillTerm" |
| #define | GNC_TYPE_BILLTERM (gnc_billterm_get_type ()) |
| #define | GNC_BILLTERM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_BILLTERM, GncBillTerm)) |
| #define | GNC_BILLTERM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GNC_TYPE_BILLTERM, GncBillTermClass)) |
| #define | GNC_IS_BILLTERM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_BILLTERM)) |
| #define | GNC_IS_BILLTERM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GNC_TYPE_BILLTERM)) |
| #define | GNC_BILLTERM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GNC_TYPE_BILLTERM, GncBillTermClass)) |
| #define | ENUM_TERMS_TYPE(_) |
| How to interpret the amount. More... | |
| #define | gncBillTermGetGUID(x) qof_instance_get_guid (QOF_INSTANCE(x)) |
Functions | |
| GType | gnc_billterm_get_type (void) |
| time64 | gncBillTermComputeDueDate (const GncBillTerm *term, time64 post_date) |
Create/Destroy Functions | |
| GncBillTerm * | gncBillTermCreate (QofBook *book) |
| void | gncBillTermDestroy (GncBillTerm *term) |
| void | gncBillTermIncRef (GncBillTerm *term) |
| void | gncBillTermDecRef (GncBillTerm *term) |
| void | gncBillTermChanged (GncBillTerm *term) |
| void | gncBillTermBeginEdit (GncBillTerm *term) |
| void | gncBillTermCommitEdit (GncBillTerm *term) |
Get Functions | |
| GncBillTerm * | gncBillTermLookupByName (QofBook *book, const char *name) |
| GList * | gncBillTermGetTerms (QofBook *book) |
| const char * | gncBillTermGetName (const GncBillTerm *term) |
| const char * | gncBillTermGetDescription (const GncBillTerm *term) |
| GncBillTermType | gncBillTermGetType (const GncBillTerm *term) |
| gint | gncBillTermGetDueDays (const GncBillTerm *term) |
| gint | gncBillTermGetDiscountDays (const GncBillTerm *term) |
| gnc_numeric | gncBillTermGetDiscount (const GncBillTerm *term) |
| gint | gncBillTermGetCutoff (const GncBillTerm *term) |
| gboolean | gncBillTermIsDirty (const GncBillTerm *term) |
| GncBillTerm * | gncBillTermGetParent (const GncBillTerm *term) |
| GncBillTerm * | gncBillTermReturnChild (GncBillTerm *term, gboolean make_new) |
| gint64 | gncBillTermGetRefcount (const GncBillTerm *term) |
| #define | gncBillTermGetChild(t) gncBillTermReturnChild((t),FALSE) |
Comparison Functions | |
| int | gncBillTermCompare (const GncBillTerm *a, const GncBillTerm *b) |
| Compare BillTerms on their name for sorting. More... | |
| gboolean | gncBillTermEqual (const GncBillTerm *a, const GncBillTerm *b) |
| Check if all internal fields of a and b match. More... | |
| gboolean | gncBillTermIsFamily (const GncBillTerm *a, const GncBillTerm *b) |
| Check only if the bill terms are "family". More... | |
Describes billing terms, that is when a bill is due, and what sort of discount is applied (if any).
The BillTerm object currently supports: the discount applied to a bill (absolute numeric value) the number of days until a discount expires information about the invoice due date
This last one can be defined in multiple ways: using a simple number of days value: the due date is posted date incremented with this number of days using the "proximo" method which is explained below:
A proximo billing term has two parameters: due day: day of the month the invoice/bill will be due cutoff: day of the month used to decide if the due date will be in the next month or in the month thereafter. This can be a negative number in which case the cutoff date is relative to the end of the month and counting backwards. Eg: cutoff = -3 would mean 25 in February or 28 in June
How does it work: Assume cutoff = 19 and due day = 20
Example 1 post date = 14-06-2010 (European date format) 14 is less than the cutoff of 19, so the due date will be in the next month. Since the due day is set to 20, the due date will be 20-07-2010
Example 2 post date = 22-06-2010 (European date format) 22 is more than the cutoff of 19, so the due date will be in the month after next month. Since the due day is set to 20, the due date will be 20-02-2010
| #define ENUM_TERMS_TYPE | ( | _ | ) |
How to interpret the amount.
You can interpret it as a VALUE or a PERCENT. ??? huh? NOTE: This enum /depends/ on starting at value 1
Definition at line 116 of file gncBillTerm.h.
| int gncBillTermCompare | ( | const GncBillTerm * | a, |
| const GncBillTerm * | b | ||
| ) |
Compare BillTerms on their name for sorting.
Definition at line 629 of file gncBillTerm.c.
| gboolean gncBillTermEqual | ( | const GncBillTerm * | a, |
| const GncBillTerm * | b | ||
| ) |
Check if all internal fields of a and b match.
Definition at line 643 of file gncBillTerm.c.
| gboolean gncBillTermIsFamily | ( | const GncBillTerm * | a, |
| const GncBillTerm * | b | ||
| ) |
Check only if the bill terms are "family".
This is the case if
In practice, this check if performed by comparing the bill term's names. This is required to be unique per parent/children group.
Definition at line 707 of file gncBillTerm.c.
1.8.14