Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date ][Interchange by thread ]

Re: [mv] [loop-data] number crunching problems




hi,

you may need to use perl's number formatting. Look for perl functions
in the perl docs.

Software never adds unnecessary zeros like 1.05000000. So you need to
make that number string and add zeros.

regards.


Steven Morrison wrote:
> 
> Hi folks, I'm having some trouble with [loop-data], [loop search] and some
> field data in one of my databases.
> 
> Its simple - whenever there is a number to be displayed from my database
> that ends in a decimal and trailing zeros, it cuts them off.  So for
> example, -3.00 is displayed as -3, and +5.50 is displayed as +5.5 - is there
> any way to prevent this from happening? Here's the full block of tags I'm
> using.  (The values in the database are part of contact lens prescriptions
> in case you're wondering :))
> 
> ---SNIP---
> 
> [loop search="st=text/fi=orderdetail/se=[cgi ordernumber]/sf=code/ac=1"]
> [sort orderdetail:itemid:n]
>   <INPUT TYPE=hidden NAME="mv_order_item" VALUE="[loop-data orderdetail
> sku]">
>   <INPUT TYPE=hidden NAME="mv_order_rbase" value="[loop-data orderdetail
> rbase]">
>   <INPUT TYPE=hidden NAME="mv_order_lbase" value="[loop-data orderdetail
> lbase]">
>   <INPUT TYPE=hidden NAME="mv_order_ldia" value="[loop-data orderdetail
> ldia]">
>   <INPUT TYPE=hidden NAME="mv_order_rdia" value="[loop-data orderdetail
> rdia]">
>   <INPUT TYPE=hidden NAME="mv_order_rpow" value="[loop-data orderdetail
> rpow]">
>   <INPUT TYPE=hidden NAME="mv_order_lpow" value="[loop-data orderdetail
> lpow]">
>   <INPUT TYPE=hidden NAME="mv_order_radd" value="[loop-data orderdetail
> radd]">
>   <INPUT TYPE=hidden NAME="mv_order_ladd" value="[loop-data orderdetail
> ladd]">
>   <INPUT TYPE=hidden NAME="mv_order_rcolor" value="[loop-data orderdetail
> rcolor]">
>   <INPUT TYPE=hidden NAME="mv_order_lcolor" value="[loop-data orderdetail
> lcolor]">
>   <INPUT TYPE=hidden NAME="mv_order_rcyl" value="[loop-data orderdetail
> rcyl]">
>   <INPUT TYPE=hidden NAME="mv_order_lcyl" value="[loop-data orderdetail
> lcyl]">
>   <INPUT TYPE=hidden NAME="mv_order_raxis" value="[loop-data orderdetail
> raxis]">
>   <INPUT TYPE=hidden NAME="mv_order_laxis" value="[loop-data orderdetail
> laxis]">
> [/loop]
> 
> ---SNIP---
> 
> Any help would be greatly appreciated - please reply here as well as email.
> :)  I'm sure there is a simple solution to this but searching the archives
> hasn't helped me much.
> 
> _______________________________________________
> Minivend-users mailing list
> Minivend-users@minivend.com
> http://lists.akopia.com/mailman/listinfo/minivend-users

-- 


Sezer YALÇIN
email: sezery@damla.net

Damla Network Systems(DNS)
http://www.damla.net/

_______________________________________________
Minivend-users mailing list
Minivend-users@minivend.com
http://lists.akopia.com/mailman/listinfo/minivend-users


Search for: Match: Format: Sort by: