Implemented repository mapper, and venta show
This commit is contained in:
20
app/src/Service/Venta/Pie.php
Normal file
20
app/src/Service/Venta/Pie.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace Incoviba\Service\Venta;
|
||||
|
||||
use Incoviba\Repository;
|
||||
use Incoviba\Model;
|
||||
|
||||
class Pie
|
||||
{
|
||||
public function __construct(
|
||||
protected Repository\Venta\Pie $pieRepository,
|
||||
protected Repository\Venta\Cuota $cuotaRepository
|
||||
) {}
|
||||
|
||||
public function getById(int $pie_id): Model\Venta\Pie
|
||||
{
|
||||
$pie = $this->pieRepository->fetchById($pie_id);
|
||||
$pie->cuotasArray = $this->cuotaRepository->fetchVigenteByPie($pie_id);
|
||||
return $pie;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user