Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pysped/nfe/leiaute/nfe_310.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,8 @@ def get_xml(self):
xml += self.vICMSST.xml
else:
xml += self.modBC.xml
xml += self.vBC.xml
xml += self.pRedBC.xml
xml += self.vBC.xml
xml += self.pICMS.xml
xml += self.vICMS.xml
xml += self.modBCST.xml
Expand Down Expand Up @@ -646,8 +646,8 @@ def get_xml(self):

elif self.CST.valor == '70':
xml += self.modBC.xml
xml += self.vBC.xml
xml += self.pRedBC.xml
xml += self.vBC.xml
xml += self.pICMS.xml
xml += self.vICMS.xml
xml += self.modBCST.xml
Expand All @@ -665,8 +665,8 @@ def get_xml(self):

elif self.CST.valor == '90':
xml += self.modBC.xml
xml += self.vBC.xml
xml += self.pRedBC.xml
xml += self.vBC.xml
xml += self.pICMS.xml
xml += self.vICMS.xml
xml += self.modBCST.xml
Expand Down Expand Up @@ -729,8 +729,8 @@ def get_xml(self):

elif self.CSOSN.valor == '900':
xml += self.modBC.xml
xml += self.vBC.xml
xml += self.pRedBC.xml
xml += self.vBC.xml
xml += self.pICMS.xml
xml += self.vICMS.xml
xml += self.modBCST.xml
Expand Down
7 changes: 4 additions & 3 deletions pysped/nfe/leiaute/nfe_400.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ class Pag(XMLNFe):
def __init__(self):
super(Pag, self).__init__()
self.detPag = []
self.vTroco = TagDecimal(nome='vTroco' , codigo='', tamanho=[1, 13, 1], decimais=[0, 2, 2], raiz='//pag')
self.vTroco = TagDecimal(nome='vTroco' , codigo='YA09', tamanho=[1, 13, 1], decimais=[0, 2, 2], raiz='//pag')

def get_xml(self):
#
Expand All @@ -946,7 +946,8 @@ def get_xml(self):
for d in self.detPag:
xml += d.xml

xml += self.vTroco.xml
if self.vTroco.valor:
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mesmo enviando a tag vTroco em branco ( '' ) o PySPED parece preencher o campo com 0.00 150.000.00</
vTroco> e ao enviar a TAG dessa forma a SEFAZ retorna erro 869 - Mensagem Rejeição: Valor do troco incorreto - Status Recebido Retorno

xml += self.vTroco.xml
xml += '</pag>'
return xml

Expand Down Expand Up @@ -1348,7 +1349,7 @@ def set_xml(self, arquivo):
self.transp.xml = arquivo
self.cobr.xml = arquivo

self.pag = self.le_grupo('//NFe/infNFe/pag', Pag)
self.pag.xml = arquivo
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Por algum motivo que não consegui identificar, da forma que era feito antes o programa parecia chamar duas vezes a função e na segunda não encontrava a TAG retornando erro


self.infAdic.xml = arquivo
self.exporta.xml = arquivo
Expand Down