-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathventa_realizada.php
152 lines (136 loc) · 5.68 KB
/
venta_realizada.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<?php
include 'libreria/php/principal.php';
restricionAcceso();
// EXTRAER información de la cuenta
if(isset($_GET['accion']) && $_GET['accion'] == 'realizada'){
if(isset($_GET['cuenta'])){
$cuenta = $_GET['cuenta'];
$queryX = "SELECT * FROM tbl_venta WHERE id = '$cuenta'";
$resultX = mysql_query($queryX) or die(mysql_error());
$datosX = mysql_fetch_array($resultX);
$numDatosX = mysql_num_rows($resultX);
$queryP = "SELECT * FROM tbl_productos_venta WHERE venta = '$cuenta'";
$resP = mysql_query($queryP) or die(mysql_error());
$datosP = mysql_fetch_array($resP);
if($numDatosX == 0){
header("Location: dashboard.php?error=nohayregistro");
exit;
} else {
if($datosX['status'] != 2){
header("Location: dashboard.php?error=noesventa");
exit;
}
}
} else {
header("Location: dashboard.php");
exit;
}
} else {
header("Location: dashboard.php");
exit;
}
?>
<!DOCTYPE html>
<html lang="es-MX">
<head>
<meta charset="UTF-8" />
<title>Sistema PDV Tezontle Express</title>
<meta name="author" content="Fernando Magrosoto V. | [email protected]" />
<meta name="description" content="Sistema PDV para Tezontle Express" />
<meta name="keywords" content="PDV, magrosoto, tezontle, fernando magrosoto,
nimbus, digitae" />
<meta name="robots" content="INDEX,NOFOLLOW" />
<link rel="stylesheet" type="text/css" href="css/principal.css" />
<link rel="stylesheet" type="text/css" href="css/impresion.css" media="print" />
<link href='http://fonts.googleapis.com/css?family=Roboto+Slab:400,700' rel='stylesheet' type='text/css'>
<script src="libreria/js/interno.js"></script>
</head>
<!-- Gracias por ver nuestro código
Este sitio está hecho en HTML5.
Desarrollado por Fernando Magrosoto V. - [email protected] -->
<body onload="imprimir();">
<!-- área del WRAPPER -->
<div id="contenedor-principal">
<!-- ZONA DE ENCABEZADO -->
<header>
<img class="imgLogo" src="imagenes/express.png" alt="" />
</header>
<!-- FIN ENCABEZADO -->
<!-- Navegación -->
<nav>
<ul>
<li><a href="dashboard.php">Dashboard</a></li>
<li><a href="portero.php?accion=cerrarSesion">Cerrar sesión</a></li>
<li><em class="tip">Usuario activo: <?php echo $_SESSION['Nusuario']; ?></em></li>
</ul>
</nav>
<!-- ZONA DEL CUERPO -->
<section>
<div class="titulo">
<h2>Venta realizada con éxito</h2>
</div>
<table class="ver-venta">
<tr>
<td>Venta realizada por: <?php echo nombreUsuario($datosX['usuario']); ?></td>
</tr>
<tr>
<td>Fecha: <?php echo mostrarFechaH($datosX['fecha'], 1) ?></td>
</tr>
<tr>
<td>Venta No: <?php echo $datosX['id'] ?></td>
</tr>
</table>
<table class="ver-productos">
<thead>
<tr>
<th>Concepto</th>
<th>Importe</th>
</tr>
</thead>
<tfoot>
<tr>
<td>Total:</td>
<td>$ <?php echo $datosX['total'] ?></td>
</tr>
</tfoot>
<tbody>
<?php do { ?>
<tr>
<td><?php echo utf8_encode($datosP['concepto']) ?></td>
<td>$ <?php echo $datosP['importe']; ?></td>
</tr>
<?php } while ($datosP = mysql_fetch_array($resP)); ?>
</tbody>
</table>
<hr />
<div class="botones-bottom">
<button type="button"
name="nueva-venta"
onclick="nuevaVenta();">Nueva venta</button>
<button type="button"
name="imprimir"
onclick="imprimir();">Imprimir recibo</button>
</div>
</section>
<!-- fin CUERPO -->
<!-- ZONA DE PIE DE PÁGINA -->
<footer>
<div class="legales">
<p>©2013 - Sistema PDV Tezontle Express</p>
<p>Todos los Derechos Reservados</p>
</div>
<div class="creditos">
<a href="javascript:void(0);"
onclick="nimbus();">
<img src="imagenes/logoNimbus.png"
alt="Tecnología NIMBUS"
title="Tecnología NIMBUS"
height="35" />
</a>
</div>
</footer>
<!-- FIN DE PIE DE PÁGINA -->
</div>
<!-- fin WRAPPER -->
</body>
</html>