@@ -40,8 +40,8 @@ |
||
| 40 | 40 | public function doValidate(): JsonResponse |
| 41 | 41 | { |
| 42 | 42 | $response = ['result' => 'OK', 'message' => null]; |
| 43 | - $uri = (string)config('csv_importer.uri'); |
|
| 44 | - $token = (string)config('csv_importer.access_token'); |
|
| 43 | + $uri = (string)config('csv_importer.uri'); |
|
| 44 | + $token = (string)config('csv_importer.access_token'); |
|
| 45 | 45 | $request = new SystemInformationRequest($uri, $token); |
| 46 | 46 | try { |
| 47 | 47 | $result = $request->get(); |
@@ -80,11 +80,11 @@ discard block |
||
| 80 | 80 | case 'VZ': // Verzamelbetaling |
| 81 | 81 | case 'IC': // Incasso |
| 82 | 82 | case 'DV': // Divers |
| 83 | - $this->removeIBANIngDescription(); // Remove "IBAN:", because it is already at "Tegenrekening" |
|
| 84 | - $this->removeNameIngDescription(); // Remove "Naam:", because it is already at "Naam/ Omschrijving" |
|
| 85 | - $this->removeIngDescription(); // Remove "Omschrijving", but not the value from description |
|
| 83 | + $this->removeIBANIngDescription(); // Remove "IBAN:", because it is already at "Tegenrekening" |
|
| 84 | + $this->removeNameIngDescription(); // Remove "Naam:", because it is already at "Naam/ Omschrijving" |
|
| 85 | + $this->removeIngDescription(); // Remove "Omschrijving", but not the value from description |
|
| 86 | 86 | $this->moveValutadatumDescription(); // Move "Valutadatum" from description to new column |
| 87 | - $this->MoveSavingsAccount(); // Move savings account number and name |
|
| 87 | + $this->MoveSavingsAccount(); // Move savings account number and name |
|
| 88 | 88 | break; |
| 89 | 89 | case 'BA': // Betaalautomaat |
| 90 | 90 | $this->moveValutadatumDescription(); // Move "Valutadatum" from description to new column |
@@ -152,19 +152,19 @@ discard block |
||
| 152 | 152 | |
| 153 | 153 | if (preg_match('/(Naar|Van) (.*rekening) ([A-Za-z0-9]+)/', $this->row[8], $matches)) { // Search for saving acount at 'Mededelingen' column |
| 154 | 154 | $this->row[1] .= ' ' . $matches[2] . ' ' . $matches[3]; // Current name + Saving acount name + Acount number |
| 155 | - if ('' === (string) $this->row[3]) { // if Saving account number does not yet exists |
|
| 155 | + if ('' === (string)$this->row[3]) { // if Saving account number does not yet exists |
|
| 156 | 156 | $this->row[3] = $matches[3]; // Copy savings account number |
| 157 | 157 | } |
| 158 | 158 | $this->row[8] = preg_replace('/(Naar|Van) (.*rekening) ([A-Za-z0-9]+)/', '', $this->row[8]); // Remove the savings account content from description |
| 159 | 159 | } elseif (preg_match('/(Naar|Van) (.*rekening) ([A-Za-z0-9]+)/', $this->row[1], $matches)) { // Search for saving acount at 'Naam / Omschrijving' column |
| 160 | - $this->row[1] = $matches[2] . ' ' . $matches[3]; // Saving acount name + Acount number |
|
| 161 | - if ('' === (string) $this->row[3]) { // if Saving account number does not yet exists |
|
| 160 | + $this->row[1] = $matches[2] . ' ' . $matches[3]; // Saving acount name + Acount number |
|
| 161 | + if ('' === (string)$this->row[3]) { // if Saving account number does not yet exists |
|
| 162 | 162 | $this->row[3] = $matches[3]; // Copy savings account number |
| 163 | 163 | } |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | // if Saving account number exists |
| 167 | - if (('' !== (string) $this->row[3]) && !preg_match('/[A-Za-z]/', $this->row[3])) { // if Saving account number has no characters |
|
| 167 | + if (('' !== (string)$this->row[3]) && !preg_match('/[A-Za-z]/', $this->row[3])) { // if Saving account number has no characters |
|
| 168 | 168 | $this->row[3] = sprintf("%010d", $this->row[3]); // Make the number 10 digits |
| 169 | 169 | } |
| 170 | 170 | } |