-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharray.js
More file actions
61 lines (58 loc) · 1.13 KB
/
array.js
File metadata and controls
61 lines (58 loc) · 1.13 KB
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
import { templateTableTr } from "./components/TemplateTableTr.js";
const items = [
{
seq: 10,
item: 5746011,
descricao: "PARAFUSO DE PONTA COM PORCA ",
um: "PC",
qtde: 12,
dep: "M1",
valorTotal: 1232.32,
localizacao: "A2-07-1098",
saldo: 126,
qtdeAtendida: 12,
},
{
seq: 20,
item: 5746022,
descricao: "PREGO",
um: "PC",
qtde: 25,
dep: "M1",
valorTotal: 1232.32,
localizacao: "A2-07-1098",
saldo: 36,
qtdeAtendida: 25,
},
{
seq: 30,
item: 5746033,
descricao: "ALICATE",
um: "PC",
qtde: 1,
dep: "M1",
valorTotal: 1422.32,
localizacao: "A2-07-1098",
saldo: 5,
qtdeAtendida: 1,
},
{
seq: 40,
item: 5746044,
descricao: "MARTELO",
um: "PC",
qtde: 2,
dep: "M1",
valorTotal: 1222.32,
localizacao: "A2-07-1098",
saldo: 3,
qtdeAtendida: 2,
},
];
const renderTableTr = document.querySelector("tbody");
renderTableTr.innerHTML = items
.map((item) => {
if (item.valorTotal) item.valorTotal = "R$ " + item.valorTotal.toFixed(2);
return templateTableTr(item);
})
.join("");