Merge branch 'feat/listados_cliente_form' of https://git.imnavajas.es/jjimenez/safekat into feat/listados_cliente_form

This commit is contained in:
2025-03-31 09:58:06 +02:00
38 changed files with 1730 additions and 573 deletions

View File

@ -33,7 +33,7 @@
<i class="ti ti-box-multiple ti-lg"></i>
</div>
<div class="card-info">
<h5 class="mb-0" id="ot-paginas"><?=$presupuesto->merma?></h5>
<h5 class="mb-0" id="ot-paginas"><?=$presupuesto->paginas?></h5>
<span class="fx-large"><?= @lang("Produccion.paginas") ?></span>
</div>
</div>
@ -44,7 +44,7 @@
<i class="ti ti-bookmark ti-lg"></i>
</div>
<div class="card-info">
<h5 class="mb-0" id="ot-solapa"><?=$presupuesto->solapas?></h5>
<h5 class="mb-0" id="ot-solapa"><?=$presupuesto->solapas > 0 ? $presupuesto->solapas : 0?></h5>
<span class="fx-large"><?= @lang("Produccion.solapa") ?></span>
</div>
@ -56,7 +56,7 @@
<i class="ti ti-books ti-lg"></i>
</div>
<div class="card-info">
<h5 class="mb-0" id="ot-tirada"></h5>
<h5 class="mb-0" id="ot-tirada"><?=$presupuesto->tirada?></h5>
<span class="fx-large"><?= @lang("Produccion.tirada") ?></span>
</div>

View File

@ -10,7 +10,7 @@
<div class="sk-wave-rect"></div>
<div class="sk-wave-rect"></div>
</div>
<img class="card-img card-img-left img-thumbnail" id="portada-orden-trabajo" src="" hidden>
<img class="card-img card-img-left img-thumbnail" id="portada-orden-trabajo" src="<?=site_url('assets/img/portada_not_found.png')?>" hidden>
</div>
<div class="col-md-8">
<div class="card-body">

View File

@ -16,7 +16,11 @@
<input class="form-control" type="file" id="portada-file-input">
</div>
<div class="mb-3">
<button type="button" class="btn btn-primary w-100" id="btn-upload-portada"><i class="ti ti-md ti-upload"></i>Subir portada </button>
<div class="d-flex flex-row align-items-center justify-content-start gap-2">
<button type="button" class="btn btn-primary" id="btn-upload-portada"><i class="ti ti-md ti-upload"></i>Subir portada </button>
<button type="button" class="btn btn-danger" id="btn-delete-portada"><i class="ti ti-md ti-trash"></i>Eliminar </button>
</div>
</div>
</div>
</div>

View File

@ -119,11 +119,13 @@
<?= $this->section('css') ?>
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/formvalidation/dist/css/formValidation.min.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.css') ?>" />
<?= $this->endSection() ?>
<?= $this->section("additionalExternalJs") ?>
<script type="module" src="<?= site_url("assets/js/safekat/pages/produccion/planning_rotativa/index.js") ?>"></script>
<script src="<?= site_url("themes/vuexy/vendor/libs/formvalidation/dist/js/FormValidation.js") ?>"></script>
<script src="<?= site_url("themes/vuexy/vendor/libs/formvalidation/dist/js/plugins/Bootstrap5.min.js") ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.js') ?>"></script>
<script src="<?= site_url("themes/vuexy/vendor/libs/formvalidation/dist/js/plugins/AutoFocus.min.js") ?>"></script>
<?= $this->endSection() ?>

View File

@ -5,6 +5,7 @@
<?= $this->extend('themes/vuexy/main/defaultlayout') ?>
<?= $this->section('content'); ?>
<div id="ot-edit" data-id="<?= $modelId ?>">
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
<?= view("themes/vuexy/form/produccion/ot/otHeader") ?>
<div class="row">
@ -33,9 +34,11 @@
</form>
<div class="col-md-12 mt-3">
<div class="d-grip gap-2">
<a type="button" class="btn btn-primary btn-block w-100 mb-1" target="__blank" href="<?= "/produccion/ordentrabajo/pdf/" . $modelId ?>"><?= @lang("Produccion.preview_pdf") ?></a>
<button type="button" class="btn btn-primary btn-block w-100 mb-1"><?= @lang("Produccion.imprimir_ferro") ?></button>
<button type="button" class="btn btn-secondary btn-block w-100 mb-1"><?= @lang("Produccion.imprimir_codigo_safekat") ?></button>
<a type="button" class="btn btn-outline-danger btn-block mb-1" target="__blank" href="<?= "/produccion/ordentrabajo/pdf/" . $modelId ?>">
<span class="ti-sm ti ti-eye me-1"></span>
<?= @lang("Produccion.preview_pdf") ?></a>
<button type="button" class="btn btn-primary btn-block mb-1"><?= @lang("Produccion.imprimir_ferro") ?></button>
<button type="button" class="btn btn-secondary btn-block mb-1"><?= @lang("Produccion.imprimir_codigo_safekat") ?></button>
</div>
</div>

View File

@ -0,0 +1,356 @@
<?php
use CodeIgniter\I18n\Time;
$session = session();
$settings = $session->get('settings');
?>
<!DOCTYPE html>
<html
lang="<?= $session->get('lang') ?>"
data-assets-path="<?= site_url('themes/vuexy/') ?>"
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Icons -->
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/fonts/fontawesome.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/fonts/tabler-icons.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/fonts/flag-icons.css') ?>" />
<!-- Core CSS -->
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/css/rtl/core.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/css/rtl/theme-semi-dark.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/safekat.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/css/pages/app-chat.css') ?>">
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/flatpickr/flatpickr.css') ?>" />
<link rel="icon" type="image/x-icon" href="<?= site_url('themes/vuexy/img/favicon/favicon.ico') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/pdf.ot.css') ?>">
<title><?= $presupuesto->titulo ?>[OT:<?= $ot->id ?>]</title>
</head>
<body>
<div class="col-md-12" data-id=<?= $ot->id ?>>
<div class="header">
<div class="title"><?= $presupuesto->titulo ?></div>
<div style="font-size: medium;"> <strong><?= Time::now()->format("d/m/Y H:i:s") ?></strong></div>
</div>
<div class="section">
<div class="cover">
<div class="portada">
<img class="portada-img" src="<?= "data:image/png;base64," . base64_encode(file_get_contents(WRITEPATH . "uploads/" . $ot->portada_path)) ?>">
</div>
<div class="portada-info">
<div class="d-flex flex-row justify-content-end">
<h1 class="text-success"><?= $presupuesto->presupuestoLineaImpresion()->isRotativa() ? "Rotativa" : "Plana" ?></h1>
</div>
<div class="portada-row">
<span class="portada-text pl-2"><strong><?= $dates->fecha_encuadernado_at ? week_day_humanize(Time::createFromFormat("Y-m-d", $dates->fecha_encuadernado_at)->getDayOfWeek(), true) : "" ?></strong></span>
<div class="portada-text pr-2"><strong>Comercial:</strong> <?= $cliente->first_name . " " . $cliente->comercial()->last_name ?> </div>
</div>
<div class="portada-row-2 <?= $ot->fecha_entrega_warning ? "bg-red" : "bg-white" ?>">
<div style="display: flex;flex-direction:column;height:100%;width:25%">
<span class="portada-text date <?= $ot->fecha_entrega_warning ? "bg-red" : "bg-white" ?> " id="fecha_encuadernado_at"><?= $dates->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d", $dates->fecha_encuadernado_at)?->format("d/m/Y") : "" ?></span>
<!-- <div style="width: 100%;height: 100%;background-color:white;margin-left:0.5rem;margin-bottom:0.5rem">
</div> -->
<div class="pl-2">
<table id="table-portada-ubicacion">
<tr class="t-row">
<th class="t-header">IN</th>
<td class="t-cell"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">PO</th>
<td class="t-cell"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">PL</th>
<td class="t-cell"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">EN</th>
<td class="t-cell"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">MA</th>
<td class="t-cell"><?= $ubicacion ?></td>
</tr>
</table>
</div>
</div>
<div style="display: flex;flex-direction:column;height:100%;width:10%" class="pt-2">
<div class="pl-2 pt-2">
<table id="table-portada-ubicacion">
<tr class="t-row">
<th class="t-header" style="font-size: large;">RF</th>
</tr>
</table>
</div>
</div>
<div class="square-wrapper">
<div class="square bg-white">
BCLF 100
</div>
<div class="square bg-white">
0:3
</div>
<div class="square bg-gray">
EM 300
</div>
<div class="square bg-blue">
BRILLO
</div>
</div>
<div class="cod">
<div class="code-code">
<p style="line-height: 0px;font-size:20px"><?= $ot->id ?></p>
</div>
<div class="cod-barras">
<img src="data:image/png;base64,<?= $ot->bar_code ?>" alt="barcode" />
</div>
</div>
</div>
</div>
</div>
</div>
<div class="section">
<div class="flex-row">
<div class="flex-col" id="presupuesto-section">
<table>
<tr>
<th>Cliente</th>
<td class="t-cell ">
<p class="cliente-title"><?= $cliente->nombre ?></p>
</td>
</tr>
<tr>
<th>Titulo</th>
<td class="t-cell ">
<p class="presupuesto-title"><?= $presupuesto->titulo ?></p>
</td>
</tr>
<tr>
<th>ISBN</th>
<td class="t-cell"><?= $presupuesto->isbn ?></td>
</tr>
<tr>
<th>CIF</th>
<td class="t-cell"><?= $cliente->cif ?></td>
</tr>
</table>
</div>
<div class="esquema-imposicion-wrapper">
<div class="esquema">
<div class="pagina-imposicion-outer-start">
<div class="pagina-imposicion-inner">
A
</div>
</div>
<div class="pagina-imposicion-outer">
<div class="pagina-imposicion-inner">
A
</div>
</div>
<div class="pagina-imposicion-outer">
<div class="pagina-imposicion-inner">
A
</div>
</div>
<div class="pagina-imposicion-outer-end">
<div class="pagina-imposicion-inner">
A
</div>
</div>
</div>
<div class="imposicion">
<table style="width: 400%;">
<tr>
<th>Imposicion</th>
<td>400x400</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="section">
<div class="section-title impresion">IMP. INTERIOR</div>
<table>
<tr>
<td rowspan="3" class="row-logo-impresion"><img src="<?= site_url($linea_impresion->get_impresion_logo()) ?>" width="35px" height="35px"></td>
<th>Páginas</th>
<th>Ejemplares</th>
<th>Tintas</th>
<th>Formas</th>
<th>Máquina</th>
<th>Clics</th>
<th>Tiempo</th>
</tr>
<tr>
<td><?= $presupuesto->paginas ?></td>
<td><?= $presupuesto->tirada ?></td>
<td>??</td>
<td><?= json_decode($linea_impresion->formas)->formas ?></td>
<td><strong><?= $linea_impresion->maquina()->nombre ?></strong></td>
<td><?= $linea_impresion->rotativa_clicks_total ?></td>
<td><?= float_seconds_to_hhmm_string($linea_impresion->horas_maquina * 3600) ?></td>
</tr>
<tr>
<td colspan="4"><?= $linea_impresion->papel_impresion ?></td>
<td><?= $linea_impresion->papel_impresion()->gramaje . " " . "gr" ?></td>
<td colspan="2"><?= number_format($linea_impresion->rotativa_metros_total, 2, ',', '.') ?> metros</td>
</tr>
</table>
<div class="comments">
<div class="flex-row impresion">Comentarios impresión interior</div>
<div class="comment-content">
<p>
</p>
<br />
<p>
</p>
</div>
</div>
</div>
<div class="section">
<div class="section-title cubierta">IMP. CUBIERTA</div>
<table>
<tr>
<td rowspan="3" class="row-logo-impresion"><img src="<?= site_url($linea_cubierta->get_impresion_logo()) ?>" width="35px" height="35px"></td>
<th>Tintas</th>
<th>Ejemplares</th>
<th>Maquina</th>
<th>Marcapaginas</th>
<th>Tiempo</th>
</tr>
<tr>
<td>??</td>
<td><?= $presupuesto->tirada ?></td>
<td><strong><?= $linea_cubierta->maquina()->nombre ?></strong></td>
<td><?= $presupuesto->marcapaginas ? "SI" : "NO" ?></td>
<td><?= float_seconds_to_hhmm_string($linea_cubierta->horas_maquina * 3600) ?></td>
</tr>
<tr>
<td colspan="1"><?= json_decode($linea_cubierta->formas)->maquina_ancho ?>x<?= json_decode($linea_cubierta->formas)->maquina_alto ?></td>
<td colspan="1"><?= $papel_formato->ancho ?>x<?= $papel_formato->alto ?></td>
<td colspan="2"><?= $linea_cubierta->papel_impresion ?></td>
<td colspan="2"><?= $linea_cubierta->papel_impresion()->gramaje . " " . "gr" ?></td>
</tr>
</table>
<div class="comments">
<div class="flex-row cubierta">Comentarios cubierta</div>
<div class="comment-content">
<p>
</p>
</div>
</div>
</div>
<div class="section">
<div class="section-title encuadernacion">ENCUADERNACIÓN</div>
<table>
<tr>
<th class="t-header">Plastificado</th>
<td class="t-cell"><?= $acabados[0]->tarifa()->nombre ?></td>
<th class="t-header" style="width: 10%;">UVI</th>
<td class="t-cell"> ?? </td>
</tr>
</table>
<table>
<tr>
<th class="t-header">MAQUINA</th>
<td class="t-cell"><?= implode("/", array_map(fn($q) => $q->nombre, $acabados[0]->maquinas())) ?> </td>
</tr>
</table>
<table>
<tr>
<th class="t-header">OPERARIO</th>
<td class="t-cell"><?= $ot->users()->plastificado_by->getFullName() ?> </td>
</tr>
</table>
<?php if (count($encuadernaciones) > 0): ?>
<table>
<tr>
<th>Encuadernacion</th>
<th>Solapas</th>
<th>Sobrecubierta</th>
<th>Plegado</th>
<th>Guardas</th>
<th>Retractilado</th>
<th>Marcapáginas</th>
</tr>
<?php foreach ($encuadernaciones as $key => $value): ?>
<tr>
<td><?= $value->tarifa()->nombre ?></td>
<td><?= $presupuesto->solapas ? "SI" : "NO" ?></td>
<td><?= $presupuesto->hasSobrecubierta() ? "SI" : "NO" ?></td>
<td> ______ pliegos de ______ </td>
<td><?= $presupuesto->guardas ? "SI" : "NO" ?></td>
<td><?= $presupuesto->retractilado ? "SI" : "NO" ?></td>
<td><?= $presupuesto->marcapaginas ? "SI" : "NO" ?></td>
</tr>
<?php endforeach; ?>
</table>
<div class="comments">
<div class="flex-row encuadernacion">Comentarios encuadernacion:</div>
<div class="comment-content">
<p>
</p>
</div>
</div>
<?php endif; ?>
</div>
<div class="section">
<div class="section-title">LOGISTICA</div>
<table>
<tr>
<th>Peso Unidad</th>
<th>Peso Pedido</th>
<th>Cajas</th>
<th>Corte Pie</th>
</tr>
<tr>
<td><?= number_format($peso_unidad, 2, ',', '.') ?> gr</td>
<td><?= $peso_pedido > 1000 ? number_format($peso_pedido / 1000, 2, ',', '.') . " kg" : number_format($peso_pedido, 2, ',', '.') . " gr" ?> </td>
<td>-</td>
<td>-</td>
</tr>
</table>
<div class="comments">
<div class="flex-row">Comentarios logistica:</div>
<div class="comment-content">
<p>
</p>
</div>
</div>
</div>
<div class="footer">
&copy; 2024 SAFEKAT. Todos los derechos reservados.
</div>
<script src=<?= site_url("themes/vuexy/vendor/libs/html2pdf/html2pdf.bundle.min.js") ?>></script>
<script src="<?= site_url('themes/vuexy/vendor/libs/jquery/jquery.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/libs/popper/popper.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/js/bootstrap.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/libs/flatpickr/flatpickr.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/libs/perfect-scrollbar/perfect-scrollbar.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/libs/hammer/hammer.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/js/menu.js') ?>"></script>
<script src="<?= site_url('assets/js/safekat/pages/pdf/otDownload.js') ?>"></script>
</div>
</body>
</html>

View File

@ -1,126 +1,161 @@
<?php
use CodeIgniter\I18n\Time;
$session = session();
$settings = $session->get('settings');
?>
<!DOCTYPE html>
<html lang="es">
<html
lang="<?= $session->get('lang') ?>"
data-assets-path="<?= site_url('themes/vuexy/') ?>"
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Icons -->
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/fonts/fontawesome.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/fonts/tabler-icons.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/fonts/flag-icons.css') ?>" />
<!-- Core CSS -->
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/css/rtl/core.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/css/rtl/theme-semi-dark.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/safekat.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/css/pages/app-chat.css') ?>">
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/flatpickr/flatpickr.css') ?>" />
<link rel="icon" type="image/x-icon" href="<?= site_url('themes/vuexy/img/favicon/favicon.ico') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/pdf.ot.css') ?>">
<title><?= $presupuesto->titulo ?>[OT:<?= $ot->id ?>]</title>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/pdf.ot.css') ?>">
<title>Rotativa</title>
</head>
<body>
<div>
<div class="header">
<div class="title"><?= $presupuesto->titulo ?></div>
<div><?= Time::now()->format("d/m/Y H:i:s") ?></div>
<div class="col-md-12" data-id=<?= $ot->id ?>>
<div class="row">
<div class="col-12 d-flex justify-content-between align-items-center">
<h4><?= $presupuesto->titulo ?></h4>
<span class="fs-medium"><strong><?= Time::now()->format("d/m/Y H:i:s") ?></strong></span>
</div>
</div>
<div class="section">
<div class="cover">
<div class="portada">
<img class="portada-img" src="<?= "data:image/png;base64," . base64_encode(file_get_contents(WRITEPATH . "uploads/" . $ot->portada_path)) ?>">
</div>
<div class="portada-info">
<div class="portada-row">
<p class="portada-text pl-2"><strong><?= $dates->fecha_encuadernado_at ? week_day_humanize(Time::createFromFormat("Y-m-d", $dates->fecha_encuadernado_at)->getDayOfWeek(),true) : "" ?></strong></p>
<div class="portada-text pr-2"><strong>Comercial:</strong> <?= $cliente->first_name . " " . $cliente->comercial()->last_name ?> </div>
</div>
<div class="row mb-2 d-flex flex align-items-stretch">
<div class="col-2">
<img class="portada-img border-secondary img-thumbnail img-fluid" src="<?= $ot->portada_path ? "data:image/png;base64,".base64_encode(file_get_contents(WRITEPATH . "uploads/" . $ot->portada_path)): '/assets/img/portada_not_found.png' ?>" />
</div>
<div class="col-10 <?= $ot->fecha_entrega_warning ? "bg-danger" : "bg-secondary" ?> py-2 rounded border-1 border-secondary">
<div class="row">
<div class="col-8">
<div class="px-2 d-flex flex justify-content-between align-items-center mb-2 border boder-1 border-dark bg-primary text-white rounded-pill bordered border-secondary">
<span><strong><?= $dates->fecha_encuadernado_at ? week_day_humanize(Time::createFromFormat("Y-m-d", $dates->fecha_encuadernado_at)->getDayOfWeek(), true) : "" ?></strong></span>
<span><strong>Comercial:</strong> <?= $cliente->first_name . " " . $cliente->comercial()->last_name ?> </span>
</div>
<div class="portada-row-2">
<div style="display: flex;flex-direction:column;height:100%;width:25%">
<p class="portada-text date" id="fecha_encuadernado_at"><?= $dates->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d", $dates->fecha_encuadernado_at)?->format("d/m/Y") : "" ?></p>
<!-- <div style="width: 100%;height: 100%;background-color:white;margin-left:0.5rem;margin-bottom:0.5rem">
</div> -->
<div class="pl-2">
<table id="table-portada-ubicacion">
<tr class="t-row">
<th class="t-header">IN</th>
<td class="t-cell"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">PO</th>
<td class="t-cell"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">PL</th>
<td class="t-cell"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">EN</th>
<td class="t-cell"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">MA</th>
<td class="t-cell"><?= $ubicacion ?></td>
</tr>
</table>
</div>
</div>
<div style="display: flex;flex-direction:column;height:100%;width:10%" class="pt-2">
<div class="pl-2 pt-2">
<table id="table-portada-ubicacion">
<tr class="t-row">
<th class="t-header" style="font-size: large;">RF</th>
</tr>
</table>
</div>
</div>
<div class="square-wrapper">
<div class="square bg-white">
BCLF 100
</div>
<div class="square bg-white">
0:3
</div>
<div class="square bg-gray">
EM 300
</div>
<div class="square bg-blue">
BRILLO
</div>
</div>
<div class="cod">
<div class="code-code">
<p style="line-height: 0px;font-size:20px"><?= $ot->id ?></p>
</div>
<div class="cod-barras"></div>
</div>
</div>
<div class="col-4">
<div class="px-2 d-flex flex justify-content-center align-items-center mb-2 border boder-1 border-dark bg-success rounded-pill">
<span class="text-white"><strong><?= $presupuesto->presupuestoLineaImpresion()->isRotativa() ? "Rotativa" : "Plana" ?></strong></span>
</div>
</div>
</div>
</div>
<div class="section">
<div class="flex-row">
<div class="flex-col" id="presupuesto-section">
<table>
<tr>
<th>Cliente</th>
<td class="t-cell ">
<p class="cliente-title"><?= $cliente->nombre ?></p>
</td>
</tr>
<tr>
<th>Titulo</th>
<td class="t-cell ">
<p class="presupuesto-title"><?= $presupuesto->titulo ?></p>
</td>
</tr>
<tr>
<th>ISBN</th>
<td class="t-cell"><?= $presupuesto->isbn ?></td>
</tr>
<tr>
<th>CIF</th>
<td class="t-cell"><?= $cliente->cif ?></td>
</tr>
</table>
<div class="row p-2">
<div class="col-4 h-100">
<div class="row px-2 d-flex flex justify-content-between align-items-center">
<div class="col-6 w-75 border border-1 border-dark text-center <?= $ot->fecha_entrega_warning ? "bg-danger" : "bg-secondary" ?> ">
<span class="text-white" id="fecha_encuadernado_at"><strong><?= $dates->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d", $dates->fecha_encuadernado_at)?->format("d/m/Y") : "" ?></strong></span>
</div>
<div class="col-6 w-25 border border-1 border-dark text-center bg-secondary text-white">
<strong>RF</strong>
</div>
</div>
<div class="row px-2 mt-2 h-100">
<table class="h-100">
<tr class="t-row">
<th class="t-header">IN</th>
<td class="t-cell bg-white"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">PO</th>
<td class="t-cell bg-white"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">PL</th>
<td class="t-cell bg-white"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">EN</th>
<td class="t-cell bg-white"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">MA</th>
<td class="t-cell bg-white"><?= $ubicacion ?></td>
</tr>
</table>
</div>
</div>
<div class="col-4">
<div class="row h-100">
<div class="col-6 h-50 square text-center text-dark bg-secondary border border-right border-dark">
BCLF 100
</div>
<div class="col-6 h-50 square text-center text-dark bg-secondary border border-right border-dark">
0:3
</div>
<div class="col-6 h-50 square bg-primary text-center text-white border border-right border-dark">
EM 300
</div>
<div class="col-6 h-50 square bg-blue text-center text-dark bg-secondary border border-right border-dark">
BRILLO
</div>
</div>
</div>
<div class="col-4 bg-warning border border-dark">
<div class="row h-100">
<div class="col-12 h-25 d-flex flex align-items-center justify-content-center">
<span class="fs-large text-white"><strong><?= $ot->id ?></strong></span>
</div>
<div class="col-12 h-75 d-flex flex align-items-center justify-content-center bg-white">
<img class="img-fluid" src="data:image/png;base64,<?= $ot->bar_code ?>" alt="barcode" />
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row mb-2">
<div class="col-8">
<table class="h-100">
<tr>
<th>Cliente</th>
<td class="t-cell ">
<?= $cliente->nombre ?>
</td>
</tr>
<tr>
<th>Titulo</th>
<td class="t-cell ">
<?= $presupuesto->titulo ?>
</td>
</tr>
<tr>
<th>ISBN</th>
<td class="t-cell"><?= $presupuesto->isbn ?></td>
</tr>
<tr>
<th>CIF</th>
<td class="t-cell"><?= $cliente->cif ?></td>
</tr>
</table>
</div>
<div class="col-4">
<div class="col-12 mb-2">
<div class="esquema-imposicion-wrapper">
<div class="esquema">
<div class="pagina-imposicion-outer-start">
@ -144,52 +179,56 @@ use CodeIgniter\I18n\Time;
</div>
</div>
</div>
<div class="imposicion">
<table style="width: 400%;">
<tr>
<th>Imposicion</th>
<td>400x400</td>
</tr>
</table>
</div>
</div>
</div>
<div class="col-12">
<div class="imposicion">
<table>
<tr>
<th>Imposicion</th>
<td>??</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="row mb-2">
<div class="section-title impresion">IMP. INTERIOR</div>
<div class="col-12">
<div>
<table>
<tr>
<td rowspan="3" class="row-logo-impresion"><img src="<?= site_url($linea_impresion->get_impresion_logo()) ?>" width="35px" height="35px"></td>
<th>Páginas</th>
<th>Ejemplares</th>
<th>Tintas</th>
<th>Formas</th>
<th>Máquina</th>
<th>Clics</th>
<th>Tiempo</th>
</tr>
<tr>
<td><?= $presupuesto->paginas ?></td>
<td><?= $presupuesto->tirada ?></td>
<td>??</td>
<td><?= json_decode($linea_impresion->formas)->formas ?></td>
<td><strong><?= $linea_impresion->maquina()->nombre ?></strong></td>
<td><?= $linea_impresion->rotativa_clicks_total ?></td>
<td><?= float_seconds_to_hhmm_string($linea_impresion->horas_maquina * 3600) ?></td>
</tr>
<tr>
<td colspan="4"><?= $linea_impresion->papel_impresion ?></td>
<td><?= $linea_impresion->papel_impresion()->gramaje . " " . "gr" ?></td>
<td colspan="2"><?= number_format($linea_impresion->rotativa_metros_total, 2, ',', '.') ?> metros</td>
<div class="section">
<div class="section-title impresion">IMP. INTERIOR</div>
<table>
<tr>
<td rowspan="3" class="row-logo-impresion"><img src="<?= site_url($linea_impresion->get_impresion_logo()) ?>" width="35px" height="35px"></td>
<th>Páginas</th>
<th>Ejemplares</th>
<th>Tintas</th>
<th>Formas</th>
<th>Máquina</th>
<th>Clics</th>
<th>Tiempo</th>
</tr>
<tr>
<td><?= $presupuesto->paginas ?></td>
<td><?= $presupuesto->tirada ?></td>
<td>??</td>
<td><?= json_decode($linea_impresion->formas)->formas ?></td>
<td><strong><?= $linea_impresion->maquina()->nombre ?></strong></td>
<td><?= $linea_impresion->rotativa_clicks_total ?></td>
<td><?= float_seconds_to_hhmm_string($linea_impresion->horas_maquina * 3600) ?></td>
</tr>
<tr>
<td colspan="4"><?= $linea_impresion->papel_impresion ?></td>
<td><?= $linea_impresion->papel_impresion()->gramaje . " " . "gr" ?></td>
<td colspan="2">_________ metros</td>
</tr>
</table>
</tr>
</table>
</div>
<div class="comments">
<div class="flex-row impresion">Comentarios impresión interior</div>
<div class="comment-content">
<div class="comment-content w-100">
<p>
</p>
<br />
@ -198,9 +237,11 @@ use CodeIgniter\I18n\Time;
</div>
</div>
</div>
</div>
<div class="row mb-2">
<div class="section-title cubierta">IMP. CUBIERTA</div>
<div class="col-12">
<div class="section">
<div class="section-title cubierta">IMP. CUBIERTA</div>
<table>
<tr>
<td rowspan="3" class="row-logo-impresion"><img src="<?= site_url($linea_cubierta->get_impresion_logo()) ?>" width="35px" height="35px"></td>
@ -233,51 +274,53 @@ use CodeIgniter\I18n\Time;
</div>
</div>
</div>
<div class="section">
<div class="section-title encuadernacion">ENCUADERNACIÓN</div>
</div>
<div class="row mb-2">
<div class="section-title encuadernacion">ENCUADERNACIÓN</div>
<div class="col-12">
<table>
<tr>
<th class="t-header">Plastificado</th>
<th class="t-header" style="width: 10%;">Plastificado</th>
<td class="t-cell"><?= $acabados[0]->tarifa()->nombre ?></td>
<th class="t-header" style="width: 10%;">UVI</th>
<td class="t-cell"> ?? </td>
<th class="t-header" style="width: 10%;">Máquina</th>
<td class="t-cell"><?= implode("/", array_map(fn($q) => $q->nombre, $acabados[0]->maquinas())) ?> </td>
<th class="t-header" style="width: 10%;">Operario</th>
<td class="t-cell"><?= $ot->users()->plastificado_by?->getFullName() ?? null ?> </td>
</tr>
</table>
<table>
<tr>
<th class="t-header">MAQUINA</th>
<td class="t-cell"> ?? </td>
<th>Encuadernacion</th>
<th>Solapas</th>
<th>Sobrecubierta</th>
<th>Plegado</th>
<th>Guardas</th>
<th>Retractilado</th>
<th>Marcapáginas</th>
</tr>
</table>
<table>
<tr>
<th class="t-header">OPERARIO</th>
<td class="t-cell"> ?? </td>
</tr>
</table>
<?php if (count($encuadernaciones) > 0): ?>
<table>
<tr>
<th>Encuadernacion</th>
<th>Solapas</th>
<th>Sobrecubierta</th>
<th>Plegado</th>
<th>Guardas</th>
<th>Retractilado</th>
<th>Marcapáginas</th>
</tr>
<?php if (count($encuadernaciones) > 0): ?>
<?php foreach ($encuadernaciones as $key => $value): ?>
<tr>
<td><?= $value->tarifa()->nombre ?></td>
<td><?= $presupuesto->solapas ? "SI" : "NO" ?></td>
<td><?= $presupuesto->hasSobrecubierta() ? "SI" : "NO" ?></td>
<td> ______ pliegos de ______ </td>
<td> <?= $linea_impresion->pliegos_libro?>/<?=$linea_impresion->pliegos_pedido?> </td>
<td><?= $presupuesto->guardas ? "SI" : "NO" ?></td>
<td><?= $presupuesto->retractilado ? "SI" : "NO" ?></td>
<td><?= $presupuesto->marcapaginas ? "SI" : "NO" ?></td>
</tr>
<?php endforeach; ?>
</table>
<?php else: ?>
<tr>
<td colspan="7">Sin encuadernación</td>
</tr>
<?php endif; ?>
</table>
<?php if (count($encuadernaciones) > 0): ?>
<div class="comments">
<div class="flex-row encuadernacion">Comentarios encuadernacion:</div>
<div class="comment-content">
@ -286,10 +329,13 @@ use CodeIgniter\I18n\Time;
</div>
</div>
<?php endif; ?>
</div>
<div class="section">
<div class="section-title">LOGISTICA</div>
</div>
<div class="row mb-2">
<div class="section-title">LOGISTICA</div>
<div class="col-12">
<table>
<tr>
<th>Peso Unidad</th>
@ -298,8 +344,8 @@ use CodeIgniter\I18n\Time;
<th>Corte Pie</th>
</tr>
<tr>
<td><?= $peso_unidad ?>gr</td>
<td><?= $peso_pedido ?>gr</td>
<td><?= number_format($peso_unidad, 2, ',', '.') ?> gr</td>
<td><?= $peso_pedido > 1000 ? number_format($peso_pedido / 1000, 2, ',', '.') . " kg" : number_format($peso_pedido, 2, ',', '.') . " gr" ?> </td>
<td>-</td>
<td>-</td>
</tr>
@ -312,11 +358,21 @@ use CodeIgniter\I18n\Time;
</div>
</div>
</div>
<div class="footer">
&copy; 2024 SAFEKAT. Todos los derechos reservados.
</div>
</div>
<div class="col-md-12 d-flex justify-content-center align-items-center">
<span>&copy; 2024 SAFEKAT. Todos los derechos reservados.</span>
</div>
<script src=<?= site_url("themes/vuexy/vendor/libs/html2pdf/html2pdf.bundle.min.js") ?>></script>
<script src="<?= site_url('themes/vuexy/vendor/libs/jquery/jquery.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/libs/popper/popper.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/js/bootstrap.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/libs/flatpickr/flatpickr.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/libs/perfect-scrollbar/perfect-scrollbar.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/libs/hammer/hammer.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/js/menu.js') ?>"></script>
<script src="<?= site_url('assets/js/safekat/pages/pdf/otDownload.js') ?>"></script>
</body>
</html>