only amount
ST
smntov at gmail.com
Tue Mar 6 07:10:52 EST 2012
when I removed "-public" from define it started to work...
I tried:
(define (fmtmoneyNoCurrency curr amt)
;; Format a monetary amount in the given currency as HTML
(nbsp (gnc:monetary->string (gnc:gnc-monetary-amount amt))))
but it also produced errors...
So the questions is - how do I rewrite this function so that it prints
only amount without currency?
ST
On Tue, 2012-03-06 at 14:00 +0200, ST wrote:
> another question - where and how should I define this function? Now I
> place at the beginning of taxinvoice.eguile.scm and here is the error
> that I get:
>
> An error occurred when processing the template:
>
>
> ERROR: In procedure memoization:
> ERROR: In line 30: Mixed definitions and expressions in (define-public (fmtmoneyNoCurrency curr amt) (nbsp (gnc:monetary->string (gnc:make-gnc-monetary curr amt)))).
> In current input:
> 4: 54* (let* ((x 42)) (define-public (fmtmoneyNoCurrency curr amt) (nbsp #)) ...)
>
> thank you,
> ST
>
>
> On Tue, 2012-03-06 at 13:05 +0200, ST wrote:
> > Hi,
> >
> > how do I rewrite following function, so that it outputs only ammount,
> > without currency?
> >
> >
> > (define-public (fmtmoney curr amt)
> > ;; Format a monetary amount in the given currency as HTML
> > (nbsp (gnc:monetary->string (gnc:make-gnc-monetary curr amt))))
> >
> >
> > thank you
> > ST
>
More information about the gnucash-devel
mailing list