-
Notifications
You must be signed in to change notification settings - Fork 0
/
daily_sales.php
57 lines (52 loc) · 1.79 KB
/
daily_sales.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
<?php
$page_title = 'Venta diaria';
require_once('includes/load.php');
// Verificar que nivel de usuario tiene permiso de ver esta página.
page_require_level(3);
$year = date('Y');
$month = date('m');
$sales = dailySales($year,$month);
?>
<?php include_once('layouts/header.php'); ?>
<div class="row">
<div class="col-md-6">
<?php echo display_msg($msg); ?>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading clearfix">
<strong>
<span class="glyphicon glyphicon-th"></span>
<span>Ventas diarias</span>
</strong>
</div>
<div class="panel-body">
<table class="table table-striped">
<thead>
<tr>
<th class="text-center" style="width: 50px;">#</th>
<th class="text-center"> Descripción </th>
<th class="text-center" style="width: 15%;"> Cantidad vendida</th>
<th class="text-center" style="width: 15%;"> Total </th>
<th class="text-center" style="width: 15%;"> Fecha </th>
</tr>
</thead>
<tbody>
<?php foreach ($sales as $sale):?>
<tr>
<td class="text-center"><?php echo count_id();?></td>
<td><?php echo remove_junk($sale['name']); ?></td>
<td class="text-center"><?php echo (int)$sale['qty']; ?></td>
<td class="text-center"><?php echo remove_junk($sale['total_saleing_price']); ?></td>
<td class="text-center"><?php echo date("d/m/Y", strtotime ($sale['date'])); ?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?php include_once('layouts/footer.php'); ?>