forked from thegreenter/demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocs.php
119 lines (114 loc) · 2.84 KB
/
docs.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
<?php
$items = [
[
'file' => 'examples/factura.php',
'title' => 'Factura',
'tag' => '2.1',
],
[
'file' => 'examples/factura-contingencia.php',
'title' => 'Factura',
'tag' => 'CONTINGENCIA',
],
[
'file' => 'examples/boleta.php',
'title' => 'Boleta de Venta',
'tag' => '2.1',
],
[
'file' => 'examples/factura-inafecta.php',
'title' => 'Factura Inafecta',
'tag' => '2.1',
],
[
'file' => 'examples/factura-gratuita.php',
'title' => 'Factura Gratuita',
'tag' => '2.1',
],
[
'file' => 'examples/factura-percepcion.php',
'title' => 'Factura con Percepción',
'tag' => '2.1',
],
[
'file' => 'examples/factura-exportacion.php',
'title' => 'Factura Exportación',
'tag' => '2.1',
],
[
'file' => 'examples/factura-anticipo.php',
'title' => 'Factura con Anticipos',
'tag' => '2.1',
],
[
'file' => 'examples/factura-icbper.php',
'title' => 'Factura ICBPER',
'tag' => '2.1',
],
[
'file' => 'examples/factura-descuento-global.php',
'title' => 'Factura con Descuento Global',
'tag' => '2.1',
],
[
'file' => 'examples/nota-credito.php',
'title' => 'Nota de Crédito',
'tag' => '2.1',
],
[
'file' => 'examples/nota-debito.php',
'title' => 'Nota de Débito',
'tag' => '2.1',
],
[
'file' => 'examples/resumen.php',
'title' => 'Resumen Diario',
'tag' => '2.0',
],
[
'file' => 'examples/resumen-contingencia.php',
'title' => 'Resumen Diario',
'tag' => 'CONTINGENCIA',
],
[
'file' => 'examples/resumen-usd.php',
'title' => 'Resumen Diario (en Dólares)',
'tag' => '2.0',
],
[
'file' => 'examples/comunicacion-baja.php',
'title' => 'Comunicación de Baja',
'tag' => '2.0',
],
[
'file' => 'examples/guia-remision.php',
'title' => 'Guía de Remisión',
'tag' => '2.1',
],
[
'file' => 'examples/percepcion.php',
'title' => 'C. de Percepción',
'tag' => '2.0',
],
[
'file' => 'examples/retencion.php',
'title' => 'C. de Retención',
'tag' => '2.0',
],
[
'file' => 'examples/reversion.php',
'title' => 'Resumen de Reversiones',
'tag' => '2.0',
],
];
$pdfPaths = glob(__DIR__.'/examples/report/*.php');
$pdfPaths = array_map(function ($file) {
$name = basename($file);
$path = 'examples/report/' . $name;
return ['name' => $name, 'path' => $path];
}, $pdfPaths);
header('Content-Type: application/json');
echo json_encode([
'invoices' => $items,
'reports' => $pdfPaths,
]);