Check if Valutadatum is found in row 8, when not found do nothing!

This commit is contained in:
Ruben Verhoef 2020-03-17 19:43:03 +01:00
parent b398924706
commit 87d459c5ff

View File

@ -135,10 +135,11 @@ class IngDescription implements SpecificInterface
protected function moveValutadatumDescription(): void protected function moveValutadatumDescription(): void
{ {
$matches = array(); $matches = array();
preg_match('/Valutadatum: ([0-9-]+)/', $this->row[8], $matches); if (preg_match('/Valutadatum: ([0-9-]+)/', $this->row[8], $matches)) {
$this->row[9] = date("Ymd", strtotime($matches[1])); $this->row[9] = date("Ymd", strtotime($matches[1]));
$this->row[8] = preg_replace('/Valutadatum: [0-9-]+/', '', $this->row[8]); $this->row[8] = preg_replace('/Valutadatum: [0-9-]+/', '', $this->row[8]);
} }
}
/** /**
* Move savings account number to column 1 and name to column 3. * Move savings account number to column 1 and name to column 3.