scheme reporting help!!
Andrew Sackville-West
andrew at swclan.homelinux.org
Wed Jan 28 23:53:07 EST 2009
On Tue, Jan 27, 2009 at 09:53:00PM -0500, Don Zickus wrote:
> Hello,
...
>
> The following snippet of code seems to be the source of my problems:
>
> @@ -140,6 +147,7 @@
> (let* ((num-periods (gnc-budget-get-num-periods budget))
> (period 0)
> (current-col (+ colnum 1))
> + (tdif-dif-total (gnc-numeric-zero))
> )
> (while (< period num-periods)
> (let* (
> @@ -170,6 +178,13 @@
> (gnc:make-gnc-monetary comm dif-numeric-val)))
> )
because of this line, dif-numeric-val in a gnc-monetary type which
includes both a gnc-numeric and a commodity.
>
> + ;; total difference (total period budget to total
> period actual)
> + (tdif-dif-total (gnc-numeric-add dif-numeric-val
> + tdif-dif-total GNC-DENOM-AUTO
> + (+ GNC-DENOM-LCD GNC-RND-NEVER)))
this tries to add two gnc-numerics, but dif-numeric-val is not a
gnc-numeric. you need to (gnc-monetary-amount dif-numeric-val) to
extract the numeric value from it.
hth
A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20090128/88b7ffe6/attachment.bin
More information about the gnucash-devel
mailing list