Merge branch 'main' into add/view_logistica_principal

This commit is contained in:
2025-04-21 21:09:00 +02:00
545 changed files with 2025 additions and 715 deletions

0
ci4/app/Entities/Albaranes/AlbaranEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Albaranes/AlbaranLineaEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Chat/ChatDepartmentEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Chat/ChatDepartmentUserEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Chat/ChatEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Chat/ChatMessageEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Chat/ChatNotificationEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Chat/ChatUserEntity.php Normal file → Executable file
View File

View File

@ -1,6 +1,8 @@
<?php
namespace App\Entities\Configuracion;
use App\Models\Configuracion\ImposicionEsquemaModel;
use CodeIgniter\Entity;
class Imposicion extends \CodeIgniter\Entity\Entity
@ -13,19 +15,36 @@ class Imposicion extends \CodeIgniter\Entity\Entity
"orientacion" => null,
"maquina" => null,
"etiqueta" => null,
"imposicion_esquema_id" => null
];
protected $casts = [
"ancho" => "int",
"alto" => "int",
"unidades" => "?int",
"imposicion_esquema_id" => "?int"
];
public function getFullName() : string
public function getFullName(): string
{
$ancho_x_alto = $this->attributes["ancho"] ."x". $this->attributes["alto"];
$ancho_x_alto = $this->attributes["ancho"] . "x" . $this->attributes["alto"];
$unidades = $this->attributes["unidades"] ?? "";
$orientacion = $this->attributes["orientacion"] ?? "";
return implode("_",[$ancho_x_alto,$unidades,$orientacion]);
return implode("_", [$ancho_x_alto, $unidades, $orientacion]);
}
public function withImposicionEsquema(): self
{
$this->attributes["imposicion_esquema"] = $this->imposicion_esquema();
return $this;
}
public function imposicion_esquema(): ?ImposicionEsquemaEntity
{
$esquema = null;
if ($this->attributes["imposicion_esquema_id"]) {
$m = model(ImposicionEsquemaModel::class);
$esquema = $m->find($this->attributes["imposicion_esquema_id"]);
}
return $esquema;
}
}

View File

@ -0,0 +1,26 @@
<?php
namespace App\Entities\Configuracion;
use CodeIgniter\Entity\Entity;
class ImposicionEsquemaEntity extends Entity
{
protected $attributes = [
"name" => null,
"rows" => null,
"columns" => null,
"orientacion"=> null,
"rotativa"=> null,
"cosido"=> null,
"svg_schema"=> null
];
protected $dates = ['created_at', 'updated_at', 'deleted_at'];
protected $casts = [
"name" => "string",
"rows" => "integer",
"columns" => "integer",
"rotativa"=> "boolean",
"cosido"=> "boolean",
];
}

View File

View File

View File

0
ci4/app/Entities/Configuracion/UbicacionesEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Facturas/FacturaEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Facturas/FacturaLineaEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Facturas/FacturaPagoEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Mensajeria/ConversacionEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Mensajeria/ParticipanteEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Pedidos/PedidoEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Pedidos/PedidoLineaEntity.php Normal file → Executable file
View File

View File

View File

0
ci4/app/Entities/Produccion/OrdenTrabajoDateEntity.php Normal file → Executable file
View File

8
ci4/app/Entities/Produccion/OrdenTrabajoEntity.php Normal file → Executable file
View File

@ -121,6 +121,14 @@ class OrdenTrabajoEntity extends Entity
$barcodeData = $barcode->getBarcode($this->pedido()->presupuesto()->id);
return base64_encode($renderer->render($barcodeData, 200, 50));
}
public function getBarCodeFile()
{
$barcode = new TypeCode128();
$renderer = new PngRenderer();
$renderer->setBackgroundColor([255, 255, 255]); // Give a color blue for the background, default is transparent. Give it as 3 times 0-255 values for red, green and blue.
$barcodeData = $barcode->getBarcode($this->pedido()->presupuesto()->id);
return ($renderer->render($barcodeData, 200, 50));
}
public function files(): array
{
$m = model(OrdenTrabajoFileModel::class);

0
ci4/app/Entities/Produccion/OrdenTrabajoFileEntity.php Normal file → Executable file
View File

View File

View File

0
ci4/app/Entities/Produccion/OrdenTrabajoUserEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Sistema/ActivityEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Sistema/SettingsEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Soporte/TicketEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Soporte/TicketRespuestaEntity.php Normal file → Executable file
View File

View File

View File

View File

View File

View File

View File

View File

View File

0
ci4/app/Entities/Usuarios/GroupEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Usuarios/GroupsUsersEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Usuarios/PermisosEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Wiki/WikiContentEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Wiki/WikiFileEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Wiki/WikiPageEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Wiki/WikiSectionEntity.php Normal file → Executable file
View File

0
ci4/app/Entities/Wiki/WikiSectionRoleEntity.php Normal file → Executable file
View File