J
|
jsuisman 9/21/2009 |
PHPRunner 5.1 When I use currency as a fihttp://eld property, it defaults to two decimal places. Problem: I have one field which, although currency, is always a whole number. My Solution: By editing locale.php and changing $locale_info["LOCALE_ICURRDIGITS"]="2" to $locale_info["LOCALE_ICURRDIGITS"]="0", changing the field property to number and inserting a $ immediately to the left of the field, I can achieve the desired result. Unfortunately there are six fields, one of which always displays but the others don't always have data. This leaves me with $ signs in otherwise empty fields. I would prefer not to have the $'s display in the empty fields. Question: is it possible to use a custom property which would accomplish the desired outcome and, if so, any ideas what $value = ____ {$value}; would be? TIA
|
M
|
mfero author 9/22/2009 |
Michael, Put one of the following lines in the custom box.
|
M
|
mfero author 9/22/2009 |
|
J
|
jsuisman 9/22/2009 |
Michael,
|
M
|
mfero author 9/23/2009 |
Jared: This just about does it, especially "$value = "\$".number_format($value);//no decimal places with dollar sign" but when there is no value in the table it renders $0. Is it possible to have it not show anything unless there is a value to display? Thank you! |
M
|
mfero author 9/23/2009 |
Michael, Although I have never tried this with phprunner, I would say that the ternary operator would work for you here:
|
J
|
Jane 9/23/2009 |
Michael, if ($value) |
J
|
jsuisman 9/23/2009 |
Michael, here is a sample: if ($value)
|
M
|
mfero author 9/23/2009 |
Thanks for chiming in Jane, wasn't thinking it was a boolean thing. Michael, this will work for you with dollar sign:
|