-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstock_seg_report.php
143 lines (120 loc) · 4.97 KB
/
stock_seg_report.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
<?php
// session_start();
require_once 'header.php';
require_once 'models/Productos.php';
error_reporting(E_ALL ^ E_WARNING);
$nickname = $_SESSION['nickname'];
$tipo = $_SESSION['tipo'];
require_once 'controllers/ControllerProductos.php';
$controller_productos = new ControllerProductos();
$productos = $controller_productos->get_x_surtir();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>FIXCEL | Productos con Stock de Seguridad </title>
<link rel="shortcut icon" href="Images/login.png">
<!-- Bootstrap core CSS-->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom fonts for this template-->
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<!-- Custom styles for this template-->
<link href="css/sb-admin.css" rel="stylesheet">
<!--ALERT -->
<script src="dist_alert/sweetalert-dev.js"></script>
<link rel="stylesheet" href="dist_alert/sweetalert.css">
<script src="js/excel.js"></script>
<script>
</script>
</head>
<body class="fixed-nav sticky-footer bg-dark" id="page-top">
<?php
//MENU DE OPCIONES // NAVBAR
include("menu.php");
?>
<div class="content-wrapper">
<div class="container-fluid">
<!-- INICIA DIV DE TABLA-->
<div class="card mb-3">
<div class="card-header">
<center><i class="fa fa-table"></i> Productos con Stock de Seguridad</center>
<center>
<a title="Regresar al menú de Reportes" href="reportes.php"><span class="badge badge-pill badge-default"><img src="./icons/back.svg" style="width:30px; height:30px;"" /></span></a>
<a title='Exportar a Excel' onclick="tableToExcel('dataTable', 'Productos')"><span class='badge badge-pill badge-default'><img src='./icons/xls.svg' style='width:35px; height:35px;' /></span></a>
</center>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
<thead>
<tr>
<th><center>ID Producto</center></th>
<th><center>Descripción</center></th>
<th><center>Categoria</center></th>
<th><center>Subcategoría</center></th>
<th><center>Stock de Seguridad</center></th>
<th><center>Stock Disponible</center></th>
</tr>
</thead>
<tfoot>
<tr>
<th><center>ID Producto</center></th>
<th><center>Descripción</center></th>
<th><center>Categoria</center></th>
<th><center>Subcategoría</center></th>
<th><center>Stock de Seguridad</center></th>
<th><center>Stock Disponible</center></th>
</tr>
</tfoot>
<tbody>
<?php
foreach ($productos as $p)
{
echo "<tr>
<td><center>$p->id_producto</center></td>
<td>$p->descripcion_producto</td>
<td><center>$p->descripcion_categoria</center></td>
<td><center>$p->descripcion_subcategoria</center></td>
<td><center>$p->stock_seguridad PZ</center></td>
<td><center>$p->stock_disponible PZ</center></td>
</tr>";
}
?>
</tbody>
</table>
</div>
</div>
<center><div class="card-footer small text-muted">Presiona la tecla F5 Para actualizar la tabla</div></center>
</div> <!--TERMINA DIV DE TABLA -->
</div>
<!-- /.container-fluid-->
<!-- /.content-wrapper-->
<!--Footer y Modales-->
<?php
include ("footer.php");
include ("modales.php");
?>
<!-- Scroll to Top Button-->
<a class="scroll-to-top rounded" href="#page-top">
<i class="fa fa-angle-up"></i>
</a>
<!-- Bootstrap core JavaScript-->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Page level plugin JavaScript-->
<script src="vendor/datatables/jquery.dataTables.js"></script>
<script src="vendor/datatables/dataTables.bootstrap4.js"></script>
<!-- Custom scripts for all pages-->
<script src="js/sb-admin.min.js"></script>
<!-- Custom scripts for this page-->
<script src="js/sb-admin-datatables.min.js"></script>
</div>
</body>
</html>