[Patch] reworked advanced-portfolio.scm
Derek Atkins
warlord at MIT.EDU
Sun Feb 19 09:47:08 EST 2006
Andrew Sackville-West <andrew at farwestbilliards.com> writes:
>> > In
>> > /usr/local/share/gnucash/guile-modules/gnucash/report/advanced-portfolio.scm:
>> > ...
>> > 186: 51 (let* (# # # # ...) (if price-is-dirty #) (for-each # #) ...)
>> > 315: 52* (if (or include-empty (not #)) (let* (# # # ...) (if # #) ...) ...)
>> > 316: 53 (let* (# # # #) (if # #) (if show-symbol #) ...)
>> > 316: 54* [gnc:monetary-neg ...
>> > 317: 55* [gnc:sum-collector-commodity #<procedure #f #> # #<procedure #f #>]
>
> I believe the first #<procedure #f #> is the problem, but can't
> figure out how you would be getting one of these. I *think* I've
> covered all cases before you get to this point so that this doesn't
> happen. Obviously I haven't. Are you sure the diff was applied
> properly? can I send you a complete copy of the report for you to
> plug in?
I think the issue here are /both/ #<procedure #f #> entries in frame 55.
This error is /absolutely/ the fault of commod-currency being #f. In
this code:
(price-list (price-fn commodity to-date))
(price (if (> (length price-list) 0)
(car price-list) #f))
(commod-currency (gnc:price-get-currency price))
The problem is that price-fn returns an empty list and therefore
the price is #f and as a result the commod-currency is #f
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the gnucash-devel
mailing list