mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
add kvp frame to customer
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9413 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
697846331a
commit
f330ed7fbc
@ -16,6 +16,7 @@
|
||||
#include "qofobject.h"
|
||||
#include "gnc-event-p.h"
|
||||
#include "gnc-be-utils.h"
|
||||
#include "kvp_frame.h"
|
||||
|
||||
#include "qofbook.h"
|
||||
#include "qofid-p.h"
|
||||
@ -42,6 +43,8 @@ struct _gncCustomer {
|
||||
gnc_numeric discount;
|
||||
gnc_numeric credit;
|
||||
GncTaxIncluded taxincluded;
|
||||
KvpFrame *kvp_data;
|
||||
|
||||
gboolean active;
|
||||
GList * jobs;
|
||||
|
||||
@ -94,6 +97,7 @@ GncCustomer *gncCustomerCreate (QofBook *book)
|
||||
cust->taxincluded = GNC_TAXINCLUDED_USEGLOBAL;
|
||||
cust->active = TRUE;
|
||||
cust->jobs = NULL;
|
||||
cust->kvp_data = kvp_frame_new();
|
||||
|
||||
qof_entity_guid_new (qof_book_get_entity_table (book),&cust->guid);
|
||||
addObj (cust);
|
||||
@ -122,6 +126,7 @@ static void gncCustomerFree (GncCustomer *cust)
|
||||
gncAddressDestroy (cust->addr);
|
||||
gncAddressDestroy (cust->shipaddr);
|
||||
g_list_free (cust->jobs);
|
||||
kvp_frame_delete (cust->kvp_data);
|
||||
|
||||
remObj (cust);
|
||||
|
||||
@ -420,6 +425,12 @@ GncTaxTable* gncCustomerGetTaxTable (GncCustomer *customer)
|
||||
return customer->taxtable;
|
||||
}
|
||||
|
||||
KvpFrame* gncCustomerGetSlots (GncCustomer *customer)
|
||||
{
|
||||
if (!customer) return NULL;
|
||||
return customer->kvp_data;
|
||||
}
|
||||
|
||||
GList * gncCustomerGetJoblist (GncCustomer *cust, gboolean show_all)
|
||||
{
|
||||
if (!cust) return NULL;
|
||||
|
@ -16,6 +16,7 @@ typedef struct _gncCustomer GncCustomer;
|
||||
#include "gncJob.h"
|
||||
|
||||
#include "gnc-numeric.h"
|
||||
#include "kvp_frame.h"
|
||||
|
||||
#define GNC_CUSTOMER_MODULE_NAME "gncCustomer"
|
||||
|
||||
@ -64,6 +65,7 @@ gnc_commodity * gncCustomerGetCurrency (GncCustomer *customer);
|
||||
gboolean gncCustomerGetTaxTableOverride (GncCustomer *customer);
|
||||
GncTaxTable* gncCustomerGetTaxTable (GncCustomer *customer);
|
||||
|
||||
KvpFrame *gncCustomerGetSlots (GncCustomer *customer);
|
||||
GList * gncCustomerGetJoblist (GncCustomer *customer, gboolean show_all);
|
||||
|
||||
GUID gncCustomerRetGUID (GncCustomer *customer);
|
||||
|
Loading…
Reference in New Issue
Block a user