GnuCash  5.6-150-g038405b370+
Macros | Typedefs | Functions

– Business Helper Functions More...

#include <glib.h>
#include "qof.h"
#include "Account.h"

Go to the source code of this file.

Macros

#define OWNER_EXPORT_PDF_DIRNAME   "export-pdf-directory"
 
#define LAST_POSTED_TO_ACCT   "last-posted-to-acct"
 
#define GNC_PAYMENT   "payment"
 
#define GNC_LAST_ACCOUNT   "last_acct"
 
#define GNC_BILLTERM_MODULE_NAME   GNC_ID_BILLTERM
 
#define GNC_CUSTOMER_MODULE_NAME   GNC_ID_CUSTOMER
 
#define GNC_EMPLOYEE_MODULE_NAME   GNC_ID_EMPLOYEE
 
#define GNC_ENTRY_MODULE_NAME   GNC_ID_ENTRY
 
#define GNC_INVOICE_MODULE_NAME   GNC_ID_INVOICE
 
#define GNC_JOB_MODULE_NAME   GNC_ID_JOB
 
#define GNC_ORDER_MODULE_NAME   GNC_ID_ORDER
 
#define GNC_OWNER_MODULE_NAME   GNC_ID_OWNER
 
#define GNC_TAXTABLE_MODULE_NAME   GNC_ID_TAXTABLE
 
#define GNC_VENDOR_MODULE_NAME   GNC_ID_VENDOR
 
#define DI(x)   x
 

Typedefs

typedef GList OwnerList
 For SWIG: A GList containing GncOwner. More...
 

Functions

GList * gncBusinessGetList (QofBook *book, QofIdTypeConst type_name, gboolean all_including_inactive)
 Returns a GList of all objects of the given type_name in the given book. More...
 
OwnerListgncBusinessGetOwnerList (QofBook *book, QofIdTypeConst type_name, gboolean all_including_inactive)
 Returns a GList of all objects of the given type_name in the given book, but each object is wrapped in a GncOwner object. More...
 
gboolean gncBusinessIsPaymentAcctType (GNCAccountType type)
 Returns whether the given account type is a valid type to use in business payments. More...
 

Detailed Description

– Business Helper Functions

Author
Copyright (C) 2002 Derek Atkins
Derek Atkins warlo.nosp@m.rd@M.nosp@m.IT.ED.nosp@m.U

Definition in file gncBusiness.h.

Typedef Documentation

◆ OwnerList

typedef GList OwnerList

For SWIG: A GList containing GncOwner.

Definition at line 121 of file gncBusiness.h.

Function Documentation

◆ gncBusinessGetList()

GList* gncBusinessGetList ( QofBook *  book,
QofIdTypeConst  type_name,
gboolean  all_including_inactive 
)

Returns a GList of all objects of the given type_name in the given book.

◆ gncBusinessGetOwnerList()

OwnerList* gncBusinessGetOwnerList ( QofBook *  book,
QofIdTypeConst  type_name,
gboolean  all_including_inactive 
)

Returns a GList of all objects of the given type_name in the given book, but each object is wrapped in a GncOwner object.

The wrapping was done by qofOwnerSetEntity(), hence the owner will contain data only for {CUSTOMER, JOB, VENDOR, EMPLOYEE}, otherwise the owner will be of type GNC_OWNER_NONE and not contain the original data.

◆ gncBusinessIsPaymentAcctType()

gboolean gncBusinessIsPaymentAcctType ( GNCAccountType  type)

Returns whether the given account type is a valid type to use in business payments.

Currently payments are allowed to/from assets, liabilities and equity accounts.

Definition at line 92 of file gncBusiness.c.

93 {
94  if (xaccAccountIsAssetLiabType(type) ||
96  return TRUE;
97  else
98  return FALSE;
99 }
gboolean xaccAccountIsAssetLiabType(GNCAccountType t)
Convenience function to check if the account is a valid Asset or Liability type, but not a business a...
Definition: Account.cpp:4420
gboolean xaccAccountIsEquityType(GNCAccountType t)
Convenience function to check if the account is a valid Equity type.
Definition: Account.cpp:4478