| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function NiceDecimalPoint() |
||
| 32 | { |
||
| 33 | $currencySymbol = Currency::config()->get('currency_symbol'); |
||
| 34 | $decimalPoint = Currency::config()->get('decimal_point'); |
||
| 35 | $thousandSeparator = Currency::config()->get('thousand_seperator'); |
||
| 36 | $val = $currencySymbol . number_format(abs($this->owner->value), 2, $decimalPoint, $thousandSeparator); |
||
| 37 | if ((double)$this->owner->value === (double)0) { |
||
| 38 | return _t('CurrencyExtension.FREE', 'Free'); |
||
| 39 | } elseif ((double)$this->owner->value < 0) { |
||
| 40 | return "($val)"; |
||
| 41 | } else { |
||
| 42 | return $val; |
||
| 43 | } |
||
| 44 | } |
||
| 45 | } |
||
| 46 |