@@ 69-74 (lines=6) @@ | ||
66 | // IBAN |
|
67 | $transactionData = str_replace('Europese Incasso, doorlopend ', '', $this->getCurrentTransactionData()); |
|
68 | $transactionData = preg_replace('![\r\n]+!', '', $transactionData); |
|
69 | if (preg_match('#/CNTP/[^/]*/[^/]*/(.*?)/#', $transactionData, $results)) { |
|
70 | $name = trim($results[1]); |
|
71 | if (!empty($name)) { |
|
72 | return $this->sanitizeAccountName($name); |
|
73 | } |
|
74 | } |
|
75 | if (preg_match('#:86:.*? [^ ]+ (.*)#', $transactionData, $results) !== 1) { |
|
76 | return ''; |
|
77 | } |
|
@@ 89-94 (lines=6) @@ | ||
86 | */ |
|
87 | private function parseNameFromTransactionData($transactionData) |
|
88 | { |
|
89 | if (preg_match('#(.*) (Not-Provided|NOTPROVIDED)#', $transactionData, $results) === 1) { |
|
90 | $name = trim($results[1]); |
|
91 | if (!empty($name)) { |
|
92 | return $this->sanitizeAccountName($name); |
|
93 | } |
|
94 | } |
|
95 | ||
96 | if (preg_match('#\D+#', $transactionData, $results)) { |
|
97 | $name = trim($results[0]); |
|
@@ 96-101 (lines=6) @@ | ||
93 | } |
|
94 | } |
|
95 | ||
96 | if (preg_match('#\D+#', $transactionData, $results)) { |
|
97 | $name = trim($results[0]); |
|
98 | if (!empty($name)) { |
|
99 | return $this->sanitizeAccountName($name); |
|
100 | } |
|
101 | } |
|
102 | ||
103 | return ''; |
|
104 | } |
@@ 63-68 (lines=6) @@ | ||
60 | } |
|
61 | } |
|
62 | ||
63 | if (preg_match('/^:61:.*? (.+)/m', $this->getCurrentTransactionData(), $results)) { |
|
64 | $accountName = trim($results[1]); |
|
65 | if (!empty($accountName)) { |
|
66 | return $this->sanitizeAccountName($accountName); |
|
67 | } |
|
68 | } |
|
69 | ||
70 | if (preg_match('/(.*) Betaalautomaat/', $this->parseTransactionDescription(), $results)) { |
|
71 | $accountName = trim($results[1]); |
|
@@ 70-75 (lines=6) @@ | ||
67 | } |
|
68 | } |
|
69 | ||
70 | if (preg_match('/(.*) Betaalautomaat/', $this->parseTransactionDescription(), $results)) { |
|
71 | $accountName = trim($results[1]); |
|
72 | if (!empty($accountName)) { |
|
73 | return $this->sanitizeAccountName($accountName); |
|
74 | } |
|
75 | } |
|
76 | return ''; |
|
77 | } |
|
78 |
@@ 92-99 (lines=8) @@ | ||
89 | $results = []; |
|
90 | ||
91 | // SEPA MT940 Structured |
|
92 | if (preg_match('#/NAME/(.*?)/(EREF|REMI|ADDR)/#ms', $this->getCurrentTransactionData(), $results) |
|
93 | && !empty($results[1]) |
|
94 | ) { |
|
95 | $accountName = trim($results[1]); |
|
96 | if (!empty($accountName)) { |
|
97 | return $this->sanitizeAccountName($accountName); |
|
98 | } |
|
99 | } |
|
100 | ||
101 | if (preg_match('/NAAM: (.+)/', $this->getCurrentTransactionData(), $results) |
|
102 | && !empty($results[1]) |