mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06: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:
parent
0f0080c964
commit
a6e850f8a7
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user