41 } GncEntryPaymentType;
50 #ifdef GNUCASH_MAJOR_VERSION
58 #define GNC_ID_ENTRY "gncEntry"
61 #define GNC_TYPE_ENTRY (gnc_entry_get_type ())
62 #define GNC_ENTRY(o) \
63 (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_ENTRY, GncEntry))
64 #define GNC_ENTRY_CLASS(k) \
65 (G_TYPE_CHECK_CLASS_CAST((k), GNC_TYPE_ENTRY, GncEntryClass))
66 #define GNC_IS_ENTRY(o) \
67 (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_ENTRY))
68 #define GNC_IS_ENTRY_CLASS(k) \
69 (G_TYPE_CHECK_CLASS_TYPE ((k), GNC_TYPE_ENTRY))
70 #define GNC_ENTRY_GET_CLASS(o) \
71 (G_TYPE_INSTANCE_GET_CLASS ((o), GNC_TYPE_ENTRY, GncEntryClass))
72 GType gnc_entry_get_type(
void);
84 gboolean gncEntryDiscountStringToHow (
const char *str, GncDiscountHow *how);
86 const char * gncEntryPaymentTypeToString (GncEntryPaymentType type);
87 gboolean gncEntryPaymentStringToType (
const char *str, GncEntryPaymentType *type);
92 void gncEntryDestroy (
GncEntry *entry);
106 void gncEntrySetDescription (
GncEntry *entry,
const char *desc);
107 void gncEntrySetAction (
GncEntry *entry,
const char *action);
108 void gncEntrySetNotes (
GncEntry *entry,
const char *notes);
128 void gncEntrySetInvTaxable (
GncEntry *entry, gboolean taxable);
129 void gncEntrySetInvTaxIncluded (
GncEntry *entry, gboolean tax_included);
133 void gncEntrySetInvDiscountHow (
GncEntry *entry, GncDiscountHow how);
134 void qofEntrySetInvDiscType (
GncEntry *entry,
const char *type);
135 void qofEntrySetInvDiscHow (
GncEntry *entry,
const char *type);
142 void gncEntrySetBillTaxable (
GncEntry *entry, gboolean taxable);
143 void gncEntrySetBillTaxIncluded (
GncEntry *entry, gboolean tax_included);
145 void gncEntrySetBillable (
GncEntry *entry, gboolean billable);
151 void gncEntrySetBillPayment (
GncEntry *entry, GncEntryPaymentType type);
164 const char * gncEntryGetDescription (
const GncEntry *entry);
165 const char * gncEntryGetAction (
const GncEntry *entry);
166 const char * gncEntryGetNotes (
const GncEntry *notes);
187 GncDiscountHow gncEntryGetInvDiscountHow (
const GncEntry *entry);
188 char* qofEntryGetInvDiscType (
const GncEntry *entry);
189 char* qofEntryGetInvDiscHow (
const GncEntry *entry);
190 gboolean gncEntryGetInvTaxable (
const GncEntry *entry);
191 gboolean gncEntryGetInvTaxIncluded (
const GncEntry *entry);
199 gboolean gncEntryGetBillTaxable (
const GncEntry *entry);
200 gboolean gncEntryGetBillTaxIncluded (
const GncEntry *entry);
202 gboolean gncEntryGetBillable (
const GncEntry *entry);
205 GncEntryPaymentType gncEntryGetBillPayment (
const GncEntry* entry);
208 void gncEntryCopy (
const GncEntry *src,
GncEntry *dest, gboolean add_entry);
245 typedef GList AccountValueList;
246 gnc_numeric gncEntryGetDocValue (
GncEntry *entry, gboolean round, gboolean is_cust_doc, gboolean is_cn);
247 gnc_numeric gncEntryGetDocTaxValue (
GncEntry *entry, gboolean round, gboolean is_cust_doc, gboolean is_cn);
250 gnc_numeric gncEntryGetDocDiscountValue (
GncEntry *entry, gboolean round, gboolean is_cust_doc, gboolean is_cn);
253 gnc_numeric gncEntryGetBalTaxValue (
GncEntry *entry, gboolean round, gboolean is_cust_doc);
256 gnc_numeric gncEntryGetBalDiscountValue (
GncEntry *entry, gboolean round, gboolean is_cust_doc);
271 const GncTaxTable *tax_table, gboolean tax_included,
273 GncDiscountHow discount_how,
int SCU,
295 gboolean gncEntryIsOpen (
const GncEntry *entry);
296 void gncEntryBeginEdit (
GncEntry *entry);
297 void gncEntryCommitEdit (
GncEntry *entry);
300 #define ENTRY_DATE "date"
301 #define ENTRY_DATE_ENTERED "date-entered"
302 #define ENTRY_DESC "desc"
303 #define ENTRY_ACTION "action"
304 #define ENTRY_NOTES "notes"
305 #define ENTRY_QTY "qty"
307 #define ENTRY_IPRICE "iprice"
308 #define ENTRY_IACCT "invoice-account"
309 #define ENTRY_BACCT "bill-account"
310 #define ENTRY_BPRICE "bprice"
311 #define ENTRY_BILLABLE "billable?"
312 #define ENTRY_BILLTO "bill-to"
314 #define ENTRY_ORDER "order"
315 #define ENTRY_INVOICE "invoice"
316 #define ENTRY_BILL "bill"
318 #define ENTRY_INV_DISC_TYPE "discount-type"
319 #define ENTRY_INV_DISC_HOW "discount-method"
321 #define ENTRY_INV_TAXABLE "invoice-taxable"
322 #define ENTRY_BILL_TAXABLE "bill-taxable"
323 #define ENTRY_INV_TAX_INC "invoice-tax-included"
324 #define ENTRY_BILL_TAX_INC "bill-tax-included"
325 #define ENTRY_INV_DISCOUNT "invoice-discount"
326 #define ENTRY_BILL_PAY_TYPE "bill-payment-type"
330 #define gncEntryGetGUID(x) qof_instance_get_guid(QOF_INSTANCE(x))
Business Interface: Object OWNERs.
void gncEntrySetQuantity(GncEntry *entry, gnc_numeric quantity)
void gncEntrySetDate(GncEntry *entry, Timespec date)
AccountValueList * gncEntryGetDocTaxValues(GncEntry *entry, gboolean is_cust_doc, gboolean is_cn)
Use a 64-bit unsigned int timespec.
Timespec gncEntryGetDate(const GncEntry *entry)
#define QOF_BOOK_RETURN_ENTITY(book, guid, e_type, c_type)
Encapsulates all the information about a dataset manipulated by QOF. This is the top-most structure u...
void gncEntrySetDocQuantity(GncEntry *entry, gnc_numeric quantity, gboolean is_cn)
AccountValueList * gncEntryGetBalTaxValues(GncEntry *entry, gboolean is_cust_doc)
void gncEntryComputeValue(gnc_numeric qty, gnc_numeric price, const GncTaxTable *tax_table, gboolean tax_included, gnc_numeric discount, GncAmountType discount_type, GncDiscountHow discount_how, int SCU, gnc_numeric *value, gnc_numeric *discount_value, GList **tax_values)
GDate gncEntryGetDateGDate(const GncEntry *entry)
Tax Table programming interface.
void gncEntrySetDateGDate(GncEntry *entry, const GDate *date)
const char * gncEntryDiscountHowToString(GncDiscountHow how)
Business Invoice Interface.
gnc_numeric gncEntryGetQuantity(const GncEntry *entry)
gnc_numeric gncEntryGetDocQuantity(const GncEntry *entry, gboolean is_cn)