Fórum Aprenda com códigos: Criar uma NF-e com diferentes formas de pagamento #597863

16/10/2018

0

Olá programadores, tudo bom?

Vamos aprender consumindo código! :) No código de hoje temos um XML de nota fiscal eletrônica com a forma de pagamento cartão de crédito - consegue identificar?

Bom, temos dois desafios para você!

Desafio 1) Publicar aqui a melhor resposta para uma versão desse mesmo XML, mas com outras formas de pagamento, tal como boleto, por exemplo. Quem ganha thumbs recebe DevUPs e sobe no ranking do site (rumo ao topo!!! :)

Desafio 2) Agora o seguinte: entendeu esse XML? Então ganhe uma medalha respondendo o exercício abaixo!

###EXERCÍCIO### https://www.devmedia.com.br/exercicios/nf-e-adicionando-formas-de-pagamento/34

Tá aqui o XML

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?xml version="1.0" encoding="UTF-8"?>
    <infNFe versao="4.00" Id="NFe00000000000000000000000000000000000000000000">
        <ide>
            <cUF>33</cUF>
            <cNF>00447108</cNF>
            <natOp>VENDA</natOp>
            <mod>55</mod>
            <serie>1</serie>
            <nNF>447116</nNF>
            <dhEmi>2018-08-24T12:28:14-03:00</dhEmi>
            <dhSaiEnt>2018-08-24T12:28:14-03:00</dhSaiEnt>
            <tpNF>1</tpNF>
            <idDest>2</idDest>
            <cMunFG>3304557</cMunFG>
            <tpImp>1</tpImp>
            <tpEmis>1</tpEmis>
            <cDV>0</cDV>
            <tpAmb>1</tpAmb>
            <finNFe>1</finNFe>
            <indFinal>1</indFinal>
            <indPres>2</indPres>
            <procEmi>0</procEmi>
            <verProc>4.00.00</verProc>
        </ide>
        <emit>
            <CNPJ>00000000000000</CNPJ>
            <xNome>DevMedia Editora</xNome>
            <enderEmit>
                <xLgr>Av Ayrton Senna</xLgr>
                <nro>3000</nro>
                <xCpl>Ed. Itanhangá, sala 3087</xCpl>
                <xBairro>Barra da Tijuca</xBairro>
                <cMun>0000000</cMun>
                <xMun>Rio de Janeiro</xMun>
                <UF>RJ</UF>
                <CEP>22775-904</CEP>
                <cPais>1058</cPais>
                <xPais>Brasil</xPais>
            </enderEmit>
            <IE>00000000</IE>
            <CRT>3</CRT>
        </emit>
        <dest>
            <CPF>00000000000</CPF>
            <xNome>Estevão Dias</xNome>
            <enderDest>
                <xLgr>Av Ayrton Senna</xLgr>
                <nro>3000</nro>
                <xCpl>Ed. Itanhangá, sala 3087</xCpl>
                <xBairro>Barra da Tijuca</xBairro>
                <cMun>0000000</cMun>
                <xMun>Barra da Tijuca</xMun>
                <UF>RJ</UF>
                <CEP>22775-904</CEP>
                <cPais>1058</cPais>
                <xPais>Brasil</xPais>
            </enderDest>
            <indIEDest>9</indIEDest>
        </dest>
        <det nItem="1">
            <prod>
                <cProd>25</cProd>
                <cEAN></cEAN>
                <xProd>DevMedia Publicacoes</xProd>
                <NCM>49019900</NCM>
                <CFOP>6102</CFOP>
                <uCom>un</uCom>
                <qCom>1.0000</qCom>
                <vUnCom>69.9000000000</vUnCom>
                <vProd>69.90</vProd>
                <cEANTrib></cEANTrib>
                <uTrib>un</uTrib>
                <qTrib>1.0000</qTrib>
                <vUnTrib>69.9000000000</vUnTrib>
                <indTot>1</indTot>
            </prod>
            <imposto>
                <vTotTrib>0.00</vTotTrib>
                <ICMS>
                    <ICMS40>
                        <orig>0</orig>
                        <CST>40</CST>
                    </ICMS40>
                </ICMS>
                <IPI>
                    <cEnq>999</cEnq>
                    <IPINT>
                        <CST>53</CST>
                    </IPINT>
                </IPI>
                <PIS>
                    <PISNT>
                        <CST>06</CST>
                    </PISNT>
                </PIS>
                <COFINS>
                    <COFINSNT>
                        <CST>06</CST>
                    </COFINSNT>
                </COFINS>
            </imposto>
        </det>
        <total>
            <ICMSTot>
                <vBC>0.00</vBC>
                <vICMS>0.00</vICMS>
                <vICMSDeson>0.00</vICMSDeson>
                <vICMSUFRemet>0.00</vICMSUFRemet>
                <vFCP>0.00</vFCP>
                <vBCST>0.00</vBCST>
                <vST>0.00</vST>
                <vFCPST>0.00</vFCPST>
                <vFCPSTRet>0.00</vFCPSTRet>
                <vProd>69.90</vProd>
                <vFrete>0.00</vFrete>
                <vSeg>0.00</vSeg>
                <vDesc>0.00</vDesc>
                <vII>0.00</vII>
                <vIPI>0.00</vIPI>
                <vIPIDevol>0.00</vIPIDevol>
                <vPIS>0.00</vPIS>
                <vCOFINS>0.00</vCOFINS>
                <vOutro>0.00</vOutro>
                <vNF>69.90</vNF>
                <vTotTrib>0.00</vTotTrib>
            </ICMSTot>
        </total>
        <transp>
            <modFrete>0</modFrete>
        </transp>
        <pag>
            <detPag>
                <tPag>99</tPag>
                <vPag>69.90</vPag>
            </detPag>
        </pag>
        <infAdic>
            <infCpl>Imunidade tributaria, nos termos do Art 150 inc VI, al D da Constituicao Federal. Nao incidencia de ICMS nos termos do art. 47 inciso I do decreto 27427 de 22/11/2000. Total aproximado dos tributos federais, estaduais 4,08%.</infCpl>
        </infAdic>
    </infNFe>
</NFe>


Se tiver alguma duvida fique a vontade para utilizar esse mesmo topico para interagir com a comunidade :)

abraços
Estevão Dias

Estevão Dias

Responder

Post mais votado

18/10/2018

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?xml version="1.0" encoding="UTF-8"?>
    <infNFe versao="4.00" Id="NFe00000000000000000000000000000000000000000000">
        <ide>
            <cUF>33</cUF>
            <cNF>00447108</cNF>
            <natOp>VENDA</natOp>
            <mod>55</mod>
            <serie>1</serie>
            <nNF>447116</nNF>
            <dhEmi>2018-08-24T12:28:14-03:00</dhEmi>
            <dhSaiEnt>2018-08-24T12:28:14-03:00</dhSaiEnt>
            <tpNF>1</tpNF>
            <idDest>2</idDest>
            <cMunFG>3304557</cMunFG>
            <tpImp>1</tpImp>
            <tpEmis>1</tpEmis>
            <cDV>0</cDV>
            <tpAmb>1</tpAmb>
            <finNFe>1</finNFe>
            <indFinal>1</indFinal>
            <indPres>2</indPres>
            <procEmi>0</procEmi>
            <verProc>4.00.00</verProc>
        </ide>
        <emit>
            <CNPJ>00000000000000</CNPJ>
            <xNome>DevMedia Editora</xNome>
            <enderEmit>
                <xLgr>Av Ayrton Senna</xLgr>
                <nro>3000</nro>
                <xCpl>Ed. Itanhangá, sala 3087</xCpl>
                <xBairro>Barra da Tijuca</xBairro>
                <cMun>0000000</cMun>
                <xMun>Rio de Janeiro</xMun>
                <UF>RJ</UF>
                <CEP>22775-904</CEP>
                <cPais>1058</cPais>
                <xPais>Brasil</xPais>
            </enderEmit>
            <IE>00000000</IE>
            <CRT>3</CRT>
        </emit>
        <dest>
            <CPF>00000000000</CPF>
            <xNome>Estevão Dias</xNome>
            <enderDest>
                <xLgr>Av Ayrton Senna</xLgr>
                <nro>3000</nro>
                <xCpl>Ed. Itanhangá, sala 3087</xCpl>
                <xBairro>Barra da Tijuca</xBairro>
                <cMun>0000000</cMun>
                <xMun>Barra da Tijuca</xMun>
                <UF>RJ</UF>
                <CEP>22775-904</CEP>
                <cPais>1058</cPais>
                <xPais>Brasil</xPais>
            </enderDest>
            <indIEDest>9</indIEDest>
        </dest>
        <det nItem="1">
            <prod>
                <cProd>25</cProd>
                <cEAN></cEAN>
                <xProd>DevMedia Publicacoes</xProd>
                <NCM>49019900</NCM>
                <CFOP>6102</CFOP>
                <uCom>un</uCom>
                <qCom>1.0000</qCom>
                <vUnCom>69.9000000000</vUnCom>
                <vProd>69.90</vProd>
                <cEANTrib></cEANTrib>
                <uTrib>un</uTrib>
                <qTrib>1.0000</qTrib>
                <vUnTrib>69.9000000000</vUnTrib>
                <indTot>1</indTot>
            </prod>
            <imposto>
                <vTotTrib>0.00</vTotTrib>
                <ICMS>
                    <ICMS40>
                        <orig>0</orig>
                        <CST>40</CST>
                    </ICMS40>
                </ICMS>
                <IPI>
                    <cEnq>999</cEnq>
                    <IPINT>
                        <CST>53</CST>
                    </IPINT>
                </IPI>
                <PIS>
                    <PISNT>
                        <CST>06</CST>
                    </PISNT>
                </PIS>
                <COFINS>
                    <COFINSNT>
                        <CST>06</CST>
                    </COFINSNT>
                </COFINS>
            </imposto>
        </det>
        <total>
            <ICMSTot>
                <vBC>0.00</vBC>
                <vICMS>0.00</vICMS>
                <vICMSDeson>0.00</vICMSDeson>
                <vICMSUFRemet>0.00</vICMSUFRemet>
                <vFCP>0.00</vFCP>
                <vBCST>0.00</vBCST>
                <vST>0.00</vST>
                <vFCPST>0.00</vFCPST>
                <vFCPSTRet>0.00</vFCPSTRet>
                <vProd>69.90</vProd>
                <vFrete>0.00</vFrete>
                <vSeg>0.00</vSeg>
                <vDesc>0.00</vDesc>
                <vII>0.00</vII>
                <vIPI>0.00</vIPI>
                <vIPIDevol>0.00</vIPIDevol>
                <vPIS>0.00</vPIS>
                <vCOFINS>0.00</vCOFINS>
                <vOutro>0.00</vOutro>
                <vNF>69.90</vNF>
                <vTotTrib>0.00</vTotTrib>
            </ICMSTot>
        </total>
        <transp>
            <modFrete>0</modFrete>
        </transp>
        <pag>
            <detPag>
                <tPag>01</tPag>
                <vPag>69.90</vPag>
            </detPag>
        </pag>
        <infAdic>
            <infCpl>Imunidade tributaria, nos termos do Art 150 inc VI, al D da Constituicao Federal. Nao incidencia de ICMS nos termos do art. 47 inciso I do decreto 27427 de 22/11/2000. Total aproximado dos tributos federais, estaduais 4,08%.</infCpl>
        </infAdic>
    </infNFe>
</NFe>

Fabricio Pereira

Fabricio Pereira
Responder

Gostei + 3

Mais Posts

26/10/2018

Thiago Luiz

<?xml version="1.0" encoding="UTF-8"?>
<NFe xmlns="http://www.portalfiscal.inf.br/nfe">
<infNFe versao="4.00" Id="NFe00000000000000000000000000000000000000000000">
<ide>
<cUF>33</cUF>
<cNF>00447108</cNF>
<natOp>VENDA</natOp>
<mod>55</mod>
<serie>1</serie>
<nNF>447116</nNF>
<dhEmi>2018-08-24T12:28:14-03:00</dhEmi>
<dhSaiEnt>2018-08-24T12:28:14-03:00</dhSaiEnt>
<tpNF>1</tpNF>
<idDest>2</idDest>
<cMunFG>3304557</cMunFG>
<tpImp>1</tpImp>
<tpEmis>1</tpEmis>
<cDV>0</cDV>
<tpAmb>1</tpAmb>
<finNFe>1</finNFe>
<indFinal>1</indFinal>
<indPres>2</indPres>
<procEmi>0</procEmi>
<verProc>4.00.00</verProc>
</ide>
<emit>
<CNPJ>00000000000000</CNPJ>
<xNome>DevMedia Editora</xNome>
<enderEmit>
<xLgr>Av Ayrton Senna</xLgr>
<nro>3000</nro>
<xCpl>Ed. Itanhangá, sala 3087</xCpl>
<xBairro>Barra da Tijuca</xBairro>
<cMun>0000000</cMun>
<xMun>Rio de Janeiro</xMun>
<UF>RJ</UF>
<CEP>22775-904</CEP>
<cPais>1058</cPais>
<xPais>Brasil</xPais>
</enderEmit>
<IE>00000000</IE>
<CRT>3</CRT>
</emit>
<dest>
<CPF>00000000000</CPF>
<xNome>Estevão Dias</xNome>
<enderDest>
<xLgr>Av Ayrton Senna</xLgr>
<nro>3000</nro>
<xCpl>Ed. Itanhangá, sala 3087</xCpl>
<xBairro>Barra da Tijuca</xBairro>
<cMun>0000000</cMun>
<xMun>Barra da Tijuca</xMun>
<UF>RJ</UF>
<CEP>22775-904</CEP>
<cPais>1058</cPais>
<xPais>Brasil</xPais>
</enderDest>
<indIEDest>9</indIEDest>
</dest>
<det nItem="1">
<prod>
<cProd>25</cProd>
<cEAN></cEAN>
<xProd>DevMedia Publicacoes</xProd>
<NCM>49019900</NCM>
<CFOP>6102</CFOP>
<uCom>un</uCom>
<qCom>1.0000</qCom>
<vUnCom>69.9000000000</vUnCom>
<vProd>69.90</vProd>
<cEANTrib></cEANTrib>
<uTrib>un</uTrib>
<qTrib>1.0000</qTrib>
<vUnTrib>69.9000000000</vUnTrib>
<indTot>1</indTot>
</prod>
<imposto>
<vTotTrib>0.00</vTotTrib>
<ICMS>
<ICMS40>
<orig>0</orig>
<CST>40</CST>
</ICMS40>
</ICMS>
<IPI>
<cEnq>999</cEnq>
<IPINT>
<CST>53</CST>
</IPINT>
</IPI>
<PIS>
<PISNT>
<CST>06</CST>
</PISNT>
</PIS>
<COFINS>
<COFINSNT>
<CST>06</CST>
</COFINSNT>
</COFINS>
</imposto>
</det>
<total>
<ICMSTot>
<vBC>0.00</vBC>
<vICMS>0.00</vICMS>
<vICMSDeson>0.00</vICMSDeson>
<vICMSUFRemet>0.00</vICMSUFRemet>
<vFCP>0.00</vFCP>
<vBCST>0.00</vBCST>
<vST>0.00</vST>
<vFCPST>0.00</vFCPST>
<vFCPSTRet>0.00</vFCPSTRet>
<vProd>69.90</vProd>
<vFrete>0.00</vFrete>
<vSeg>0.00</vSeg>
<vDesc>0.00</vDesc>
<vII>0.00</vII>
<vIPI>0.00</vIPI>
<vIPIDevol>0.00</vIPIDevol>
<vPIS>0.00</vPIS>
<vCOFINS>0.00</vCOFINS>
<vOutro>0.00</vOutro>
<vNF>69.90</vNF>
<vTotTrib>0.00</vTotTrib>
</ICMSTot>
</total>
<transp>
<modFrete>0</modFrete>
</transp>
<pag>
<detPag>
<tPag>04</tPag>
<vPag>69.90</vPag>
</detPag>
</pag>
<infAdic>
<infCpl>Imunidade tributaria, nos termos do Art 150 inc VI, al D da Constituicao Federal. Nao incidencia de ICMS nos termos do art. 47 inciso I do decreto 27427 de 22/11/2000. Total aproximado dos tributos federais, estaduais 4,08%.</infCpl>
</infAdic>
</infNFe>
</NFe>
Responder

Gostei + 1

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar