-
Notifications
You must be signed in to change notification settings - Fork 0
/
template_agrupats.php
137 lines (127 loc) · 4.96 KB
/
template_agrupats.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
<title>Resultats</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/jquery.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="css/buttons.dataTables.min.css">
<script src="js/jquery-3.7.0.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script type="text/javascript" language="javascript" src="js/dataTables.buttons.min.js"></script>
<script type="text/javascript" language="javascript" src="js/jszip.min.js"></script>
<script type="text/javascript" language="javascript" src="js/pdfmake.min.js"></script>
<script type="text/javascript" language="javascript" src="js/vfs_fonts.js"></script>
<script type="text/javascript" language="javascript" src="js/buttons.html5.min.js"></script>
<script type="text/javascript" language="javascript" src="js/buttons.print.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#table_agrupats).DataTable({
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
],
"paging": false,
"ordering": false,
"info": false,
"searching": false,
"fixedColumns": true,
scrollX: true,
scrollY: true,
});
});
</script>
<style>
/* Custom CSS for dashed column borders */
table.dataTable th,
table.dataTable td {
border: 1px solid #deddda66; /* Dashed border with light gray */
padding: 8px; /* Add padding for better appearance */
}
</style>
</head>
<body>
<h3>RESULTATS AGRUPATS SOCXI cart id</h3>
<table id="table_agrupats" class="display primary" cellspacing="0" width="100%">
<thead>
<tr>
<th style="width: 170px;"></th> <!-- necessary for buttons CSV, PDF etc -->
<th style="width: 200px;"></th> <!-- necessary for buttons CSV, PDF etc -->
<?php foreach ($factures as $factura): ?>
<th></th>
<?php endforeach; ?>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td>Detall compra<br/>(Cart id)</td>
<?php foreach ($factures as $factura): ?>
<td><?= $factura['cart_id'] ?></td>
<?php endforeach; ?>
</tr>
<tr>
<td>Despesa Total: <?= $total ?></td>
<td>NUM SOCI:</td>
<?php foreach ($factures as $factura): ?>
<td><?= $factura['soci'] ?></td>
<?php endforeach; ?>
</tr>
<tr>
<td><?= count($factures) ?> comandes</td>
<td></td>
<?php foreach ($factures as $factura): ?>
<td></td>
<?php endforeach; ?>
</tr>
<tr>
<td></td>
<td>Total:</td>
<?php foreach ($factures as $factura): ?>
<td><?= $factura['total'] ?></td>
<?php endforeach; ?>
</tr>
<!-- <tr>
<td></td>
<td>IVA 4%</td>
<?php foreach ($factures as $factura): ?>
<td><?= $factura['sin_iva']['4%'] ?></td>
<?php endforeach; ?>
</tr>
-->
<tr>
<td></td>
<td>IVA 5%</td>
<?php foreach ($factures as $factura): ?>
<td><?= $factura['sin_iva']['5%'] ?></td>
<?php endforeach; ?>
</tr>
<tr>
<td></td>
<td>IVA 10%</td>
<?php foreach ($factures as $factura): ?>
<td><?= $factura['sin_iva']['10%'] ?></td>
<?php endforeach; ?>
</tr>
<tr>
<td></td>
<td>IVA 21%</td>
<?php foreach ($factures as $factura): ?>
<td><?= $factura['sin_iva']['21%'] ?></td>
<?php endforeach; ?>
</tr>
<tr>
<td></td>
<td>Sense IVA</td>
<?php foreach ($factures as $factura): ?>
<td><?= $factura['sin_iva']['0%'] + $factura['sin_iva']['4%'] ?></td>
<?php endforeach; ?>
</tr>
</tbody>
</table>
<!--
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script>
-->
</body>
</html>