File "Registros1Audi.php"
Full Path: C:/wamp64/www/INVENTAPP/models/Registros1Audi.php
File size: 5.67 KB
MIME-type: text/x-php
Charset: utf-8
<?php
session_start();
header("Cache-control: private"); // Arregla IE 6
//*******Datos de Conexion Base de Datos************
include("conexion.php");
$FECHA = date("Y-m-d");
$TKILOS = 0;
$TUNI = 0;
$TCANASTAS = 0;
$TBULTOS = 0;
$TCAJAS = 0;
$TBASES = 0;
$N = 0;
$D1 = "";
$D2 = "";
$D3 = "";
//***A TODAS LAS UBICACIONES
//AAA => Consulta todas las ubicaciones todos los codigos y todos los planilladores
//ABA => Consulta todas las ubicaciones según el producto
//AAB => Consulta todas las ubicaciones todos los productos segun digitador
//BAA => Consulta todas una ubicacion especial con todos los codigos y planilladores
?>
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>Acta de Registros Inventarios</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
.container {
width: 100%;
max-width: 800px;
margin: auto;
padding: 20px;
box-sizing: border-box;
}
table {
width: 100%;
border-collapse: collapse;
margin-bottom: 20px;
}
th, td {
border: 1px solid #000;
padding: 8px;
text-align: center;
}
th {
background-color: #ffcc99; /* Light orange */
color: #663300; /* Dark brown */
}
td {
background-color: #fff2e6; /* Very light orange */
}
.header {
background-color: #ffcc99; /* Light orange */
}
.totals {
background-color: #ffcc99; /* Light orange */
}
.data {
background-color: #ffebcc; /* Lighter orange */
}
canvas {
border: 1px solid #000;
width: 100%;
}
.textbox {
width: 100%;
padding: 5px;
box-sizing: border-box;
}
.vertical-fields {
margin-bottom: 20px;
}
.logo {
text-align: center;
margin-bottom: 20px;
}
</style>
</head>
<body>
<div class="container">
<div class="logo">
<img src="logo_avicampo.png" alt="avicampo Logo" width="200">
</div>
<form method="post" action="process_form.php">
<center>
<p><strong>Acta de Control de Registros Inventario General AVICAMPO PEREIRA</strong></p>
<p>Fecha: <?php echo $FECHA; ?></p>
<div class="vertical-fields">
<p><label for="nombre_planillador">Nombre Planillador:</label>
<input type="text" class="textbox" name="nombre_planillador" id="nombre_planillador"></p>
<p><label for="nombre_auditor">Nombre Auditor:</label>
<input type="text" class="textbox" name="nombre_auditor" id="nombre_auditor"></p>
<p><label for="nombre_pesador">Nombre Pesador:</label>
<input type="text" class="textbox" name="nombre_pesador" id="nombre_pesador"></p>
</div>
<table>
<tr class="header">
<th>Consecutivo</th>
<th>Ubicación</th>
<th>Usuario</th>
<th>Usuario Audita</th>
</tr>
<tr>
<td><input type="text" class="textbox" name="consecutivo"></td>
<td><input type="text" class="textbox" name="ubicacion"></td>
<td><input type="text" class="textbox" name="usuario"></td>
<td><input type="text" class="textbox" name="usuario_audita"></td>
</tr>
</table>
<table>
<tr class="data">
<th>Reg</th>
<th>Descripción Ubicación</th>
<th>Kilos</th>
<th>Unidades</th>
<th>Canastas</th>
<th>Cajas</th>
<th>Bultos</th>
<th>Bases</th>
</tr>
<?php
// Aquí iría la lógica para llenar la tabla con los datos de la base de datos
$query = "SELECT * FROM inventario";
$result = mysqli_query($conexion, $query);
while ($row = mysqli_fetch_assoc($result)) {
echo "<tr class='data'>";
echo "<td>{$row['reg']}</td>";
echo "<td>{$row['descripcion_ubicacion']}</td>";
echo "<td>{$row['kilos']}</td>";
echo "<td>{$row['unidades']}</td>";
echo "<td>{$row['canastas']}</td>";
echo "<td>{$row['cajas']}</td>";
echo "<td>{$row['bultos']}</td>";
echo "<td>{$row['bases']}</td>";
echo "</tr>";
}
?>
<tr class="totals">
<td colspan="2"> </td>
<td>Totales según filtros aplicados</td>
<td align="right"><?php echo $TKILOS; ?></td>
<td align="right"><?php echo $TUNI; ?></td>
<td align="right"><?php echo $TCANASTAS; ?></td>
<td align="right"><?php echo $TCAJAS; ?></td>
<td align="right"><?php echo $TBULTOS; ?></td>
<td align="right"><?php echo $TBASES; ?></td>
</tr>
</table>
<p> </p>
<p>Firma:</p>
<canvas id="signatureCanvas" width="800" height="200"></canvas>
<p><button type="button" onclick="clearCanvas()">Limpiar Firma</button></p>
</center>
<script>
var canvas = document.getElementById('signatureCanvas');
var context = canvas.getContext('2d');
var isDrawing = false;
canvas.onmousedown = function(e) {
isDrawing = true;
context.beginPath();
context.moveTo(e.clientX - canvas.offsetLeft, e.clientY - canvas.offsetTop);
};
canvas.onmousemove = function(e) {
if (isDrawing) {
context.lineTo(e.clientX - canvas.offsetLeft, e.clientY - canvas.offsetTop);
context.stroke();
}
};
canvas.onmouseup = function() {
isDrawing = false;
};
function clearCanvas() {
context.clearRect(0, 0, canvas.width, canvas.height);
}
</script>
</form>
</div>
</body>
</html>