mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix Bug 590458 - Invoices are incomplete or miss specifications
Replace call to gncEntrySetInvoice() with gncInvoiceAddEntry() which is the real function. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18302 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
bc1aa534df
commit
294390b54e
@ -60,6 +60,8 @@ static QofLogModule log_module = G_LOG_DOMAIN;
|
|||||||
#define MAX_DISCTYPE_LEN 2048
|
#define MAX_DISCTYPE_LEN 2048
|
||||||
#define MAX_DISCHOW_LEN 2048
|
#define MAX_DISCHOW_LEN 2048
|
||||||
|
|
||||||
|
static void entry_set_invoice( gpointer pObject, gpointer val );
|
||||||
|
|
||||||
static GncSqlColumnTableEntry col_table[] =
|
static GncSqlColumnTableEntry col_table[] =
|
||||||
{
|
{
|
||||||
{ "guid", CT_GUID, 0, COL_NNUL|COL_PKEY, "guid" },
|
{ "guid", CT_GUID, 0, COL_NNUL|COL_PKEY, "guid" },
|
||||||
@ -74,7 +76,7 @@ static GncSqlColumnTableEntry col_table[] =
|
|||||||
{ "i_discount", CT_NUMERIC, 0, 0, NULL, NULL,
|
{ "i_discount", CT_NUMERIC, 0, 0, NULL, NULL,
|
||||||
(QofAccessFunc)gncEntryGetInvDiscount, (QofSetterFunc)gncEntrySetInvDiscount },
|
(QofAccessFunc)gncEntryGetInvDiscount, (QofSetterFunc)gncEntrySetInvDiscount },
|
||||||
{ "invoice", CT_INVOICEREF, 0, 0, NULL, NULL,
|
{ "invoice", CT_INVOICEREF, 0, 0, NULL, NULL,
|
||||||
(QofAccessFunc)gncEntryGetInvoice, (QofSetterFunc)gncEntrySetInvoice },
|
(QofAccessFunc)gncEntryGetInvoice, (QofSetterFunc)entry_set_invoice },
|
||||||
{ "i_disc_type", CT_STRING, MAX_DISCTYPE_LEN, 0, NULL, ENTRY_INV_DISC_TYPE },
|
{ "i_disc_type", CT_STRING, MAX_DISCTYPE_LEN, 0, NULL, ENTRY_INV_DISC_TYPE },
|
||||||
{ "i_disc_how", CT_STRING, MAX_DISCHOW_LEN, 0, NULL, ENTRY_INV_DISC_HOW },
|
{ "i_disc_how", CT_STRING, MAX_DISCHOW_LEN, 0, NULL, ENTRY_INV_DISC_HOW },
|
||||||
{ "i_taxable", CT_BOOLEAN, 0, 0, NULL, ENTRY_INV_TAXABLE },
|
{ "i_taxable", CT_BOOLEAN, 0, 0, NULL, ENTRY_INV_TAXABLE },
|
||||||
@ -98,6 +100,23 @@ static GncSqlColumnTableEntry col_table[] =
|
|||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void
|
||||||
|
entry_set_invoice( gpointer pObject, gpointer val )
|
||||||
|
{
|
||||||
|
GncEntry* entry;
|
||||||
|
GncInvoice* invoice;
|
||||||
|
|
||||||
|
g_return_if_fail( pObject != NULL );
|
||||||
|
g_return_if_fail( GNC_IS_ENTRY(pObject) );
|
||||||
|
g_return_if_fail( val != NULL );
|
||||||
|
g_return_if_fail( GNC_IS_INVOICE(val) );
|
||||||
|
|
||||||
|
entry = GNC_ENTRY(pObject);
|
||||||
|
invoice = GNC_INVOICE(val);
|
||||||
|
|
||||||
|
gncInvoiceAddEntry( invoice, entry );
|
||||||
|
}
|
||||||
|
|
||||||
static GncEntry*
|
static GncEntry*
|
||||||
load_single_entry( GncSqlBackend* be, GncSqlRow* row )
|
load_single_entry( GncSqlBackend* be, GncSqlRow* row )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user