Cleanup
This commit is contained in:
@ -17,7 +17,7 @@ class Cierre
|
||||
public function getByProyecto(int $proyecto_id): array
|
||||
{
|
||||
$cierres = $this->cierreRepository->fetchByProyecto($proyecto_id);
|
||||
foreach ($cierres as &$cierre) {
|
||||
foreach ($cierres as $cierre) {
|
||||
$cierre->estados = $this->estadoCierreRepository->fetchByCierre($cierre->id);
|
||||
$cierre->current = $this->estadoCierreRepository->fetchCurrentByCierre($cierre->id);
|
||||
$cierre->unidades = $this->unidadRepository->fetchByCierre($cierre->id);
|
||||
@ -30,7 +30,7 @@ class Cierre
|
||||
$cierre->estados = $this->estadoCierreRepository->fetchByCierre($cierre_id);
|
||||
$cierre->current = $this->estadoCierreRepository->fetchCurrentByCierre($cierre_id);
|
||||
$cierre->unidades = $this->unidadRepository->fetchByCierre($cierre_id);
|
||||
foreach ($cierre->unidades as &$unidad) {
|
||||
foreach ($cierre->unidades as $unidad) {
|
||||
$unidad->currentPrecio = $this->precioRepository->fetchByUnidadAndDate($unidad->id, $cierre->dateTime->format('Y-m-d'));
|
||||
}
|
||||
$cierre->valoresCierre = $this->valorCierreRepository->fetchByCierre($cierre_id);
|
||||
|
Reference in New Issue
Block a user