Skip to content

Commit

Permalink
Add calculation for daily fee for Itau
Browse files Browse the repository at this point in the history
  • Loading branch information
danimaribeiro committed Nov 3, 2020
1 parent 6ecc665 commit e10bb60
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion br_cnab/febraban/cnab_240/bancos/itau.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# KMEE - www.kmee.com.br
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).


from ..cnab_240 import Cnab240
from datetime import datetime
from decimal import Decimal


class Itau240(Cnab240):
Expand Down Expand Up @@ -42,6 +42,10 @@ def _prepare_segmento(self, line):
vals['codigo_multa'] = int(vals['codigo_multa'])
vals['data_multa'] = str(vals['data_multa']).zfill(8)
vals['juros_multa'] = vals['juros_multa']
if vals.get('juros_mora_taxa') > 0.0:
multa_mes = vals['valor_titulo'] * (vals.get('juros_mora_taxa') / 100)
dia = round(multa_mes / 30, 2) or 0.01;
vals['juros_mora_taxa'] = Decimal(str(dia)).quantize(Decimal('1.00'))
return vals

def dv_nosso_numero(self, agencia, conta, carteira, nosso_numero):
Expand Down

0 comments on commit e10bb60

Please sign in to comment.