"
+ )
+ ->toJson(true);
}
- protected function getOrientacionOptions()
- {
- $orientacionOptions = [
- '' => lang('Basic.global.pleaseSelect'),
- 'H' => 'H',
- 'V' => 'V',
- ];
- return $orientacionOptions;
- }
public function selectImposicion()
{
$data = $this->model->querySelect($this->request->getGet('q'));
return $this->response->setJSON($data);
}
+ public function selectImposicionEsquema()
+ {
+ $data = $this->imposicionEsquemaModel->querySelect($this->request->getGet('q'));
+ return $this->response->setJSON($data);
+ }
+ public function find_imposicion(int $imposicion_id)
+ {
+ $imposicionEntity = $this->model->find($imposicion_id)->withImposicionEsquema();
+ return $this->response->setJSON($imposicionEntity);
+ }
+ public function find_imposicion_esquema(int $imposicion_esquema_id)
+ {
+ $imposicionEsquemaEntity = $this->imposicionEsquemaModel->find($imposicion_esquema_id);
+ return $this->response->setJSON($imposicionEsquemaEntity);
+ }
+ public function create()
+ {
+ $bodyData = $this->request->getPost();
+ $createdId = $this->model->insert($bodyData);
+ if ($createdId) {
+ return $this->response->setJSON(["message" => lang("App.global_alert_save_success"), "status" => true]);
+ } else {
+ return $this->response->setJSON(["message" => lang("App.global_alert_save_error"), "errors" => $this->model->errors(), "status" => true])->setStatusCode(400);
+ }
+ }
+ public function create_imposicion_esquema()
+ {
+ $bodyData = $this->request->getPost();
+ $createdId = $this->imposicionEsquemaModel->insert($bodyData);
+ if ($createdId) {
+ return $this->response->setJSON(["message" => lang("App.global_alert_save_success"), "status" => true]);
+ } else {
+ return $this->response->setJSON(["message" => lang("App.global_alert_save_error"), "errors" => $this->imposicionEsquemaModel->errors(), "status" => true])->setStatusCode(400);
+ }
+ }
}
diff --git a/ci4/app/Controllers/Configuracion/MaquinaTarea.php b/ci4/app/Controllers/Configuracion/MaquinaTarea.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Configuracion/SeriesFacturas.php b/ci4/app/Controllers/Configuracion/SeriesFacturas.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Configuracion/Ubicaciones.php b/ci4/app/Controllers/Configuracion/Ubicaciones.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Excel/PrintGiros.php b/ci4/app/Controllers/Excel/PrintGiros.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Excel/PrintLineas.php b/ci4/app/Controllers/Excel/PrintLineas.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Facturacion/FacturasLineas.php b/ci4/app/Controllers/Facturacion/FacturasLineas.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Facturacion/FacturasPagos.php b/ci4/app/Controllers/Facturacion/FacturasPagos.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Logistica/LogisticaController.php b/ci4/app/Controllers/Logistica/LogisticaController.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Mensajeria/MensajesDirectos.php b/ci4/app/Controllers/Mensajeria/MensajesDirectos.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Pdf/PrintAlbaranes.php b/ci4/app/Controllers/Pdf/PrintAlbaranes.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Pdf/PrintFacturas.php b/ci4/app/Controllers/Pdf/PrintFacturas.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Pedidos/Albaran.php b/ci4/app/Controllers/Pedidos/Albaran.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Presupuestos/Buscador.php b/ci4/app/Controllers/Presupuestos/Buscador.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Presupuestos/Importadorpresupuestos.php b/ci4/app/Controllers/Presupuestos/Importadorpresupuestos.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Presupuestos/Presupuestoadmin.php b/ci4/app/Controllers/Presupuestos/Presupuestoadmin.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Presupuestos/Presupuestotiradasalternativas.php b/ci4/app/Controllers/Presupuestos/Presupuestotiradasalternativas.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Produccion/Ordentrabajo.php b/ci4/app/Controllers/Produccion/Ordentrabajo.php
index 41bd2391..31ff93fc 100755
--- a/ci4/app/Controllers/Produccion/Ordentrabajo.php
+++ b/ci4/app/Controllers/Produccion/Ordentrabajo.php
@@ -152,8 +152,13 @@ class Ordentrabajo extends BaseController
$this->viewData["presupuesto"] = $this->produccionService->getPresupuesto();
$this->viewData["cliente"] = $this->produccionService->getCliente();
$this->viewData["ot"] = $this->produccionService->getOrdenTrabajo();
+ $this->viewData["is_finalizada"] = $this->produccionService->getOrdenTrabajo()->estado == "F";
$this->viewData["user_dates"] = $this->produccionService->userDates();
$this->viewData["pedido_user_dates"] = $this->produccionService->pedidoUserDates();
+ $this->viewData["colors"] = $this->produccionService->getPdfColors();
+ $this->viewData["tiempo_estimado"] = $this->produccionService->getTiempoProcesamientoHHMM();
+ $this->viewData["flags"] = $this->produccionService->getFlags();
+
return view(static::$viewPath . $this->editRoute, $this->viewData);
}
@@ -168,7 +173,7 @@ class Ordentrabajo extends BaseController
->add("logo", fn($q) => ["logo" => site_url($logo->get_logo_path($q->presupuesto_linea_tipo)), "imposicion" => $q->imposicion_name,"color" => $this->produccionService->init($q->id)->getOtColorStatus()])
->edit(
"fecha_encuadernado_at",
- fn($q) => $q->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d", $q->fecha_encuadernado_at)->format("d/m/Y") : ""
+ fn($q) => $q->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d H:i:s", $q->fecha_encuadernado_at)->format("d/m/Y") : ""
)
->add("action", fn($q) => $q->id)
->toJson(true);
@@ -183,7 +188,7 @@ class Ordentrabajo extends BaseController
->add("logo", fn($q) => ["logo" => site_url($logo->get_logo_path($q->presupuesto_linea_tipo)), "imposicion" => $q->imposicion_name,"color" => $this->produccionService->init($q->id)->getOtColorStatus()])
->edit(
"fecha_encuadernado_at",
- fn($q) => $q->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d", $q->fecha_encuadernado_at)->format("d/m/Y") : ""
+ fn($q) => $q->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d H:i:s", $q->fecha_encuadernado_at)->format("d/m/Y") : ""
)
->add("action", fn($q) => $q->id)
->toJson(true);
@@ -198,7 +203,7 @@ class Ordentrabajo extends BaseController
->add("logo", fn($q) => ["logo" => site_url($logo->get_logo_path($q->presupuesto_linea_tipo)), "imposicion" => $q->imposicion_name,"color" => $this->produccionService->init($q->id)->getOtColorStatus()])
->edit(
"fecha_encuadernado_at",
- fn($q) => $q->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d", $q->fecha_encuadernado_at)->format("d/m/Y") : ""
+ fn($q) => $q->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d H:i:s", $q->fecha_encuadernado_at)->format("d/m/Y") : ""
)
->add("action", fn($q) => $q->id)
->toJson(true);
@@ -213,7 +218,7 @@ class Ordentrabajo extends BaseController
->add("logo", fn($q) => ["logo" => site_url($logo->get_logo_path($q->presupuesto_linea_tipo)), "imposicion" => $q->imposicion_name,"color" => $this->produccionService->init($q->id)->getOtColorStatus()])
->edit(
"fecha_encuadernado_at",
- fn($q) => $q->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d", $q->fecha_encuadernado_at)->format("d/m/Y") : ""
+ fn($q) => $q->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d H:i:s", $q->fecha_encuadernado_at)->format("d/m/Y") : ""
)
->add("action", fn($q) => $q->id)
->toJson(true);
@@ -438,4 +443,16 @@ class Ordentrabajo extends BaseController
$color = $this->produccionService->init($orden_trabajo_id)->getOtColorStatus();
return $this->response->setJSON(["color" => $color]);
}
+ public function imprimir_codigo_safekat(int $orden_trabajo_id)
+ {
+ helper('file');
+ $barcode = $this->produccionService->init($orden_trabajo_id)->getFileBarCode();
+ return $this->response
+ ->setHeader('Content-Type', 'image/png')
+ ->setHeader('Content-Disposition', "attachment; filename=CodigoBarrasOT_{$orden_trabajo_id}.png")
+ ->setBody($barcode);
+ }
+ public function maquinista_maquinas_view(){}
+ public function maquinista_colas_view(){}
+
}
diff --git a/ci4/app/Controllers/Sistema/Actividad.php b/ci4/app/Controllers/Sistema/Actividad.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Sistema/AuthAPIController.php b/ci4/app/Controllers/Sistema/AuthAPIController.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Sistema/Intranet.php b/ci4/app/Controllers/Sistema/Intranet.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Soporte/Ticketcontroller.php b/ci4/app/Controllers/Soporte/Ticketcontroller.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Tarifas/Acabados/ServiciosAcabado.php b/ci4/app/Controllers/Tarifas/Acabados/ServiciosAcabado.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Tarifas/Acabados/TarifaAcabados.php b/ci4/app/Controllers/Tarifas/Acabados/TarifaAcabados.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Tarifas/Acabados/TarifaAcabadosLineas.php b/ci4/app/Controllers/Tarifas/Acabados/TarifaAcabadosLineas.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Tarifas/Maquinas/TarifaMaquinas.php b/ci4/app/Controllers/Tarifas/Maquinas/TarifaMaquinas.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Utiles.php b/ci4/app/Controllers/Utiles.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Controllers/Wiki/WikiController.php b/ci4/app/Controllers/Wiki/WikiController.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-04-09-173000_RemovePrecioUnidadFacturas.php b/ci4/app/Database/Migrations/2024-04-09-173000_RemovePrecioUnidadFacturas.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-09-17-151435_ChatDepartments.php b/ci4/app/Database/Migrations/2024-09-17-151435_ChatDepartments.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-09-17-151440_ChatsTable.php b/ci4/app/Database/Migrations/2024-09-17-151440_ChatsTable.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-09-17-151450_ChatMessages.php b/ci4/app/Database/Migrations/2024-09-17-151450_ChatMessages.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-09-17-151500_ChatDepartmentUsers.php b/ci4/app/Database/Migrations/2024-09-17-151500_ChatDepartmentUsers.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-10-02-090620_ConfigVariablesApp.php b/ci4/app/Database/Migrations/2024-10-02-090620_ConfigVariablesApp.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-10-12-151500_ChatUsers.php b/ci4/app/Database/Migrations/2024-10-12-151500_ChatUsers.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-10-13-185128_AlterChatTableAddTitleColumn.php b/ci4/app/Database/Migrations/2024-10-13-185128_AlterChatTableAddTitleColumn.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-10-13-200759_ChatNotifications.php b/ci4/app/Database/Migrations/2024-10-13-200759_ChatNotifications.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-11-13-161331_CheckWebClientesPapeles.php b/ci4/app/Database/Migrations/2024-11-13-161331_CheckWebClientesPapeles.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-11-17-194547_ModifyNullableComercialSoporte.php b/ci4/app/Database/Migrations/2024-11-17-194547_ModifyNullableComercialSoporte.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-11-19-185529_TicksPapeles.php b/ci4/app/Database/Migrations/2024-11-19-185529_TicksPapeles.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-11-20-162124_CambiarTicksPapelImpresion.php b/ci4/app/Database/Migrations/2024-11-20-162124_CambiarTicksPapelImpresion.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-11-25-173558_AddTickInteriorPapelImpresion.php b/ci4/app/Database/Migrations/2024-11-25-173558_AddTickInteriorPapelImpresion.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-11-27-105608_AddTickTapaDuraPapelImp.php b/ci4/app/Database/Migrations/2024-11-27-105608_AddTickTapaDuraPapelImp.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-11-30-160000_TareasServicioTable.php b/ci4/app/Database/Migrations/2024-11-30-160000_TareasServicioTable.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-11-30-170000_OrdenTrabajoTable.php b/ci4/app/Database/Migrations/2024-11-30-170000_OrdenTrabajoTable.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-11-30-170001_OrdenTrabajoTareasTable.php b/ci4/app/Database/Migrations/2024-11-30-170001_OrdenTrabajoTareasTable.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-11-30-170002_OrdenTrabajoDatesTable.php b/ci4/app/Database/Migrations/2024-11-30-170002_OrdenTrabajoDatesTable.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-11-30-170002_OrdenTrabajoUsersTable.php b/ci4/app/Database/Migrations/2024-11-30-170002_OrdenTrabajoUsersTable.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-11-30-170006_OrdenTrabajoMaquetacionesTable.php b/ci4/app/Database/Migrations/2024-11-30-170006_OrdenTrabajoMaquetacionesTable.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-11-30-171007_OrdenTrabajoMaquetacionMovimientosTable.php b/ci4/app/Database/Migrations/2024-11-30-171007_OrdenTrabajoMaquetacionMovimientosTable.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-12-08-195700_AlterColumnServiciosCliente.php b/ci4/app/Database/Migrations/2024-12-08-195700_AlterColumnServiciosCliente.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-12-14-121014_RemoveEstampadoBarnizado.php b/ci4/app/Database/Migrations/2024-12-14-121014_RemoveEstampadoBarnizado.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-12-16-180000_MaquinaTareasTable.php b/ci4/app/Database/Migrations/2024-12-16-180000_MaquinaTareasTable.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-12-16-183531_TarifaAcabadoMaquinaTable.php b/ci4/app/Database/Migrations/2024-12-16-183531_TarifaAcabadoMaquinaTable.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-12-16-183550_TarifaManipuladoMaquinaTable.php b/ci4/app/Database/Migrations/2024-12-16-183550_TarifaManipuladoMaquinaTable.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-12-16-183607_TarifaPreimpresionMaquinaTable.php b/ci4/app/Database/Migrations/2024-12-16-183607_TarifaPreimpresionMaquinaTable.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-12-16-183619_TarifaEncuadernacionMaquinaTable.php b/ci4/app/Database/Migrations/2024-12-16-183619_TarifaEncuadernacionMaquinaTable.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2024-12-17-183619_TarifaExtraMaquinaTable.php b/ci4/app/Database/Migrations/2024-12-17-183619_TarifaExtraMaquinaTable.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-02-14-114500_create_tickets_system.php b/ci4/app/Database/Migrations/2025-02-14-114500_create_tickets_system.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-02-16-194726_AlterTableTarifasCheckPresupuestoClienteMigration.php b/ci4/app/Database/Migrations/2025-02-16-194726_AlterTableTarifasCheckPresupuestoClienteMigration.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-02-16-224244_AlterAddColumnActivoPapelGenerico.php b/ci4/app/Database/Migrations/2025-02-16-224244_AlterAddColumnActivoPapelGenerico.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-02-20-080000_AlterTableTarifasExtraPreimpresionCheckPresupuestoClienteMigration.php b/ci4/app/Database/Migrations/2025-02-20-080000_AlterTableTarifasExtraPreimpresionCheckPresupuestoClienteMigration.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-02-22-074400_WikiSectionsMigration.php b/ci4/app/Database/Migrations/2025-02-22-074400_WikiSectionsMigration.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-02-22-080000_WikiPagesMigration.php b/ci4/app/Database/Migrations/2025-02-22-080000_WikiPagesMigration.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-02-22-080100_WikiContentsMigration.php b/ci4/app/Database/Migrations/2025-02-22-080100_WikiContentsMigration.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-02-22-080200_WikiFilesMigration.php b/ci4/app/Database/Migrations/2025-02-22-080200_WikiFilesMigration.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-02-24-093400_serviciosAcabado.php b/ci4/app/Database/Migrations/2025-02-24-093400_serviciosAcabado.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-03-02-080000_WikiSectionRolesMigration.php b/ci4/app/Database/Migrations/2025-03-02-080000_WikiSectionRolesMigration.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-03-02-120000_WikiSectionNameMigration.php b/ci4/app/Database/Migrations/2025-03-02-120000_WikiSectionNameMigration.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-03-17-080000_AddForeignChatDepartmentUsers.php b/ci4/app/Database/Migrations/2025-03-17-080000_AddForeignChatDepartmentUsers.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-03-26-210001_AlterOrdenTrabajoUsers.php b/ci4/app/Database/Migrations/2025-03-26-210001_AlterOrdenTrabajoUsers.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-03-26-210002_AlterOrdenTrabajoDates.php b/ci4/app/Database/Migrations/2025-03-26-210002_AlterOrdenTrabajoDates.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-03-31-080000_AddColumnIsCorteOrdenTrabajoTarea.php b/ci4/app/Database/Migrations/2025-03-31-080000_AddColumnIsCorteOrdenTrabajoTarea.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-03-31-204200_AlterForeignKeysOrdenTrabajoTareas.php b/ci4/app/Database/Migrations/2025-03-31-204200_AlterForeignKeysOrdenTrabajoTareas.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-04-02-074000_ImpresoraEtiquetasTable.php b/ci4/app/Database/Migrations/2025-04-02-074000_ImpresoraEtiquetasTable.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-04-03-233800_OrdenTrabajoFilesTable.php b/ci4/app/Database/Migrations/2025-04-03-233800_OrdenTrabajoFilesTable.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-04-04-212900_AddColumnIsPedidoEsperaOrdenTrabajoTable.php b/ci4/app/Database/Migrations/2025-04-04-212900_AddColumnIsPedidoEsperaOrdenTrabajoTable.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-04-11-040000_DropIsDeletedField.php b/ci4/app/Database/Migrations/2025-04-11-040000_DropIsDeletedField.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-04-11-180001_AddUserIdFechaEntregaPedido.php b/ci4/app/Database/Migrations/2025-04-11-180001_AddUserIdFechaEntregaPedido.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-04-12-130000_AddCantidadConceptoPedidoLinea.php b/ci4/app/Database/Migrations/2025-04-12-130000_AddCantidadConceptoPedidoLinea.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-04-14-204500_UpdateDateFieldsOrdenTrabajoDates.php b/ci4/app/Database/Migrations/2025-04-14-204500_UpdateDateFieldsOrdenTrabajoDates.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-04-14-235200_AddFkOrdenTrabajoChatDepartment.php b/ci4/app/Database/Migrations/2025-04-14-235200_AddFkOrdenTrabajoChatDepartment.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Migrations/2025-04-16-153000_AddEspiralOrdenTrabajoDates.php b/ci4/app/Database/Migrations/2025-04-16-153000_AddEspiralOrdenTrabajoDates.php
new file mode 100755
index 00000000..bdf79a02
--- /dev/null
+++ b/ci4/app/Database/Migrations/2025-04-16-153000_AddEspiralOrdenTrabajoDates.php
@@ -0,0 +1,41 @@
+ [
+ "type" => "DATE",
+ "null" => true,
+ ],
+ ];
+ protected array $USERS = [
+ "espiral_user_id" => [
+ "type" => "INT",
+ "unsigned" => true,
+ "constraint" => 10,
+ "null" => true,
+ ],
+ ];
+
+ public function up()
+ {
+ $this->forge->addColumn("orden_trabajo_dates", $this->DATES);
+ $this->forge->addColumn("orden_trabajo_users", $this->USERS);
+ foreach ($this->USERS as $key => $value) {
+ $this->forge->addForeignKey([$key],"users",["id"]);
+ }
+ }
+
+ public function down()
+ {
+ $this->forge->dropColumn("orden_trabajo_dates", array_keys($this->DATES));
+ $this->forge->dropColumn("orden_trabajo_users", array_keys($this->USERS));
+
+
+ }
+}
diff --git a/ci4/app/Database/Migrations/2025-04-18-210000_AddTableImposicionEsquemas.php b/ci4/app/Database/Migrations/2025-04-18-210000_AddTableImposicionEsquemas.php
new file mode 100755
index 00000000..bb738594
--- /dev/null
+++ b/ci4/app/Database/Migrations/2025-04-18-210000_AddTableImposicionEsquemas.php
@@ -0,0 +1,79 @@
+ [
+ "type" => "INT",
+ "unsigned" => true,
+ "auto_increment" => true
+ ],
+ "name" => [
+ "type" => "VARCHAR",
+ "constraint" => 255,
+ ],
+ "rows" => [
+ "type" => "INT",
+ "unsigned" => true,
+ "default" => 0,
+ ],
+ "columns" => [
+ "type" => "INT",
+ "unsigned" => true,
+ "default" => 0,
+ ],
+ "orientacion" => [
+ "type" => "ENUM",
+ "constraint" => ["H","V"],
+ "default" => "H",
+ ],
+ "rotativa" => [
+ "type" => "BOOLEAN",
+ "default" => false,
+ ],
+ "cosido" => [
+ "type" => "BOOLEAN",
+ "default" => false,
+ ],
+ "svg_schema" => [
+ "type" => "LONGTEXT",
+ "null" => true
+ ],
+ ];
+
+ public function up()
+ {
+
+ $this->forge->addField($this->COLUMNS);
+ $currenttime = new RawSql("CURRENT_TIMESTAMP");
+ $this->forge->addField([
+ "created_at" => [
+ "type" => "TIMESTAMP",
+ "default" => $currenttime,
+
+ ],
+ "updated_at" => [
+ "type" => "TIMESTAMP",
+ "null" => true,
+
+ ],
+ "deleted_at" => [
+ "type" => "TIMESTAMP",
+ "null" => true,
+ ],
+ ]);
+ $this->forge->addPrimaryKey("id");
+ $this->forge->createTable("imposicion_esquemas");
+ }
+
+ public function down()
+ {
+ $this->forge->dropTable("imposicion_esquemas",true);
+
+ }
+}
diff --git a/ci4/app/Database/Migrations/2025-04-18-213000_AddFkEsquemaImposiciones.php b/ci4/app/Database/Migrations/2025-04-18-213000_AddFkEsquemaImposiciones.php
new file mode 100755
index 00000000..fd0fe949
--- /dev/null
+++ b/ci4/app/Database/Migrations/2025-04-18-213000_AddFkEsquemaImposiciones.php
@@ -0,0 +1,31 @@
+forge->addColumn("lg_imposiciones", [
+ "imposicion_esquema_id" => [
+ "type" => "INT",
+ "unsigned" => true,
+ "null" => true
+ ]
+ ]);
+ $this->forge->addForeignKey(["imposicion_esquema_id"],"imposicion_esquemas",["id"],'SET NULL','SET NULL');
+ $this->forge->processIndexes("lg_imposiciones");
+ }
+
+ public function down()
+ {
+ $this->forge->dropForeignKey("lg_imposiciones","lg_imposiciones_imposicion_esquema_id_foreign");
+ $this->forge->dropColumn("lg_imposiciones","imposicion_esquema_id");
+
+ }
+}
diff --git a/ci4/app/Database/Seeds/ChatSeeder.php b/ci4/app/Database/Seeds/ChatSeeder.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Seeds/DefaultConfigVariablesSeeder.php b/ci4/app/Database/Seeds/DefaultConfigVariablesSeeder.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Seeds/EtiquetaImpresoraSeeder.php b/ci4/app/Database/Seeds/EtiquetaImpresoraSeeder.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Seeds/MaquinaTareaSeeder.php b/ci4/app/Database/Seeds/MaquinaTareaSeeder.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Seeds/MessageSeeder.php b/ci4/app/Database/Seeds/MessageSeeder.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Seeds/TicketsSeeder.php b/ci4/app/Database/Seeds/TicketsSeeder.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Database/Seeds/WikiSectionSeeder.php b/ci4/app/Database/Seeds/WikiSectionSeeder.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Chat/ChatDepartmentEntity.php b/ci4/app/Entities/Chat/ChatDepartmentEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Chat/ChatDepartmentUserEntity.php b/ci4/app/Entities/Chat/ChatDepartmentUserEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Chat/ChatEntity.php b/ci4/app/Entities/Chat/ChatEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Chat/ChatMessageEntity.php b/ci4/app/Entities/Chat/ChatMessageEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Chat/ChatNotificationEntity.php b/ci4/app/Entities/Chat/ChatNotificationEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Chat/ChatUserEntity.php b/ci4/app/Entities/Chat/ChatUserEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Configuracion/Imposicion.php b/ci4/app/Entities/Configuracion/Imposicion.php
index fcb0ddaa..9f6640db 100755
--- a/ci4/app/Entities/Configuracion/Imposicion.php
+++ b/ci4/app/Entities/Configuracion/Imposicion.php
@@ -1,6 +1,8 @@
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;
}
}
diff --git a/ci4/app/Entities/Configuracion/ImposicionEsquemaEntity.php b/ci4/app/Entities/Configuracion/ImposicionEsquemaEntity.php
new file mode 100755
index 00000000..30723491
--- /dev/null
+++ b/ci4/app/Entities/Configuracion/ImposicionEsquemaEntity.php
@@ -0,0 +1,26 @@
+ 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",
+ ];
+}
diff --git a/ci4/app/Entities/Configuracion/ImpresoraEtiquetaEntity.php b/ci4/app/Entities/Configuracion/ImpresoraEtiquetaEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Configuracion/SeriesFacturasEntity.php b/ci4/app/Entities/Configuracion/SeriesFacturasEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Configuracion/ServicioClienteEntity.php b/ci4/app/Entities/Configuracion/ServicioClienteEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Configuracion/UbicacionesEntity.php b/ci4/app/Entities/Configuracion/UbicacionesEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Facturas/FacturaEntity.php b/ci4/app/Entities/Facturas/FacturaEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Facturas/FacturaLineaEntity.php b/ci4/app/Entities/Facturas/FacturaLineaEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Facturas/FacturaPagoEntity.php b/ci4/app/Entities/Facturas/FacturaPagoEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Mensajeria/ConversacionEntity.php b/ci4/app/Entities/Mensajeria/ConversacionEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Mensajeria/ParticipanteEntity.php b/ci4/app/Entities/Mensajeria/ParticipanteEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Pedidos/AlbaranEntity.php b/ci4/app/Entities/Pedidos/AlbaranEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Pedidos/AlbaranLineaEntity.php b/ci4/app/Entities/Pedidos/AlbaranLineaEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Pedidos/PedidoEntity.php b/ci4/app/Entities/Pedidos/PedidoEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Pedidos/PedidoLineaEntity.php b/ci4/app/Entities/Pedidos/PedidoLineaEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Presupuestos/PresupuestoAcabadosEntity.php b/ci4/app/Entities/Presupuestos/PresupuestoAcabadosEntity.php
index 0709ccb9..c0ab643e 100755
--- a/ci4/app/Entities/Presupuestos/PresupuestoAcabadosEntity.php
+++ b/ci4/app/Entities/Presupuestos/PresupuestoAcabadosEntity.php
@@ -54,4 +54,5 @@ class PresupuestoAcabadosEntity extends \CodeIgniter\Entity\Entity
$m = model(TarifaAcabadoModel::class);
return $m->find($this->attributes["tarifa_acabado_id"]);
}
+
}
diff --git a/ci4/app/Entities/Presupuestos/PresupuestoEntity.php b/ci4/app/Entities/Presupuestos/PresupuestoEntity.php
index 9fc90892..8d776bc7 100755
--- a/ci4/app/Entities/Presupuestos/PresupuestoEntity.php
+++ b/ci4/app/Entities/Presupuestos/PresupuestoEntity.php
@@ -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,4 +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;
+
+ }
+
}
diff --git a/ci4/app/Entities/Presupuestos/PresupuestoFicheroEntity.php b/ci4/app/Entities/Presupuestos/PresupuestoFicheroEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Presupuestos/PresupuestoManipuladosEntity.php b/ci4/app/Entities/Presupuestos/PresupuestoManipuladosEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Produccion/OrdenTrabajoDateEntity.php b/ci4/app/Entities/Produccion/OrdenTrabajoDateEntity.php
old mode 100644
new mode 100755
index e106c57c..19ad97ab
--- a/ci4/app/Entities/Produccion/OrdenTrabajoDateEntity.php
+++ b/ci4/app/Entities/Produccion/OrdenTrabajoDateEntity.php
@@ -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,
diff --git a/ci4/app/Entities/Produccion/OrdenTrabajoEntity.php b/ci4/app/Entities/Produccion/OrdenTrabajoEntity.php
old mode 100644
new mode 100755
index 3ac4e474..55bcfc5b
--- a/ci4/app/Entities/Produccion/OrdenTrabajoEntity.php
+++ b/ci4/app/Entities/Produccion/OrdenTrabajoEntity.php
@@ -74,6 +74,11 @@ class OrdenTrabajoEntity extends Entity
$m = model(OrdenTrabajoTarea::class);
return $m->where("orden_trabajo_id", $this->attributes["id"])->findAll();
}
+ public function tareas_impresion(): array
+ {
+ $m = model(OrdenTrabajoTarea::class);
+ return $m->where("orden_trabajo_id", $this->attributes["id"])->where("presupuesto_linea_id IS NOT NULL", NULL, FALSE)->findAll() ?? [];
+ }
/**
* Devuelve el pedido de la orden de trabajo
*
@@ -116,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);
@@ -139,13 +152,25 @@ class OrdenTrabajoEntity extends Entity
helper('filesystem');
$path = WRITEPATH . 'uploads/' . $this->attributes["portada_path"];
$portada_path = null;
- if ($path) {
- if (file_exists($path)) {
- $portada_path = $path;
- } else {
- $portada_path = null;
+ if ($this->attributes["portada_path"]) {
+ if ($path) {
+ if (file_exists($path)) {
+ $portada_path = $path;
+ } else {
+ $portada_path = null;
+ }
}
}
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"]];
+ }
}
diff --git a/ci4/app/Entities/Produccion/OrdenTrabajoFileEntity.php b/ci4/app/Entities/Produccion/OrdenTrabajoFileEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Produccion/OrdenTrabajoMaquetacionEntity.php b/ci4/app/Entities/Produccion/OrdenTrabajoMaquetacionEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Produccion/OrdenTrabajoMaquetacionMovimientoEntity.php b/ci4/app/Entities/Produccion/OrdenTrabajoMaquetacionMovimientoEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Produccion/OrdenTrabajoTareaEntity.php b/ci4/app/Entities/Produccion/OrdenTrabajoTareaEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Produccion/OrdenTrabajoUserEntity.php b/ci4/app/Entities/Produccion/OrdenTrabajoUserEntity.php
old mode 100644
new mode 100755
index 57356b8b..0a95037a
--- a/ci4/app/Entities/Produccion/OrdenTrabajoUserEntity.php
+++ b/ci4/app/Entities/Produccion/OrdenTrabajoUserEntity.php
@@ -32,6 +32,8 @@ class OrdenTrabajoUserEntity extends Entity
"retractilado5_user_id" => null,
"prototipo_user_id" => null,
"marcapaginas_user_id" => null,
+ "espiral_user_id" => null,
+
//FERRO
"pendiente_ferro_user_id" => null,
"ferro_en_cliente_user_id" => null,
diff --git a/ci4/app/Entities/Sistema/ActivityEntity.php b/ci4/app/Entities/Sistema/ActivityEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Sistema/SettingsEntity.php b/ci4/app/Entities/Sistema/SettingsEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Soporte/TicketEntity.php b/ci4/app/Entities/Soporte/TicketEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Soporte/TicketRespuestaEntity.php b/ci4/app/Entities/Soporte/TicketRespuestaEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Tarifas/Acabados/ServicioAcabadoEntity.php b/ci4/app/Entities/Tarifas/Acabados/ServicioAcabadoEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Tarifas/Acabados/TarifaAcabadoEntity.php b/ci4/app/Entities/Tarifas/Acabados/TarifaAcabadoEntity.php
old mode 100644
new mode 100755
index 818d42e1..cb96db44
--- a/ci4/app/Entities/Tarifas/Acabados/TarifaAcabadoEntity.php
+++ b/ci4/app/Entities/Tarifas/Acabados/TarifaAcabadoEntity.php
@@ -45,4 +45,9 @@ class TarifaAcabadoEntity extends \CodeIgniter\Entity\Entity
$ta_maquinas = $m->where('tarifa_acabado_id',$this->attributes['id'])->findAll();
return array_map(fn(TarifaAcabadoMaquinaEntity $ta_maquina) => $ta_maquina->maquina(),$ta_maquinas);
}
+
+ public function isUVI(): bool
+ {
+ return in_array($this->attributes["code"],["R3D","R2D"]);
+ }
}
diff --git a/ci4/app/Entities/Tarifas/Acabados/TarifaAcabadoLineaEntity.php b/ci4/app/Entities/Tarifas/Acabados/TarifaAcabadoLineaEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Tarifas/Acabados/TarifasAcabadosServicioAcabadoEntity.php b/ci4/app/Entities/Tarifas/Acabados/TarifasAcabadosServicioAcabadoEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Tarifas/Maquinas/TareaMaquinaEntity.php b/ci4/app/Entities/Tarifas/Maquinas/TareaMaquinaEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Tarifas/Maquinas/TarifaAcabadoMaquinaEntity.php b/ci4/app/Entities/Tarifas/Maquinas/TarifaAcabadoMaquinaEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Tarifas/Maquinas/TarifaEncuadernacionMaquinaEntity.php b/ci4/app/Entities/Tarifas/Maquinas/TarifaEncuadernacionMaquinaEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Tarifas/Maquinas/TarifaExtraMaquinaEntity.php b/ci4/app/Entities/Tarifas/Maquinas/TarifaExtraMaquinaEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Tarifas/Maquinas/TarifaManipuladoMaquinaEntity.php b/ci4/app/Entities/Tarifas/Maquinas/TarifaManipuladoMaquinaEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Tarifas/Maquinas/TarifaPreimpresionMaquinaEntity.php b/ci4/app/Entities/Tarifas/Maquinas/TarifaPreimpresionMaquinaEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Usuarios/GroupEntity.php b/ci4/app/Entities/Usuarios/GroupEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Usuarios/GroupsUsersEntity.php b/ci4/app/Entities/Usuarios/GroupsUsersEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Usuarios/PermisosEntity.php b/ci4/app/Entities/Usuarios/PermisosEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Wiki/WikiContentEntity.php b/ci4/app/Entities/Wiki/WikiContentEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Wiki/WikiFileEntity.php b/ci4/app/Entities/Wiki/WikiFileEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Wiki/WikiPageEntity.php b/ci4/app/Entities/Wiki/WikiPageEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Wiki/WikiSectionEntity.php b/ci4/app/Entities/Wiki/WikiSectionEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Entities/Wiki/WikiSectionRoleEntity.php b/ci4/app/Entities/Wiki/WikiSectionRoleEntity.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Filters/Cors.php b/ci4/app/Filters/Cors.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Helpers/general_helper.php b/ci4/app/Helpers/general_helper.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Helpers/logger_helper.php b/ci4/app/Helpers/logger_helper.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Helpers/rbac_helper.php b/ci4/app/Helpers/rbac_helper.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Helpers/time_helper.php b/ci4/app/Helpers/time_helper.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Language/en/Auth.php b/ci4/app/Language/en/Auth.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Language/en/Chat.php b/ci4/app/Language/en/Chat.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Language/en/Facturas.php b/ci4/app/Language/en/Facturas.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Language/en/FormasPago.php b/ci4/app/Language/en/FormasPago.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Language/en/Imposiciones.php b/ci4/app/Language/en/Imposiciones.php
new file mode 100755
index 00000000..5d47a904
--- /dev/null
+++ b/ci4/app/Language/en/Imposiciones.php
@@ -0,0 +1,7 @@
+ "Mis tickets",
"me" => "Yo",
+ "menu_maquinista" => "Maquinista",
+ "menu_maquinista_maquinas" => "Máquinas",
+ "menu_maquinista_colas" => "Colas",
+ "menu_maquinista_mantenimiento" => "Mantenimiento",
+
];
\ No newline at end of file
diff --git a/ci4/app/Language/es/Auth.php b/ci4/app/Language/es/Auth.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Language/es/Chat.php b/ci4/app/Language/es/Chat.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Language/es/ConfigVariables.php b/ci4/app/Language/es/ConfigVariables.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Language/es/ErrorPresupuesto.php b/ci4/app/Language/es/ErrorPresupuesto.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Language/es/Facturas.php b/ci4/app/Language/es/Facturas.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Language/es/Imposiciones.php b/ci4/app/Language/es/Imposiciones.php
new file mode 100755
index 00000000..a65e8f17
--- /dev/null
+++ b/ci4/app/Language/es/Imposiciones.php
@@ -0,0 +1,38 @@
+ "Lista imposiciones",
+ "id" => "id",
+ "ancho" => "Ancho",
+ "alto" => "Alto",
+ "unidades" => "Unidades",
+ "orientacion" => "Orientación",
+ "maquina" => "Máquina",
+ "etiqueta" => "Etiqueta",
+ "imposicion" => "Imposición",
+ "btnNewImposicion" => "Nueva imposición",
+ "btnNewImposicionEsquema" => "Nuevo esquema",
+ "H" => "Horizontal",
+ "V" => "Vertical",
+ "imposicion_esquemas" => "Esquemas",
+ "imposicion_esquema" => "Esquema",
+ "imposicion_esquema_drawing" => "Esquema imposicion dibujo",
+ "imposicion_esquema_link" => "Imposicion esquema link",
+
+ "validation" => [
+ "alto" => [
+ "required" => "Este campo es obligatorio",
+ ],
+ "ancho" => [
+ "required" => "Este campo es obligatorio",
+ ]
+ ],
+ "esquema" => [
+ "name" => "Nombre",
+ "rows" => "Filas",
+ "columns" => "Columnas",
+ "rotativa" => "Rotativa",
+ "cosido" => "Cosido/Grapado"
+ ]
+];
diff --git a/ci4/app/Language/es/Logistica.php b/ci4/app/Language/es/Logistica.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Language/es/MaquinaTarea.php b/ci4/app/Language/es/MaquinaTarea.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Language/es/Pedidos.php b/ci4/app/Language/es/Pedidos.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Language/es/Produccion.php b/ci4/app/Language/es/Produccion.php
old mode 100644
new mode 100755
index e5b622b0..cd8b95d3
--- a/ci4/app/Language/es/Produccion.php
+++ b/ci4/app/Language/es/Produccion.php
@@ -71,6 +71,7 @@ return [
"tiempo_consumido" => "Tiempo consumido",
"tiempo_estimado" => "Tiempo estimado",
"finalizar_orden" => "Finalizar orden",
+ "reactivar_orden" => "Reactivar",
"comments" => "Comentarios orden trabajo",
"preview_pdf" => "Previsualizar PDF",
"imprimir_codigo_safekat" => "Imprimir código SAFEKAT",
@@ -105,13 +106,22 @@ return [
"pre_codbarras" => "Revisión código barras",
"pre_imposicion" => "Revisión imposición",
-
+ "iniciada" => "Iniciada",
+ "finalizada" => "Finalizada",
+ "error" => "Error",
+ "pendiente_material" => "Pendiente material",
+ "empty" => "Vacio",
"errors" => [
"date_not_exist" => "Esta fecha no existe en el modelo",
"attr_not_exist" => "El atributo {0,string} no pertenece al modelo Pedido"
- ]
+ ],
+
+ "progress_preimpresion" => "Preimpresión",
+ "progress_logistica" => "Ferro/Logística",
+ "progress_impresion" => "Impresión",
+ "progress_manipulado" => "Manipulado/Acabado"
diff --git a/ci4/app/Language/es/RolesPermisos.php b/ci4/app/Language/es/RolesPermisos.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Language/es/SeriesFacturas.php b/ci4/app/Language/es/SeriesFacturas.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Language/es/Tickets.php b/ci4/app/Language/es/Tickets.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Language/es/Ubicaciones.php b/ci4/app/Language/es/Ubicaciones.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Language/es/Wiki.php b/ci4/app/Language/es/Wiki.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Libraries/SafekatFtpClient.php b/ci4/app/Libraries/SafekatFtpClient.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/BaseModel.php b/ci4/app/Models/BaseModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Chat/ChatDeparmentModel.php b/ci4/app/Models/Chat/ChatDeparmentModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Chat/ChatDeparmentUserModel.php b/ci4/app/Models/Chat/ChatDeparmentUserModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Chat/ChatMessageModel.php b/ci4/app/Models/Chat/ChatMessageModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Chat/ChatModel.php b/ci4/app/Models/Chat/ChatModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/ChatNotification.php b/ci4/app/Models/ChatNotification.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/ChatUser.php b/ci4/app/Models/ChatUser.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Clientes/ClienteUsuariosModel.php b/ci4/app/Models/Clientes/ClienteUsuariosModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/CollectionModel.php b/ci4/app/Models/CollectionModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Configuracion/ConfigVariableModel.php b/ci4/app/Models/Configuracion/ConfigVariableModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Configuracion/ImposicionEsquemaModel.php b/ci4/app/Models/Configuracion/ImposicionEsquemaModel.php
new file mode 100755
index 00000000..220ad4b5
--- /dev/null
+++ b/ci4/app/Models/Configuracion/ImposicionEsquemaModel.php
@@ -0,0 +1,123 @@
+ [
+ "label" => "Imposiciones.esquema.name",
+ "rules" => "required|alpha_numeric_punct",
+ ],
+ "rows" => [
+ "label" => "Imposiciones.esquema.rows",
+ "rules" => "required|integer"
+ ],
+ "columns" => [
+ "label" => "Imposiciones.esquema.columns",
+ "rules" => "required|integer"
+ ],
+ "orientacion" => [
+ "label" => "Imposiciones.esquema.orientacion",
+ "rules" => "required|in_list[V,H]"
+ ],
+
+ ];
+ protected $validationMessages = [
+ "name" => [
+ "required" => "Validation.required",
+ ],
+ "rows" => [
+ "required" => "Validation.required",
+ "integer" => "Validation.integer",
+ ],
+ "columns" => [
+ "required" => "Validation.required",
+ "integer" => "Validation.integer",
+ ],
+ "orientacion" => [
+ "required" => "Validation.required",
+ "in_list" => "Validation.in_liust",
+ ],
+ ];
+ protected $skipValidation = false;
+ protected $cleanValidationRules = true;
+
+ // Callbacks
+ protected $allowCallbacks = true;
+ protected $beforeInsert = [];
+ protected $afterInsert = [];
+ protected $beforeUpdate = [];
+ protected $afterUpdate = [];
+ protected $beforeFind = [];
+ protected $afterFind = [];
+ protected $beforeDelete = [];
+ protected $afterDelete = [];
+
+ public function querySelect(?string $q)
+ {
+ $query = $this->builder()->select([
+ "id",
+ "name",
+ "svg_schema as description"
+ ])->where('deleted_at', null);
+ if ($q) {
+ $query->orLike("name", $q);
+ }
+ return $query
+ ->orderBy('id', 'ASC')
+ ->get()->getResultArray();
+ }
+ public function queryDatatable()
+ {
+ return $this->builder()
+ ->select([
+ "id",
+ "name",
+ "svg_schema"
+
+ ])->where('deleted_at', null);
+ }
+ public static function datatable_buttons(int $id)
+ {
+ $btn = "";
+ if (auth()->user()->inGroup("admin")) {
+ $btn .= "";
+ $btn .= "";
+ }
+ return $btn;
+ }
+}
diff --git a/ci4/app/Models/Configuracion/ImposicionModel.php b/ci4/app/Models/Configuracion/ImposicionModel.php
index b21def73..9fb05470 100755
--- a/ci4/app/Models/Configuracion/ImposicionModel.php
+++ b/ci4/app/Models/Configuracion/ImposicionModel.php
@@ -2,7 +2,10 @@
namespace App\Models\Configuracion;
-class ImposicionModel extends \App\Models\BaseModel
+use App\Entities\Configuracion\Imposicion;
+use App\Models\BaseModel;
+
+class ImposicionModel extends BaseModel
{
protected $table = "lg_imposiciones";
@@ -23,8 +26,8 @@ class ImposicionModel extends \App\Models\BaseModel
7 => "t1.etiqueta",
];
- protected $allowedFields = ["ancho", "alto", "unidades", "orientacion", "maquina", "etiqueta"];
- protected $returnType = "App\Entities\Configuracion\Imposicion";
+ protected $allowedFields = ["ancho", "alto", "unidades", "orientacion", "maquina", "etiqueta","imposicion_esquema_id"];
+ protected $returnType = Imposicion::class;
public static $labelField = "ancho";
@@ -53,6 +56,10 @@ class ImposicionModel extends \App\Models\BaseModel
"label" => "Imposiciones.unidades",
"rules" => "integer|permit_empty",
],
+ "imposicion_esquema_id" => [
+ "label" => "Imposiciones.imposicion_esquema",
+ "rules" => "integer|permit_empty",
+ ],
];
protected $validationMessages = [
@@ -76,6 +83,9 @@ class ImposicionModel extends \App\Models\BaseModel
"unidades" => [
"integer" => "Imposiciones.validation.unidades.integer",
],
+ "imposicion_esquema_id" => [
+ "integer" => "Imposiciones.validation.unidades.integer",
+ ],
];
/**
@@ -129,4 +139,30 @@ class ImposicionModel extends \App\Models\BaseModel
->orderBy('id', 'ASC')
->get()->getResultArray();
}
+ public function queryDatatable()
+ {
+ return $this->builder()
+ ->select([
+ "lg_imposiciones.id",
+ "lg_imposiciones.ancho",
+ "lg_imposiciones.alto",
+ "lg_imposiciones.unidades",
+ "lg_imposiciones.maquina",
+ "lg_imposiciones.orientacion",
+ "lg_imposiciones.etiqueta",
+ "imposicion_esquemas.id as esquemaId",
+ "imposicion_esquemas.name as esquemaName"
+ ])
+ ->join("imposicion_esquemas","imposicion_esquemas.id = lg_imposiciones.imposicion_esquema_id","left")
+ ->where('lg_imposiciones.deleted_at', null);
+ }
+ public static function datatable_buttons(int $id)
+ {
+ $btn = "";
+ if(auth()->user()->inGroup("admin")){
+ $btn.="";
+ $btn.="";
+ }
+ return $btn;
+ }
}
diff --git a/ci4/app/Models/Configuracion/ImpresoraEtiquetaModel.php b/ci4/app/Models/Configuracion/ImpresoraEtiquetaModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Configuracion/MaquinaTareaModel.php b/ci4/app/Models/Configuracion/MaquinaTareaModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Configuracion/SeriesFacturasModel.php b/ci4/app/Models/Configuracion/SeriesFacturasModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Configuracion/ServicioClienteModel.php b/ci4/app/Models/Configuracion/ServicioClienteModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Configuracion/ServicioClienteTareaModel.php b/ci4/app/Models/Configuracion/ServicioClienteTareaModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Configuracion/UbicacionesModel.php b/ci4/app/Models/Configuracion/UbicacionesModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Facturas/FacturaLineaModel.php b/ci4/app/Models/Facturas/FacturaLineaModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Facturas/FacturaModel.php b/ci4/app/Models/Facturas/FacturaModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Facturas/FacturaPagoModel.php b/ci4/app/Models/Facturas/FacturaPagoModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Mensajeria/ConversacionModel.php b/ci4/app/Models/Mensajeria/ConversacionModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Mensajeria/ParticipanteModel.php b/ci4/app/Models/Mensajeria/ParticipanteModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/OrdenTrabajo/OrdenTrabajoDate.php b/ci4/app/Models/OrdenTrabajo/OrdenTrabajoDate.php
old mode 100644
new mode 100755
index 555f6415..51234724
--- a/ci4/app/Models/OrdenTrabajo/OrdenTrabajoDate.php
+++ b/ci4/app/Models/OrdenTrabajo/OrdenTrabajoDate.php
@@ -35,6 +35,7 @@ class OrdenTrabajoDate extends Model
"retractilado5_at",
"prototipo_at",
"marcapaginas_at",
+ "espiral_at",
//FERRO
"pendiente_ferro_at",
"ferro_en_cliente_at",
diff --git a/ci4/app/Models/OrdenTrabajo/OrdenTrabajoFileModel.php b/ci4/app/Models/OrdenTrabajo/OrdenTrabajoFileModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/OrdenTrabajo/OrdenTrabajoModel.php b/ci4/app/Models/OrdenTrabajo/OrdenTrabajoModel.php
old mode 100644
new mode 100755
index 2554d37f..440b4cad
--- a/ci4/app/Models/OrdenTrabajo/OrdenTrabajoModel.php
+++ b/ci4/app/Models/OrdenTrabajo/OrdenTrabajoModel.php
@@ -73,7 +73,7 @@ class OrdenTrabajoModel extends Model
->select([
"ordenes_trabajo.id",
"ordenes_trabajo.pedido_id",
- "orden_trabajo_dates.fecha_encuadernado_at",
+ "pedidos.fecha_encuadernado as fecha_encuadernado_at",
"clientes.nombre as cliente_nombre",
"presupuestos.titulo as presupuesto_titulo",
"ordenes_trabajo.estado",
diff --git a/ci4/app/Models/OrdenTrabajo/OrdenTrabajoTarea.php b/ci4/app/Models/OrdenTrabajo/OrdenTrabajoTarea.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/OrdenTrabajo/OrdenTrabajoUser.php b/ci4/app/Models/OrdenTrabajo/OrdenTrabajoUser.php
old mode 100644
new mode 100755
index df4d0541..443bbcd0
--- a/ci4/app/Models/OrdenTrabajo/OrdenTrabajoUser.php
+++ b/ci4/app/Models/OrdenTrabajo/OrdenTrabajoUser.php
@@ -36,6 +36,7 @@ class OrdenTrabajoUser extends Model
"retractilado5_user_id",
"prototipo_user_id",
"marcapaginas_user_id",
+ "espiral_user_id",
//FERRO
"pendiente_ferro_user_id",
"ferro_en_cliente_user_id",
diff --git a/ci4/app/Models/Pedidos/AlbaranLineaModel.php b/ci4/app/Models/Pedidos/AlbaranLineaModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Pedidos/AlbaranModel.php b/ci4/app/Models/Pedidos/AlbaranModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Pedidos/PedidoLineaModel.php b/ci4/app/Models/Pedidos/PedidoLineaModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Pedidos/PedidoModel.php b/ci4/app/Models/Pedidos/PedidoModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Presupuestos/BuscadorModel.php b/ci4/app/Models/Presupuestos/BuscadorModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Presupuestos/ErrorPresupuesto.php b/ci4/app/Models/Presupuestos/ErrorPresupuesto.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Presupuestos/ImportadorModel.php b/ci4/app/Models/Presupuestos/ImportadorModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Presupuestos/PresupuestoFicheroModel.php b/ci4/app/Models/Presupuestos/PresupuestoFicheroModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Sistema/ActivityModel.php b/ci4/app/Models/Sistema/ActivityModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Soporte/TicketModel.php b/ci4/app/Models/Soporte/TicketModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Soporte/TicketRespuestaModel.php b/ci4/app/Models/Soporte/TicketRespuestaModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Soporte/ticketFileModel.php b/ci4/app/Models/Soporte/ticketFileModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Tarifas/Acabados/ServicioAcabadoModel.php b/ci4/app/Models/Tarifas/Acabados/ServicioAcabadoModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Tarifas/Acabados/TarifaAcabadoLineaModel.php b/ci4/app/Models/Tarifas/Acabados/TarifaAcabadoLineaModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Tarifas/Acabados/TarifaAcabadoModel.php b/ci4/app/Models/Tarifas/Acabados/TarifaAcabadoModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Tarifas/Acabados/TarifasAcabadoServiciosAcabadoModel.php b/ci4/app/Models/Tarifas/Acabados/TarifasAcabadoServiciosAcabadoModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Tarifas/Maquinas/TarifaAcabadoMaquinaModel.php b/ci4/app/Models/Tarifas/Maquinas/TarifaAcabadoMaquinaModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Tarifas/Maquinas/TarifaEncuadernacionMaquinaModel.php b/ci4/app/Models/Tarifas/Maquinas/TarifaEncuadernacionMaquinaModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Tarifas/Maquinas/TarifaExtraMaquinaModel.php b/ci4/app/Models/Tarifas/Maquinas/TarifaExtraMaquinaModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Tarifas/Maquinas/TarifaManipuladoMaquinaModel.php b/ci4/app/Models/Tarifas/Maquinas/TarifaManipuladoMaquinaModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Tarifas/Maquinas/TarifaPreimpresionMaquinaModel.php b/ci4/app/Models/Tarifas/Maquinas/TarifaPreimpresionMaquinaModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Usuarios/GroupModel.php b/ci4/app/Models/Usuarios/GroupModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Usuarios/GroupsUsersModel.php b/ci4/app/Models/Usuarios/GroupsUsersModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Usuarios/PermisosModel.php b/ci4/app/Models/Usuarios/PermisosModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Wiki/WikiContentModel.php b/ci4/app/Models/Wiki/WikiContentModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Wiki/WikiFileModel.php b/ci4/app/Models/Wiki/WikiFileModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Wiki/WikiPageModel.php b/ci4/app/Models/Wiki/WikiPageModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Wiki/WikiSectionModel.php b/ci4/app/Models/Wiki/WikiSectionModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Models/Wiki/WikiSectionRoleModel.php b/ci4/app/Models/Wiki/WikiSectionRoleModel.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Services/ChatService.php b/ci4/app/Services/ChatService.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Services/EmailService.php b/ci4/app/Services/EmailService.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Services/ImpresoraEtiquetaService.php b/ci4/app/Services/ImpresoraEtiquetaService.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Services/MaquinaService.php b/ci4/app/Services/MaquinaService.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Services/MessageService.php b/ci4/app/Services/MessageService.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Services/PapelImpresionService.php b/ci4/app/Services/PapelImpresionService.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Services/PedidoXMLService.php b/ci4/app/Services/PedidoXMLService.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Services/PresupuestoClienteService.php b/ci4/app/Services/PresupuestoClienteService.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Services/ProductionService.php b/ci4/app/Services/ProductionService.php
old mode 100644
new mode 100755
index 74d96614..a82464e9
--- a/ci4/app/Services/ProductionService.php
+++ b/ci4/app/Services/ProductionService.php
@@ -16,6 +16,7 @@ use CodeIgniter\Config\BaseService;
use App\Entities\Configuracion\Maquina as MaquinaEntity;
use App\Entities\Produccion\OrdenTrabajoFileEntity;
use App\Entities\Produccion\OrdenTrabajoTareaEntity;
+use App\Entities\Tarifas\Acabados\TarifaAcabadoEntity;
use App\Models\Configuracion\ConfigVariableModel;
use App\Models\Configuracion\MaquinaModel;
use App\Models\OrdenTrabajo\OrdenTrabajoFileModel;
@@ -34,7 +35,17 @@ use Exception;
*/
class ProductionService extends BaseService
{
+ /**
+ * Tipos de impresion para identificar linea de impresion plana/general
+ *
+ * @var array
+ */
public array $TIPOS_PLANA = ['lp_bn', 'lp_color', 'lp_colorhq'];
+ /**
+ * Tipos de impresion para idenficiar si es rotativa
+ *
+ * @var array
+ */
public array $TIPOS_ROTATIVA = ['lp_rot_bn', 'lp_rot_color'];
protected OrdenTrabajoModel $otModel;
@@ -46,12 +57,99 @@ class ProductionService extends BaseService
protected OrdenTrabajoFileModel $otFileModel;
protected PedidoModel $pedidoModel;
protected UserModel $userModel;
- protected string $defaultMaquinaCorteName = 'HT-1000';
+ protected ConfigVariableModel $configVariableModel;
protected MaquinaEntity $defaultMaquinaCorte;
protected MaquinaModel $maquinaModel;
protected OrdenTrabajo $ordenTrabajoConfig;
- public string $statusColor;
+
+ /**
+ * Nombre de la maquina por defecto para realizar la tarea de corte.
+ *
+ * @var string 'HT-1000'
+ */
+ protected string $defaultMaquinaCorteName = 'HT-1000';
+ /**
+ * Color del header en el formulario de orden de trabajo
+ *
+ * @var string
+ */
+ public string $statusColor;
+ /**
+ * Valor límite del POD
+ *
+ * `$this->configVariableModel->getVariable('POD')->value;`
+ * @var integer
+ */
+ protected int $podValue = 0;
+ /**
+ * Indica si es POD
+ *
+ * `tirada <= podValue`
+ * @var boolean
+ */
+ protected bool $isPOD = false;
+
+ /**
+ * Indica si la orden de trabajo contiene gofrado
+ * Se usa para mostrar la fecha correspondiente en la vista
+ * @var boolean
+ */
+ public bool $isGofrado = false; //* CHECK DONE
+ /**
+ * Indica si la orden de trabajo contiene gofrado
+ * Se usa para mostrar la fecha correspondiente en la vista
+ * TODO Hay que implementar un boolean en `lg_tarifa_acabado` para identificar
+ * @var boolean
+ */
+ public bool $isGrapado = true; //TODO
+ /**
+ * Indica si la orden de trabajo contiene espiral
+ * Se usa para mostrar la fecha correspondiente en la vista
+ * TODO Hay que implementar un boolean en `lg_tarifa_manipulado` para identificar
+ * DEFAULT true hasta implementacion
+ * @var boolean
+ */
+ public bool $isEspiral = true; //TODO
+ /**
+ * Indica si la orden de trabajo contiene UVI
+ * Se usa para mostrar la fecha correspondiente en la vista
+ * @var boolean
+ */
+ public bool $isUVI = false; //* CHECK DONE
+ /**
+ * Indica si la orden de trabajo contiene plastificado
+ * Se usa para mostrar la fecha correspondiente en la vista
+ * TODO Hay que implementar un boolean en `lg_tarifa_acabado` para identificar
+ * DEFAULT true hasta implementacion
+ * @var boolean
+ */
+ public bool $isPlastificado = true; //TODO
+ /**
+ * Indica si la orden de trabajo contiene cubierta
+ * Se usa para mostrar la fecha correspondiente en la vista
+ * @var boolean
+ */
+ public bool $isCubierta = false; //* CHECK DONE
+ /**
+ * Indica si la impresion es en color
+ * Se usa para mostrar la fecha correspondiente en la vista
+ * @var boolean
+ */
+ public bool $isColor = false; //* CHECK DONE
+ /**
+ * Indica si la impresion es en bn
+ * Se usa para mostrar la fecha correspondiente en la vista
+ * @var boolean
+ */
+ public bool $isBN = false; //* CHECK DONE
+ /**
+ * Indica si hay una tarea de corte
+ * Se usa para mostrar la fecha correspondiente en la vista
+ * ! Se añade por defecto siempre en una rotativa una tarea de corte
+ * @var boolean
+ */
+ public bool $isCorte = false; //* CHECK DONE
/**
* Pedido Entity
*
@@ -76,11 +174,13 @@ class ProductionService extends BaseService
$this->pedidoModel = model(PedidoModel::class);
$this->ordenTrabajoConfig = config('OrdenTrabajo');
$this->statusColor = $this->ordenTrabajoConfig->OT_COLORS["sin_imprimir"];
+ $this->configVariableModel = model(ConfigVariableModel::class);
+ $this->podValue = $this->configVariableModel->getVariable('POD')->value;
}
+
public function init(int $orden_trabajo_id): self
{
try {
- //code...
$this->maquinaModel = model(MaquinaModel::class);
$this->otModel = model(OrdenTrabajoModel::class);
$this->ot = $this->otModel->find($orden_trabajo_id);
@@ -88,6 +188,7 @@ class ProductionService extends BaseService
$this->setPedido($pedido);
$this->defaultMaquinaCorte = $this->maquinaModel->where('nombre', $this->defaultMaquinaCorteName)->first();
$this->statusColor = $this->ordenTrabajoConfig->OT_COLORS["sin_imprimir"];
+ $this->updateProgress();
return $this;
} catch (\Throwable $th) {
throw $th;
@@ -106,6 +207,7 @@ class ProductionService extends BaseService
$this->otModel = model(OrdenTrabajoModel::class);
$this->otDate = model(OrdenTrabajoDate::class);
$this->otTarea = model(OrdenTrabajoTarea::class);
+ $this->isPOD = $this->presupuesto->tirada <= $this->podValue;
return $this;
}
/**
@@ -170,30 +272,49 @@ class ProductionService extends BaseService
$this->otDate->updateUserDateMap($this->ot->id, $data);
return $otDateId;
}
+ /**
+ * Crea un registro en `orden_trabajo_users`
+ *
+ * @return integer|boolean|string
+ */
protected function storeOrdenTrabajoUsers(): int|bool|string
{
return $this->otUser->insert([
"orden_trabajo_id" => $this->ot->id,
]);
}
+ /**
+ * Crea un registro en `orden_trabajo_users` si no ha sido creado previamente
+ *
+ * @return integer|boolean|string
+ */
public function reInsertOrdenTrabajoUsers(): int|bool|string
{
$status = false;
- if($this->otUser->where('orden_trabajo_id',$this->ot->id)->countAllResults() == 0)
- {
+ if ($this->otUser->where('orden_trabajo_id', $this->ot->id)->countAllResults() == 0) {
$status = $this->storeOrdenTrabajoUsers();
}
return $status;
}
+ /**
+ * Crea un registro en `orden_trabajo_dates` si no ha sido creado previamente
+ *
+ * @return integer|boolean|string
+ */
public function reInsertOrdenTrabajoDates(): int|bool|string
{
$status = false;
- if($this->otDate->where('orden_trabajo_id',$this->ot->id)->countAllResults() == 0)
- {
+ if ($this->otDate->where('orden_trabajo_id', $this->ot->id)->countAllResults() == 0) {
$status = $this->storeOrdenTrabajoDates();
+ $this->resetAllTareas();
}
return $status;
}
+ /**
+ * General las correspondientes tareas de la orden de trabajo en la table `orden_trabajo_tareas`
+ *
+ * @return integer|boolean|string
+ */
protected function storeAllTareas()
{
$this->storeOrdenTrabajoTareas();
@@ -203,6 +324,12 @@ class ProductionService extends BaseService
$this->storeOrdenTrabajoEncuadernacionTareas();
// $this->storeOrdenTrabajoExtraTareas();
}
+ /**
+ * Regenera las tareas.
+ * !! Se eliminan las que hay previamente sin `softDelete`
+ *
+ * @return integer|boolean|string
+ */
public function resetAllTareas(): BaseResult|bool
{
$r = $this->otTarea->where("orden_trabajo_id", $this->ot->id)->delete(purge: true);
@@ -239,6 +366,12 @@ class ProductionService extends BaseService
}
return $insert_query_result;
}
+ /**
+ * Inserta una tarea de corte si la impresion es en `rotativa`
+ *
+ * @param PresupuestoLineaEntity $pLinea
+ * @return OrdenTrabajoTareaEntity|null
+ */
protected function storeTareaCorte(PresupuestoLineaEntity $pLinea): ?OrdenTrabajoTareaEntity
{
$otCorte = null;
@@ -259,6 +392,11 @@ class ProductionService extends BaseService
return $otCorte;
}
+ /**
+ * General las tareas de acabado segun las líneas de presupuesto_acabados
+ *
+ * @return boolean
+ */
protected function storeOrdenTrabajoAcabadoTareas(): bool
{
$p_lineas = $this->presupuesto_lineas_acabado();
@@ -285,6 +423,11 @@ class ProductionService extends BaseService
}
return true;
}
+ /**
+ * General las tareas de acabado segun las líneas de presupuesto_manipulados
+ *
+ * @return boolean
+ */
protected function storeOrdenTrabajoManipuladoTareas(): bool
{
$p_lineas = $this->presupuesto_lineas_manipulado();
@@ -311,6 +454,11 @@ class ProductionService extends BaseService
}
return true;
}
+ /**
+ * General las tareas de acabado segun las líneas de presupuesto_preimpresion
+ *
+ * @return boolean
+ */
protected function storeOrdenTrabajoPreimpresionTareas(): bool
{
$p_lineas = $this->presupuesto_lineas_preimpresion();
@@ -337,6 +485,11 @@ class ProductionService extends BaseService
}
return true;
}
+ /**
+ * General las tareas de acabado segun las líneas de presupuesto_encuadernaciones
+ *
+ * @return boolean
+ */
protected function storeOrdenTrabajoEncuadernacionTareas(): bool
{
$p_lineas = $this->presupuesto_lineas_encuadernaciones();
@@ -683,6 +836,10 @@ class ProductionService extends BaseService
"peso_pedido" => $logistica_data["peso_pedido"],
"imposicion" => $this->getImposicionTareaImpresion(),
"tiempo_procesamiento" => $this->getTiempoProcesamientoHHMM(),
+ "tiempo_impresion" => $this->getTiempoTareasImpresionHHMM(),
+ "colors" => $this->getPdfColors(),
+ "isPOD" => $this->isPOD,
+ "uvi" => $this->getUVI()
];
}
@@ -774,7 +931,7 @@ class ProductionService extends BaseService
{
$result = [];
$otDate = $this->otDate->where('orden_trabajo_id', $this->ot->id)
- ->set($data['name'],$data[$data['name']])
+ ->set($data['name'], $data[$data['name']])
->update();
$this->otDate->updateUserDateMap($this->ot->id, $data);
$ot_users = $this->ot->users();
@@ -1111,12 +1268,34 @@ class ProductionService extends BaseService
}
return $pedidoUserDates;
}
- public function getTiempoProcesamientoHHMM(): string
+ public function getTiempoProcesamientoHHMM(): ?string
{
$time_tareas_seconds = array_map(fn($q) => $q->tiempo_estimado ?? 0, $this->ot->tareas());
$seconds = array_sum($time_tareas_seconds);
return float_seconds_to_hhmm_string($seconds);
}
+ public function getTiempoTareasImpresionHHMM(): string
+ {
+ $tareas_impresion = $this->ot->tareas_impresion();
+ $tiempo_seconds = 0;
+ foreach ($tareas_impresion as $key => $tarea) {
+ if ($tarea->is_corte == false) {
+ $tiempo_seconds += $tarea->tiempo_estimado;
+ }
+ }
+ return float_seconds_to_hhmm_string($tiempo_seconds);
+ }
+ public function getUVI(): ?TarifaAcabadoEntity
+ {
+ $uvi = null;
+ $acabados = $this->presupuesto->acabados();
+ foreach ($acabados as $key => $acabado) {
+ if ($acabado->tarifa()->isUVI()) {
+ $uvi = $acabado->tarifa();
+ }
+ }
+ return $uvi;
+ }
public function updateProgress(): bool
{
$userDates = $this->ordenTrabajoConfig->DATE_USER_MAPPING;
@@ -1126,15 +1305,18 @@ class ProductionService extends BaseService
$status = false;
$total = count($userDates) + count($pedidoUserDates);
if ($this->ot->estado != "F") {
- foreach ($userDates as $key => $value) {
- if ($this->ot->dates()->{$key} != null) $fill_dates++;
- }
- foreach ($pedidoUserDates as $key => $value) {
- if ($this->pedido->{$key} != null) $fill_dates++;
- }
+ if ($this->ot->dates()) {
- $progreso = (float) $fill_dates / $total * 100;
- $status = $this->otModel->update($this->ot->id, ["progreso" => round($progreso, 2)]);
+ foreach ($userDates as $key => $value) {
+ if ($this->ot->dates()->{$key} != null) $fill_dates++;
+ }
+ foreach ($pedidoUserDates as $key => $value) {
+ if ($this->pedido->{$key} != null) $fill_dates++;
+ }
+
+ $progreso = (float) $fill_dates / $total * 100;
+ $status = $this->otModel->update($this->ot->id, ["progreso" => round($progreso, 2)]);
+ }
} else {
$status = $this->otModel->update($this->ot->id, ["progreso" => 100]);
}
@@ -1142,7 +1324,7 @@ class ProductionService extends BaseService
}
public function getOtColorStatus(): string
{
- if($this->ot->dates()){
+ if ($this->ot->dates()) {
$this->updateColor();
}
return $this->statusColor;
@@ -1207,7 +1389,8 @@ class ProductionService extends BaseService
$this->statusColor = $this->ordenTrabajoConfig->OT_COLORS["grapado"];
};
}
- protected function updateColor(){
+ protected function updateColor()
+ {
$this->otSinImprimirColor();
$this->otImpresionIntColor();
$this->otCosidoColor();
@@ -1219,4 +1402,222 @@ class ProductionService extends BaseService
$this->otEncuadernadoColor();
$this->otCorteColor();
}
+ public function getEncuadernacionCode(): ?string
+ {
+ $code = "";
+ $encuadernaciones = $this->presupuesto->encuadernaciones();
+ if (isset($encuadernaciones[0])) {
+ $code = $encuadernaciones[0]->tarifa()->code;
+ }
+ return $code;
+ }
+ public function getEncuadernacionColor(): array
+ {
+ $color = $this->ordenTrabajoConfig->OT_ENCUADERNACION_COLOR["default"];
+ $encuadernacion_code = $this->getEncuadernacionCode();
+ if ($encuadernacion_code) {
+ if (isset($this->ordenTrabajoConfig->OT_ENCUADERNACION_COLOR[$encuadernacion_code])) {
+ $color = $this->ordenTrabajoConfig->OT_ENCUADERNACION_COLOR[$encuadernacion_code];
+ }
+ }
+ return $color;
+ }
+ public function getWeekDayColor(): array
+ {
+ $color = $this->ordenTrabajoConfig->OT_WEEK_COLOR_DAY[0];
+ if ($this->ot->pedido()->fecha_encuadernado) {
+ $week_day = Time::createFromFormat("Y-m-d H:i:s", $this->ot->pedido()->fecha_encuadernado)->getDayOfWeek();
+ $color = $this->ordenTrabajoConfig->OT_WEEK_COLOR_DAY[$week_day];
+ }
+ return $color;
+ }
+ public function getGeneralBackgroundColor()
+ {
+ $color = $this->ordenTrabajoConfig->OT_BACKGROUND_COLOR['default'];
+ $is_ferro_or_prototipo = ($this->presupuesto->ferro || $this->presupuesto->ferro_digital || $this->presupuesto->prototipo);
+ $color = $is_ferro_or_prototipo ? $this->ordenTrabajoConfig->OT_BACKGROUND_COLOR['ferro'] : $color;
+ $color = $this->isPOD ? $this->ordenTrabajoConfig->OT_BACKGROUND_COLOR['pod'] : $color;
+ $color = $this->pedido->inaplazable ? $this->ordenTrabajoConfig->OT_BACKGROUND_COLOR['inaplazable'] : $color;
+ return $color;
+ }
+ public function getPapelImpresionBackgroundColor()
+ {
+ $papel = $this->presupuesto->presupuestoLineaImpresion()->papel_generico();
+ $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['default'];
+ $papel_code = $papel->code_ot;
+ if ($papel_code) {
+ if (strpos($papel_code, "BCLOF")) {
+ $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['blanco'];
+ }
+ if (strpos($papel_code, "AH") && $papel->code == "OFF2") {
+ $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['ahuesado'];
+ }
+ if (strpos($papel_code, "MARF")) {
+ $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['marfil'];
+ }
+ if (strpos($papel_code, "VOLAH")) {
+ $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['volumen_ahuesado'];
+ }
+ if ($papel_code == "EM") {
+ $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['estucado_mate'];
+ }
+ if ($papel_code == "CGE") {
+ $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['cartulina'];
+ }
+ }
+
+ return $color;
+ }
+ public function getPapelImpresionCubiertaBackgroundColor()
+ {
+ $papel = $this->presupuesto->presupuestoLineaCubierta()->papel_generico();
+ $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['default'];
+ $papel_code = $papel->code_ot;
+ if ($papel_code) {
+ if (strpos($papel_code, "BCLOF")) {
+ $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['blanco'];
+ }
+ if (strpos($papel_code, "AH") && $papel->code == "OFF2") {
+ $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['ahuesado'];
+ }
+ if (strpos($papel_code, "MARF")) {
+ $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['marfil'];
+ }
+ if (strpos($papel_code, "VOLAH")) {
+ $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['volumen_ahuesado'];
+ }
+ if ($papel_code == "EM") {
+ $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['estucado_mate'];
+ }
+ if ($papel_code == "CGE") {
+ $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['cartulina'];
+ }
+ }
+ return $color;
+ }
+ public function getPlastificadoColor()
+ {
+ $acabados = $this->presupuesto->acabados();
+ $color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR['default'];
+ foreach ($acabados as $key => $acabado) {
+ $tarifa_acabado = $acabado->tarifa();
+ if ($tarifa_acabado->code) {
+ $plastificado_code = $tarifa_acabado->code;
+ if ($plastificado_code == "BRIL") {
+ $color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR['BRIL'];
+ }
+ if ($plastificado_code == "MATE") {
+ $color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR['MATE'];
+ }
+ if ($plastificado_code == "ANTI") {
+ $color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR['ANTIRAYADO'];
+ }
+ if ($plastificado_code == "SAND") {
+ $color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR['SANDY'];
+ }
+ if ($plastificado_code == "GOF") {
+ $color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR['GOFRADO'];
+ }
+ }
+ }
+ return $color;
+ }
+ public function getImpresionInteriorPPALColor()
+ {
+ $isRotativa = $this->presupuesto->presupuestoLineaImpresion()->isRotativa();
+ $color = $isRotativa ? $this->ordenTrabajoConfig->OT_IMPRESION_INTERIOR_PPAL_COLOR['ROTATIVA'] : $this->ordenTrabajoConfig->OT_IMPRESION_INTERIOR_PPAL_COLOR['GENERAL'];
+ $color = $this->isPOD ? $this->ordenTrabajoConfig->OT_IMPRESION_INTERIOR_PPAL_COLOR['POD'] : $color;
+ return $color;
+ }
+ public function getPdfColors(): array
+ {
+ return [
+ "general" => $this->getGeneralBackgroundColor(),
+ "week_day" => $this->getWeekDayColor(),
+ "ot" => $this->getEncuadernacionColor(),
+ "papel_interior" => $this->getPapelImpresionBackgroundColor(),
+ "papel_cubierta" => $this->getPapelImpresionCubiertaBackgroundColor(),
+ "plastificado" => $this->getPlastificadoColor(),
+ "impresion_interior_ppal" => $this->getImpresionInteriorPPALColor()
+ ];
+ }
+
+ public function getFlags()
+ {
+ $this->color();
+ return [
+ "isGofrado" => $this->gofrado(),
+ "isEspiral" => $this->isEspiral,
+ "isUVI" => $this->uvi(),
+ "isPlastificado" => $this->isPlastificado,
+ "isCubierta" => $this->cubierta(),
+ "isColor" => $this->isColor,
+ "isBN" => $this->isBN,
+ "isCorte" => $this->corte(),
+ "isGrapado" => $this->isGrapado
+ ];
+ }
+ public function gofrado(): bool
+ {
+ $flag = false;
+ $acabados = $this->presupuesto->acabados();
+ foreach ($acabados as $key => $acabado) {
+ $tarifa_acabado = $acabado->tarifa();
+ if ($tarifa_acabado->code) {
+ $plastificado_code = $tarifa_acabado->code;
+ if ($plastificado_code == "GOF") {
+ $flag = true;
+ break;
+ }
+ }
+ }
+ $this->isGofrado = $flag;
+ return $this->isGofrado;
+ }
+ public function uvi(): bool
+ {
+ $flag = false;
+ $tarifa_acabado_uvi = $this->getUVI();
+ if ($tarifa_acabado_uvi) {
+ $flag = true;
+ }
+ $this->isUVI = $flag;
+ return $this->isUVI;
+ }
+ public function cubierta(): bool
+ {
+ $lineaCubierta = $this->presupuesto->presupuestoLineaCubierta();
+ if ($lineaCubierta) {
+ $this->isCubierta = true;
+ }
+ return $this->isCubierta;
+ }
+ public function color(): bool
+ {
+ $linea_impresion = $this->presupuesto->presupuestoLineaImpresion();
+ if ($linea_impresion) {
+ if ($linea_impresion->isColor()) {
+ $this->isColor = true;
+ $this->isBN = false;
+ } else {
+ $this->isColor = false;
+ $this->isBN = true;
+ }
+ }
+ return $this->isColor;
+ }
+ public function corte(): bool
+ {
+ $ot_tareas = $this->ot->tareas();
+ foreach ($ot_tareas as $key => $tarea) {
+ if ($tarea->is_corte) {
+ $this->isCorte = true;
+ break;
+ }
+ }
+ return $this->isCorte;
+ }
+ public function getFileBarCode(){
+ return $this->ot->getBarCodeFile();
+ }
}
diff --git a/ci4/app/Services/TarifaMaquinaService.php b/ci4/app/Services/TarifaMaquinaService.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/Shield/Email/email_2fa_email.php b/ci4/app/Views/Shield/Email/email_2fa_email.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/Shield/Email/email_activate_email.php b/ci4/app/Views/Shield/Email/email_activate_email.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/Shield/Email/magic_link_email.php b/ci4/app/Views/Shield/Email/magic_link_email.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/Shield/email_2fa_show.php b/ci4/app/Views/Shield/email_2fa_show.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/Shield/email_2fa_verify.php b/ci4/app/Views/Shield/email_2fa_verify.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/Shield/email_activate_show.php b/ci4/app/Views/Shield/email_activate_show.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/Shield/layout.php b/ci4/app/Views/Shield/layout.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/Shield/login.php b/ci4/app/Views/Shield/login.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/Shield/magic_link_form.php b/ci4/app/Views/Shield/magic_link_form.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/Shield/magic_link_message.php b/ci4/app/Views/Shield/magic_link_message.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/Shield/register.php b/ci4/app/Views/Shield/register.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/_commonPartialsBs/_modalInput.php b/ci4/app/Views/themes/_commonPartialsBs/_modalInput.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/_commonPartialsBs/_modalMessageDialog.php b/ci4/app/Views/themes/_commonPartialsBs/_modalMessageDialog.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/_commonPartialsBs/translate.js b/ci4/app/Views/themes/_commonPartialsBs/translate.js
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/alerts/alert.php b/ci4/app/Views/themes/vuexy/components/alerts/alert.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/chat_direct.php b/ci4/app/Views/themes/vuexy/components/chat_direct.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/chat_factura.php b/ci4/app/Views/themes/vuexy/components/chat_factura.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/chat_general.php b/ci4/app/Views/themes/vuexy/components/chat_general.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/chat_internal_factura.php b/ci4/app/Views/themes/vuexy/components/chat_internal_factura.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/chat_internal_orden_trabajo.php b/ci4/app/Views/themes/vuexy/components/chat_internal_orden_trabajo.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/chat_internal_pedido.php b/ci4/app/Views/themes/vuexy/components/chat_internal_pedido.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/chat_internal_presupuesto.php b/ci4/app/Views/themes/vuexy/components/chat_internal_presupuesto.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/chat_orden_trabajo.php b/ci4/app/Views/themes/vuexy/components/chat_orden_trabajo.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/chat_pedido.php b/ci4/app/Views/themes/vuexy/components/chat_pedido.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/chat_presupuesto.php b/ci4/app/Views/themes/vuexy/components/chat_presupuesto.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/dropzone.php b/ci4/app/Views/themes/vuexy/components/dropzone.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/forms/chat_department.php b/ci4/app/Views/themes/vuexy/components/forms/chat_department.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/forms/maquina_tarea.php b/ci4/app/Views/themes/vuexy/components/forms/maquina_tarea.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/forms/tarifa_maquinas.php b/ci4/app/Views/themes/vuexy/components/forms/tarifa_maquinas.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/internal_messages.php b/ci4/app/Views/themes/vuexy/components/internal_messages.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/modals/modalAddNewChatParticipant.php b/ci4/app/Views/themes/vuexy/components/modals/modalAddNewChatParticipant.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/modals/modalDireccion.php b/ci4/app/Views/themes/vuexy/components/modals/modalDireccion.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/modals/modalNewDirectMessage.php b/ci4/app/Views/themes/vuexy/components/modals/modalNewDirectMessage.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/modals/modalNewDirectMessageClient.php b/ci4/app/Views/themes/vuexy/components/modals/modalNewDirectMessageClient.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/modals/modalNewImposicion.php b/ci4/app/Views/themes/vuexy/components/modals/modalNewImposicion.php
new file mode 100755
index 00000000..40fadd11
--- /dev/null
+++ b/ci4/app/Views/themes/vuexy/components/modals/modalNewImposicion.php
@@ -0,0 +1,20 @@
+
+
+
+
+
+
= lang('Imposiciones.btnNewImposicion') ?>
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ci4/app/Views/themes/vuexy/components/modals/modalNewInternalMessage.php b/ci4/app/Views/themes/vuexy/components/modals/modalNewInternalMessage.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/modals/modalOtTaskManual.php b/ci4/app/Views/themes/vuexy/components/modals/modalOtTaskManual.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/modals/modalSection.php b/ci4/app/Views/themes/vuexy/components/modals/modalSection.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/tables/chat_department_users_table.php b/ci4/app/Views/themes/vuexy/components/tables/chat_department_users_table.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/tables/chat_departments_table.php b/ci4/app/Views/themes/vuexy/components/tables/chat_departments_table.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/tables/imposicion_esquema_table.php b/ci4/app/Views/themes/vuexy/components/tables/imposicion_esquema_table.php
new file mode 100755
index 00000000..5c285994
--- /dev/null
+++ b/ci4/app/Views/themes/vuexy/components/tables/imposicion_esquema_table.php
@@ -0,0 +1,12 @@
+
+
+
+
= lang('Imposiciones.id') ?>
+
= lang('Imposiciones.esquema.name') ?>
+
= lang('Basic.global.Action') ?>
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ci4/app/Views/themes/vuexy/components/tables/maquina_tarea_table.php b/ci4/app/Views/themes/vuexy/components/tables/maquina_tarea_table.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/tables/messages_table.php b/ci4/app/Views/themes/vuexy/components/tables/messages_table.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/tables/ot_table.php b/ci4/app/Views/themes/vuexy/components/tables/ot_table.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/tables/ot_task_table.php b/ci4/app/Views/themes/vuexy/components/tables/ot_task_table.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/tables/planning_papel_gramaje_table.php b/ci4/app/Views/themes/vuexy/components/tables/planning_papel_gramaje_table.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/tables/planning_papel_pliego_table.php b/ci4/app/Views/themes/vuexy/components/tables/planning_papel_pliego_table.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/tables/planning_plana_table.php b/ci4/app/Views/themes/vuexy/components/tables/planning_plana_table.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/components/tables/planning_rot_table.php b/ci4/app/Views/themes/vuexy/components/tables/planning_rot_table.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/activity/activityList.php b/ci4/app/Views/themes/vuexy/form/activity/activityList.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/clientes/cliente/_clienteDireccionesForm.php b/ci4/app/Views/themes/vuexy/form/clientes/cliente/_clienteDireccionesForm.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/clientes/cliente/_clienteFormItems.php b/ci4/app/Views/themes/vuexy/form/clientes/cliente/_clienteFormItems.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/clientes/cliente/_facturacionClienteItems.php b/ci4/app/Views/themes/vuexy/form/clientes/cliente/_facturacionClienteItems.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/clientes/cliente/_pedidosClienteItems.php b/ci4/app/Views/themes/vuexy/form/clientes/cliente/_pedidosClienteItems.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/clientes/cliente/_presupuestosClienteItems.php b/ci4/app/Views/themes/vuexy/form/clientes/cliente/_presupuestosClienteItems.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/clientes/cliente/viewClienteForm.php b/ci4/app/Views/themes/vuexy/form/clientes/cliente/viewClienteForm.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/clientes/cliente/viewClienteList.php b/ci4/app/Views/themes/vuexy/form/clientes/cliente/viewClienteList.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/clientes/contactos/_contactoDeClienteFormItems.php b/ci4/app/Views/themes/vuexy/form/clientes/contactos/_contactoDeClienteFormItems.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/clientes/contactos/viewContactoDeClienteForm.php b/ci4/app/Views/themes/vuexy/form/clientes/contactos/viewContactoDeClienteForm.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/clientes/contactos/viewContactoDeClienteList.php b/ci4/app/Views/themes/vuexy/form/clientes/contactos/viewContactoDeClienteList.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/clientes/direcciones/viewClienteDireccionesList.php b/ci4/app/Views/themes/vuexy/form/clientes/direcciones/viewClienteDireccionesList.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/clientes/distribuidores/_distribuidorDeClienteFormItems.php b/ci4/app/Views/themes/vuexy/form/clientes/distribuidores/_distribuidorDeClienteFormItems.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/clientes/distribuidores/viewDistribuidorDeClienteForm.php b/ci4/app/Views/themes/vuexy/form/clientes/distribuidores/viewDistribuidorDeClienteForm.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/clientes/distribuidores/viewDistribuidorDeClienteList.php b/ci4/app/Views/themes/vuexy/form/clientes/distribuidores/viewDistribuidorDeClienteList.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/clientes/plantillaprecios/_ClienteplantillapreciosFormItems.php b/ci4/app/Views/themes/vuexy/form/clientes/plantillaprecios/_ClienteplantillapreciosFormItems.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/clientes/plantillaprecios/viewClienteplantillapreciosForm.php b/ci4/app/Views/themes/vuexy/form/clientes/plantillaprecios/viewClienteplantillapreciosForm.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/clientes/plantillaprecios/viewClienteplantillapreciosList.php b/ci4/app/Views/themes/vuexy/form/clientes/plantillaprecios/viewClienteplantillapreciosList.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/compras/proveedores/_proveedorFormItems.php b/ci4/app/Views/themes/vuexy/form/compras/proveedores/_proveedorFormItems.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/compras/proveedores/_proveedorTipoFormItems.php b/ci4/app/Views/themes/vuexy/form/compras/proveedores/_proveedorTipoFormItems.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/compras/proveedores/viewProveedorForm.php b/ci4/app/Views/themes/vuexy/form/compras/proveedores/viewProveedorForm.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/compras/proveedores/viewProveedorList.php b/ci4/app/Views/themes/vuexy/form/compras/proveedores/viewProveedorList.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/compras/proveedores/viewProveedorTipoForm.php b/ci4/app/Views/themes/vuexy/form/compras/proveedores/viewProveedorTipoForm.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/compras/proveedores/viewProveedorTipoList.php b/ci4/app/Views/themes/vuexy/form/compras/proveedores/viewProveedorTipoList.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/configuracion/comunidades-autonomas/_comunidadAutonomaFormItems.php b/ci4/app/Views/themes/vuexy/form/configuracion/comunidades-autonomas/_comunidadAutonomaFormItems.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/configuracion/comunidades-autonomas/viewComunidadAutonomaForm.php b/ci4/app/Views/themes/vuexy/form/configuracion/comunidades-autonomas/viewComunidadAutonomaForm.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/configuracion/comunidades-autonomas/viewComunidadAutonomaList.php b/ci4/app/Views/themes/vuexy/form/configuracion/comunidades-autonomas/viewComunidadAutonomaList.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/configuracion/error_presupuesto/viewErrorPresupuestoForm.php b/ci4/app/Views/themes/vuexy/form/configuracion/error_presupuesto/viewErrorPresupuestoForm.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/configuracion/error_presupuesto/viewErrorPresupuestoList.php b/ci4/app/Views/themes/vuexy/form/configuracion/error_presupuesto/viewErrorPresupuestoList.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/configuracion/formas-pago/_formaDePagoFormItems.php b/ci4/app/Views/themes/vuexy/form/configuracion/formas-pago/_formaDePagoFormItems.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/configuracion/formas-pago/viewFormaDePagoForm.php b/ci4/app/Views/themes/vuexy/form/configuracion/formas-pago/viewFormaDePagoForm.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/configuracion/formas-pago/viewFormaDePagoList.php b/ci4/app/Views/themes/vuexy/form/configuracion/formas-pago/viewFormaDePagoList.php
old mode 100644
new mode 100755
diff --git a/ci4/app/Views/themes/vuexy/form/configuracion/imposiciones/_imposicionEsquemaFormItems.php b/ci4/app/Views/themes/vuexy/form/configuracion/imposiciones/_imposicionEsquemaFormItems.php
new file mode 100755
index 00000000..53cb5a46
--- /dev/null
+++ b/ci4/app/Views/themes/vuexy/form/configuracion/imposiciones/_imposicionEsquemaFormItems.php
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ci4/app/Views/themes/vuexy/form/configuracion/imposiciones/_imposicionFormItems.php b/ci4/app/Views/themes/vuexy/form/configuracion/imposiciones/_imposicionFormItems.php
old mode 100644
new mode 100755
index 6ffe399c..5556a088
--- a/ci4/app/Views/themes/vuexy/form/configuracion/imposiciones/_imposicionFormItems.php
+++ b/ci4/app/Views/themes/vuexy/form/configuracion/imposiciones/_imposicionFormItems.php
@@ -1,64 +1,64 @@