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

This commit is contained in:
Ruben Verhoef 2020-02-23 18:39:39 +01:00
parent 21fcb6f853
commit 23ec5cbaa7

View File

@ -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>.