This commit is contained in:
2023-11-23 00:53:49 -03:00
parent 9ab0515954
commit bf03e85975
32 changed files with 599 additions and 314 deletions

View File

@ -72,7 +72,7 @@ class Venta
return $venta;
}
public function add(array $data): void
public function add(array $data): Model\Venta
{
$fecha = new DateTimeImmutable($data['fecha_venta']);
$data['uf'] = $this->moneyService->getUF($fecha);
@ -103,6 +103,8 @@ class Venta
'fecha' => $venta->fecha->format('Y-m-d')
]);
$this->estadoVentaRepository->save($estado);
return $venta;
}
protected function addPropietario(array $data): Model\Venta\Propietario
{