FormaPago Service
This commit is contained in:
@ -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]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user