Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Criar um pacote de suporte #1

Open
irineujunior opened this issue May 30, 2016 · 0 comments
Open

Criar um pacote de suporte #1

irineujunior opened this issue May 30, 2016 · 0 comments
Milestone

Comments

@irineujunior
Copy link
Member

  • checkActive
  • checkRule
  • columnSort
  • mask
private function mask($val, $mask)
{
    $maskared = '';
    $k = 0;
    for ($i = 0; $i <= strlen($mask) - 1; $i++) {
        if ($mask[$i] == '#') {
            if (isset($val[$k]))
                $maskared .= $val[$k++];
        } else {
            if (isset($mask[$i]))
                $maskared .= $mask[$i];
        }
    }
    return $maskared;
}
  • parseFloat
private function parseFloat($val) 
{
    return str_replace(',', '.', str_replace('.', '', trim(str_replace('R$', '', $val))));
}
  • parseMoney
private function parseMoney($val, $prefix = 'R$ ') 
{
    return $prefix . number_format($val, 2, ',', '.');
}
@irineujunior irineujunior added this to the enhancement milestone May 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant