Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Classe GnreHelper #82

Merged
merged 5 commits into from
Nov 3, 2023
Merged

Classe GnreHelper #82

merged 5 commits into from
Nov 3, 2023

Conversation

luizkim
Copy link
Contributor

@luizkim luizkim commented Nov 3, 2023

O método getGuiaGnre já preenche todos os dados encontrados em uma NFe através do XMl, reduzindo a quantidade de campos utilizados para criar uma Guia de GNRE.

Exemplo:

      ```
        $guia = GnreHelper::getGuiaGnre($xmlString);
        $guia->c27_tipoIdentificacaoEmitente = 1;
        $guia->c03_idContribuinteEmitente = 41819055000105;                                                
        $guia->c34_tipoIdentificacaoDestinatario = 1;
        $guia->c35_idContribuinteDestinatario = 86268158000162;          
        $guia->parcela = 1;
        $guia->mes = date('m');
        $guia->ano = date('Y');
        $guia->periodo = date('Y');
        $guia->c02_receita = $receita->getCdReceita();
        //$guia->c33_dataPagamento = '2015-11-30';      
        //$guia->c15_convenio = 546456;
        //$guia->c25_detalhamentoReceita = 10101010;
        //$guia->c26_produto = 'TESTE DE PROD';
        $guia->c28_tipoDocOrigem = 10;
        $guia->c04_docOrigem = 5656;
        $guia->c06_valorPrincipal = 10.99;
        $guia->c10_valorTotal = 12.52;
        $guia->c14_dataVencimento = '01/05/2015';                            
        $guia->c15_convenio = 546456;
        $lote = new Lote();
        $lote->addGuia($guia);

@robmachado robmachado merged commit 13100cc into nfephp-org:master Nov 3, 2023
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants