Skip to content

Commit

Permalink
Merge 2d025a2 into e149fb2
Browse files Browse the repository at this point in the history
  • Loading branch information
marinaGD committed Dec 11, 2018
2 parents e149fb2 + 2d025a2 commit 7e352da
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions br_payment_cnab/models/payment_information.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ def name_get(self):

identificacao_fgts = fields.Integer('Número de Identificação do FGTS')

conec_social_dv_fgts = fields.Integer("DV do conectividade Social")

conec_social_fgts = fields.Integer("Lacre do conectividade social")

tax_identification = fields.Selection(
[('16', 'DARF Normal'),
('18', 'DARF Simples'),
Expand Down
7 changes: 6 additions & 1 deletion br_payment_cnab/serialize/cnab240.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ def _get_header_arq(self):
def _get_segmento(self, line, lot_sequency, num_lot, nome_segmento):
information_id = line.payment_information_id
segmento = {
"cedente_inscricao_numero": self._string_to_num(
self._order.company_id.cnpj_cpf),
"identificador_fgts": information_id.identificacao_fgts,
"lacre_conectividade_social": information_id.conec_social_fgts,
"lacre_conectividade_social_dv":
information_id.conec_social_dv_fgts,
"controle_lote": num_lot,
"sequencial_registro_lote": lot_sequency,
"tipo_movimento": information_id.mov_type,
Expand Down Expand Up @@ -191,7 +196,7 @@ def _get_header_lot(self, line, num_lot, lot):
information_id = line.payment_information_id
bank = self._order.src_bank_account_id
header_lot = {
'forma_lancamento': lot,
"forma_lancamento": lot,
"controle_lote": num_lot,
"tipo_servico": int(information_id.service_type),
"cedente_inscricao_tipo": 2,
Expand Down
2 changes: 2 additions & 0 deletions br_payment_cnab_voucher/models/account_voucher.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ def _prepare_payment_order_vals(self):
'invoice_date': self.date,
'barcode': self.barcode,
'linha_digitavel': self.linha_digitavel,
'conec_social_fgts': self.conec_social_fgts,
'conec_social_dv_fgts': self.conec_social_dv_fgts,
# TODO Ajustar o valor de multa e de juros
# 'fine_value': self.fine_value,
# 'interest_value': self.interest_value,
Expand Down
2 changes: 1 addition & 1 deletion br_payment_cnab_voucher/tests/test_voucher.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def test_boletos_titulos(self):
'linha': '858700000049 800001791819 107622050820 415823300017',
},
'237': {
'valor': '2546.06',
'valor': '2546.05',
'linha': '858000000259 460503281831 240720183202 339122710600'
},
'341': {
Expand Down

0 comments on commit 7e352da

Please sign in to comment.