Optimizacion de monedas

This commit is contained in:
Juan Pablo Vial
2024-05-16 21:23:24 -04:00
parent 256a3d2459
commit fa978728ce
5 changed files with 228 additions and 96 deletions

View File

@ -43,6 +43,9 @@ class Money
}
public function getIPC(DateTimeInterface $start, DateTimeInterface $end): float
{
if ($start >= $end) {
return 0;
}
try {
return $this->getProvider('ipc')->getVar($start, $end);
} catch (EmptyResponse) {

View File

@ -110,6 +110,7 @@ class Venta extends Service
'tipo' => ucwords($unidad->proyectoTipoUnidad->tipoUnidad->descripcion),
'descripcion' => $unidad->descripcion,
'prorrateo' => $unidad->prorrateo,
'valor' => $unidad->valor,
'precio' => (isset($unidad->currentPrecio)) ? $unidad->currentPrecio->valor : 0
];
}