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

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