Limpieza de input de valor y filtro de datos a nivel Repo
This commit is contained in:
@ -25,7 +25,8 @@ class Pie
|
||||
|
||||
public function add(array $data): Model\Venta\Pie
|
||||
{
|
||||
$pie = $this->pieRepository->create($data);
|
||||
$filteredData = $this->pieRepository->filterData($data);
|
||||
$pie = $this->pieRepository->create($filteredData);
|
||||
return $this->pieRepository->save($pie);
|
||||
}
|
||||
public function addCuota(array $data): Model\Venta\Cuota
|
||||
@ -34,7 +35,8 @@ class Pie
|
||||
}
|
||||
public function edit(Model\Venta\Pie $pie, array $data): Model\Venta\Pie
|
||||
{
|
||||
return $this->pieRepository->edit($pie, $data);
|
||||
$filteredData = $this->pieRepository->filterData($data);
|
||||
return $this->pieRepository->edit($pie, $filteredData);
|
||||
}
|
||||
public function reajustar(Model\Venta\Pie $pie, array $data): Model\Venta\Pie
|
||||
{
|
||||
|
Reference in New Issue
Block a user