Agregar Proveedor

This commit is contained in:
Juan Pablo Vial
2024-12-03 16:45:20 -03:00
parent 5b44260245
commit 42e1dcdff7
19 changed files with 473 additions and 283 deletions

View File

@ -33,13 +33,18 @@ class Persona extends Ideal\Repository
return $this->update($model, $new_data, ['rut', 'digito', 'nombres', 'apellido_paterno', 'apellido_materno']);
}
public function fetchByRut(int $rut): Model\Persona
/*public function fetchById(int $rut): Model\Persona
{
$query = $this->connection->getQueryBuilder()
->select()
->from($this->getTable())
->where('rut = ?');
return $this->fetchOne($query, [$rut]);
}*/
public function filterData(array $data): array
{
return array_intersect_key($data, array_flip(['rut', 'digito', 'nombres', 'apellido_paterno', 'apellido_materno']));
}
protected function getKey(): string