Implement search pago
This commit is contained in:
@ -36,4 +36,21 @@ class Credito extends Ideal\Repository
|
||||
{
|
||||
return $this->update($model, ['banco', 'valor', 'fecha', 'uf', 'abonado', 'fecha_abono', 'pago'], $new_data);
|
||||
}
|
||||
|
||||
public function fetchByValue(int $value): array
|
||||
{
|
||||
$query = $this->connection->getQueryBuilder()
|
||||
->select()
|
||||
->from($this->getTable())
|
||||
->where('valor = ?');
|
||||
return $this->fetchMany($query, [$value]);
|
||||
}
|
||||
public function fetchByPago(int $pago_id): Model\Venta\Credito
|
||||
{
|
||||
$query = $this->connection->getQueryBuilder()
|
||||
->select()
|
||||
->from($this->getTable())
|
||||
->where('pago = ?');
|
||||
return $this->fetchOne($query, [$pago_id]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user