Informe escritura
This commit is contained in:
@ -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";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user