32 changed files with 751 additions and 128 deletions
-
24README.md
-
53cidades/betha.md
-
62cidades/ginfes.md
-
0cidades/issintel.md
-
0cidades/issnet.md
-
8cidades/saatri.md
-
32cidades/webiss.md
-
38pytrustnfe/Servidores.py
-
38pytrustnfe/nfe/__init__.py
-
8pytrustnfe/nfe/assinatura.py
-
2pytrustnfe/nfe/templates/NfeAutorizacao.xml
-
22pytrustnfe/nfe/templates/RecepcaoEventoCancelamento.xml
-
113pytrustnfe/nfse/betha/__init__.py
-
15pytrustnfe/nfse/betha/templates/CancelarNfse.xml
-
8pytrustnfe/nfse/betha/templates/ConsultarLoteRps.xml
-
13pytrustnfe/nfse/betha/templates/ConsultarNfseFaixa.xml
-
13pytrustnfe/nfse/betha/templates/ConsultarNfsePorRps.xml
-
13pytrustnfe/nfse/betha/templates/ConsultarNfseServicoPrestado.xml
-
27pytrustnfe/nfse/betha/templates/ConsultarNfseServicoTomado.xml
-
3pytrustnfe/nfse/betha/templates/GerarNfse.xml
-
13pytrustnfe/nfse/betha/templates/RecepcionarLoteRps.xml
-
13pytrustnfe/nfse/betha/templates/RecepcionarLoteRpsSincrono.xml
-
78pytrustnfe/nfse/betha/templates/Rps.xml
-
18pytrustnfe/nfse/betha/templates/SubstituirNfse.xml
-
3pytrustnfe/nfse/ginfes/__init__.py
-
3pytrustnfe/nfse/issintel/__init__.py
-
3pytrustnfe/nfse/issnet/__init__.py
-
16pytrustnfe/nfse/paulistana/templates/EnvioLoteRPS.xml
-
3pytrustnfe/nfse/saatri/__init__.py
-
3pytrustnfe/nfse/webiss/__init__.py
-
37pytrustnfe/test/XMLs/paulistana_signature.xml
-
29pytrustnfe/test/test_nfse_paulistana.py
@ -0,0 +1,53 @@ |
|||||
|
* Água Boa - MT |
||||
|
* Alfenas - MG |
||||
|
* Almirante Tamandaré - PR |
||||
|
* Barracão - PR |
||||
|
* Braço do Norte - SC |
||||
|
* Bento Gonçalves - RS |
||||
|
* Bombinhas - SC |
||||
|
* Capão da Canoa - RS |
||||
|
* Capinzal - SC |
||||
|
* Catanduvas - SC |
||||
|
* Chapecó - SC |
||||
|
* Cocal do Sul - SC |
||||
|
* Congonhas - MG |
||||
|
* Cornélio Procópio - PR |
||||
|
* Criciúma - SC |
||||
|
* Dionísio Cerqueira - SC |
||||
|
* Imbituba - SC |
||||
|
* Garopaba - SC |
||||
|
* General Carneiro - PR |
||||
|
* Goioerê - PR |
||||
|
* Fazenda Rio Grande - PR |
||||
|
* Juti - MS |
||||
|
* Joaçaba - SC |
||||
|
* Itapiranga - SC |
||||
|
* Itaú de Minas - MG |
||||
|
* Lages - SC |
||||
|
* Laguna - SC |
||||
|
* Mandaguaçu - PR |
||||
|
* Mandirituba - PR |
||||
|
* Maravilha - SC |
||||
|
* Mariana - MG |
||||
|
* Mococa - SP |
||||
|
* Morro da Fumaça - SC |
||||
|
* Navegantes - SC |
||||
|
* Nova Andradina - MS |
||||
|
* Orlândia - SP |
||||
|
* Orleans - SC |
||||
|
* Paranavaí - PR |
||||
|
* Pinhalzinho - SC |
||||
|
* Santa Rosa de Viterbo - SP |
||||
|
* Santo Amaro da Imperatriz - SC. |
||||
|
* São Joaquim - SC |
||||
|
* São José - SC |
||||
|
* São Mateus do Sul - PR |
||||
|
* São Miguel do Oeste - SC |
||||
|
* Sombrio - SC |
||||
|
* Tijucas - SC |
||||
|
* Torres - RS |
||||
|
* União da Vitória - PR |
||||
|
* Urussanga - SC |
||||
|
* Várzea Grande - MT |
||||
|
* Xanxerê - SC |
||||
|
* Xaxim - SC |
||||
@ -0,0 +1,62 @@ |
|||||
|
* Amparo - SP |
||||
|
* Arapiraca - AL |
||||
|
* Araraquara - SP |
||||
|
* Araxá - MG |
||||
|
* Belford Roxo - RJ |
||||
|
* Betim - MG |
||||
|
* Caraguatatuba - SP |
||||
|
* Caruaru - PE |
||||
|
* Capivari - SP |
||||
|
* Cataguases - MG |
||||
|
* Cotia - SP |
||||
|
* Diadema - SP |
||||
|
* Eusébio - CE |
||||
|
* Fortaleza - CE |
||||
|
* Franca - SP |
||||
|
* Guaíba - RS |
||||
|
* Guaratinguetá - SP |
||||
|
* Guarujá - SP |
||||
|
* Guarulhos - SP |
||||
|
* Hortolândia - SP |
||||
|
* Itaboraí - RJ |
||||
|
* Itabira - MG |
||||
|
* Itajuba - MG |
||||
|
* Itaúna - MG |
||||
|
* Itu - SP |
||||
|
* Jaboticabal - SP |
||||
|
* Jardinópolis - SP |
||||
|
* Jaú - SP |
||||
|
* Jundiaí - SP |
||||
|
* Lagoa Santa - MG |
||||
|
* Maceió - AL |
||||
|
* Manaus - AM |
||||
|
* Morro Agudo - SP |
||||
|
* Mauá - SP |
||||
|
* Muriaé - MG |
||||
|
* Olímpia - SP |
||||
|
* Paulínia - SP |
||||
|
* Pelotas - RS |
||||
|
* Poços de Caldas - MG |
||||
|
* Porto Ferreira - SP |
||||
|
* Pouso Alegre - MG |
||||
|
* Ribeirão das Neves - MG |
||||
|
* Ribeirão Pires - SP |
||||
|
* Ribeirão Preto - SP |
||||
|
* Rio Claro - SP |
||||
|
* Salto - SP |
||||
|
* Santa Rita do Passa Quatro - SP |
||||
|
* Santo André - SP |
||||
|
* Santos - SP |
||||
|
* São Bernardo do Campo - SP |
||||
|
* São Caetano do Sul - SP |
||||
|
* São Carlos - SP |
||||
|
* São José do Rio Preto - SP |
||||
|
* São José dos Campos - SP |
||||
|
* São Roque - SP |
||||
|
* Sarzedo - MG |
||||
|
* Suzano - SP |
||||
|
* Taquaritinga - SP |
||||
|
* Ubá - MG |
||||
|
* Ubatuba - SP |
||||
|
* Umuarama - PR |
||||
|
* Votuporanga - SP |
||||
@ -0,0 +1,8 @@ |
|||||
|
* Barreiras - BA |
||||
|
* Boa Vista - RR |
||||
|
* Bom Jesus da Lapa - BA |
||||
|
* Catu - BA |
||||
|
* Eunápolis - BA |
||||
|
* Ipiaú - BA |
||||
|
* Jacobina - BA |
||||
|
* São Sebastião de Passé - BA |
||||
@ -0,0 +1,32 @@ |
|||||
|
* Aracajú - SE |
||||
|
* Arcos - MG |
||||
|
* Bagé - RS |
||||
|
* Barbacena - MG |
||||
|
* Brumado - BA. |
||||
|
* Campo Belo - MG |
||||
|
* Candeias - BA |
||||
|
* Cássia - MG |
||||
|
* Caldas Novas - GO |
||||
|
* Coronel Fabriciano - MG |
||||
|
* Estância - SE |
||||
|
* Extrema - MG |
||||
|
* Feira de Santana–BA |
||||
|
* Formiga - MG |
||||
|
* Guanambi - BA |
||||
|
* Itabuna - BA |
||||
|
* Itapetinga - BA |
||||
|
* Lagarto - SE |
||||
|
* Lucas do Rio Verde - MT |
||||
|
* Luís Eduardo Magalhães - BA |
||||
|
* Niterói - RJ |
||||
|
* Nova Serrana - MG |
||||
|
* Palmas - TO |
||||
|
* Passos - MG |
||||
|
* Porto Nacional - TO |
||||
|
* Santa Rita do Sapucai - MG |
||||
|
* São Gotardo - MG |
||||
|
* São Lourenço - MG |
||||
|
* Tangará da Serra - MT |
||||
|
* Teresópolis - RJ |
||||
|
* Uberaba-MG |
||||
|
* Vitória da Conquista - BA |
||||
@ -1,20 +1,22 @@ |
|||||
<envEvento xmlns="http://www.portalfiscal.inf.br/nfe" versao="1.00"> |
<envEvento xmlns="http://www.portalfiscal.inf.br/nfe" versao="1.00"> |
||||
<idLote>{{ obj.lote }}</idLote> |
|
||||
|
<idLote>{{ idLote }}</idLote> |
||||
|
{% for evento in eventos %} |
||||
<evento xmlns="http://www.portalfiscal.inf.br/nfe" versao="1.00"> |
<evento xmlns="http://www.portalfiscal.inf.br/nfe" versao="1.00"> |
||||
<infEvento Id="{{ obj.id }}"> |
|
||||
<cOrgao>{{ obj.orgao }}</cOrgao> |
|
||||
<tpAmb>{{ obj.ambiente }}</tpAmb> |
|
||||
<CNPJ>{{ obj.cnpj }}</CNPJ> |
|
||||
<chNFe>{{ obj.chave_nfe }}</chNFe> |
|
||||
<dhEvento>{{ obj.data_hora_evento }}</dhEvento> |
|
||||
|
<infEvento Id="{{ evento.Id }}"> |
||||
|
<cOrgao>{{ evento.cOrgao }}</cOrgao> |
||||
|
<tpAmb>{{ evento.tpAmb }}</tpAmb> |
||||
|
<CNPJ>{{ evento.CNPJ }}</CNPJ> |
||||
|
<chNFe>{{ evento.chNFe }}</chNFe> |
||||
|
<dhEvento>{{ evento.dhEvento }}</dhEvento> |
||||
<tpEvento>110111</tpEvento> |
<tpEvento>110111</tpEvento> |
||||
<nSeqEvento>{{ obj.numero_evento }}</nSeqEvento> |
|
||||
|
<nSeqEvento>{{ evento.nSeqEvento }}</nSeqEvento> |
||||
<verEvento>1.00</verEvento> |
<verEvento>1.00</verEvento> |
||||
<detEvento versao="1.00"> |
<detEvento versao="1.00"> |
||||
<descEvento>Cancelamento</descEvento> |
<descEvento>Cancelamento</descEvento> |
||||
<nProt>{{ obj.protocolo }}</nProt> |
|
||||
<xJust>{{obj.justificativa }}</xJust> |
|
||||
|
<nProt>{{ evento.nProt }}</nProt> |
||||
|
<xJust>{{ evento.xJust }}</xJust> |
||||
</detEvento> |
</detEvento> |
||||
</infEvento> |
</infEvento> |
||||
</evento> |
</evento> |
||||
|
{% endfor %} |
||||
</envEvento> |
</envEvento> |
||||
@ -0,0 +1,113 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# © 2016 Danimar Ribeiro, Trustcode |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
||||
|
|
||||
|
import os |
||||
|
import suds |
||||
|
from OpenSSL import crypto |
||||
|
from base64 import b64encode |
||||
|
from pytrustnfe.xml import render_xml, sanitize_response |
||||
|
from pytrustnfe.client import get_authenticated_client |
||||
|
from pytrustnfe.certificado import extract_cert_and_key_from_pfx, save_cert_key |
||||
|
from pytrustnfe.nfse.assinatura import Assinatura |
||||
|
|
||||
|
|
||||
|
def sign_tag(certificado, **kwargs): |
||||
|
pkcs12 = crypto.load_pkcs12(certificado.pfx, certificado.password) |
||||
|
key = pkcs12.get_privatekey() |
||||
|
if 'nfse' in kwargs: |
||||
|
for item in kwargs['nfse']['lista_rps']: |
||||
|
signed = crypto.sign(key, item['assinatura'], 'SHA1') |
||||
|
item['assinatura'] = b64encode(signed) |
||||
|
if 'cancelamento' in kwargs: |
||||
|
signed = crypto.sign(key, kwargs['cancelamento']['assinatura'], 'SHA1') |
||||
|
kwargs['cancelamento']['assinatura'] = b64encode(signed) |
||||
|
|
||||
|
|
||||
|
def _send(certificado, method, **kwargs): |
||||
|
path = os.path.join(os.path.dirname(__file__), 'templates') |
||||
|
if method in ('GerarNfse', 'RecepcionarLoteRps', |
||||
|
'RecepcionarLoteRpsSincrono', |
||||
|
'CancelarNfse', 'SubstituirNfse'): |
||||
|
sign_tag(certificado, **kwargs) |
||||
|
|
||||
|
if kwargs['ambiente'] == 'producao': |
||||
|
url = \ |
||||
|
'http://e-gov.betha.com.br/e-nota-contribuinte-test-ws/nfseWS?wsdl' |
||||
|
else: |
||||
|
url = 'http://e-gov.betha.com.br/e-nota-contribuinte-ws/nfseWS?wsdl' |
||||
|
|
||||
|
xml_send = render_xml(path, '%s.xml' % method, False, **kwargs) |
||||
|
|
||||
|
cert, key = extract_cert_and_key_from_pfx( |
||||
|
certificado.pfx, certificado.password) |
||||
|
cert, key = save_cert_key(cert, key) |
||||
|
client = get_authenticated_client(url, cert, key) |
||||
|
|
||||
|
pfx_path = certificado.save_pfx() |
||||
|
signer = Assinatura(pfx_path, certificado.password) |
||||
|
xml_send = signer.assina_xml(xml_send, '') |
||||
|
|
||||
|
try: |
||||
|
response = getattr(client.service, method)(1, xml_send) |
||||
|
except suds.WebFault, e: |
||||
|
return { |
||||
|
'sent_xml': xml_send, |
||||
|
'received_xml': e.fault.faultstring, |
||||
|
'object': None |
||||
|
} |
||||
|
|
||||
|
response, obj = sanitize_response(response) |
||||
|
return { |
||||
|
'sent_xml': xml_send, |
||||
|
'received_xml': response, |
||||
|
'object': obj |
||||
|
} |
||||
|
|
||||
|
|
||||
|
def gerar_nfse(certificado, **kwargs): |
||||
|
return _send(certificado, 'GerarNfse', **kwargs) |
||||
|
|
||||
|
|
||||
|
def envio_lote_rps_assincrono(certificado, **kwargs): |
||||
|
return _send(certificado, 'RecepcionarLoteRps', **kwargs) |
||||
|
|
||||
|
|
||||
|
def envio_lote_rps(certificado, **kwargs): |
||||
|
return _send(certificado, 'RecepcionarLoteRpsSincrono', **kwargs) |
||||
|
|
||||
|
|
||||
|
def cancelar_nfse(certificado, **kwargs): |
||||
|
return _send(certificado, 'CancelarNfse', **kwargs) |
||||
|
|
||||
|
|
||||
|
def substituir_nfse(certificado, **kwargs): |
||||
|
return _send(certificado, 'SubstituirNfse', **kwargs) |
||||
|
|
||||
|
|
||||
|
def consulta_situacao_lote_rps(certificado, **kwargs): |
||||
|
return _send(certificado, 'ConsultaSituacaoLoteRPS', **kwargs) |
||||
|
|
||||
|
|
||||
|
def consulta_nfse_por_rps(certificado, **kwargs): |
||||
|
return _send(certificado, 'ConsultaNfsePorRps', **kwargs) |
||||
|
|
||||
|
|
||||
|
def consultar_lote_rps(certificado, **kwargs): |
||||
|
return _send(certificado, 'ConsultarLoteRps', **kwargs) |
||||
|
|
||||
|
|
||||
|
def consulta_nfse_servico_prestado(certificado, **kwargs): |
||||
|
return _send(certificado, 'ConsultarNfseServicoPrestado', **kwargs) |
||||
|
|
||||
|
|
||||
|
def consultar_nfse_servico_tomado(certificado, **kwargs): |
||||
|
return _send(certificado, 'ConsultarNfseServicoTomado', **kwargs) |
||||
|
|
||||
|
|
||||
|
def consulta_nfse_faixe(certificado, **kwargs): |
||||
|
return _send(certificado, 'ConsultarNfseFaixa', **kwargs) |
||||
|
|
||||
|
|
||||
|
def consulta_cnpj(certificado, **kwargs): |
||||
|
return _send(certificado, 'ConsultaCNPJ', **kwargs) |
||||
@ -0,0 +1,15 @@ |
|||||
|
<CancelarNfseEnvio xmlns = "http://www.betha.com.br/e-nota-contribuinte-ws"> |
||||
|
<Pedido> |
||||
|
<InfPedidoCancelamento Id="1"> |
||||
|
<IdentificacaoNfse> |
||||
|
<Numero>58</Numero> |
||||
|
<CpfCnpj> |
||||
|
<Cnpj>45111111111100</Cnpj> |
||||
|
</CpfCnpj> |
||||
|
<InscricaoMunicipal>123498</InscricaoMunicipal> |
||||
|
<CodigoMunicipio>4204608</CodigoMunicipio> |
||||
|
</IdentificacaoNfse> |
||||
|
<CodigoCancelamento>1</CodigoCancelamento> |
||||
|
</InfPedidoCancelamento> |
||||
|
</Pedido> |
||||
|
</CancelarNfseEnvio> |
||||
@ -0,0 +1,8 @@ |
|||||
|
<ConsultarLoteRpsEnvio xmlns="http://www.betha.com.br/e-nota-contribuinte-ws"> |
||||
|
<Prestador> |
||||
|
<CpfCnpj> |
||||
|
<Cnpj>45111111111100</Cnpj> |
||||
|
</CpfCnpj> |
||||
|
</Prestador> |
||||
|
<Protocolo>141542179222170</Protocolo> |
||||
|
</ConsultarLoteRpsEnvio> |
||||
@ -0,0 +1,13 @@ |
|||||
|
<ConsultarNfseFaixaEnvio xmlns="http://www.betha.com.br/e-nota-contribuinte-ws"> |
||||
|
<Prestador> |
||||
|
<CpfCnpj> |
||||
|
<Cnpj>45111111111100</Cnpj> |
||||
|
</CpfCnpj> |
||||
|
<InscricaoMunicipal>123498</InscricaoMunicipal> |
||||
|
</Prestador> |
||||
|
<Faixa> |
||||
|
<NumeroNfseInicial>50</NumeroNfseInicial> |
||||
|
<NumeroNfseFinal>60</NumeroNfseFinal> |
||||
|
</Faixa> |
||||
|
<Pagina>1</Pagina> |
||||
|
</ConsultarNfseFaixaEnvio> |
||||
@ -0,0 +1,13 @@ |
|||||
|
<ConsultarNfseRpsEnvio xmlns="http://www.betha.com.br/e-nota-contribuinte-ws"> |
||||
|
<IdentificacaoRps> |
||||
|
<Numero>24</Numero> |
||||
|
<Serie>A1</Serie> |
||||
|
<Tipo>1</Tipo> |
||||
|
</IdentificacaoRps> |
||||
|
<Prestador> |
||||
|
<CpfCnpj> |
||||
|
<Cnpj>45111111111100</Cnpj> |
||||
|
</CpfCnpj> |
||||
|
<InscricaoMunicipal>123498</InscricaoMunicipal> |
||||
|
</Prestador> |
||||
|
</ConsultarNfseRpsEnvio> |
||||
@ -0,0 +1,13 @@ |
|||||
|
<ConsultarNfseServicoPrestadoEnvio xmlns="http://www.betha.com.br/e-nota-contribuinte-ws"> |
||||
|
<Prestador> |
||||
|
<CpfCnpj> |
||||
|
<Cnpj>45111111111100</Cnpj> |
||||
|
</CpfCnpj> |
||||
|
</Prestador> |
||||
|
<NumeroNfse>61</NumeroNfse> |
||||
|
<PeriodoEmissao> |
||||
|
<DataInicial>2014-12-01</DataInicial> |
||||
|
<DataFinal>2014-12-31</DataFinal> |
||||
|
</PeriodoEmissao> |
||||
|
<Pagina>1</Pagina> |
||||
|
</ConsultarNfseServicoPrestadoEnvio> |
||||
@ -0,0 +1,27 @@ |
|||||
|
<ConsultarNfseServicoTomadoEnvio xmlns="http://www.betha.com.br/e-nota-contribuinte-ws"> |
||||
|
<Consulente> |
||||
|
<CpfCnpj> |
||||
|
<Cnpj>45111111111100</Cnpj> |
||||
|
</CpfCnpj> |
||||
|
</Consulente> |
||||
|
<PeriodoEmissao> |
||||
|
<DataInicial>2014-01-01</DataInicial> |
||||
|
<DataFinal>2014-12-31</DataFinal> |
||||
|
</PeriodoEmissao> |
||||
|
<Prestador> |
||||
|
<CpfCnpj> |
||||
|
<Cnpj>45111111111100</Cnpj> |
||||
|
</CpfCnpj> |
||||
|
</Prestador> |
||||
|
<Tomador> |
||||
|
<CpfCnpj> |
||||
|
<Cnpj>83787494000123</Cnpj> |
||||
|
</CpfCnpj> |
||||
|
</Tomador> |
||||
|
<Intermediario> |
||||
|
<CpfCnpj> |
||||
|
<Cnpj>45111111111100</Cnpj> |
||||
|
</CpfCnpj> |
||||
|
</Intermediario> |
||||
|
<Pagina>1</Pagina> |
||||
|
</ConsultarNfseServicoTomadoEnvio> |
||||
@ -0,0 +1,3 @@ |
|||||
|
<GerarNfseEnvio xmlns = "http://www.betha.com.br/e-nota-contribuinte-ws"> |
||||
|
{% include 'rps.xml' %} |
||||
|
</GerarNfseEnvio> |
||||
@ -0,0 +1,13 @@ |
|||||
|
<EnviarLoteRpsEnvio xmlns = "http://www.betha.com.br/e-nota-contribuinte-ws"> |
||||
|
<LoteRps Id="lote1" versao="2.02"> |
||||
|
<NumeroLote>2012024</NumeroLote> |
||||
|
<CpfCnpj> |
||||
|
<Cnpj>45111111111100</Cnpj> |
||||
|
</CpfCnpj> |
||||
|
<InscricaoMunicipal>123498</InscricaoMunicipal> |
||||
|
<QuantidadeRps>1</QuantidadeRps> |
||||
|
<ListaRps> |
||||
|
{% include 'rps.xml' %} |
||||
|
</ListaRps> |
||||
|
</LoteRps> |
||||
|
</EnviarLoteRpsEnvio> |
||||
@ -0,0 +1,13 @@ |
|||||
|
<EnviarLoteRpsSincronoEnvio xmlns = "http://www.betha.com.br/e-nota-contribuinte-ws"> |
||||
|
<LoteRps Id="lote1" versao="2.02"> |
||||
|
<NumeroLote>2012021</NumeroLote> |
||||
|
<CpfCnpj> |
||||
|
<Cnpj>45111111111100</Cnpj> |
||||
|
</CpfCnpj> |
||||
|
<InscricaoMunicipal>123498</InscricaoMunicipal> |
||||
|
<QuantidadeRps>1</QuantidadeRps> |
||||
|
<ListaRps> |
||||
|
{% include 'rps.xml' %} |
||||
|
</ListaRps> |
||||
|
</LoteRps> |
||||
|
</EnviarLoteRpsSincronoEnvio> |
||||
@ -0,0 +1,78 @@ |
|||||
|
<Rps> |
||||
|
<InfDeclaracaoPrestacaoServico Id="rps1"> |
||||
|
<Rps> |
||||
|
<IdentificacaoRps> |
||||
|
<Numero>25</Numero> |
||||
|
<Serie>A1</Serie> |
||||
|
<Tipo>1</Tipo> |
||||
|
</IdentificacaoRps> |
||||
|
<DataEmissao>2014-12-06</DataEmissao> |
||||
|
<Status>1</Status> |
||||
|
</Rps> |
||||
|
<Competencia>2014-12-01</Competencia> |
||||
|
<Servico> |
||||
|
<Valores> |
||||
|
<ValorServicos>100</ValorServicos> |
||||
|
<ValorDeducoes>0</ValorDeducoes> |
||||
|
<ValorPis>0</ValorPis> |
||||
|
<ValorCofins>0</ValorCofins> |
||||
|
<ValorInss>0</ValorInss> |
||||
|
<ValorIr>0</ValorIr> |
||||
|
<ValorCsll>0</ValorCsll> |
||||
|
<OutrasRetencoes>0</OutrasRetencoes> |
||||
|
<DescontoIncondicionado>0</DescontoIncondicionado> |
||||
|
<DescontoCondicionado>0</DescontoCondicionado> |
||||
|
</Valores> |
||||
|
<IssRetido>2</IssRetido> |
||||
|
<ItemListaServico>0702</ItemListaServico> |
||||
|
<CodigoTributacaoMunicipio>2525</CodigoTributacaoMunicipio> |
||||
|
<Discriminacao>Prog.</Discriminacao> |
||||
|
<CodigoMunicipio>4204608</CodigoMunicipio> |
||||
|
<ExigibilidadeISS>1</ExigibilidadeISS> |
||||
|
<MunicipioIncidencia>4204608</MunicipioIncidencia> |
||||
|
</Servico> |
||||
|
<Prestador> |
||||
|
<CpfCnpj> |
||||
|
<Cnpj>45111111111100</Cnpj> |
||||
|
</CpfCnpj> |
||||
|
<InscricaoMunicipal>123498</InscricaoMunicipal> |
||||
|
</Prestador> |
||||
|
<Tomador> |
||||
|
<IdentificacaoTomador> |
||||
|
<CpfCnpj> |
||||
|
<Cnpj>83787494000123</Cnpj> |
||||
|
</CpfCnpj> |
||||
|
</IdentificacaoTomador> |
||||
|
<RazaoSocial>INSTITUICAO FINANCEIRA</RazaoSocial> |
||||
|
<Endereco> |
||||
|
<Endereco>AV. 7 DE SETEMBRO</Endereco> |
||||
|
<Numero>1505</Numero> |
||||
|
<Complemento>AO LADO DO JOAO AUTOMOVEIS</Complemento> |
||||
|
<Bairro>CENTRO</Bairro> |
||||
|
<CodigoMunicipio>4201406</CodigoMunicipio> |
||||
|
<Uf>SC</Uf> |
||||
|
<Cep>88900000</Cep> |
||||
|
</Endereco> |
||||
|
<Contato> |
||||
|
<Telefone>4835220026</Telefone> |
||||
|
<Email>luiz.alves@cxpostal.com</Email> |
||||
|
</Contato> |
||||
|
</Tomador> |
||||
|
<Intermediario> |
||||
|
<IdentificacaoIntermediario> |
||||
|
<CpfCnpj> |
||||
|
<Cnpj>06410987065144</Cnpj> |
||||
|
</CpfCnpj> |
||||
|
<InscricaoMunicipal>22252</InscricaoMunicipal> |
||||
|
</IdentificacaoIntermediario> |
||||
|
<RazaoSocial>CONSTRUTORA TERRA FIRME</RazaoSocial> |
||||
|
</Intermediario> |
||||
|
<ConstrucaoCivil> |
||||
|
<CodigoObra>142</CodigoObra> |
||||
|
<Art>1/2014</Art> |
||||
|
</ConstrucaoCivil> |
||||
|
<RegimeEspecialTributacao>3</RegimeEspecialTributacao> |
||||
|
<OptanteSimplesNacional>2</OptanteSimplesNacional> |
||||
|
<IncentivoFiscal>2</IncentivoFiscal> |
||||
|
</InfDeclaracaoPrestacaoServico> |
||||
|
</Rps> |
||||
@ -0,0 +1,18 @@ |
|||||
|
<SubstituirNfseEnvio xmlns = "http://www.betha.com.br/e-nota-contribuinte-ws"> |
||||
|
<SubstituicaoNfse Id="subst"> |
||||
|
<Pedido> |
||||
|
<InfPedidoCancelamento Id="cancel"> |
||||
|
<IdentificacaoNfse> |
||||
|
<Numero>57</Numero> |
||||
|
<CpfCnpj> |
||||
|
<Cnpj>45111111111100</Cnpj> |
||||
|
</CpfCnpj> |
||||
|
<InscricaoMunicipal>123498</InscricaoMunicipal> |
||||
|
<CodigoMunicipio>4204608</CodigoMunicipio> |
||||
|
</IdentificacaoNfse> |
||||
|
<CodigoCancelamento>2</CodigoCancelamento> |
||||
|
</InfPedidoCancelamento> |
||||
|
</Pedido> |
||||
|
{% include 'rps.xml' %} |
||||
|
</SubstituicaoNfse> |
||||
|
</SubstituirNfseEnvio> |
||||
@ -0,0 +1,3 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# © 2016 Danimar Ribeiro, Trustcode |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
||||
@ -0,0 +1,3 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# © 2016 Danimar Ribeiro, Trustcode |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
||||
@ -0,0 +1,3 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# © 2016 Danimar Ribeiro, Trustcode |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
||||
@ -0,0 +1,3 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# © 2016 Danimar Ribeiro, Trustcode |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
||||
@ -0,0 +1,3 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# © 2016 Danimar Ribeiro, Trustcode |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
||||
@ -0,0 +1,37 @@ |
|||||
|
<?xml version="1.0"?> |
||||
|
<PedidoEnvioLoteRPS xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.prefeitura.sp.gov.br/nfe"><Cabecalho xmlns="" Versao="1"><CPFCNPJRemetente><CNPJ>12345678901234</CNPJ></CPFCNPJRemetente><transacao>false</transacao><dtInicio>2016-08-29</dtInicio><dtFim>2016-08-29</dtFim><QtdRPS>1</QtdRPS><ValorTotalServicos/><ValorTotalDeducoes/></Cabecalho><RPS xmlns=""><Assinatura>E4fpHYkQa7Naxn6IKGb7NwwZu5tPk/KXJ9hCwtZgq0xvKS450aQqqBL+7Iv46lTgqrSMu7+gLrl+LC1qs/8aT2mbHE8uaVFSbzwZ+sF/BkcT6nsFHLMswEiTAEs95Jb7hN1cC91xqQGRH4buw0TzxHKmhuLJ22WwtG/scxyKtjM=</Assinatura><ChaveRPS><InscricaoPrestador>123456</InscricaoPrestador><SerieRPS>1</SerieRPS><NumeroRPS>1</NumeroRPS></ChaveRPS><TipoRPS>RPS</TipoRPS><DataEmissao>2016-08-29</DataEmissao><StatusRPS>N</StatusRPS><TributacaoRPS>T</TributacaoRPS><ValorServicos/><ValorDeducoes/><ValorPIS>0.00</ValorPIS><ValorCOFINS>0.00</ValorCOFINS><ValorINSS>0.00</ValorINSS><ValorIR>0.00</ValorIR><ValorCSLL>0.00</ValorCSLL><CodigoServico>07498</CodigoServico><AliquotaServicos>5.00</AliquotaServicos><ISSRetido>false</ISSRetido><CPFCNPJTomador> |
||||
|
|
||||
|
|
||||
|
</CPFCNPJTomador><InscricaoMunicipalTomador>123456</InscricaoMunicipalTomador><RazaoSocialTomador>Trustcode</RazaoSocialTomador><EnderecoTomador><TipoLogradouro>1</TipoLogradouro><Logradouro>Vinicius de Moraes, 42</Logradouro><NumeroEndereco>42</NumeroEndereco><ComplementoEndereco/><Bairro>Corrego</Bairro><Cidade>Floripa</Cidade><UF>SC</UF><CEP>88037240</CEP></EnderecoTomador><Discriminacao>Venda de servico</Discriminacao></RPS><Signature xmlns="http://www.w3.org/2000/09/xmldsig#"> |
||||
|
<SignedInfo> |
||||
|
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/> |
||||
|
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> |
||||
|
<Reference URI=""> |
||||
|
<Transforms> |
||||
|
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/> |
||||
|
<Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/> |
||||
|
</Transforms> |
||||
|
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> |
||||
|
<DigestValue>ivaOwkcrt0pfuMYsAdfyLaUAcIk=</DigestValue> |
||||
|
</Reference> |
||||
|
</SignedInfo> |
||||
|
<SignatureValue>FjIHdfPavSEyaWYhAT0z0shPLuTsqBKyy78PUEZ8PUhTZ+iSV0MOvAIRq9MPPVK9 |
||||
|
jjXOw1TE903uSK8aJon52RNKPd68ORVJ3bKFSjTqQLxFRR9tiiAQFrWDETf7FF89 |
||||
|
EhG6dy6TGcgVbOyn0Jqm8MkqrE1XrJ44orN1X+Jt+7U=</SignatureValue> |
||||
|
<KeyInfo> |
||||
|
<X509Data> |
||||
|
<X509Certificate>MIICMTCCAZqgAwIBAgIQfYOsIEVuAJ1FwwcTrY0t1DANBgkqhkiG9w0BAQUFADBX |
||||
|
MVUwUwYDVQQDHkwAewA1ADkARgAxAEUANAA2ADEALQBEAEQARQA1AC0ANABEADIA |
||||
|
RgAtAEEAMAAxAEEALQA4ADMAMwAyADIAQQA5AEUAQgA4ADMAOAB9MB4XDTE1MDYx |
||||
|
NTA1NDc1N1oXDTE2MDYxNDExNDc1N1owVzFVMFMGA1UEAx5MAHsANQA5AEYAMQBF |
||||
|
ADQANgAxAC0ARABEAEUANQAtADQARAAyAEYALQBBADAAMQBBAC0AOAAzADMAMgAy |
||||
|
AEEAOQBFAEIAOAAzADgAfTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAk41G |
||||
|
nqXXLaiOC/y0/cA4tbS+NZCqI+x4EsztgDFvPPlHstiVYcLRkni4i93gK9zoC6g0 |
||||
|
mh66HMVzAfE8vRNwW5b7m6nWS1SiHBon7/Mqsw4MIq3SC+J/fTbKpqwyfAuH2YZl |
||||
|
AiQuQc85fyllAMLh2WrA7JgOLR/5tF3kLtpbHdECAwEAATANBgkqhkiG9w0BAQUF |
||||
|
AAOBgQArdh+RyT6VxKGsXk1zhHsgwXfToe6GpTF4W8PHI1+T0WIsNForDhvst6nm |
||||
|
QtgAhuZM9rxpOJuNKc+pM29EixpAiZZiRMCSWEItNyEVdUIi+YnKBcAHd88TwO86 |
||||
|
d126MWQ2O8cu5W1VoDp7hYBYKOnLbYi11/StO+0rzK+oPYAvIw==</X509Certificate> |
||||
|
</X509Data> |
||||
|
</KeyInfo> |
||||
|
</Signature></PedidoEnvioLoteRPS> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue