diff --git a/ci4/app/Config/Routes.php b/ci4/app/Config/Routes.php
index 4ac5ac81..de724146 100755
--- a/ci4/app/Config/Routes.php
+++ b/ci4/app/Config/Routes.php
@@ -783,6 +783,8 @@ $routes->group('produccion', ['namespace' => 'App\Controllers\Produccion'], func
* PDF
*========================**/
$routes->get('pdf/(:num)', 'Ordentrabajo::get_pdf/$1');
+ $routes->get('pdf/ferro/(:num)', 'Ordentrabajo::get_ferro_pdf/$1');
+ $routes->get('pdf/prototipo/(:num)', 'Ordentrabajo::get_prototipo_pdf/$1');
$routes->get('portada/(:num)', 'Ordentrabajo::get_portada_img/$1');
$routes->group('planning', ['namespace' => 'App\Controllers\Produccion'], function ($routes) {
$routes->get('select/maquina/rotativa', 'Ordentrabajo::select_maquina_planning_rot');
diff --git a/ci4/app/Controllers/Produccion/Ordentrabajo.php b/ci4/app/Controllers/Produccion/Ordentrabajo.php
index 61741e33..366ec0d5 100755
--- a/ci4/app/Controllers/Produccion/Ordentrabajo.php
+++ b/ci4/app/Controllers/Produccion/Ordentrabajo.php
@@ -313,6 +313,14 @@ class Ordentrabajo extends BaseController
{
return $this->produccionService->init($orden_trabajo_id)->getPdf();
}
+ public function get_ferro_pdf($orden_trabajo_id)
+ {
+ return $this->produccionService->init($orden_trabajo_id)->getFerroPdf();
+ }
+ public function get_prototipo_pdf($orden_trabajo_id)
+ {
+ return $this->produccionService->init($orden_trabajo_id)->getPrototipoPdf();
+ }
public function upload_orden_trabajo_portada()
{
try {
diff --git a/ci4/app/Database/Migrations/2025-04-30_083700_AlterOrdenesTrabajoAddCommentColumns.php b/ci4/app/Database/Migrations/2025-04-30_083700_AlterOrdenesTrabajoAddCommentColumns.php
new file mode 100755
index 00000000..626e7fc1
--- /dev/null
+++ b/ci4/app/Database/Migrations/2025-04-30_083700_AlterOrdenesTrabajoAddCommentColumns.php
@@ -0,0 +1,39 @@
+ [
+ 'type' => 'LONGTEXT',
+ 'null' => true
+ ],
+ 'comment_cubierta' => [
+ 'type' => 'LONGTEXT',
+ 'null' => true
+ ],
+ 'comment_encuadernacion' => [
+ 'type' => 'LONGTEXT',
+ 'null' => true
+ ],
+ 'comment_logistica' => [
+ 'type' => 'LONGTEXT',
+ 'null' => true
+ ],
+ ];
+ public function up()
+ {
+
+ $this->forge->addColumn('ordenes_trabajo',$this->COLUMNS);
+
+ }
+
+ public function down()
+ {
+ $this->forge->dropColumn('ordenes_trabajo',array_keys($this->COLUMNS));
+
+ }
+}
diff --git a/ci4/app/Entities/Produccion/OrdenTrabajoEntity.php b/ci4/app/Entities/Produccion/OrdenTrabajoEntity.php
index b5d9216c..b3f38e26 100755
--- a/ci4/app/Entities/Produccion/OrdenTrabajoEntity.php
+++ b/ci4/app/Entities/Produccion/OrdenTrabajoEntity.php
@@ -30,6 +30,10 @@ class OrdenTrabajoEntity extends Entity
"progreso" => 0.00,
"estado" => "I",
"comentarios" => null,
+ "comment_interior"=> null,
+ "comment_cubierta"=> null,
+ "comment_encuadernacion"=> null,
+ "comment_logistica"=> null,
"revisar_formato" => null,
"revisar_lomo" => null,
"revisar_solapa" => null,
@@ -52,7 +56,11 @@ class OrdenTrabajoEntity extends Entity
"tipo_entrada" => "string",
"progreso" => "float",
"estado" => "string",
- "comentarios" => "string",
+ "comentarios" => "?string",
+ "comment_interior"=> "?string",
+ "comment_cubierta"=> "?string",
+ "comment_encuadernacion"=> "?string",
+ "comment_logistica"=> "?string",
"revisar_formato" => "bool",
"revisar_lomo" => "bool",
"revisar_solapa" => "bool",
diff --git a/ci4/app/Language/es/Produccion.php b/ci4/app/Language/es/Produccion.php
index a511f03e..dada2238 100755
--- a/ci4/app/Language/es/Produccion.php
+++ b/ci4/app/Language/es/Produccion.php
@@ -48,7 +48,7 @@ return [
"finalizadas" => "Finalizadas",
"pendiente_ferro" => "Ferro pendiente",
"pendientes" => "Pendientes",
- "ferro_ok" => "Ferro ok",
+ "ferro_ok" => "Ferro/Prototipo ok",
"envio" => "Envío",
"ferro" => "Ferro",
"ot" => "Orden trabajo",
@@ -80,6 +80,7 @@ return [
"preview_pdf" => "Previsualizar PDF",
"imprimir_codigo_safekat" => "Imprimir código SAFEKAT",
"imprimir_ferro" => "Imprimir ferro",
+ "imprimir_prototipo" => "Prototipo",
"planning_rotativa" => "Planificación rotativa",
"planning_plana" => "Planificación plana",
"solapa" => "Solapa",
@@ -144,6 +145,12 @@ return [
'print_label' => "Imprimir etiqueta",
'click_init' => "Clicks al inicio",
'click_end' => "Clicks al final",
+ "comentarios" => "Comentarios",
+ "comentariosOt" => "Comentarios orden",
+ "comentariosImpresionInterior" => "Comentarios interior",
+ "comentariosCubierta" => "Comentarios cubierta",
+ "comentariosEncuadernacion" => "Comentarios encuadernación",
+ "comentariosLogistica" => "Comentarios logística",
];
\ No newline at end of file
diff --git a/ci4/app/Models/OrdenTrabajo/OrdenTrabajoModel.php b/ci4/app/Models/OrdenTrabajo/OrdenTrabajoModel.php
index d7a1f37a..b9a0cddf 100755
--- a/ci4/app/Models/OrdenTrabajo/OrdenTrabajoModel.php
+++ b/ci4/app/Models/OrdenTrabajo/OrdenTrabajoModel.php
@@ -25,6 +25,10 @@ class OrdenTrabajoModel extends Model
"progreso",
"estado",
"comentarios",
+ "comment_interior",
+ "comment_cubierta",
+ "comment_encuadernacion",
+ "comment_logistica",
"revisar_formato",
"revisar_lomo",
"revisar_solapa",
diff --git a/ci4/app/Services/ProductionService.php b/ci4/app/Services/ProductionService.php
index 006949c2..dc5bfe80 100755
--- a/ci4/app/Services/ProductionService.php
+++ b/ci4/app/Services/ProductionService.php
@@ -585,6 +585,14 @@ class ProductionService extends BaseService
{
return view("themes/vuexy/pdfs/orden_trabajo", $this->getDataPdf());
}
+ public function getFerroPdf()
+ {
+ return view("themes/vuexy/pdfs/ferro", $this->getDataPdf());
+ }
+ public function getPrototipoPdf()
+ {
+ return view("themes/vuexy/pdfs/prototipo", $this->getDataPdf());
+ }
/**
* Query para mostrar en datatable
*
diff --git a/ci4/app/Views/themes/vuexy/form/produccion/ot/otComments.php b/ci4/app/Views/themes/vuexy/form/produccion/ot/otComments.php
index 222d64f9..f2aff0f7 100755
--- a/ci4/app/Views/themes/vuexy/form/produccion/ot/otComments.php
+++ b/ci4/app/Views/themes/vuexy/form/produccion/ot/otComments.php
@@ -1,6 +1,168 @@
+
+
+
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ci4/app/Views/themes/vuexy/form/produccion/ot/otHeader.php b/ci4/app/Views/themes/vuexy/form/produccion/ot/otHeader.php
index 2777d260..469decd9 100755
--- a/ci4/app/Views/themes/vuexy/form/produccion/ot/otHeader.php
+++ b/ci4/app/Views/themes/vuexy/form/produccion/ot/otHeader.php
@@ -42,9 +42,17 @@
Pedido
- ">
-
- PDF
+ ferro == 1): ?>
+ dates()->ferro_ok_at != null): ?>
+ ">
+
+ PDF
+
+
+ ">
+
+ PDF
+
= @lang("Produccion.imprimir_codigo_safekat") ?>
diff --git a/ci4/app/Views/themes/vuexy/form/produccion/viewOrdenTrabajoEdit.php b/ci4/app/Views/themes/vuexy/form/produccion/viewOrdenTrabajoEdit.php
index 474445ce..c57b532f 100755
--- a/ci4/app/Views/themes/vuexy/form/produccion/viewOrdenTrabajoEdit.php
+++ b/ci4/app/Views/themes/vuexy/form/produccion/viewOrdenTrabajoEdit.php
@@ -45,9 +45,17 @@
href="= "/produccion/ordentrabajo/pdf/" . $modelId ?>">
= @lang("Produccion.preview_pdf") ?>
+ ferro): ?>
+ ">
+
+ = @lang("Produccion.imprimir_ferro") ?>
+
prototipo): ?>
-
+ ">
+
+ = @lang("Produccion.prototipo") ?>
get('settings');
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+= $presupuesto->titulo ?>[OT:= $ot->id ?>]
+
+
+
+
+
+ id . "_" . $presupuesto->titulo ?>">
+
+
+
= $presupuesto->titulo ?>
+ = Time::now()->format("d/m/Y H:i:s") ?>
+
+
+
+
+
+
+ full_path): ?>
+

full_path)) : '/assets/img/portada_not_found.png' ?>" />
+
+

+
+
+
+
+
;color:= $colors["general"]["color"] ?>;">
+
+
+
;color:= $colors["week_day"]["color"] ?>;">
+ = $pedido->fecha_encuadernado ? week_day_humanize(Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->getDayOfWeek() - 1, true) : "" ?>
+ Comercial: = $cliente->first_name . " " . $cliente->comercial()->last_name ?>
+
+
+
+
+ ;color:= $colors["impresion_interior_ppal"]["color"] ?>;">
+
+ POD
+ presupuestoLineaImpresion()->isRotativa()): ?>
+ ROTATIVA
+
+ GENERAL
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | IN |
+ = $ubicacion ?> |
+
+
+ | PORT. |
+ = $ubicacion ?> |
+
+
+ | ACABAD. |
+ = $ubicacion ?> |
+
+
+ | ENCUAD. |
+ = $ubicacion ?> |
+
+
+ | MANIPUL. |
+ = $ubicacion ?> |
+
+
+
+
+
+
+
+
;color:= $colors["ot"]["color"] ?>;">
+ = $encuadernacionCode ?>
+
+
+
+
;color:= $colors["papel_interior"]["color"] ?>;">
+ = $linea_impresion?->papel_impresion()->papel_code_ot ?>
+
+
">
+ = $tiempo_impresion ?>
+
+
;color:= $colors["papel_cubierta"]["color"] ?>;">
+ = $linea_cubierta?->papel_impresion()->papel_code_ot ?>
+
+
;color:= $colors["plastificado"]["color"] ?>;">
+ = isset($acabados[0]) ? $acabados[0]->tarifa()->code : "" ?>
+
+ $acabado): ?>
+ tarifa()->isUVI()): ?>
+
;color:white;">
+ + = $acabado->tarifa()->code ?>
+
+
+
+
+
+
">
+
+
+ ;">= $ot->id ?>
+
+
+

+
+
+
+
+
+
+
+
+
+
+
+
+ | IDSK |
+
+
+ |
+
+
+ | CLIENTE |
+
+ = $cliente->alias ?>
+ |
+
+
+ | TITULO |
+
+ = $presupuesto->titulo ?>
+ |
+
+
+
+ | ISBN |
+ = $presupuesto->isbn ?> |
+
+
+ | PEDIDO CLIENTE |
+ = $pedido->id ?> |
+
+
+
+
+
+
+
+ imposicion_esquema()): ?>
+ = $imposicion->imposicion_esquema()->svg_schema ?>
+
+
+
+
+
+
+
+
+ | Imposicion |
+ = $imposicion?->full_name ?? "" ?> |
+
+
+
+
+
+
+
+
IMP. INTERIOR
+
+
+
+
+
+ | = $papel_formato->ancho ?>x= $papel_formato->alto ?> |
+
+ 1 |
+
+ = $presupuesto->tipo_presupuesto()?->codigo ?? "" ?> |
+
+ = number_format($presupuesto->lomo_cubierta, 2, ',', '.') ?> |
+
+
+
+
+ ) ?>) |
+ Páginas |
+ Ejemplares |
+ Tintas |
+ Formas |
+ Máquina |
+ Clics |
+ Tiempo |
+
+
+ | = $presupuesto->paginas ?> |
+ 1 |
+ = $linea_impresion->tinta() ?> |
+ = json_decode($linea_impresion->formas)->formas ?> |
+ = $linea_impresion->maquina()->nombre ?> |
+ = $linea_impresion->rotativa_clicks_libro ?> |
+ = float_seconds_to_hhmm_string($linea_impresion->horas_maquina * 3600 / $presupuesto->tirada) ?> |
+
+
+ | = $linea_impresion->papel_impresion ?> |
+ = $linea_impresion->papel_impresion()->gramaje . " " . "gr" ?> |
+
+ isRotativa()): ?>
+ = number_format($linea_impresion->rotativa_metros_libro, 2, ',', '.') ?> metros
+
+ |
+
+
+
+
+
+
+
+
+
LOGISTICA
+
+
+
+ | Peso Unidad |
+ Peso Pedido |
+ Corte Pie |
+
+
+ | = number_format($peso_unidad, 2, ',', '.') ?> gr |
+ = $peso_unidad > 1000 ? number_format($peso_unidad / 1000, 2, ',', '.') . " kg" : number_format($peso_unidad, 2, ',', '.') . " gr" ?> |
+ - |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ = $ot->comment_interior ?> +
+