Implemented repository mapper, and venta show

This commit is contained in:
Juan Pablo Vial
2023-08-08 23:53:49 -04:00
parent ef30ae67d2
commit 59825259b6
111 changed files with 2766 additions and 612 deletions

View File

@ -17,8 +17,16 @@ class Format
return $formatter->format($date);
}
public function number(float|string $number, int $decimal_places = 0): string
{
return number_format($number, $decimal_places, ',', '.');
}
public function pesos(string $valor): string
{
return '$' . number_format($valor, 0, ',', '.');
return '$ ' . $this->number($valor);
}
public function ufs(string $valor): string
{
return $this->number($valor, 2) . ' UF';
}
}