mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[FIX] abnamro payment order recognition
This commit is contained in:
@@ -90,6 +90,7 @@ class transaction(models.mem_bank_transaction):
|
||||
'INTL': bt.ORDER, # international order
|
||||
'UNKN': bt.ORDER, # everything else
|
||||
'SEPA': bt.ORDER,
|
||||
'PAYB': bt.PAYMENT_BATCH,
|
||||
}
|
||||
|
||||
def __init__(self, line, *args, **kwargs):
|
||||
@@ -116,7 +117,7 @@ class transaction(models.mem_bank_transaction):
|
||||
elif not self.execution_date:
|
||||
self.error_message = "No execution date"
|
||||
elif not self.remote_account and self.transfer_type not in [
|
||||
'BEA', 'GEA', 'COSTS', 'UNKN',
|
||||
'BEA', 'GEA', 'COSTS', 'UNKN', 'PAYB',
|
||||
]:
|
||||
self.error_message = _('No remote account for transaction type '
|
||||
'%s') % self.transfer_type
|
||||
@@ -246,6 +247,8 @@ class transaction(models.mem_bank_transaction):
|
||||
remote_owner = field[14:32].strip()
|
||||
elif re.match("^EL[0-9]{13}I", field):
|
||||
transfer_type = 'INTL'
|
||||
elif field.startswith("TOTAAL BETALINGEN"):
|
||||
transfer_type = 'PAYB'
|
||||
return (transfer_type, remote_account, remote_owner)
|
||||
|
||||
fields = split_blob(self.blob)
|
||||
|
||||
Reference in New Issue
Block a user