Fetch by Cuenta
This commit is contained in:
@ -57,6 +57,14 @@ class Cartola extends Ideal\Repository
|
||||
->where('fecha = ?');
|
||||
return $this->fetchMany($query, [$fecha->format('Y-m-d')]);
|
||||
}
|
||||
public function fetchByCuenta(int $cuenta_id): array
|
||||
{
|
||||
$query = $this->connection->getQueryBuilder()
|
||||
->select()
|
||||
->from($this->getTable())
|
||||
->where('cuenta_id = ?');
|
||||
return $this->fetchMany($query, [$cuenta_id]);
|
||||
}
|
||||
public function fetchByCuentaAndFecha(int $cuenta_id, DateTimeInterface $fecha): Model\Contabilidad\Cartola
|
||||
{
|
||||
$query = $this->connection->getQueryBuilder()
|
||||
|
@ -54,6 +54,14 @@ class Movimiento extends Ideal\Repository
|
||||
return $this->update($model, ['cuenta_id', 'fecha', 'glosa', 'documento', 'cargo', 'abono', 'saldo'], $new_data);
|
||||
}
|
||||
|
||||
public function fetchByCuenta(int $cuenta_id): array
|
||||
{
|
||||
$query = $this->connection->getQueryBuilder()
|
||||
->select()
|
||||
->from($this->getTable())
|
||||
->where('cuenta_id = ?');
|
||||
return $this->fetchMany($query, [$cuenta_id]);
|
||||
}
|
||||
public function fetchByCuentaAndFecha(int $cuenta_id, DateTimeInterface $fecha): array
|
||||
{
|
||||
$query = $this->connection->getQueryBuilder()
|
||||
|
Reference in New Issue
Block a user