mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Don't leak prices in the (non-advanced) portfolio report.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23709 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
96957db600
commit
e32ba766b6
@ -157,8 +157,10 @@
|
|||||||
"number-cell" value)))
|
"number-cell" value)))
|
||||||
;;(display (sprintf #f "Shares: %6.6d " (gnc-numeric-to-double units)))
|
;;(display (sprintf #f "Shares: %6.6d " (gnc-numeric-to-double units)))
|
||||||
;;(display units) (newline)
|
;;(display units) (newline)
|
||||||
|
(if price (gnc-price-unref price))
|
||||||
(table-add-stock-rows-internal rest (not odd-row?)))
|
(table-add-stock-rows-internal rest (not odd-row?)))
|
||||||
(table-add-stock-rows-internal rest odd-row?)))))
|
(begin (if price (gnc-price-unref price))
|
||||||
|
(table-add-stock-rows-internal rest odd-row?))))))
|
||||||
|
|
||||||
(set! work-to-do (length accounts))
|
(set! work-to-do (length accounts))
|
||||||
(table-add-stock-rows-internal accounts #t)))
|
(table-add-stock-rows-internal accounts #t)))
|
||||||
@ -209,22 +211,28 @@
|
|||||||
pricealist foreign date)))))
|
pricealist foreign date)))))
|
||||||
((pricedb-latest)
|
((pricedb-latest)
|
||||||
(lambda (foreign date)
|
(lambda (foreign date)
|
||||||
(let ((price
|
(let* ((price
|
||||||
(gnc-pricedb-lookup-latest-any-currency
|
(gnc-pricedb-lookup-latest-any-currency
|
||||||
pricedb foreign)))
|
pricedb foreign))
|
||||||
(if (and price (> (length price) 0))
|
(fn (if (and price (> (length price) 0))
|
||||||
(let ((v (gnc-price-get-value (car price))))
|
(let ((v (gnc-price-get-value (car price))))
|
||||||
(cons (car price) v))
|
(gnc-price-ref (car price))
|
||||||
(cons #f (gnc-numeric-zero))))))
|
(cons (car price) v))
|
||||||
|
(cons #f (gnc-numeric-zero)))))
|
||||||
|
(if price (gnc-price-list-destroy price))
|
||||||
|
fn)))
|
||||||
((pricedb-nearest)
|
((pricedb-nearest)
|
||||||
(lambda (foreign date)
|
(lambda (foreign date)
|
||||||
(let ((price
|
(let* ((price
|
||||||
(gnc-pricedb-lookup-nearest-in-time-any-currency
|
(gnc-pricedb-lookup-nearest-in-time-any-currency
|
||||||
pricedb foreign (timespecCanonicalDayTime date))))
|
pricedb foreign (timespecCanonicalDayTime date)))
|
||||||
(if (and price (> (length price) 0))
|
(fn (if (and price (> (length price) 0))
|
||||||
(let ((v (gnc-price-get-value (car price))))
|
(let ((v (gnc-price-get-value (car price))))
|
||||||
(cons (car price) v))
|
(gnc-price-ref (car price))
|
||||||
(cons #f (gnc-numeric-zero)))))))))
|
(cons (car price) v))
|
||||||
|
(cons #f (gnc-numeric-zero)))))
|
||||||
|
(if price (gnc-price-list-destroy price))
|
||||||
|
fn))))))
|
||||||
|
|
||||||
(gnc:html-table-set-col-headers!
|
(gnc:html-table-set-col-headers!
|
||||||
table
|
table
|
||||||
|
Loading…
Reference in New Issue
Block a user