Informe escritura

This commit is contained in:
2024-01-18 16:41:16 -03:00
parent 01af47fba1
commit ca83472012
5 changed files with 107 additions and 4 deletions

View File

@ -21,12 +21,16 @@ class Format
{
return number_format($number, $decimal_places, ',', '.');
}
public function percent(float|string $number, int $decimal_places = 2): string
{
return "{$this->number($number, $decimal_places)}%";
}
public function pesos(string $valor): string
{
return '$ ' . $this->number($valor);
return "$ {$this->number($valor)}";
}
public function ufs(string $valor): string
{
return $this->number($valor, 2) . ' UF';
return "{$this->number($valor, 2)} UF";
}
}