Mostrar alertas en inicio

This commit is contained in:
2023-10-19 18:20:37 -03:00
parent c2a3192b32
commit 02e1f3e091
25 changed files with 915 additions and 225 deletions

View File

@ -28,18 +28,12 @@ class Venta
public function getByProyecto(int $proyecto_id): array
{
$ventas = $this->ventaRepository->fetchByProyecto($proyecto_id);
foreach ($ventas as &$venta) {
$venta = $this->process($venta);
}
return $ventas;
return array_map([$this, 'process'], $ventas);
}
public function getActivaByProyecto(int $proyecto_id): array
{
$ventas = $this->ventaRepository->fetchActivaByProyecto($proyecto_id);
foreach ($ventas as &$venta) {
$venta = $this->process($venta);
}
return $ventas;
return array_map([$this, 'process'], $ventas);
}
public function getByProyectoAndUnidad(string $proyecto_nombre, int $unidad_descripcion): Model\Venta
{
@ -49,26 +43,22 @@ class Venta
public function getByUnidad(string $unidad, string $tipo): array
{
$ventas = $this->ventaRepository->fetchByUnidad($unidad, $tipo);
foreach ($ventas as &$venta) {
$venta = $this->process($venta);
}
return $ventas;
return array_map([$this, 'process'], $ventas);
}
public function getByPropietario(string $propietario): array
{
$ventas = $this->ventaRepository->fetchByPropietario($propietario);
foreach ($ventas as &$venta) {
$venta = $this->process($venta);
}
return $ventas;
return array_map([$this, 'process'], $ventas);
}
public function getByPrecio(string $precio): array
{
$ventas = $this->ventaRepository->fetchByPrecio($precio);
foreach ($ventas as &$venta) {
$venta = $this->process($venta);
}
return $ventas;
return array_map([$this, 'process'], $ventas);
}
public function getEscriturasByProyecto(int $proyecto_id): array
{
$ventas = $this->ventaRepository->fetchEscriturasByProyecto($proyecto_id);
return array_map([$this, 'process'], $ventas);
}
protected function process(Model\Venta $venta): Model\Venta