31 #ifndef GNC_CUSTOMER_H_ 32 #define GNC_CUSTOMER_H_ 69 #define GNC_ID_CUSTOMER "gncCustomer" 72 #define GNC_TYPE_CUSTOMER (gnc_customer_get_type ()) 73 #define GNC_CUSTOMER(o) \ 74 (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_CUSTOMER, GncCustomer)) 75 #define GNC_CUSTOMER_CLASS(k) \ 76 (G_TYPE_CHECK_CLASS_CAST((k), GNC_TYPE_CUSTOMER, GncCustomerClass)) 77 #define GNC_IS_CUSTOMER(o) \ 78 (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_CUSTOMER)) 79 #define GNC_IS_CUSTOMER_CLASS(k) \ 80 (G_TYPE_CHECK_CLASS_TYPE ((k), GNC_TYPE_CUSTOMER)) 81 #define GNC_CUSTOMER_GET_CLASS(o) \ 82 (G_TYPE_INSTANCE_GET_CLASS ((o), GNC_TYPE_CUSTOMER, GncCustomerClass)) 83 GType gnc_customer_get_type(
void);
96 void gncCustomerSetID (
GncCustomer *customer,
const char *
id);
97 void gncCustomerSetName (
GncCustomer *customer,
const char *name);
98 void gncCustomerSetNotes (
GncCustomer *customer,
const char *notes);
99 void gncCustomerSetTerms (
GncCustomer *customer, GncBillTerm *term);
101 void gncCustomerSetActive (
GncCustomer *customer, gboolean active);
102 void gncCustomerSetDiscount (
GncCustomer *customer, gnc_numeric discount);
103 void gncCustomerSetCredit (
GncCustomer *customer, gnc_numeric credit);
104 void gncCustomerSetCurrency (
GncCustomer *customer, gnc_commodity *currency);
106 void gncCustomerSetTaxTableOverride (
GncCustomer *customer, gboolean
override);
109 void gncCustomerAddJob (
GncCustomer *customer, GncJob *job);
110 void gncCustomerRemoveJob (
GncCustomer *customer, GncJob *job);
120 static inline GncCustomer * gncCustomerLookup (
const QofBook *book,
const GncGUID *guid)
125 const char * gncCustomerGetID (
const GncCustomer *customer);
126 const char * gncCustomerGetName (
const GncCustomer *customer);
129 const char * gncCustomerGetNotes (
const GncCustomer *customer);
130 GncBillTerm * gncCustomerGetTerms (
const GncCustomer *customer);
132 gboolean gncCustomerGetActive (
const GncCustomer *customer);
133 gnc_numeric gncCustomerGetDiscount (
const GncCustomer *customer);
134 gnc_numeric gncCustomerGetCredit (
const GncCustomer *customer);
135 gnc_commodity * gncCustomerGetCurrency (
const GncCustomer *customer);
137 gboolean gncCustomerGetTaxTableOverride (
const GncCustomer *customer);
144 #define CUSTOMER_ID "id" 145 #define CUSTOMER_NAME "name" 146 #define CUSTOMER_ADDR "addr" 147 #define CUSTOMER_SHIPADDR "shipaddr" 148 #define CUSTOMER_NOTES "notes" 149 #define CUSTOMER_DISCOUNT "amount of discount" 150 #define CUSTOMER_CREDIT "amount of credit" 151 #define CUSTOMER_TT_OVER "tax table override" 152 #define CUSTOMER_TAX_INC "customer_tax_included" 153 #define CUSTOMER_TERMS "customer_terms" 154 #define CUSTOMER_ACTIVE "customer_is_active" 155 #define CUSTOMER_SLOTS "customer_values" 158 #define gncCustomerGetGUID(x) qof_instance_get_guid(QOF_INSTANCE(x)) 159 #define gncCustomerRetGUID(x) (x ? *(qof_instance_get_guid(QOF_INSTANCE(x))) : *(guid_null())) 160 #define gncCustomerGetBook(x) qof_instance_get_book(QOF_INSTANCE(x)) 161 #define gncCustomerLookupDirect(g,b) gncCustomerLookup((b), &(g)) 166 GList * gncCustomerGetJoblist (
const GncCustomer *customer, gboolean show_all);
167 gboolean gncCustomerIsDirty (
GncCustomer *customer);
GncTaxIncluded
How to interpret the TaxIncluded.
#define QOF_BOOK_RETURN_ENTITY(book, guid, e_type, c_type)
Encapsulates all the information about a dataset manipulated by QOF.
Tax Table programming interface.
credit, discount and shipaddr are unique to GncCustomer id, name, notes, terms, addr, currency, taxtable, taxtable_override taxincluded, active and jobs are identical to ::GncVendor.
gboolean gncCustomerEqual(const GncCustomer *a, const GncCustomer *b)
Test support function, used in gets-dbi-business-stuff.c.
The type used to store guids in C.
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