Skip to content

Commit 2850d71

Browse files
authored
Merge pull request #351 from bredassistemas/main
feito implementação sigis100 marília/sp
2 parents 2547134 + 18aa62f commit 2850d71

4 files changed

Lines changed: 276 additions & 33 deletions

File tree

src/OpenAC.Net.NFSe.Test/TestProviderSigiss.cs

Lines changed: 50 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,58 @@ public void EmissaoNota()
1010
{
1111
var openNFSe = SetupOpenNFSe.Sigiss;
1212

13+
//Dados WebService
14+
openNFSe.Configuracoes.WebServices.Ambiente = DFe.Core.Common.DFeTipoAmbiente.Producao;
15+
openNFSe.Configuracoes.WebServices.CodigoMunicipio = 3529005;
16+
openNFSe.Configuracoes.WebServices.Usuario = "";
17+
openNFSe.Configuracoes.WebServices.Senha = "";
18+
openNFSe.Configuracoes.PrestadorPadrao.CpfCnpj = "";
19+
1320
//adicionado rps
1421
var nota = openNFSe.NotasServico.AddNew();
15-
nota.Prestador.CpfCnpj = "37761587000161";
22+
nota.Prestador.CpfCnpj = "";
1623
nota.RegimeEspecialTributacao = RegimeEspecialTributacao.SimplesNacional;
17-
nota.Servico.Valores.Aliquota = 2;
18-
nota.Servico.CodigoTributacaoMunicipio = "802";
24+
nota.Servico.Valores.Aliquota = 4.9588M;
25+
nota.Servico.CodigoTributacaoMunicipio = "104";
1926
nota.NaturezaOperacao = NaturezaOperacao.Sigiss.TributadaNoPrestador;
20-
nota.Servico.Valores.ValorServicos = 29.91M;
21-
nota.Servico.Valores.BaseCalculo = 29.91M;
27+
nota.Servico.Valores.ValorServicos = 0.07M;
28+
nota.Servico.Valores.BaseCalculo = 0.07M;
2229
nota.Servico.Descricao = "serviço teste";
30+
nota.Servico.CodigoNbs = "115021005";
2331
nota.Tomador.Tipo = TipoTomador.NaoIdentificado;
24-
nota.Tomador.DadosContato.Email = "a@a.com";
32+
/*nota.Tomador.CpfCnpj = "";
33+
nota.Tomador.DadosContato.Telefone = "";
34+
nota.Tomador.DadosContato.Email = "";*/
35+
//nota.IdentificacaoRps.Numero = "1";
36+
//nota.IdentificacaoRps.Serie = "100";
2537

2638
//enviando
2739
var retorno = openNFSe.Enviar(0);
40+
var retornoconsulta = openNFSe.ConsultaNFSe(int.Parse(retorno.Protocolo));
41+
42+
Assert.True(retorno.Sucesso);
43+
}
44+
45+
[Fact]
46+
public void ConsultarNota()
47+
{
48+
var openNFSe = SetupOpenNFSe.Sigiss;
49+
50+
//Dados WebService
51+
openNFSe.Configuracoes.WebServices.Ambiente = DFe.Core.Common.DFeTipoAmbiente.Producao;
52+
openNFSe.Configuracoes.WebServices.CodigoMunicipio = 3529005;
53+
openNFSe.Configuracoes.WebServices.Usuario = "";
54+
openNFSe.Configuracoes.WebServices.Senha = "";
55+
openNFSe.Configuracoes.PrestadorPadrao.CpfCnpj = "";
2856

57+
//Dados Prestador
58+
openNFSe.Configuracoes.PrestadorPadrao.Endereco.CodigoMunicipio = 3529005;
59+
openNFSe.Configuracoes.WebServices.AguardarConsultaRet = 60 * 5; //5 minutos de timeout
60+
61+
//enviando requisicao de cancelamento
62+
var retorno = openNFSe.ConsultaNFSe(50000);//nao existe
63+
//var retorno2 = openNFSe.ConsultaNFSe(42219);//recusado
64+
//var retorno3 = openNFSe.ConsultaNFSe(42218);//sucesso
2965
Assert.True(retorno.Sucesso);
3066
}
3167

@@ -34,8 +70,15 @@ public void CancelarNota()
3470
{
3571
var openNFSe = SetupOpenNFSe.Sigiss;
3672

73+
//Dados WebService
74+
openNFSe.Configuracoes.WebServices.Ambiente = DFe.Core.Common.DFeTipoAmbiente.Producao;
75+
openNFSe.Configuracoes.WebServices.CodigoMunicipio = 3529005;
76+
openNFSe.Configuracoes.WebServices.Usuario = "";
77+
openNFSe.Configuracoes.WebServices.Senha = "";
78+
openNFSe.Configuracoes.PrestadorPadrao.CpfCnpj = "";
79+
3780
//enviando requisicao de cancelamento
38-
var retorno = openNFSe.CancelarNFSe("a@a.com", "7125", "motivo teste testetestetesteteste");
81+
var retorno = openNFSe.CancelarNFSe("email@email.com", "42216", "teste desenvolvimento danilo breda");
3982
Assert.True(retorno.Sucesso);
4083
}
4184
}

0 commit comments

Comments
 (0)