Skip to content

Commit

Permalink
Merge PR #3121 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by rvalyi
  • Loading branch information
OCA-git-bot committed Jun 19, 2024
2 parents 2011382 + c83ee52 commit fa81b27
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions l10n_br_account_payment_brcobranca/models/account_payment_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@
class AccountPaymentLine(models.Model):
_inherit = "account.payment.line"

def _prepare_bank_line_ailos(self, payment_mode_id, linhas_pagamentos):
if self.discount_value:
# Código adotado pela FEBRABAN para identificação do desconto.
# Domínio:
# 0 = Isento
# 1 = Valor Fixo
linhas_pagamentos["cod_desconto"] = "1"

def _prepare_bank_line_unicred(self, payment_mode_id, linhas_pagamentos):
# TODO - Valores padrões ?
# Estou preenchendo valores que se forem vazios geram erro
Expand Down Expand Up @@ -62,9 +54,6 @@ def _prepare_bank_line_unicred(self, payment_mode_id, linhas_pagamentos):

linhas_pagamentos["numero"] = doc_number

if self.discount_value:
linhas_pagamentos["cod_desconto"] = "1"

def _prepare_bank_line_banco_brasil(self, payment_mode_id, linhas_pagamentos):
if (
self.mov_instruction_code_id.code
Expand Down Expand Up @@ -180,4 +169,11 @@ def prepare_bank_payment_line(self, bank_name_brcobranca):
"dias_protesto"
] = payment_mode_id.boleto_days_protest

# Desconto
# Código adotado pela FEBRABAN para identificação do desconto.
# Domínio: 0 = Isento | 1 = Valor Fixo
if payment_mode_id.payment_method_code == "240":
if self.discount_value:
linhas_pagamentos["cod_desconto"] = "1"

return linhas_pagamentos

0 comments on commit fa81b27

Please sign in to comment.