From 65a5757df9b6659f2f98102eb025ef654869cf03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danyi=20D=C3=A1vid?= Date: Sun, 10 Sep 2017 23:23:00 +0200 Subject: [PATCH] * tesco added --- src/App/Service/KoinService.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/App/Service/KoinService.php b/src/App/Service/KoinService.php index 7203a69..4bb7eff 100644 --- a/src/App/Service/KoinService.php +++ b/src/App/Service/KoinService.php @@ -92,11 +92,15 @@ class KoinService */ private function getExpenseCategory(string $posInfo): string { - if(false !== strpos($posInfo,"MCDHU")) { + if(false !== strpos($posInfo, "TESCO")) { + return 'Bevásárlás'; + } + + if(false !== strpos($posInfo, "MCDHU")) { return 'Étel'; } - if(false !== strpos($posInfo,"GYOGYSZER")) { + if(false !== strpos($posInfo, "GYOGYSZER")) { return 'Egészség'; } @@ -111,10 +115,13 @@ class KoinService { $tags = []; - if(false !== strpos($posInfo,"MCDHU")) { + if(false !== strpos($posInfo, "TESCO")) { + $tags[] = 'Tesco'; + } + if(false !== strpos($posInfo, "MCDHU")) { $tags[] = 'Junk food'; } - if(false !== strpos($posInfo,"GYOGYSZER")) { + if(false !== strpos($posInfo, "GYOGYSZER")) { $tags[] = 'Gyógyszer'; }