mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[customer-summary] fix no-owner sorting of entries
Previous 9ed0174cb
would place any entry with customername == "No
Customer" last, including genuine customers with this particular
name. This commit modifies to test on presence of owner-report-url to
detect owner/no-owner entries. This is reliable for this report.
This commit is contained in:
parent
f82058e026
commit
3a927ce2ac
@ -428,14 +428,14 @@
|
||||
(op (if (eq? sort-order 'descend) > <)))
|
||||
(define (<? key)
|
||||
(case key
|
||||
;; customername sorting is handled differently;
|
||||
;; this conditional ensures "No Customer" lines
|
||||
;; are printed last.
|
||||
;; customername sorting is handled differently; this
|
||||
;; conditional ensures "No Customer" entries,
|
||||
;; i.e. without owner-report url, are printed last.
|
||||
((customername)
|
||||
(lambda (a b)
|
||||
(cond
|
||||
((string=? (vector-ref b 0) (_ "No Customer")) #t)
|
||||
((string=? (vector-ref a 0) (_ "No Customer")) #f)
|
||||
((vector-ref b 6) #t)
|
||||
((vector-ref a 6) #f)
|
||||
(else (str-op (vector-ref a 0) (vector-ref b 0))))))
|
||||
;; currency sorting always alphabetical a-z
|
||||
((currency)
|
||||
|
Loading…
Reference in New Issue
Block a user