This commit is contained in:
Juan Pablo Vial
2025-03-03 14:57:22 -03:00
parent d165440483
commit 8f16f33a1e
56 changed files with 749 additions and 105 deletions

View File

@ -39,6 +39,11 @@ class Escritura extends Ideal\Repository
return $this->update($model, ['valor', 'fecha', 'uf', 'abonado', 'fecha_abono', 'pago'], $new_data);
}
/**
* @param int $value
* @return array
* @throws Implement\Exception\EmptyResult
*/
public function fetchByValue(int $value): array
{
$query = $this->connection->getQueryBuilder()
@ -55,6 +60,12 @@ class Escritura extends Ideal\Repository
->where('pago = ?');
return $this->fetchOne($query, [$pago_id]);
}
/**
* @param int $venta_id
* @return Model\Venta\Escritura
* @throws Implement\Exception\EmptyResult
*/
public function fetchByVenta(int $venta_id): Model\Venta\Escritura
{
$query = $this->connection->getQueryBuilder()