mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Use correct routine to add a newly loaded entry to the correct bill. r18302 fixed the entry
loading problem for invoices, this extends it to bills. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18580 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
ca7a2b4bc7
commit
cc08f7f39b
@ -61,6 +61,7 @@ static QofLogModule log_module = G_LOG_DOMAIN;
|
||||
#define MAX_DISCHOW_LEN 2048
|
||||
|
||||
static void entry_set_invoice( gpointer pObject, gpointer val );
|
||||
static void entry_set_bill( gpointer pObject, gpointer val );
|
||||
|
||||
static GncSqlColumnTableEntry col_table[] =
|
||||
{
|
||||
@ -86,7 +87,7 @@ static GncSqlColumnTableEntry col_table[] =
|
||||
{ "b_acct", CT_ACCOUNTREF, 0, 0, NULL, ENTRY_BACCT },
|
||||
{ "b_price", CT_NUMERIC, 0, 0, NULL, ENTRY_BPRICE },
|
||||
{ "bill", CT_INVOICEREF, 0, 0, NULL, NULL,
|
||||
(QofAccessFunc)gncEntryGetBill, (QofSetterFunc)gncEntrySetBill },
|
||||
(QofAccessFunc)gncEntryGetBill, (QofSetterFunc)entry_set_bill },
|
||||
{ "b_taxable", CT_BOOLEAN, 0, 0, NULL, ENTRY_BILL_TAXABLE },
|
||||
{ "b_taxincluded", CT_BOOLEAN, 0, 0, NULL, ENTRY_BILL_TAX_INC },
|
||||
{ "b_taxtable", CT_TAXTABLEREF, 0, 0, NULL, NULL,
|
||||
@ -117,6 +118,23 @@ entry_set_invoice( gpointer pObject, gpointer val )
|
||||
gncInvoiceAddEntry( invoice, entry );
|
||||
}
|
||||
|
||||
static void
|
||||
entry_set_bill( gpointer pObject, gpointer val )
|
||||
{
|
||||
GncEntry* entry;
|
||||
GncInvoice* bill;
|
||||
|
||||
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);
|
||||
bill = GNC_INVOICE(val);
|
||||
|
||||
gncBillAddEntry( bill, entry );
|
||||
}
|
||||
|
||||
static GncEntry*
|
||||
load_single_entry( GncSqlBackend* be, GncSqlRow* row )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user