Browse Source
Criação do grupo de combustível dentro do produto
pull/99/head
leogregianin
5 years ago
No known key found for this signature in database
GPG Key ID: BBCE23B6DC23016D
2 changed files with
33 additions and
0 deletions
-
pynfe/entidades/notafiscal.py
-
pynfe/processamento/serializacao.py
|
|
|
@ -598,6 +598,28 @@ class NotaFiscalProduto(Entidade): |
|
|
|
# - Produto especifico (seleciona de lista) - NF_PRODUTOS_ESPECIFICOS |
|
|
|
produto_especifico = str() |
|
|
|
|
|
|
|
# Grupo de informações de Combustível |
|
|
|
# Código de produto da ANP |
|
|
|
cProdANP = str() |
|
|
|
|
|
|
|
# Descrição do produto conforme ANP |
|
|
|
descANP = str() |
|
|
|
|
|
|
|
# Percentual de Gás derivado do Petróleo |
|
|
|
pGLP = Decimal() |
|
|
|
|
|
|
|
# Percentual de gás natural nacional |
|
|
|
pGNn = Decimal() |
|
|
|
|
|
|
|
# Percentual do gás natural importado |
|
|
|
pGNi = Decimal() |
|
|
|
|
|
|
|
# Valor de Partida (apenas para GLP) |
|
|
|
vPart = Decimal() |
|
|
|
|
|
|
|
# Sigla da UF de consumo – (OBS: Deve ser a Sigla e não o Código da UF) |
|
|
|
UFCons = str() |
|
|
|
|
|
|
|
# - Tributos |
|
|
|
# - ICMS |
|
|
|
# - Situacao tributaria (obrigatorio - seleciona de lista) - ICMS_TIPOS_TRIBUTACAO |
|
|
|
|
|
|
|
@ -283,6 +283,17 @@ class SerializacaoXML(Serializacao): |
|
|
|
if produto_servico.numero_item: |
|
|
|
etree.SubElement(prod, 'nItemPed').text = str(produto_servico.numero_item) |
|
|
|
|
|
|
|
# Combustível |
|
|
|
if produto_servico.cProdANP: |
|
|
|
combustivel = etree.SubElement(prod, 'comb') |
|
|
|
etree.SubElement(combustivel, 'cProdANP').text = str(produto_servico.cProdANP) |
|
|
|
etree.SubElement(combustivel, 'descANP').text = str(produto_servico.descANP) |
|
|
|
etree.SubElement(combustivel, 'pGLP').text = '{:.4f}'.format(produto_servico.pGLP or 0) |
|
|
|
etree.SubElement(combustivel, 'pGNn').text = '{:.4f}'.format(produto_servico.pGNn or 0) |
|
|
|
etree.SubElement(combustivel, 'pGNi').text = '{:.4f}'.format(produto_servico.pGNi or 0) |
|
|
|
etree.SubElement(combustivel, 'vPart').text = '{:.2f}'.format(produto_servico.vPart or 0) |
|
|
|
etree.SubElement(combustivel, 'UFCons').text = str(produto_servico.UFCons) |
|
|
|
|
|
|
|
# Imposto |
|
|
|
imposto = etree.SubElement(raiz, 'imposto') |
|
|
|
|
|
|
|
|