Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix functions `moveValutadatumDescription` and `removeNameIngDescription`
Ruben Verhoef8c552b8fa82f
diff --git a/app/Import/Specifics/IngDescription.php b/app/Import/Specifics/IngDescription.phpindex f33062a58e..a8cd78a2c7 100644--- a/app/Import/Specifics/IngDescription.php+++ b/app/Import/Specifics/IngDescription.php@@ -112,9 +112,10 @@ class IngDescription implements SpecificInterfaceprotected function moveValutadatumDescription(): void{$matches = [];- preg_match('/Valutadatum: ([0-9-]+)/', $this->row[8], $matches);- $this->row[9] = date("Ymd", strtotime($matches[1]));- $this->row[8] = preg_replace('/Valutadatum: [0-9-]+/', '', $this->row[8]);+ if (preg_match('/Valutadatum: ([0-9-]+)/', $this->row[8], $matches)) {+ $this->row[9] = date("Ymd", strtotime($matches[1]));+ $this->row[8] = preg_replace('/Valutadatum: [0-9-]+/', '', $this->row[8]);+ }}/**@@ -140,11 +141,7 @@ class IngDescription implements SpecificInterface*/protected function removeNameIngDescription(): void{- $matches = [];- if (preg_match('/Valutadatum: ([0-9-]+)/', $this->row[8], $matches)) {- $this->row[9] = date("Ymd", strtotime($matches[1]));- $this->row[8] = preg_replace('/Valutadatum: [0-9-]+/', '', $this->row[8]);- }+ $this->row[8] = preg_replace('/Naam:.*?([a-zA-Z\/]+:)/', '$1', $this->row[8]);}/**