mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Creado concepto de ISK
This commit is contained in:
@ -4,7 +4,7 @@ namespace App\Entities\Catalogo;
|
||||
|
||||
use CodeIgniter\Entity\Entity;
|
||||
use App\Models\Configuracion\PapelGenericoModel;
|
||||
|
||||
use App\Models\Tarifas\Acabados\ServicioAcabadoModel;
|
||||
class CatalogoLibroEntity extends Entity
|
||||
{
|
||||
protected $attributes = [
|
||||
@ -32,6 +32,7 @@ class CatalogoLibroEntity extends Entity
|
||||
'num_ilustr_color' => 0,
|
||||
'num_ilustr_bn' => 0,
|
||||
'coleccion' => '',
|
||||
'isk' => null,
|
||||
'isbn' => null,
|
||||
'ean' => null,
|
||||
'editorial' => '',
|
||||
@ -143,4 +144,24 @@ class CatalogoLibroEntity extends Entity
|
||||
$papel = model(PapelGenericoModel::class)->asObject()->find($this->sobrecubierta_papel_id);
|
||||
return $papel?->nombre ?? null;
|
||||
}
|
||||
|
||||
public function getCubiertaAcabadoName()
|
||||
{
|
||||
if (!$this->cubierta_acabado_id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$servicioAcabado = model(ServicioAcabadoModel::class)->asObject()->find($this->cubierta_acabado_id);
|
||||
return $servicioAcabado?->nombre ?? null;
|
||||
}
|
||||
|
||||
public function getSobrecubiertaAcabadoName()
|
||||
{
|
||||
if (!$this->sobrecubierta_acabado_id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$servicioAcabado = model(ServicioAcabadoModel::class)->asObject()->find($this->sobrecubierta_acabado_id);
|
||||
return $servicioAcabado?->nombre ?? null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user