From 23ec5cbaa7d6384fda1bc62790d8846c8e30e0d3 Mon Sep 17 00:00:00 2001 From: Ruben Verhoef Date: Sun, 23 Feb 2020 18:39:39 +0100 Subject: [PATCH] Remove "Omschrijving" but not it's value, only the word. --- app/Import/Specifics/IngDescription.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/Import/Specifics/IngDescription.php b/app/Import/Specifics/IngDescription.php index 4a1eac5bf2..7f6115763a 100644 --- a/app/Import/Specifics/IngDescription.php +++ b/app/Import/Specifics/IngDescription.php @@ -79,6 +79,7 @@ class IngDescription implements SpecificInterface case 'DV': // Divers $this->removeIBANIngDescription(); // Remove "IBAN:", because it is already at "Tegenrekening" $this->removeNameIngDescription(); // Remove "Naam:", because it is already at "Naam/ Omschrijving" + $this->removeIngDescription(); // Remove "Omschrijving", but not the value from description // if "tegenrekening" empty, copy the description. Primitive, but it works. $this->copyDescriptionToOpposite(); break; @@ -100,6 +101,14 @@ class IngDescription implements SpecificInterface $this->row[8] = $this->row[1] . ' ' . $this->row[8]; } + /** + * Remove "Omschrijving" (and NOT its value) from the description. + */ + protected function removeIngDescription(): void + { + $this->row[8] = preg_replace('/Omschrijving: /', '', $this->row[8]); + } + /** * Remove IBAN number out of the description * Default description of Description is: Naam: Omschrijving: IBAN: .