Skip to content

Commit

Permalink
[14.0][FIX] Fixed field does not match alpha numeric criteria issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
murtuzasaleh committed Aug 16, 2022
1 parent 95a62c2 commit 941ad74
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions account_banking_ach_base/models/account_payment_order.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import re
from string import ascii_uppercase

from ach.builder import AchFile
Expand Down Expand Up @@ -145,14 +146,17 @@ def generate_ach_file(self):
self.validate_banking(line)
amount = line.amount_currency

name = re.sub("[^A-Za-z0-9]+", "", line.partner_id.name)
note = re.sub("[^A-Za-z0-9]+", "", line.communication)

entries.append(
{
"type": self.get_transaction_type(amount=amount),
"routing_number": line.partner_bank_id.bank_id.routing_number,
"account_number": line.partner_bank_id.acc_number,
"amount": str(amount),
"name": line.partner_id.name,
"addenda": [{"payment_related_info": line.communication}],
"name": name,
"addenda": [{"payment_related_info": note}],
}
)
outbound_payment = self.payment_type == "outbound"
Expand Down

0 comments on commit 941ad74

Please sign in to comment.