Limpieza de input de valor y filtro de datos a nivel Repo

This commit is contained in:
Juan Pablo Vial
2024-07-03 15:13:13 -04:00
parent d5b9be0196
commit d68eba5697
28 changed files with 436 additions and 189 deletions

View File

@ -81,4 +81,8 @@ class Pie extends Ideal\Repository
->where('venta.id = ?');
return $this->fetchOne($query, [$venta_id]);
}
public function filterData(array $data): array
{
return array_intersect_key($data, array_fill_keys(['fecha', 'valor', 'uf', 'cuotas', 'asociado', 'reajuste'], 0));
}
}