-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimprimir_corte.php
124 lines (116 loc) · 3.37 KB
/
imprimir_corte.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
<?php
include ("conexi.php");
$link = Conectarse();
$id_usuarios = $_POST['id_usuarios'];
$id_turnos = $_POST['id_turnos'];
$todo = $_POST['todo'];
// $id_usuarios = $_SESSION['id_usuarios'];
$consultaVentas = "SELECT * FROM ventas
LEFT JOIN usuarios USING(id_usuarios)
WHERE fecha_ventas = CURDATE()
";
$resultaVentas = mysqli_query($link,$consultaVentas);
while($row_V = mysqli_fetch_assoc($resultaVentas)){
extract($row_V);
}
?>
<div class="container-fluid text-center hoja visible-print" id="imprimir_corte">
<br>
<div class="row cuerpo">
<div class="folio">
No.Turno <?php echo $id_turnos;?><br><br>
</div>
<div class="fecha">
<strong>Usuario: </strong><?php echo $nombre_usuarios; ?>
</div>
<div class="col-xs-12">
<h4 class="text-center">Fecha<br><?php echo date("d/m/Y");?></h4>
</div>
<hr>
<br>
<div class="col-xs-12 contenido">
<br>
<div class="text-left">
<strong>INGRESOS</strong>
<div class="row">
<table class="table table-responsive">
<thead></thead>
<tr>
<th class="text-center">Folio</th>
<th class="text-center">Cantidad</th>
</tr>
</thead>
<tbody>
<?php
$consultaVentas = "SELECT * FROM ventas LEFT JOIN usuarios USING(id_usuarios)
WHERE fecha_ventas = CURDATE()
";
$resultadoVentas = mysqli_query($link,$consultaVentas);
while($fila_ticket = mysqli_fetch_assoc($resultadoVentas)){
extract($fila_ticket);
?>
<tr>
<td class="text-center"><?php echo $id_ventas;?></td>
<td class="text-center"><?php echo "$".$total_ventas;?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
<!-- --------------------------------------------------------------------- -->
<div class="col-xs-12 contenido">
<br>
<div class="text-left">
<strong>EGRESOS</strong>
<div class="row">
<table class="table table-responsive">
<thead></thead>
<tr>
<th class="text-center">Descripción</th>
<th class="text-center">Cantidad</th>
</tr>
</thead>
<tbody>
<?php
$consultarEgresos = "SELECT * FROM egresos
WHERE fecha_egresos = CURDATE()
";
$resultegresos = mysqli_query($link,$consultarEgresos);
while($rowEgresos = mysqli_fetch_assoc($resultegresos)){
extract($rowEgresos);
?>
<tr>
<td class="text-center"><?php echo $descripcion_egresos;?></td>
<td class="text-center"><?php echo "$".$cantidad_egresos;?></td>
</tr>
<?php
}
?>
<tr>
<td colspan="1" class="text-right">
<br>
<b>TOTAL:</b>
</td>
<td class="text-center">
<br>
<?php
echo "$". number_format($todo,2);
?>
<input type="text" id="total" class="hidden" value="<?php echo $todo;?>">
</td>
</tr>
</tbody>
</table>
</div>
<i><u>(<span id="total_texto"></span>/100 M.N).</u></i>
</div>
</div>
</div>
<div class="text-center footer">
<br>
</div>
</div>