FIX: all sociedades & allActive depositos
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace Incoviba\Repository;
|
||||
|
||||
use DateTimeImmutable;
|
||||
use Incoviba\Common\Define;
|
||||
use Incoviba\Common\Ideal;
|
||||
use Incoviba\Common\Implement;
|
||||
@ -51,4 +52,13 @@ class Deposito extends Ideal\Repository
|
||||
->where('cuenta_id = ?');
|
||||
return $this->fetchMany($query, [$cuenta_id]);
|
||||
}
|
||||
public function fetchAllActive(): array
|
||||
{
|
||||
$fecha = new DateTimeImmutable();
|
||||
$query = $this->connection->getQueryBuilder()
|
||||
->select()
|
||||
->from($this->getTable())
|
||||
->where('inicio <= ? AND termino >= ?');
|
||||
return $this->fetchMany($query, [$fecha->format('Y-m-d'), $fecha->format('Y-m-d')]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user