mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
ot general features
This commit is contained in:
@ -4,8 +4,10 @@ namespace App\Entities\Presupuestos;
|
||||
|
||||
use App\Entities\Clientes\ClienteEntity;
|
||||
use App\Entities\Configuracion\PapelFormatoEntity;
|
||||
use App\Entities\Configuracion\TipoPresupuestoEntity;
|
||||
use App\Models\Clientes\ClienteModel;
|
||||
use App\Models\Configuracion\PapelFormatoModel;
|
||||
use App\Models\Configuracion\TipoPresupuestoModel;
|
||||
use App\Models\Presupuestos\PresupuestoAcabadosModel;
|
||||
use App\Models\Presupuestos\PresupuestoEncuadernacionesModel;
|
||||
use App\Models\Presupuestos\PresupuestoFicheroModel;
|
||||
@ -300,5 +302,15 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity
|
||||
$files = $m->where('presupuesto_id',$this->attributes['id'])->findAll();
|
||||
return $files ?? [];
|
||||
}
|
||||
public function tipo_presupuesto() : ?TipoPresupuestoEntity
|
||||
{
|
||||
$tipo_presupuesto = null;
|
||||
$m = model(TipoPresupuestoModel::class);
|
||||
if($this->attributes["tipo_impresion_id"]){
|
||||
$tipo_presupuesto = $m->find($this->attributes['tipo_impresion_id']);
|
||||
}
|
||||
return $tipo_presupuesto;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -28,6 +28,7 @@ class OrdenTrabajoDateEntity extends Entity
|
||||
"retractilado5_at"=> null,
|
||||
"prototipo_at"=> null,
|
||||
"marcapaginas_at"=> null,
|
||||
"espiral_at"=> null,
|
||||
//FERRO
|
||||
"pendiente_ferro_at" => null,
|
||||
"ferro_en_cliente_at" => null,
|
||||
|
||||
@ -153,4 +153,14 @@ class OrdenTrabajoEntity extends Entity
|
||||
}
|
||||
return $portada_path;
|
||||
}
|
||||
public function getEstadoText(): string
|
||||
{
|
||||
$estados = [
|
||||
"E" => lang('Produccion.error'),
|
||||
"I" => lang('Produccion.iniciada'),
|
||||
"F" => lang('Produccion.finalizada'),
|
||||
"PM" => lang("Produccion.pendiente_material")
|
||||
];
|
||||
return $estados[$this->attributes["estado"]];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user