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

@ -117,4 +117,8 @@ WHERE venta_id = ?";
->where('venta.id = ?');
return $this->fetchOne($query, [$venta_id]);
}
public function filterData(array $data): array
{
return array_intersect_key($data, array_fill_keys(['valor', 'banco', 'tipo', 'identificador', 'fecha', 'uf', 'pagador', 'asociado'], 0));
}
}