FormaPago Service

This commit is contained in:
Juan Pablo Vial
2024-03-13 14:38:44 -03:00
parent c7dd309185
commit 98953cce42
21 changed files with 261 additions and 71 deletions

View File

@ -52,4 +52,13 @@ class BonoPie extends Ideal\Repository
->where('pago = ?');
return $this->fetchOne($query, [$pago_id]);
}
public function fetchByVenta(int $venta_id): Model\Venta\BonoPie
{
$query = $this->connection->getQueryBuilder()
->select('a.*')
->from("{$this->getTable()} a")
->joined('JOIN venta ON venta.bono_pie = a.id')
->where('venta.id = ?');
return $this->fetchOne($query, [$venta_id]);
}
}