I. carrito.html

1<!DOCTYPE html>
2<html lang="es">
3
4<head>
5
6 <meta charset="UTF-8">
7 <meta name="viewport" content="width=device-width">
8
9 <title>Carrito</title>
10
11 <script type="module" src="lib/js/consumeJson.js"></script>
12 <script type="module" src="lib/js/muestraError.js"></script>
13 <script type="module" src="lib/js/muestraObjeto.js"></script>
14
15</head>
16
17<body onload="consumeJson('srv/venta-en-captura.php')
18 .then(venta => muestraObjeto(document, venta.body))
19 .catch(muestraError)">
20
21 <h1>Carrito</h1>
22
23 <p>
24
25 <a href="index.html">Productos</a>
26
27 <button type='button' onclick="if (confirm('Confirma procesar')) {
28 consumeJson('srv/venta-en-captura-procesa.php')
29 .then(() => location.href = 'index.html')
30 .catch(muestraError)
31 }">
32 Procesar compra
33 </button>
34
35 </p>
36
37 <p>
38 <label>
39 Folio
40 <output id="folio">
41 <progress max="100">Cargando…</progress>
42 </output>
43 </label>
44 </p>
45
46 <fieldset>
47
48 <legend>Detalle</legend>
49
50 <dl id="detalles">
51 <dt>Cargando…</dt>
52 <dd><progress max="100">Cargando…</progress></dd>
53 </dl>
54
55 </fieldset>
56
57</body>
58
59</html>
skip_previous skip_next