File "historico_pdf.php"

Full Path: C:/wamp64/www/AVIDOTAPP/views/fconsuldota/historico_pdf.php
File size: 5.8 KB
MIME-type: text/html
Charset: utf-8

<!DOCTYPE html>
<html lang="es">
<head>
  <meta charset="UTF-8">
  <title>Registro Individual de Entrega de Dotación – <?= htmlspecialchars($noe) ?></title>
  <link rel="icon" type="image/png" href="assets/img/icono.png">
  <style>
    body { font-family: Arial, sans-serif; margin: 0; padding: 20px; }
    .container { max-width: 900px; margin: 0 auto; }
    .header-table { width: 100%; border: 2px solid #000; border-collapse: collapse; }
    .header-table td { border: 1px solid #000; padding: 10px; vertical-align: middle; }
    .logo-cell  { width: 150px; text-align: center; }
    .title-cell { text-align: center; font-weight: bold; font-size: 18px; }
    .info-cell  { width: 200px; }
    .employee-info { background-color: #CCCCCC; padding: 10px; text-align: center; font-weight: bold; margin: 20px 0; }
    .content-text  { text-align: justify; line-height: 1.6; margin: 20px 0; font-size: 13px; }
    .content-text p { margin-bottom: 10px; }
    .items-header { background-color: #CCCCCC; padding: 10px; text-align: center; font-weight: bold; margin: 20px 0 0; }
    .items-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
    .items-table td { padding: 8px; text-align: center; border-bottom: 1px solid #ccc; }
    .signature-section { width: 100%; border-collapse: collapse; margin: 30px 0; }
    .signature-section td { padding: 15px; vertical-align: top; }
    .signature-area { border: 2px dashed #999; width: 500px; height: 100px; background: #fff; text-align: center; }
    .signature-image { max-width: 490px; max-height: 90px; margin: 5px; }
    .print-buttons { text-align: center; margin: 20px 0; }
    .print-buttons button { padding: 10px 20px; font-size: 16px; border: none; border-radius: 5px; cursor: pointer; margin: 0 5px; }
    .btn-print { background-color: #d0101d; color: white; }
    .btn-close-w { background-color: #6c757d; color: white; }
    @media print {
      .print-buttons, .no-print { display: none !important; }
      body { margin: 0; padding: 10px; }
      @page { margin: 1cm; size: A4 portrait; }
    }
  </style>
</head>
<body>
<div class="container">

  <!-- Encabezado -->
  <table class="header-table">
    <tr>
      <td class="logo-cell">
        <img src="assets/img/sanmarino.PNG" alt="Logo San Marino" style="max-width:120px;">
      </td>
      <td class="title-cell">
        <strong>Registro Individual de Entrega de Dotación</strong>
      </td>
      <td class="info-cell">
        <table style="width:100%">
          <tr><td><strong>Consecutivo:</strong></td><td><?= htmlspecialchars($noe) ?></td></tr>
          <tr><td><strong>Versión:</strong></td><td>0001</td></tr>
        </table>
      </td>
    </tr>
  </table>

  <!-- Datos del empleado -->
  <div class="employee-info">
    <?= htmlspecialchars(
        ($fila[1] ?? '') . ' - ' .
        ($fila[2] ?? '') . ' - ' .
        ($fila[3] ?? '') . ' - ' .
        $EMPLEADO
    ) ?>
  </div>

  <!-- Texto legal -->
  <div class="content-text">
    <p>La empresa AGROAVICOLA SANMARINO S.A dando cumplimiento al Artículo 230 del Código Sustantivo de Trabajo modificado por el artículo 7° de la Ley 11 de 1984, "Todo empleador que habitualmente ocupe uno (1) o más trabajadores permanentes, deberá suministrar cada cuatro (4) meses, en forma gratuita, un (1) par de zapatos y un (1) vestido de labor al trabajador". El trabajador recibe la dotación a satisfacción y se compromete a darle buen uso.</p>
    <p><strong>Nota 1:</strong> El trabajador manifiesta que la dotación que aquí se entrega es y será de la empresa en todo momento; en caso de terminación de contrato o la entrega de una nueva dotación, se compromete a hacer la devolución si la empresa lo solicita.</p>
    <p><strong>Nota 2:</strong> En caso de daño de la dotación o parte de ella, el colaborador debe devolverla a la empresa.</p>
    <p><strong>Nota 3:</strong> El Colaborador autoriza expresamente a la empresa mediante este documento a descontar de salarios y liquidación de prestaciones los valores de la dotación cuando no la devuelva al empleador.</p>
    <p><strong>Certifico haber recibido la dotación completa, en perfectas condiciones y me comprometo a utilizarla, junto a los elementos de seguridad industrial en el desempeño de mi cargo, a darles un adecuado uso y mantenimiento.</strong></p>
    <h3 style="color:#de2127;">Entrega: <?= htmlspecialchars($ENTREGA) ?></h3>
    <p style="text-align:center; font-weight:bold; font-size:18px;">
      Para constancia de recibido se firma a los <?= $FECHAD ?> días del mes <?= $FECHAM ?> del año <?= $FECHAY ?>
    </p>
  </div>

  <!-- Items entregados -->
  <div class="items-header"><strong>DOTACIÓN ENTREGADA</strong></div>
  <table class="items-table">
    <?php foreach ($items as $item): ?>
    <tr>
      <td style="font-weight:bold;"><?= htmlspecialchars($item['CODIGO'] ?? '') ?></td>
      <td style="font-weight:bold;"><?= htmlspecialchars($item['NOMBRE'] ?? 'Descripción no disponible') ?></td>
      <td style="font-weight:bold;">Cantidad: <?= htmlspecialchars($item['CANTIDAD'] ?? '') ?></td>
    </tr>
    <?php endforeach; ?>
  </table>

  <!-- Firma -->
  <table class="signature-section">
    <tr>
      <td style="width:200px; font-weight:bold; vertical-align:middle;">Firma Quien Recibe:</td>
      <td>
        <div class="signature-area">
          <?php if (!empty($imgSrc)): ?>
            <img src="<?= htmlspecialchars($imgSrc) ?>" class="signature-image" alt="Firma del empleado">
          <?php else: ?>
            <p style="margin:35px 0; color:#999;">Sin firma registrada</p>
          <?php endif; ?>
        </div>
      </td>
    </tr>
  </table>

  <!-- Botones (no se imprimen) -->
  <div class="print-buttons no-print">
    <button class="btn-print" onclick="window.print()">IMPRIMIR PDF</button>
    <button class="btn-close-w" onclick="window.close()">CERRAR</button>
  </div>

</div>
</body>
</html>