Skip to content

Firefly III: a personal finances manager

Remove "Omschrijving" but not it's value, only the word.

Ruben Verhoef23ec5cbaa7d6
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: <OPPOS NAME> Omschrijving: <DESCRIPTION> IBAN: <OPPOS IBAN NR>.