mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
409 lines
20 KiB
PHP
409 lines
20 KiB
PHP
<?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="row">
|
|
<div class="col-12 d-flex justify-content-between align-items-center">
|
|
<h5><?= $presupuesto->titulo ?></h5>
|
|
<span class="fs-medium"><strong><?= Time::now()->format("d/m/Y H:i:s") ?></strong></span>
|
|
</div>
|
|
</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 py-2 rounded border-1 border-secondary" style="background-color: <?= $colors["general"]["bg"] ?>;color:<?= $colors["general"]["color"] ?>;">
|
|
<div class="row">
|
|
<div class="col-8">
|
|
<div class="px-2 d-flex flex justify-content-between align-items-center" style="background-color: <?= $colors["week_day"]["bg"] ?>;color:<?= $colors["week_day"]["color"] ?>;">
|
|
<span><strong><?= $pedido->fecha_encuadernado ? week_day_humanize(Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->getDayOfWeek() - 1, true) : "" ?></strong></span>
|
|
<span><strong>Comercial:</strong> <?= $cliente->first_name . " " . $cliente->comercial()->last_name ?> </span>
|
|
</div>
|
|
</div>
|
|
<div class="col-4">
|
|
<div class="px-2 d-flex flex justify-content-center align-items-center w-100">
|
|
<span class="w-100 text-center" style="background-color: <?= $colors["impresion_interior_ppal"]["bg"] ?>;color:<?= $colors["impresion_interior_ppal"]["color"] ?>;">
|
|
<?php if ($isPOD): ?>
|
|
<strong>ROTATIVA</strong>
|
|
<?php elseif ($presupuesto->presupuestoLineaImpresion()->isRotativa()): ?>
|
|
<strong>ROTATIVA</strong>
|
|
<?php else: ?>
|
|
<strong>GENERAL</strong>
|
|
<?php endif; ?>
|
|
|
|
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row p-2">
|
|
<div class="col-3 h-100">
|
|
<div class="row px-2 d-flex flex justify-content-between align-items-center">
|
|
<div class="col-6 w-100 text-center">
|
|
<span id="fecha_encuadernado_at" style="color:<?= $colors["general"]["color"] ?>;"><strong><?= $pedido->fecha_encuadernado ? Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->format('d/m/Y') : "??" ?></strong></span>
|
|
</div>
|
|
</div>
|
|
<div class="row px-2 mt-2 h-100">
|
|
<table class="h-100">
|
|
<tr>
|
|
<th>IN</th>
|
|
<td class="t-cell bg-white"><?= $ubicacion ?></td>
|
|
</tr>
|
|
<tr>
|
|
<th>PORT.</th>
|
|
<td class="t-cell bg-white"><?= $ubicacion ?></td>
|
|
</tr>
|
|
<tr>
|
|
<th>ACABAD.</th>
|
|
<td class="t-cell bg-white"><?= $ubicacion ?></td>
|
|
</tr>
|
|
<tr>
|
|
<th>ENCUAD.</th>
|
|
<td class="t-cell bg-white"><?= $ubicacion ?></td>
|
|
</tr>
|
|
<tr>
|
|
<th>MANIPUL.</th>
|
|
<td class="t-cell bg-white"><?= $ubicacion ?></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-5">
|
|
<div class="row">
|
|
<div class="col-12 w-50 text-center" style="background-color: <?= $colors["ot"]["bg"] ?>;color:<?= $colors["ot"]["color"] ?>;">
|
|
<strong><?= isset($encuadernaciones[0]) ? $encuadernaciones[0]->tarifa()->code ?? "?" : "?" ?></strong>
|
|
</div>
|
|
</div>
|
|
<div class="row h-75">
|
|
<div class="col-6 square text-center" style="background-color: <?= $colors["papel_interior"]["bg"] ?>;color:<?= $colors["papel_interior"]["color"] ?>;">
|
|
<?= $linea_impresion->papel_impresion()->papel_code_ot ?>
|
|
</div>
|
|
<div class="col-6 square text-center <?= $linea_impresion->isColor() ? "cmyk" : "bn" ?>">
|
|
<?= $tiempo_impresion ?>
|
|
</div>
|
|
<div class="col-6 square text-center" style="background-color: <?= $colors["papel_cubierta"]["bg"] ?>;color:<?= $colors["papel_cubierta"]["color"] ?>;">
|
|
<?= $linea_cubierta->papel_impresion()->papel_code_ot ?>
|
|
</div>
|
|
<div class="col-6 square text-center" style="background-color: <?= $colors["plastificado"]["bg"] ?>;color:<?= $colors["plastificado"]["color"] ?>;">
|
|
<?= isset($acabados[0]) ? $acabados[0]->tarifa()->code : "" ?>
|
|
</div>
|
|
<?php foreach ($acabados as $key => $acabado): ?>
|
|
<?php if ($acabado->tarifa()->isUVI()): ?>
|
|
<div class="col-6 square offset-md-6 text-center" style="background-color:<?= $acabado->tarifa()->code == "R2D" ? "#4D93D9" : "#0070C0" ?>;color:white;">
|
|
+ <?= $acabado->tarifa()->code ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
</div>
|
|
<div class="col-4" style="background-color: <?= $colors["ot"]["bg"] ?>">
|
|
<div class="row h-100">
|
|
<div class="col-12 h-50 d-flex flex align-items-center justify-content-center">
|
|
<span class="fs-large" style="color:<?= $colors["ot"]["color"] ?>;"><strong><?= $ot->id ?></strong></span>
|
|
</div>
|
|
<div class="col-12 h-50 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">
|
|
<div class="col-8">
|
|
<table class="h-50">
|
|
<tr>
|
|
<th>CLIENTE</th>
|
|
<td class="t-cell">
|
|
<?= $cliente->alias ?>
|
|
</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>PEDIDO CLIENTE</th>
|
|
<td class="t-cell"><?= $pedido->id ?></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">
|
|
<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>
|
|
|
|
</div>
|
|
<div class="col-12">
|
|
<div class="imposicion">
|
|
<table>
|
|
<tr>
|
|
<th class="w-50">Imposicion</th>
|
|
<td><?= $imposicion?->full_name ?? "" ?></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>
|
|
<th class="t-header" style="width: 10%;"><?= lang('Produccion.size') ?></th>
|
|
<td class="t-cell text-center"> <?= $papel_formato->ancho ?>x<?= $papel_formato->alto ?> </td>
|
|
<th class="t-header" style="width: 10%;"><?= lang('Produccion.ejemplares') ?></th>
|
|
<td class="t-cell text-center"> <?= $presupuesto->tirada ?> </td>
|
|
<th class="t-header" style="width: 10%;"><?= lang('Produccion.tipo') ?></th>
|
|
<td class="t-cell text-center"> <?= $linea_impresion->tipo ?> </td>
|
|
<th class="t-header" style="width: 10%;"><?= lang('Produccion.lomo') ?></th>
|
|
<td class="t-cell text-center"> <?= number_format($presupuesto->lomo_cubierta, 2, ',', '.') ?> </td>
|
|
</tr>
|
|
</table>
|
|
<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>
|
|
<div class="comments">
|
|
<div class="flex-row impresion">Comentarios impresión interior</div>
|
|
<div class="comment-content w-100">
|
|
<p>
|
|
</p>
|
|
<br />
|
|
<p>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-2">
|
|
<div class="section-title cubierta">IMP. CUBIERTA</div>
|
|
<div class="col-12">
|
|
|
|
<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>
|
|
<div class="row mb-2">
|
|
<div class="section-title encuadernacion">ENCUADERNACIÓN</div>
|
|
<div class="col-12">
|
|
<table>
|
|
<tr>
|
|
<th class="t-header" style="width: 10%;">Plastificado</th>
|
|
<td class="t-cell text-center"><?= $acabados[0]->tarifa()->nombre ?></td>
|
|
<th class="t-header" style="width: 10%;">UVI</th>
|
|
<td class="t-cell text-center"> <?= $uvi ? $uvi->code : "" ?> </td>
|
|
<th class="t-header" style="width: 10%;">Máquina</th>
|
|
<td class="t-cell text-center"><?= implode("/", array_map(fn($q) => $q->nombre, $acabados[0]->maquinas())) ?> </td>
|
|
<th class="t-header " style="width: 10%;">Operario</th>
|
|
<td class="t-cell text-center"><?= $ot->users()?->plastificado_by?->getFullName() ?? null ?> </td>
|
|
</tr>
|
|
</table>
|
|
<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>_____<?= " " . lang("Produccion.pliegos_de") . " " ?>_____</td>
|
|
<td><?= $presupuesto->guardas ? "SI" : "NO" ?></td>
|
|
<td><?= $presupuesto->retractilado ? "SI" : "NO" ?></td>
|
|
<td><?= $presupuesto->marcapaginas ? "SI" : "NO" ?></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
<?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">
|
|
<p>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="row mb-2">
|
|
<div class="section-title">LOGISTICA</div>
|
|
<div class="col-12">
|
|
<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>
|
|
<div class="col-md-12 d-flex justify-content-center align-items-center">
|
|
<span class="footer">© 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>
|