mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug #635469: Add bindings for running a qofquery on invoices.
This adds a new typedef "GncInvoiceList" with the corresponding typemap, and adds two new functions qof_query_create_for_invoices and qof_query_run_for_invoices, which are trivial wrappers around qof_query_create_for and qof_query_run respectively. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19863 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
d9a658ed4b
commit
32416a5d15
@ -76,6 +76,7 @@ static GncEmployee * gncEmployeeLookupFlip(GncGUID g, QofBook *b)
|
||||
|
||||
%}
|
||||
|
||||
GLIST_HELPER_INOUT(GncInvoiceList, SWIGTYPE_p__gncInvoice);
|
||||
GLIST_HELPER_INOUT(EntryList, SWIGTYPE_p__gncEntry);
|
||||
GLIST_HELPER_INOUT(GncTaxTableEntryList, SWIGTYPE_p__gncTaxTableEntry);
|
||||
GLIST_HELPER_INOUT(OwnerList, SWIGTYPE_p__gncOwner);
|
||||
@ -127,6 +128,7 @@ GLIST_HELPER_INOUT(OwnerList, SWIGTYPE_p__gncOwner);
|
||||
%include <gncTaxTable.h>
|
||||
%include <gncVendor.h>
|
||||
%include <gncBusGuile.h>
|
||||
%include <libqof/qof/qofquery.h>
|
||||
|
||||
#define URL_TYPE_CUSTOMER GNC_ID_CUSTOMER
|
||||
#define URL_TYPE_VENDOR GNC_ID_VENDOR
|
||||
@ -136,6 +138,16 @@ GLIST_HELPER_INOUT(OwnerList, SWIGTYPE_p__gncOwner);
|
||||
// not exactly clean
|
||||
#define URL_TYPE_OWNERREPORT "owner-report"
|
||||
|
||||
%inline %{
|
||||
static QofQuery * qof_query_create_for_invoices(void) {
|
||||
return qof_query_create_for(GNC_ID_INVOICE);
|
||||
}
|
||||
|
||||
static GncInvoiceList * qof_query_run_for_invoices(QofQuery *q) {
|
||||
return qof_query_run(q);
|
||||
}
|
||||
%}
|
||||
|
||||
%init {
|
||||
{
|
||||
char tmp[100];
|
||||
|
@ -39,6 +39,7 @@ transaction and lot for the posted invoice.
|
||||
struct _gncInvoice;
|
||||
typedef struct _gncInvoice GncInvoice;
|
||||
typedef struct _gncInvoiceClass GncInvoiceClass;
|
||||
typedef GList GncInvoiceList;
|
||||
|
||||
#include "gncBillTerm.h"
|
||||
#include "gncEntry.h"
|
||||
|
Loading…
Reference in New Issue
Block a user