mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Set the query to limit searches to splits that belong to the
customer (or vendor) in question. This way you can have multiple customers sharing an A/R account and report on just an individual customer. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7043 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
c9d24dac4f
commit
e5431b6807
@ -489,8 +489,8 @@
|
|||||||
|
|
||||||
(let* ((trans (gnc:split-get-parent split))
|
(let* ((trans (gnc:split-get-parent split))
|
||||||
(invoice (gnc:invoice-get-invoice-from-txn trans))
|
(invoice (gnc:invoice-get-invoice-from-txn trans))
|
||||||
(q (gnc:malloc-query))
|
|
||||||
(temp-owner (gnc:owner-create))
|
(temp-owner (gnc:owner-create))
|
||||||
|
(q (gnc:malloc-query))
|
||||||
(owner #f))
|
(owner #f))
|
||||||
|
|
||||||
(if invoice
|
(if invoice
|
||||||
@ -511,7 +511,23 @@
|
|||||||
(check-splits (cdr splits)))))
|
(check-splits (cdr splits)))))
|
||||||
(check-splits split-list)))
|
(check-splits split-list)))
|
||||||
|
|
||||||
;; XXX: Need to add checks for the ownership...
|
(let ((guid (gnc:owner-get-guid (gnc:owner-get-end-owner owner))))
|
||||||
|
(gnc:query-add-guid-match
|
||||||
|
q
|
||||||
|
(list gnc:split-trans gnc:invoice-from-txn gnc:invoice-owner
|
||||||
|
gnc:owner-parentg)
|
||||||
|
guid 'query-or)
|
||||||
|
(gnc:query-add-guid-match
|
||||||
|
q
|
||||||
|
(list gnc:split-lot gnc:owner-from-lot gnc:owner-parentg)
|
||||||
|
guid 'query-or)
|
||||||
|
(gnc:query-add-guid-match
|
||||||
|
q
|
||||||
|
(list gnc:split-lot gnc:invoice-from-lot gnc:invoice-owner
|
||||||
|
gnc:owner-parentg)
|
||||||
|
guid 'query-or)
|
||||||
|
)
|
||||||
|
|
||||||
(gnc:query-add-single-account-match q account 'query-and)
|
(gnc:query-add-single-account-match q account 'query-and)
|
||||||
(gnc:query-set-book q (gnc:get-current-book))
|
(gnc:query-set-book q (gnc:get-current-book))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user