mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
add maquinas tareas
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace App\Entities\Presupuestos;
|
||||
|
||||
use App\Models\Tarifas\Maquinas\TarifaAcabadoMaquinaModel;
|
||||
use CodeIgniter\Entity;
|
||||
|
||||
class PresupuestoAcabadosEntity extends \CodeIgniter\Entity\Entity
|
||||
@ -28,4 +29,10 @@ class PresupuestoAcabadosEntity extends \CodeIgniter\Entity\Entity
|
||||
"cubierta" => "int",
|
||||
"sobrecubierta" => "int",
|
||||
];
|
||||
|
||||
public function maquinas() : array
|
||||
{
|
||||
$m = model(TarifaAcabadoMaquinaModel::class);
|
||||
return $m->where("tarifa_acabado_id",$this->attributes["tarifa_acabado_id"])->findAll();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
namespace App\Entities\Presupuestos;
|
||||
|
||||
use App\Models\Tarifas\Maquinas\TarifaEncuadernacionMaquinaModel;
|
||||
use App\Models\Tarifas\Maquinas\TarifaManipuladoMaquinaModel;
|
||||
use CodeIgniter\Entity;
|
||||
|
||||
class PresupuestoEncuadernacionesEntity extends \CodeIgniter\Entity\Entity
|
||||
@ -28,4 +30,9 @@ class PresupuestoEncuadernacionesEntity extends \CodeIgniter\Entity\Entity
|
||||
"precio_total" => "float",
|
||||
"margen" => "float",
|
||||
];
|
||||
public function maquinas() : array
|
||||
{
|
||||
$m = model(TarifaEncuadernacionMaquinaModel::class);
|
||||
return $m->where("tarifa_encuadernacion_id",$this->attributes["tarifa_encuadernado_id"])->findAll();
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,6 +10,7 @@ use App\Models\Presupuestos\PresupuestoLineaModel;
|
||||
use App\Models\Presupuestos\PresupuestoManipuladosModel;
|
||||
use App\Models\Presupuestos\PresupuestoModel;
|
||||
use App\Models\Presupuestos\PresupuestoPreimpresionesModel;
|
||||
use App\Models\Presupuestos\PresupuestoServiciosExtraModel;
|
||||
use CodeIgniter\Entity;
|
||||
|
||||
class PresupuestoEntity extends \CodeIgniter\Entity\Entity
|
||||
@ -222,5 +223,9 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity
|
||||
$m = model(PresupuestoManipuladosModel::class);
|
||||
return $m->where("presupuesto_id",$this->attributes["id"])->findAll();
|
||||
}
|
||||
|
||||
public function extras(): array
|
||||
{
|
||||
$m = model(PresupuestoServiciosExtraModel::class);
|
||||
return $m->where("presupuesto_id",$this->attributes["id"])->findAll();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace App\Entities\Presupuestos;
|
||||
|
||||
use App\Models\Tarifas\Maquinas\TarifaManipuladoMaquinaModel;
|
||||
use CodeIgniter\Entity;
|
||||
|
||||
class PresupuestoManipuladosEntity extends \CodeIgniter\Entity\Entity
|
||||
@ -22,4 +23,9 @@ class PresupuestoManipuladosEntity extends \CodeIgniter\Entity\Entity
|
||||
"precio_total" => "float",
|
||||
"margen" => "float",
|
||||
];
|
||||
public function maquinas() : array
|
||||
{
|
||||
$m = model(TarifaManipuladoMaquinaModel::class);
|
||||
return $m->where("tarifa_manipulado_id",$this->attributes["tarifa_manipulado_id"])->findAll();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace App\Entities\Presupuestos;
|
||||
|
||||
use App\Models\Tarifas\Maquinas\TarifaPreimpresionMaquinaModel;
|
||||
use CodeIgniter\Entity;
|
||||
|
||||
class PresupuestoPreimpresionesEntity extends \CodeIgniter\Entity\Entity
|
||||
@ -20,4 +21,9 @@ class PresupuestoPreimpresionesEntity extends \CodeIgniter\Entity\Entity
|
||||
"precio_total" => "float",
|
||||
"margen" => "float",
|
||||
];
|
||||
public function maquinas() : array
|
||||
{
|
||||
$m = model(TarifaPreimpresionMaquinaModel::class);
|
||||
return $m->where("tarifa_preimpresion_id",$this->attributes["tarifa_preimpresion_id"])->findAll();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace App\Entities\Presupuestos;
|
||||
|
||||
use App\Models\Tarifas\Maquinas\TarifaExtraMaquinaModel;
|
||||
use CodeIgniter\Entity;
|
||||
|
||||
class PresupuestoServiciosExtraEntity extends \CodeIgniter\Entity\Entity
|
||||
@ -20,4 +21,10 @@ class PresupuestoServiciosExtraEntity extends \CodeIgniter\Entity\Entity
|
||||
"precio_total" => "float",
|
||||
"margen" => "float",
|
||||
];
|
||||
|
||||
public function maquinas() : array
|
||||
{
|
||||
$m = model(TarifaExtraMaquinaModel::class);
|
||||
return $m->where("tarifa_extra_id",$this->attributes["tarifa_extra_id"])->findAll();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user