Skip to content

Commit

Permalink
[FIX] CSOSN on DANFE
Browse files Browse the repository at this point in the history
Signed-off-by: Luis Felipe Miléo <[email protected]>
  • Loading branch information
mileo committed Jul 16, 2024
1 parent d0b1736 commit 06c866e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Binary file modified src/erpbrasil/edoc/pdf/danfe.odt
Binary file not shown.
6 changes: 3 additions & 3 deletions src/erpbrasil/edoc/pdf/danfe_formata.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,17 +437,17 @@ def regime_tributario(NFe):


def cst_formatado(det):
formatado = str(det.imposto.ICMS.tipoICMS.orig).zfill(1)
formatado = str(det.imposto.ICMS.tipoICMS.orig).zfill(1) + '/'

if hasattr(det.imposto, 'ISSQN'):
if str(det.imposto.ISSQN.regime_tributario.text) == 1:
formatado += '400'
else:
formatado += '41'

elif det.imposto.ICMS.regime_tributario == 1:
elif hasattr(det.imposto.ICMS.tipoICMS, 'CSOSN'):
formatado += str(det.imposto.ICMS.tipoICMS.CSOSN).zfill(3)
else:
elif hasattr(det.imposto.ICMS.tipoICMS, 'CST'):
formatado += str(det.imposto.ICMS.tipoICMS.CST).zfill(2)

return formatado
Expand Down

0 comments on commit 06c866e

Please sign in to comment.