mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
ot
This commit is contained in:
@ -2,8 +2,14 @@
|
||||
|
||||
namespace App\Entities\Presupuestos;
|
||||
|
||||
use App\Entities\Clientes\ClienteEntity;
|
||||
use App\Models\Clientes\ClienteModel;
|
||||
use App\Models\Presupuestos\PresupuestoAcabadosModel;
|
||||
use App\Models\Presupuestos\PresupuestoEncuadernacionesModel;
|
||||
use App\Models\Presupuestos\PresupuestoLineaModel;
|
||||
use App\Models\Presupuestos\PresupuestoManipuladosModel;
|
||||
use App\Models\Presupuestos\PresupuestoModel;
|
||||
use App\Models\Presupuestos\PresupuestoPreimpresionesModel;
|
||||
use CodeIgniter\Entity;
|
||||
|
||||
class PresupuestoEntity extends \CodeIgniter\Entity\Entity
|
||||
@ -191,5 +197,30 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity
|
||||
|
||||
return $q;
|
||||
}
|
||||
public function cliente() : ClienteEntity
|
||||
{
|
||||
$m = model(ClienteModel::class);
|
||||
return $m->find($this->attributes["cliente_id"]);
|
||||
}
|
||||
public function encuadernaciones(): array
|
||||
{
|
||||
$m = model(PresupuestoEncuadernacionesModel::class);
|
||||
return $m->where("presupuesto_id",$this->attributes["id"])->findAll();
|
||||
}
|
||||
public function acabados(): array
|
||||
{
|
||||
$m = model(PresupuestoAcabadosModel::class);
|
||||
return $m->where("presupuesto_id",$this->attributes["id"])->findAll();
|
||||
}
|
||||
public function preimpresiones(): array
|
||||
{
|
||||
$m = model(PresupuestoPreimpresionesModel::class);
|
||||
return $m->where("presupuesto_id",$this->attributes["id"])->findAll();
|
||||
}
|
||||
public function manipulados(): array
|
||||
{
|
||||
$m = model(PresupuestoManipuladosModel::class);
|
||||
return $m->where("presupuesto_id",$this->attributes["id"])->findAll();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user