node-sped-nfe 1.1.1 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,298 +0,0 @@
1
- const cUF2UF: any = {
2
- "11": "RO",
3
- "12": "AC",
4
- "13": "AM",
5
- "14": "RR",
6
- "15": "PA",
7
- "16": "AP",
8
- "17": "TO",
9
- "21": "MA",
10
- "22": "PI",
11
- "23": "CE",
12
- "24": "RN",
13
- "25": "PB",
14
- "26": "PE",
15
- "27": "AL",
16
- "28": "SE",
17
- "29": "BA",
18
- "31": "MG",
19
- "32": "ES",
20
- "33": "RJ",
21
- "35": "SP",
22
- "41": "PR",
23
- "42": "SC",
24
- "43": "RS",
25
- "50": "MS",
26
- "51": "MT",
27
- "52": "GO",
28
- "53": "DF"
29
- },
30
- UF2cUF: any = {
31
- "RO": "11",
32
- "AC": "12",
33
- "AM": "13",
34
- "RR": "14",
35
- "PA": "15",
36
- "AP": "16",
37
- "TO": "17",
38
- "MA": "21",
39
- "PI": "22",
40
- "CE": "23",
41
- "RN": "24",
42
- "PB": "25",
43
- "PE": "26",
44
- "AL": "27",
45
- "SE": "28",
46
- "BA": "29",
47
- "MG": "31",
48
- "ES": "32",
49
- "RJ": "33",
50
- "SP": "35",
51
- "PR": "41",
52
- "SC": "42",
53
- "RS": "43",
54
- "MS": "50",
55
- "MT": "51",
56
- "GO": "52",
57
- "DF": "53"
58
- };
59
-
60
- //Função auxliar de imposto
61
- const impEstrutura = (imposto: any) => {
62
- const gStruct = { //Estrutura global
63
- ICMS: {
64
- ICMS_ICMSSN: {
65
- "@label": "Tributação",
66
- "@type": "select",
67
- "@obrig": true,
68
- "@values": [
69
- { "102": "Tributação Normal" },
70
- { "103": "Simples Nacional" }
71
- ],
72
- "@next": {
73
- CST: {
74
- "@label": "Situação Tributaria",
75
- "@type": "select",
76
- "@obrig": true,
77
- "@values": [
78
- { "00": "00 - Tributada integralmente" },
79
- { "10": "10 - Tributada com cobrança do ICMS por ST" },
80
- { "10v2": "10 - Tributada com cobrança do ICMS por ST(com partilha do ICMS entre UF de origem e a UF de destino ou a UFdefinida na legislação)" },
81
- { "20": "20 - Com redução de base de cálculo" },
82
- { "30": "30 - Isenta ou não tributada e com cobrança do ICMS por ST" },
83
- { "40": "40 - Isenta" },
84
- { "41": "41 - Não tributada" },
85
- { "41v2": "41 - Não tributada (ICMSST devido para UF de destino, nas operações interestaduais de produtos que tiveram retenção de ICMS na UF do rementente)" },
86
- { "50": "50 - Suspensão" },
87
- { "51": "51 - Diferimento" },
88
- { "60": "60 - Cobrado anteriormente por ST" },
89
- { "60v2": "60 - Cobrado anteriormente por ST" },
90
- { "70": "70 - Com redução de base de cálculo e cobrança do ICMS por ST" },
91
- { "90": "90 - Outros (Com partilha do ICMS entre a UF de origem e a UF de destino ou a UF definida na legistação)" },
92
- { "90v2": "90 - Outros" },
93
- ],
94
- },
95
- orig: {
96
- "@label": "Origem",
97
- "@type": "select",
98
- "@obrig": true,
99
- "@values": [
100
- { "0": "Nacional, exceto as indicadas nos códigos 3, 4, 5 e 8" },
101
- { "1": "Estrangeira - Importação direta, exceto a indicada no código 6" },
102
- { "2": "Estrangeira - Adquirida no mercado interno, exceto a indicada no código 7" },
103
- { "3": "Nacional, mercadoria ou bem com Conteúdo de Importação superior a 40% e inferior ou igual a 70%" },
104
- { "4": "Nacional, cuja produção tenha sido feita em conformidade com os processos produtivos básicos de que tratam as legislações citadas nos Ajustes" },
105
- { "5": "Nacional, mercadoria ou bem com Conteúdo de Importação inferior ou igual a 40% " },
106
- { "6": "Estrangeira - Importação direta, sem similar nacional, constante em lista da CAMEX e gás natural" },
107
- { "7": "Estrangeira - Adquirida no mercado interno, sem similar nacional, constante lista CAMEX e gás natural" }
108
- ],
109
- },
110
- "@next": {
111
- "@CST_00": {
112
- modBC: {
113
- "@label": "Modalidade de determinação da base de calculo ICMS",
114
- "@type": "select",
115
- "@obrig": true,
116
- "@values": [
117
- { "0": "0-Margem Valor Agregado (%)" },
118
- { "1": "1-Pauta (Valor)" },
119
- { "2": "2-Preço Tabelado Máx" },
120
- { "3": "3-Valor da operação" }
121
- ],
122
- },
123
- vBC: {
124
- "@label": "Base de calculo ICMS",
125
- "@type": "input",
126
- "@obrig": true,
127
- },
128
- pICMS: {
129
- "@label": "Líquota do ICMS",
130
- "@type": "input",
131
- "@obrig": true,
132
- },
133
- vICMS: {
134
- "@label": "Valor ICMS",
135
- "@type": "input",
136
- "@obrig": true,
137
- },
138
- pFCP: {
139
- "@label": "% Relativo ao FCP ST",
140
- "@type": "input",
141
- "@obrig": false,
142
- },
143
- vFCP: {
144
- "@label": "Valor ICMS FCP ST",
145
- "@type": "input",
146
- "@obrig": false,
147
- }
148
- },
149
- "@CST_10": {
150
- modBC: {
151
- "@label": "Modalidade de determinação da base de calculo ICMS",
152
- "@type": "select",
153
- "@obrig": true,
154
- "@values": [
155
- { "0": "0-Margem Valor Agregado (%)" },
156
- { "1": "1-Pauta (Valor)" },
157
- { "2": "2-Preço Tabelado Máx" },
158
- { "3": "3-Valor da operação" }
159
- ],
160
- },
161
- vBC: {
162
- "@label": "Base de calculo ICMS",
163
- "@type": "input",
164
- "@obrig": true,
165
- },
166
- pICMS: {
167
- "@label": "Líquota do ICMS",
168
- "@type": "input",
169
- "@obrig": true,
170
- },
171
- vICMS: {
172
- "@label": "Valor ICMS",
173
- "@type": "input",
174
- "@obrig": true,
175
- },
176
- modBCST: {
177
- "@label": "Modalidade de determinação da BC do ICMS ST",
178
- "@type": "select",
179
- "@obrig": true,
180
- "@values": [
181
- { "0": "Preço tabelado ou máximo sugerido" },
182
- { "1": "Lista Negativa (valor)" },
183
- { "2": "Lista Positiva (valor)" },
184
- { "3": "Lista Neutra (valor)" },
185
- { "4": "Margem Valor Agregado (%)" },
186
- { "5": "Pauta (valor)" },
187
- { "6": "Valor da Operação (NT 2019.001)" }
188
- ],
189
- },
190
- pMVAST: {
191
- "@label": "% Margem de valor adic. ICMS ST",
192
- "@type": "input",
193
- "@obrig": true,
194
- },
195
- pRedBCST: {
196
- "@label": "% Redução de BC ICMS ST",
197
- "@type": "input",
198
- "@obrig": true,
199
- },
200
- vBCST: {
201
- "@label": "BC ICMS ST",
202
- "@type": "input",
203
- "@obrig": true,
204
- },
205
- pICMSST: {
206
- "@label": "Alíquota de ICMS ST",
207
- "@type": "input",
208
- "@obrig": true,
209
- },
210
- vICMSST: {
211
- "@label": "ICMS ST",
212
- "@type": "input",
213
- "@obrig": true,
214
- },
215
- vBCFCPST: {
216
- "@label": "BC ICMS FCP ST",
217
- "@type": "input",
218
- "@obrig": true,
219
- },
220
- pFCPST: {
221
- "@label": "% Relativo ao FCP ST",
222
- "@type": "input",
223
- "@obrig": true,
224
- },
225
- vFCPST: {
226
- "@label": "Valor ICMS FCP ST",
227
- "@type": "input",
228
- "@obrig": true,
229
- },
230
-
231
- vBCFCP: {
232
- "@label": "BC ICMS FCP",
233
- "@type": "input",
234
- "@obrig": false,
235
- },
236
- pFCP: {
237
- "@label": "% Relativo ao FCP",
238
- "@type": "input",
239
- "@obrig": false,
240
- },
241
- vFCP: {
242
- "@label": "Valor ICMS FCP",
243
- "@type": "input",
244
- "@obrig": false,
245
- },
246
- }
247
- }
248
- }
249
- },
250
- },
251
- II: {
252
-
253
- },
254
- ICMSint: {
255
-
256
- },
257
- IPI: {
258
-
259
- },
260
- IPIDev: {
261
-
262
- },
263
- ISSQN: {
264
-
265
- },
266
- COFINS: {
267
-
268
- },
269
- PIS: {
270
-
271
- }
272
- }
273
-
274
- //Configurar valores
275
- let configStruct = async (el: any, struc: any) => {
276
- Object.keys(struc).forEach(key=>{
277
- if(typeof el[key] == "undefined"){ //Não foi definido pelo usuario!
278
- if(struc[key]["@obrig"]){ //Obrigatorio?
279
- return struc; //Retonar estrutura
280
- }
281
- }
282
- })
283
-
284
- Object.keys(struc).forEach(key=>{
285
- if(typeof el[key]["@next"][`${key}_${el[key].value}`] != "undefined"){ //Não foi definido pelo usuario!
286
-
287
- }
288
- })
289
-
290
- if(el["@next"]){
291
-
292
- }
293
- return configStruct(imposto, gStruct);
294
- };
295
-
296
- imposto = configStruct(imposto, gStruct)
297
- }
298
- export { cUF2UF, UF2cUF }