public function filter($value)
    {
        $value = number_format($value, $this->getDigits(), $this->getSeparator(), $this->getThousands());
        if ($this->getTrimZeros() && strpos($value, $this->getSeparator())) {
            $tmp = rtrim($value, '0');
            //iteracja po brakujących zerach
            for ($i = 0, $missing = $this->getTrimLeaveZeros() - ($this->getDigits() - (strlen($value) - strlen($tmp))); $i < $missing; $i++) {
                $tmp .= '0';
            }
            $value = rtrim($tmp, '.,');
        }
        return str_replace('-', '- ', $value);
    }