node-sped-nfe 1.2.32 → 1.2.33

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.
@@ -28,7 +28,8 @@ const cUF2UF = {
28
28
  "50": "MS",
29
29
  "51": "MT",
30
30
  "52": "GO",
31
- "53": "DF"
31
+ "53": "DF",
32
+ "91": "AN"
32
33
  }, UF2cUF = {
33
34
  "RO": "11",
34
35
  "AC": "12",
@@ -509,7 +509,11 @@ class Make {
509
509
  throw "Não implementado!";
510
510
  }
511
511
  tagInfAdic(obj) {
512
- throw "Não implementado!";
512
+ if (__classPrivateFieldGet(this, _Make_NFe, "f").infNFe.infAdic === undefined)
513
+ __classPrivateFieldGet(this, _Make_NFe, "f").infNFe.infAdic = {};
514
+ Object.keys(obj).forEach(key => {
515
+ __classPrivateFieldGet(this, _Make_NFe, "f").infNFe.infAdic[key] = obj[key];
516
+ });
513
517
  }
514
518
  tagObsCont(obj) {
515
519
  throw "Não implementado!";
@@ -296,6 +296,7 @@ class Tools {
296
296
  }
297
297
  // Ciência (210210), Confirmação (210200), Desconhecimento (210220) não precisam de campos extras
298
298
  const tempUF = urlEventos(cUF2UF[cOrgao], __classPrivateFieldGet(this, _Tools_config, "f").versao);
299
+ console.log(cUF2UF);
299
300
  const evento = {
300
301
  "envEvento": {
301
302
  "@xmlns": "http://www.portalfiscal.inf.br/nfe",
@@ -651,6 +652,8 @@ async function _Tools_xmlValido(xml, xsd) {
651
652
  }, _Tools_limparSoap =
652
653
  //Remove coisas inuteis da resposta do sefaz
653
654
  async function _Tools_limparSoap(xml) {
655
+ if (xml == "Bad Request")
656
+ throw xml;
654
657
  const clear = [
655
658
  'soapenv:Envelope',
656
659
  'soapenv:Body',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-sped-nfe",
3
- "version": "1.2.32",
3
+ "version": "1.2.33",
4
4
  "author": "Kalmon V. Tavares",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",