colores header pdf ot

This commit is contained in:
amazuecos
2025-04-16 09:14:16 +02:00
parent 5dbb40af1d
commit 7ee844fb0c
11 changed files with 326 additions and 77 deletions

View File

@ -36,7 +36,7 @@ $settings = $session->get('settings');
<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>
<h5><?= $presupuesto->titulo ?></h5>
<span class="fs-medium"><strong><?= Time::now()->format("d/m/Y H:i:s") ?></strong></span>
</div>
</div>
@ -46,79 +46,98 @@ $settings = $session->get('settings');
<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="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 mb-2 border boder-1 border-dark bg-primary text-white rounded-pill bordered border-secondary">
<span><strong><?= $pedido->fecha_encuadernado ? week_day_humanize(Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->getDayOfWeek(), true) : "" ?></strong></span>
<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 mb-2 border boder-1 border-dark bg-success rounded-pill">
<span class="text-white"><strong><?= $presupuesto->presupuestoLineaImpresion()->isRotativa() ? "Rotativa" : "Plana" ?></strong></span>
<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-4 h-100">
<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-75 border border-1 border-dark text-center <?= $ot->fecha_entrega_warning ? "bg-danger" : "bg-white" ?> ">
<span class="<?= $ot->fecha_entrega_warning ? "text-white" : "text-black" ?>" id="fecha_encuadernado_at"><strong><?= $pedido->fecha_encuadernado ? Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->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><?=isset($encuadernaciones[0]) ? $encuadernaciones[0]->tarifa()->code ?? "?" : "?" ?></strong>
<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 class="t-row">
<th class="t-header">IN</th>
<tr>
<th>IN</th>
<td class="t-cell bg-white"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">PO</th>
<tr>
<th>PORT.</th>
<td class="t-cell bg-white"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">PL</th>
<tr>
<th>ACABAD.</th>
<td class="t-cell bg-white"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">EN</th>
<tr>
<th>ENCUAD.</th>
<td class="t-cell bg-white"><?= $ubicacion ?></td>
</tr>
<tr class="t-row">
<th class="t-header">MA</th>
<tr>
<th>MANIPUL.</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-white border border-right border-dark">
<?= $linea_impresion->papel_impresion()->papel_code_ot ?>
</div>
<div class="col-6 h-50 square text-center <?=$linea_impresion->isColor() ? "cmyk" : "bn" ?> border border-right border-dark">
<?= $tiempo_procesamiento ?>
</div>
<div class="col-6 h-50 square bg-primary text-center text-white border border-right border-dark">
<?= $linea_cubierta->papel_impresion()->papel_code_ot ?>
</div>
<div class="col-6 h-50 square bg-blue text-center text-dark bg-secondary border border-right border-dark">
<?= isset($acabados[0]) ? $acabados[0]->tarifa()->code : "" ?>
<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>
<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 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-12 h-75 d-flex flex align-items-center justify-content-center bg-white">
<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>
@ -132,25 +151,25 @@ $settings = $session->get('settings');
<div class="col-8">
<table class="h-50">
<tr>
<th >Cliente</th>
<th>CLIENTE</th>
<td class="t-cell">
<?= $cliente->nombre ?>
<?= $cliente->alias ?>
</td>
</tr>
<tr>
<th >Titulo</th>
<th>TITULO</th>
<td class="t-cell">
<?= $presupuesto->titulo ?>
</td>
</tr>
<tr>
<th >ISBN</th>
<th>ISBN</th>
<td class="t-cell"><?= $presupuesto->isbn ?></td>
</tr>
<tr>
<th >CIF</th>
<td class="t-cell"><?= $cliente->cif ?></td>
<th>PEDIDO CLIENTE</th>
<td class="t-cell"><?= $pedido->id ?></td>
</tr>
</table>
</div>
@ -198,18 +217,18 @@ $settings = $session->get('settings');
<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>
<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>
@ -296,7 +315,7 @@ $settings = $session->get('settings');
<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"> ?? </td>
<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>
@ -319,7 +338,7 @@ $settings = $session->get('settings');
<td><?= $value->tarifa()->nombre ?></td>
<td><?= $presupuesto->solapas ? "SI" : "NO" ?></td>
<td><?= $presupuesto->hasSobrecubierta() ? "SI" : "NO" ?></td>
<td>_____<?=" ".lang("Produccion.pliegos_de")." "?>_____</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>