Hi friends,
I have to create a rule to be able to set a price with superscript on decimal.
I have prepared this :"var price = StringToNumber(Field("PrixBarre"));
return '<z newsize=47.14>' + Math.floor(price) + '<superscript>' +
String(Round(price - Math.floor(price), 2)).replace(/^0/,'').replace(/[\.,]/g,',') + "€";"
It works fine, except when the PrixBarre is 7,50 , then the result I am missing the 0... due to the Round rule. I have no proble with 7,49 as example.
Any idea welcome !