This topic contains 5 replies, has 0 voices, and was last updated by kastnerd 8 years, 11 months ago.
-
AuthorPosts
-
February 17, 2015 at 8:57 am #2201
coreyI am trying to print out credits on an invoice but only if the value is greater than zero. I have tried
PHP Code:
and I get
PHP Code:
The template cannot be saved due to the following errors:
The only legal comparisons are between two numbers, two strings, or two dates.. Left hand operand is a com.netledger.templates.model.EmptyModel. Right hand operand is a freemarker.template.SimpleNumber.And
PHP Code:
0)>
Same result.
I think the problem is that paid/credits is sort of a roll up field? Anyone done this?
This is a cached copy. Click here to see the original post. -
February 17, 2015 at 9:30 am #2202
jwenzerHave you tried record.amountremaining ?
corey replied on 02/17/2015, 09:42 AM: That one I can check against (it’s a number) and I guess I could check to see if it matches total but I would rather understand how to check for credits.
-
February 17, 2015 at 10:19 am #2203
carl.billingsHey Corey
Drop me a line. I think i know the issue here but rather than write 20 postings to confirm lets walk through it
-
July 14, 2015 at 2:42 am #2204
PatrickAlcPHP Code:
-
July 14, 2015 at 10:02 pm #2205
michoelFrom the Freemarker manual:
There’s a problem with >= and >. FreeMarker interprets the > character as the closing character of the FTL tag. To prevent this, you can uselt instead of <, lte instead of and gte instead of >=, like in . Another trick it to put the expression into parentheses like in y)>, although it’s considered to be less elegant.
Also, you may need to convert the field to a number first:
Code:
-
December 16, 2015 at 8:24 am #2206
kastnerdany luck getting this to work?
-
AuthorPosts
You must be logged in to reply to this topic.
