mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-09-03 20:53:02 -05:00
Fix a bug in the invoice-search, setup the query properly so
you don't find all invoices. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6952 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -1535,16 +1535,19 @@ gnc_invoice_search (GncInvoice *start, GncOwner *owner, GNCBook *book)
|
||||
* Invoice->owner->parentGUID.
|
||||
*/
|
||||
if (owner && gncOwnerGetGUID (owner)) {
|
||||
gncQueryAddGUIDMatch (q, g_slist_prepend
|
||||
q2 = gncQueryCreate ();
|
||||
gncQueryAddGUIDMatch (q2, g_slist_prepend
|
||||
(g_slist_prepend (NULL, QUERY_PARAM_GUID),
|
||||
INVOICE_OWNER),
|
||||
gncOwnerGetGUID (owner), QUERY_OR);
|
||||
|
||||
gncQueryAddGUIDMatch (q, g_slist_prepend
|
||||
gncQueryAddGUIDMatch (q2, g_slist_prepend
|
||||
(g_slist_prepend (NULL, OWNER_PARENTG),
|
||||
INVOICE_OWNER),
|
||||
gncOwnerGetGUID (owner), QUERY_OR);
|
||||
|
||||
gncQueryMergeInPlace (q, q2, QUERY_AND);
|
||||
gncQueryDestroy (q2);
|
||||
q2 = gncQueryCopy (q);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user