GnuCash 2.4.99
Data Structures | Defines | Typedefs | Enumerations | Functions
gncOwner.h File Reference

Business Interface: Object OWNERs. More...

#include "qof.h"
#include "gncCustomer.h"
#include "gncJob.h"
#include "gncVendor.h"
#include "gncEmployee.h"
#include "gncInvoice.h"
#include "Account.h"
#include "gnc-lot.h"

Go to the source code of this file.

Data Structures

struct  _gncOwner

Defines

#define GNC_ID_OWNER   "gncOwner"
#define OWNER_TYPE   "type"
#define OWNER_TYPE_STRING   "type-string"
#define OWNER_CUSTOMER   "customer"
#define OWNER_JOB   "job"
#define OWNER_VENDOR   "vendor"
#define OWNER_EMPLOYEE   "employee"
#define OWNER_PARENT   "parent"
#define OWNER_PARENTG   "parent-guid"
#define OWNER_NAME   "name"
#define OWNER_FROM_LOT   "owner-from-lot"

Typedefs

typedef struct _gncOwner GncOwner

Enumerations

enum  GncOwnerType {
  GNC_OWNER_NONE, GNC_OWNER_UNDEFINED, GNC_OWNER_CUSTOMER, GNC_OWNER_JOB,
  GNC_OWNER_VENDOR, GNC_OWNER_EMPLOYEE
}

Functions

void gncOwnerCopy (const GncOwner *src, GncOwner *dest)
const GncGUIDgncOwnerGetGUID (const GncOwner *owner)
GncGUID gncOwnerRetGUID (GncOwner *owner)
const GncOwnergncOwnerGetEndOwner (const GncOwner *owner)
const GncGUIDgncOwnerGetEndGUID (const GncOwner *owner)
void gncOwnerAttachToLot (const GncOwner *owner, GNCLot *lot)
gboolean gncOwnerLotMatchOwnerFunc (GNCLot *lot, gpointer user_data)
gint gncOwnerLotsSortFunc (GNCLot *lotA, GNCLot *lotB)
gboolean gncOwnerGetOwnerFromLot (GNCLot *lot, GncOwner *owner)
gboolean gncOwnerGetOwnerFromTypeGuid (QofBook *book, GncOwner *owner, QofIdType type, GncGUID *guid)
KvpFramegncOwnerGetSlots (GncOwner *owner)
GNCLotgncOwnerCreatePaymentLot (const GncOwner *owner, Transaction *txn, Account *posted_acc, Account *xfer_acc, gnc_numeric amount, gnc_numeric exch, Timespec date, const char *memo, const char *num)
void gncOwnerAutoApplyPaymentsWithLots (const GncOwner *owner, GList *lots)
void gncOwnerApplyPayment (const GncOwner *owner, Transaction *txn, GList *lots, Account *posted_acc, Account *xfer_acc, gnc_numeric amount, gnc_numeric exch, Timespec date, const char *memo, const char *num)
GList * gncOwnerGetAccountTypesList (const GncOwner *owner)
GList * gncOwnerGetCommoditiesList (const GncOwner *owner)
gnc_numeric gncOwnerGetBalanceInCurrency (const GncOwner *owner, const gnc_commodity *report_currency)
GncOwnergncOwnerNew (void)
void gncOwnerFree (GncOwner *owner)
void gncOwnerBeginEdit (GncOwner *owner)
void gncOwnerDestroy (GncOwner *owner)
QOF handling

Whilst GncOwner is not a formal QOF object, these functions are still expected to be useful in making GncOwner transparent to QOF as they can be used by objects like GncInvoice.

QofIdTypeConst qofOwnerGetType (const GncOwner *owner)
QofInstanceqofOwnerGetOwner (const GncOwner *owner)
void qofOwnerSetEntity (GncOwner *owner, QofInstance *ent)
gboolean GNC_IS_OWNER (QofInstance *ent)
QofIdTypeConst gncOwnerTypeToQofIdType (GncOwnerType t)
gboolean gncOwnerRegister (void)
Setup routines
void gncOwnerInitUndefined (GncOwner *owner, gpointer obj)
void gncOwnerInitCustomer (GncOwner *owner, GncCustomer *customer)
void gncOwnerInitJob (GncOwner *owner, GncJob *job)
void gncOwnerInitVendor (GncOwner *owner, GncVendor *vendor)
void gncOwnerInitEmployee (GncOwner *owner, GncEmployee *employee)
Get routines.
GncOwnerType gncOwnerGetType (const GncOwner *owner)
gboolean gncOwnerIsValid (const GncOwner *owner)
gpointer gncOwnerGetUndefined (const GncOwner *owner)
GncCustomergncOwnerGetCustomer (const GncOwner *owner)
GncJobgncOwnerGetJob (const GncOwner *owner)
GncVendorgncOwnerGetVendor (const GncOwner *owner)
GncEmployeegncOwnerGetEmployee (const GncOwner *owner)
const char * gncOwnerGetID (const GncOwner *owner)
const char * gncOwnerGetName (const GncOwner *owner)
GncAddressgncOwnerGetAddr (const GncOwner *owner)
gboolean gncOwnerGetActive (const GncOwner *owner)
gnc_commoditygncOwnerGetCurrency (const GncOwner *owner)
Set routines.
void gncOwnerSetActive (const GncOwner *owner, gboolean active)
Comparison routines.
gboolean gncOwnerEqual (const GncOwner *a, const GncOwner *b)
int gncOwnerGCompareFunc (const GncOwner *a, const GncOwner *b)
int gncOwnerCompare (const GncOwner *a, const GncOwner *b)

Detailed Description

Business Interface: Object OWNERs.

Author:
Copyright (C) 2001,2002 Derek Atkins <warlord@MIT.EDU>
Copyright (c) 2005 Neil Williams <linux@codehelp.co.uk>
Copyright (c) 2006 David Hampton <hampton@employees.org>

Definition in file gncOwner.h.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines