Cartola Diaria Manual
This commit is contained in:
@ -61,12 +61,12 @@ class Movimiento extends Ideal\Repository
|
||||
->where('cuenta_id = ? AND fecha = ?');
|
||||
return $this->fetchMany($query, [$cuenta_id, $fecha->format('Y-m-d')]);
|
||||
}
|
||||
public function fetchByCuentaAndFechaAndMonto(int $cuenta_id, DateTimeInterface $fecha, int $monto): Model\Movimiento
|
||||
public function fetchByCuentaAndFechaAndCargoAndAbonoAndSaldo(int $cuenta_id, DateTimeInterface $fecha, int $cargo, int $abono, int $saldo): Model\Movimiento
|
||||
{
|
||||
$query = $this->connection->getQueryBuilder()
|
||||
->select()
|
||||
->from($this->getTable())
|
||||
->where('cuenta_id = ? AND fecha = ? AND (cargo = ? OR abono = ?)');
|
||||
return $this->fetchOne($query, [$cuenta_id, $fecha->format('Y-m-d'), $monto, $monto]);
|
||||
->where('cuenta_id = ? AND fecha = ? AND cargo = ? AND abono = ? AND saldo = ?');
|
||||
return $this->fetchOne($query, [$cuenta_id, $fecha->format('Y-m-d'), $cargo, $abono, $saldo]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user