Skip to content

Commit

Permalink
GNRE
Browse files Browse the repository at this point in the history
  • Loading branch information
luizkim committed Nov 22, 2023
1 parent 13337bd commit 59bfd10
Show file tree
Hide file tree
Showing 18 changed files with 39 additions and 36 deletions.
2 changes: 1 addition & 1 deletion exemplos/xml/envelope-consulta-config-uf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</soap12:Header>
<soap12:Body>
<gnr:gnreDadosMsg>
<TConsultaConfigUf xmlns="https://www.gnre.pe.gov.br">
<TConsultaConfigUf xmlns="http://www.gnre.pe.gov.br">
<ambiente>1</ambiente>
<uf>PR</uf>
<receita>100099</receita>
Expand Down
6 changes: 3 additions & 3 deletions exemplos/xml/envelope-consultar-gnre.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Header>
<gnreCabecMsg xmlns="https://www.gnre.pe.gov.br/wsdl/consultar">
<gnreCabecMsg xmlns="http://www.gnre.pe.gov.br/wsdl/consultar">
<versaoDados>1.00</versaoDados>
</gnreCabecMsg>
</soap12:Header>
<soap12:Body>
<gnreDadosMsg xmlns="https://www.gnre.pe.gov.br/webservice/GnreResultadoLote">
<TConsLote_GNRE xmlns="https://www.gnre.pe.gov.br">
<gnreDadosMsg xmlns="http://www.gnre.pe.gov.br/webservice/GnreResultadoLote">
<TConsLote_GNRE xmlns="http://www.gnre.pe.gov.br">
<ambiente>12345678</ambiente>
<numeroRecibo>123</numeroRecibo>
</TConsLote_GNRE>
Expand Down
6 changes: 3 additions & 3 deletions exemplos/xml/estrutura-lote-completo-gnre.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Header>
<gnreCabecMsg xmlns="https://www.gnre.pe.gov.br/wsdl/processar">
<gnreCabecMsg xmlns="http://www.gnre.pe.gov.br/wsdl/processar">
<versaoDados>1.00</versaoDados>
</gnreCabecMsg>
</soap12:Header>
<soap12:Body>
<gnreDadosMsg xmlns="https://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao">
<TLote_GNRE xmlns="https://www.gnre.pe.gov.br">
<gnreDadosMsg xmlns="http://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao">
<TLote_GNRE xmlns="http://www.gnre.pe.gov.br">
<guias>
<TDadosGNRE>
<c01_UfFavorecida>26</c01_UfFavorecida>
Expand Down
6 changes: 3 additions & 3 deletions exemplos/xml/lote-emit-cnpj-dest-cnpj-sem-campos-extras.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Header>
<gnreCabecMsg xmlns="https://www.gnre.pe.gov.br/wsdl/processar">
<gnreCabecMsg xmlns="http://www.gnre.pe.gov.br/wsdl/processar">
<versaoDados>1.00</versaoDados>
</gnreCabecMsg>
</soap12:Header>
<soap12:Body>
<gnreDadosMsg xmlns="https://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao">
<TLote_GNRE xmlns="https://www.gnre.pe.gov.br">
<gnreDadosMsg xmlns="http://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao">
<TLote_GNRE xmlns="http://www.gnre.pe.gov.br">
<guias>
<TDadosGNRE>
<c01_UfFavorecida>26</c01_UfFavorecida>
Expand Down
6 changes: 3 additions & 3 deletions exemplos/xml/lote-emit-cpf-dest-cpf-sem-campos-extras.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Header>
<gnreCabecMsg xmlns="https://www.gnre.pe.gov.br/wsdl/processar">
<gnreCabecMsg xmlns="http://www.gnre.pe.gov.br/wsdl/processar">
<versaoDados>1.00</versaoDados>
</gnreCabecMsg>
</soap12:Header>
<soap12:Body>
<gnreDadosMsg xmlns="https://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao">
<TLote_GNRE xmlns="https://www.gnre.pe.gov.br">
<gnreDadosMsg xmlns="http://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao">
<TLote_GNRE xmlns="http://www.gnre.pe.gov.br">
<guias>
<TDadosGNRE>
<c01_UfFavorecida>26</c01_UfFavorecida>
Expand Down
6 changes: 3 additions & 3 deletions exemplos/xml/lote-emit-cpf-dest-cpf-sem-cep-emitente.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Header>
<gnreCabecMsg xmlns="https://www.gnre.pe.gov.br/wsdl/processar">
<gnreCabecMsg xmlns="http://www.gnre.pe.gov.br/wsdl/processar">
<versaoDados>1.00</versaoDados>
</gnreCabecMsg>
</soap12:Header>
<soap12:Body>
<gnreDadosMsg xmlns="https://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao">
<TLote_GNRE xmlns="https://www.gnre.pe.gov.br">
<gnreDadosMsg xmlns="http://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao">
<TLote_GNRE xmlns="http://www.gnre.pe.gov.br">
<guias>
<TDadosGNRE>
<c01_UfFavorecida>26</c01_UfFavorecida>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Header>
<gnreCabecMsg xmlns="https://www.gnre.pe.gov.br/wsdl/processar">
<gnreCabecMsg xmlns="http://www.gnre.pe.gov.br/wsdl/processar">
<versaoDados>1.00</versaoDados>
</gnreCabecMsg>
</soap12:Header>
<soap12:Body>
<gnreDadosMsg xmlns="https://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao">
<TLote_GNRE xmlns="https://www.gnre.pe.gov.br">
<gnreDadosMsg xmlns="http://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao">
<TLote_GNRE xmlns="http://www.gnre.pe.gov.br">
<guias>
<TDadosGNRE>
<c01_UfFavorecida>26</c01_UfFavorecida>
Expand Down
6 changes: 3 additions & 3 deletions exemplos/xml/lote-emit-cpf-dest-cpf-sem-telefone-emitente.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Header>
<gnreCabecMsg xmlns="https://www.gnre.pe.gov.br/wsdl/processar">
<gnreCabecMsg xmlns="http://www.gnre.pe.gov.br/wsdl/processar">
<versaoDados>1.00</versaoDados>
</gnreCabecMsg>
</soap12:Header>
<soap12:Body>
<gnreDadosMsg xmlns="https://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao">
<TLote_GNRE xmlns="https://www.gnre.pe.gov.br">
<gnreDadosMsg xmlns="http://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao">
<TLote_GNRE xmlns="http://www.gnre.pe.gov.br">
<guias>
<TDadosGNRE>
<c01_UfFavorecida>26</c01_UfFavorecida>
Expand Down
4 changes: 2 additions & 2 deletions exemplos/xml/resultado-consulta-gnre.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<gnreRespostaMsg xmlns="https://www.gnre.pe.gov.br/webservice/GnreResultadoLote">
<ns1:TResultLote_GNRE xmlns="https://www.gnre.pe.gov.br" xmlns:ns1="https://www.gnre.pe.gov.br">
<gnreRespostaMsg xmlns="http://www.gnre.pe.gov.br/webservice/GnreResultadoLote">
<ns1:TResultLote_GNRE xmlns="http://www.gnre.pe.gov.br" xmlns:ns1="https://www.gnre.pe.gov.br">
<ns1:ambiente>1</ns1:ambiente>
<ns1:numeroRecibo>0000000000</ns1:numeroRecibo>
<ns1:situacaoProcess>
Expand Down
9 changes: 6 additions & 3 deletions lib/Sped/Gnre/Helper/GnreHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,23 @@ public static function getGuiaGnre($xmlNf): Guia
$xml = self::parseNf($xmlNf);
$guia = new Guia();
$guia->c04_docOrigem = $xml->NrNf;
$guia->c28_tipoDocOrigem = $xml->TipoDoc;
//$guia->c28_tipoDocOrigem = $xml->TipoDoc;
$guia->c28_tipoDocOrigem = 10;
$guia->c21_cepEmitente = $xml->CEPEmpresa;
$guia->c16_razaoSocialEmitente = $xml->NmEmpresa;
$guia->c03_idContribuinteEmitente = $xml->NrDocumentoEmpresa;
$guia->c18_enderecoEmitente = $xml->EnderecoEmpresa;
$guia->c19_municipioEmitente = $xml->MunicipioEmpresa;

$guia->c19_municipioEmitente = $xml->CdMunicipioEmpresa;

$guia->c20_ufEnderecoEmitente = $xml->UfEmpresa;
$guia->c17_inscricaoEstadualEmitente = $xml->NrIEEmpresa;
$guia->c22_telefoneEmitente = $xml->TelefoneEmpresa;
$guia->c01_UfFavorecida = $xml->IdUfCliente;
$guia->c35_idContribuinteDestinatario = $xml->NrDocumentoCliente;
$guia->c36_inscricaoEstadualDestinatario = $xml->NrIECliente;
$guia->c37_razaoSocialDestinatario = $xml->NmCliente;
$guia->c38_municipioDestinatario = $xml->MunicipioCliente;
$guia->c38_municipioDestinatario = $xml->CdMunicipioCliente;

return $guia;
}
Expand Down
2 changes: 1 addition & 1 deletion xsd/v1/lote_gnre_consulta_v1.00.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
elementFormDefault="qualified"
attributeFormDefault="unqualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="https://www.gnre.pe.gov.br" >
xmlns="http://www.gnre.pe.gov.br" >
<xs:element name="TConsLote_GNRE">
<xs:complexType>
<xs:sequence>
Expand Down
2 changes: 1 addition & 1 deletion xsd/v1/lote_gnre_recibo_v1.00.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
elementFormDefault="qualified"
attributeFormDefault="unqualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="https://www.gnre.pe.gov.br" >
xmlns="http://www.gnre.pe.gov.br" >
<xs:include schemaLocation="tiposBasicoGNRE_v1.00.xsd" />
<xs:element name="TRetLote_GNRE">
<xs:complexType>
Expand Down
2 changes: 1 addition & 1 deletion xsd/v1/lote_gnre_result_v1.00.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
elementFormDefault="qualified"
attributeFormDefault="unqualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="https://www.gnre.pe.gov.br" >
xmlns="http://www.gnre.pe.gov.br" >
<xs:element name="TResultLote_GNRE">
<xs:complexType>
<xs:sequence>
Expand Down
2 changes: 1 addition & 1 deletion xsd/v1/lote_gnre_v1.00.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<xs:schema targetNamespace="https://www.gnre.pe.gov.br"
elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="https://www.gnre.pe.gov.br"
xmlns="http://www.gnre.pe.gov.br"
attributeFormDefault="unqualified">
<xs:include schemaLocation="tiposBasicoGNRE_v1.00.xsd"></xs:include>
<xs:element name="TLote_GNRE">
Expand Down
4 changes: 2 additions & 2 deletions xsd/v2/dados_gnre_v2.00.xsd
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns="https://www.gnre.pe.gov.br"
<xs:schema xmlns="http://www.gnre.pe.gov.br"
attributeFormDefault="unqualified"
elementFormDefault="qualified"
targetNamespace="https://www.gnre.pe.gov.br"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include xmlns="https://www.gnre.pe.gov.br" schemaLocation="tiposBasicoGNRE_v2.00.xsd"/>
<xs:include xmlns="http://www.gnre.pe.gov.br" schemaLocation="tiposBasicoGNRE_v2.00.xsd"/>
<xs:group name="dadosGnre_2.00_1">
<xs:sequence>
<xs:element name="ufFavorecida" type="TUf" maxOccurs="1"
Expand Down
2 changes: 1 addition & 1 deletion xsd/v2/lote_gnre_result_v2.00.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
elementFormDefault="qualified"
attributeFormDefault="unqualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="https://www.gnre.pe.gov.br" >
xmlns="http://www.gnre.pe.gov.br" >
<xs:include schemaLocation="dados_gnre_v1.00.xsd"/>
<xs:include schemaLocation="dados_gnre_v2.00.xsd"/>
<xs:group name="dadosGnre_1.00">
Expand Down
2 changes: 1 addition & 1 deletion xsd/v2/lote_gnre_v2.00.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<xs:schema targetNamespace="https://www.gnre.pe.gov.br"
elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="https://www.gnre.pe.gov.br"
xmlns="http://www.gnre.pe.gov.br"
attributeFormDefault="unqualified">
<xs:include schemaLocation="dados_gnre_v1.00.xsd"/>
<xs:include schemaLocation="dados_gnre_v2.00.xsd"/>
Expand Down
2 changes: 1 addition & 1 deletion xsd/v2/tiposBasicoGNRE_v2.00.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
elementFormDefault="qualified"
targetNamespace="https://www.gnre.pe.gov.br"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:Q1="https://www.gnre.pe.gov.br">
<xs:include xmlns="https://www.gnre.pe.gov.br" schemaLocation="tiposBasicoGNRE_v1.00.xsd"/>
<xs:include xmlns="http://www.gnre.pe.gov.br" schemaLocation="tiposBasicoGNRE_v1.00.xsd"/>
<xs:simpleType name="TDocOrigem">
<xs:restriction base="xs:string">
<xs:whiteSpace value="preserve" />
Expand Down

0 comments on commit 59bfd10

Please sign in to comment.