fechas pedido and imposiciones

This commit is contained in:
amazuecos
2025-04-14 08:05:03 +02:00
parent 08a91294b4
commit e9827c3557
18 changed files with 315 additions and 106 deletions

View File

@ -134,10 +134,10 @@ class OrdenTrabajoEntity extends Entity
{
return $this->pedidoEsperaBy();
}
public function getPortadaPath(): ?string
public function getFullPath(): ?string
{
helper('filesystem');
$path = $this->attributes["portada_path"];
$path = WRITEPATH . 'uploads/' . $this->attributes["portada_path"];
$portada_path = null;
if($path){
if(file_exists($path)){

View File

@ -110,7 +110,11 @@ class OrdenTrabajoTareaEntity extends Entity
public function imposicion() : ?Imposicion
{
$m = model(ImposicionModel::class);
return $m->find($this->attributes["imposicion_id"]);
$imposicion = null;
if($this->attributes["imposicion_id"]){
$imposicion = $m->find($this->attributes["imposicion_id"]);
}
return $imposicion;
}
}