Skip to content

Commit

Permalink
return complete nfse information
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrocasado committed Feb 28, 2020
1 parent 6ec6a07 commit eda2992
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 21 deletions.
55 changes: 48 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,57 @@ if ($soapHandler->isSuccess($response)) {

array (size=1)
'nfse' =>
array (size=5)
'Numero' => string '1' (length=2)
'CodigoVerificacao' => string 'AMXA-UHBL' (length=9)
'DataEmissao' => string '2020-02-12T14:31:39' (length=19)
array (size=14)
'Numero' => string '43' (length=2)
'CodigoVerificacao' => string 'VZW2-EJIB' (length=9)
'DataEmissao' => string '2020-02-28T09:09:55' (length=19)
'IdentificacaoRps' =>
array (size=3)
'Numero' => string '1' (length=3)
'Serie' => string 'A' (length=1)
'Numero' => string '1' (length=1)
'Serie' => string 'A' (length=2)
'Tipo' => string '1' (length=1)
'DataEmissaoRps' => string '2020-02-12' (length=10)
'DataEmissaoRps' => string '2020-02-28' (length=10)
'NaturezaOperacao' => string '1' (length=1)
'RegimeEspecialTributacao' => string '3' (length=1)
'OptanteSimplesNacional' => string '2' (length=1)
'IncentivadorCultural' => string '2' (length=1)
'Competencia' => string '2020-02-28T00:00:00' (length=19)
'Servico' =>
array (size=5)
'Valores' =>
array (size=3)
'ValorServicos' => string '228.6' (length=5)
'IssRetido' => string '2' (length=1)
'ValorLiquidoNfse' => string '228.6' (length=5)
'ItemListaServico' => string '1002' (length=4)
'CodigoTributacaoMunicipio' => string '100203' (length=6)
'Discriminacao' => string 'Pedido #1111 - Itens: #123 , #124' (length=33)
'CodigoMunicipio' => string '3304557' (length=7)
'PrestadorServico' =>
array (size=4)
'IdentificacaoPrestador' =>
array (size=2)
'Cnpj' => string '11111111111111' (length=14)
'InscricaoMunicipal' => string '1111111' (length=7)
'RazaoSocial' => string '11111111' (length=48)
'Endereco' =>
array (size=7)
'Endereco' => string '11111' (length=39)
'Numero' => string '1111' (length=3)
'Complemento' => string '11111' (length=15)
'Bairro' => string '11111' (length=7)
'CodigoMunicipio' => string '3304557' (length=7)
'Uf' => string 'RJ' (length=2)
'Cep' => string '1111111' (length=8)
'Contato' => string '' (length=0)
'TomadorServico' =>
array (size=2)
'IdentificacaoTomador' => string '' (length=0)
'Endereco' => string '' (length=0)
'OrgaoGerador' =>
array (size=2)
'CodigoMunicipio' => string '3304557' (length=7)
'Uf' => string 'RJ' (length=2)
*/

```
Expand Down
55 changes: 48 additions & 7 deletions examples/NotaCarioca/GerarNfse.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,55 @@
array (size=1)
'nfse' =>
array (size=5)
'Numero' => string '1' (length=2)
'CodigoVerificacao' => string 'AMXA-UHBL' (length=9)
'DataEmissao' => string '2020-02-12T14:31:39' (length=19)
array (size=14)
'Numero' => string '43' (length=2)
'CodigoVerificacao' => string 'VZW2-EJIB' (length=9)
'DataEmissao' => string '2020-02-28T09:09:55' (length=19)
'IdentificacaoRps' =>
array (size=3)
'Numero' => string '1' (length=3)
'Serie' => string 'A' (length=1)
'Numero' => string '1' (length=1)
'Serie' => string 'A' (length=2)
'Tipo' => string '1' (length=1)
'DataEmissaoRps' => string '2020-02-12' (length=10)
'DataEmissaoRps' => string '2020-02-28' (length=10)
'NaturezaOperacao' => string '1' (length=1)
'RegimeEspecialTributacao' => string '3' (length=1)
'OptanteSimplesNacional' => string '2' (length=1)
'IncentivadorCultural' => string '2' (length=1)
'Competencia' => string '2020-02-28T00:00:00' (length=19)
'Servico' =>
array (size=5)
'Valores' =>
array (size=3)
'ValorServicos' => string '228.6' (length=5)
'IssRetido' => string '2' (length=1)
'ValorLiquidoNfse' => string '228.6' (length=5)
'ItemListaServico' => string '1002' (length=4)
'CodigoTributacaoMunicipio' => string '100203' (length=6)
'Discriminacao' => string 'Pedido #1111 - Itens: #123 , #124' (length=33)
'CodigoMunicipio' => string '3304557' (length=7)
'PrestadorServico' =>
array (size=4)
'IdentificacaoPrestador' =>
array (size=2)
'Cnpj' => string '11111111111111' (length=14)
'InscricaoMunicipal' => string '1111111' (length=7)
'RazaoSocial' => string '11111111' (length=48)
'Endereco' =>
array (size=7)
'Endereco' => string '11111' (length=39)
'Numero' => string '1111' (length=3)
'Complemento' => string '11111' (length=15)
'Bairro' => string '11111' (length=7)
'CodigoMunicipio' => string '3304557' (length=7)
'Uf' => string 'RJ' (length=2)
'Cep' => string '1111111' (length=8)
'Contato' => string '' (length=0)
'TomadorServico' =>
array (size=2)
'IdentificacaoTomador' => string '' (length=0)
'Endereco' => string '' (length=0)
'OrgaoGerador' =>
array (size=2)
'CodigoMunicipio' => string '3304557' (length=7)
'Uf' => string 'RJ' (length=2)
*/
8 changes: 1 addition & 7 deletions src/NotaCarioca/GerarNfseNotaCariocaFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,7 @@ public function formatSuccessResponse(string $responseXml): array
{
$resultArr = $this->getEncoder()->decode($responseXml, '');

$responseArr['nfse'] = [
'Numero' => $resultArr['CompNfse']['Nfse']['InfNfse']['Numero'],
'CodigoVerificacao' => $resultArr['CompNfse']['Nfse']['InfNfse']['CodigoVerificacao'],
'DataEmissao' => $resultArr['CompNfse']['Nfse']['InfNfse']['DataEmissao'],
'IdentificacaoRps' => $resultArr['CompNfse']['Nfse']['InfNfse']['IdentificacaoRps'],
'DataEmissaoRps' => $resultArr['CompNfse']['Nfse']['InfNfse']['DataEmissaoRps'],
];
$responseArr['nfse'] = $resultArr['CompNfse']['Nfse']['InfNfse'];

return $responseArr;
}
Expand Down

0 comments on commit eda2992

Please sign in to comment.