|
|
|
@ -261,7 +261,7 @@ class SerializacaoXML(Serializacao): |
|
|
|
icms = etree.SubElement(imposto, 'ICMS') |
|
|
|
icms_csosn = ('102', '103', '300', '400') |
|
|
|
if produto_servico.icms_modalidade in icms_csosn: |
|
|
|
icms_item = etree.SubElement(icms, 'ICMSSN'+produto_servico.icms_modalidade) |
|
|
|
icms_item = etree.SubElement(icms, 'ICMSSN102') |
|
|
|
etree.SubElement(icms_item, 'orig').text = str(produto_servico.icms_origem) |
|
|
|
etree.SubElement(icms_item, 'CSOSN').text = produto_servico.icms_csosn |
|
|
|
elif produto_servico.icms_modalidade == '101': |
|
|
|
@ -579,6 +579,7 @@ class SerializacaoXML(Serializacao): |
|
|
|
if nota_fiscal.transporte_volumes: |
|
|
|
for volume in nota_fiscal.transporte_volumes: |
|
|
|
vol = etree.SubElement(transp, 'vol') |
|
|
|
if volume.quantidade: |
|
|
|
etree.SubElement(vol, 'qVol').text = str(volume.quantidade) |
|
|
|
etree.SubElement(vol, 'esp').text = volume.especie |
|
|
|
if volume.marca: |
|
|
|
@ -599,6 +600,9 @@ class SerializacaoXML(Serializacao): |
|
|
|
Para as notas com finalidade de Ajuste ou Devolução o campo Forma de Pagamento deve ser preenchido com 90=Sem Pagamento. """ |
|
|
|
pag = etree.SubElement(raiz, 'pag') |
|
|
|
detpag = etree.SubElement(pag, 'detPag') |
|
|
|
if nota_fiscal.finalidade_emissao == 3 or nota_fiscal.finalidade_emissao == 4: |
|
|
|
etree.SubElement(detpag, 'tPag').text = '90' |
|
|
|
else: |
|
|
|
etree.SubElement(detpag, 'tPag').text = str(nota_fiscal.tipo_pagamento).zfill(2) |
|
|
|
etree.SubElement(detpag, 'vPag').text = '{:.2f}'.format(nota_fiscal.totais_icms_total_nota) |
|
|
|
if nota_fiscal.tipo_pagamento == 3 or nota_fiscal.tipo_pagamento == 4: |
|
|
|
|