* indent fix
* added some more reoccuring pos info
This commit is contained in:
parent
65a5757df9
commit
1ee6969b0e
@ -92,18 +92,55 @@ class KoinService
|
|||||||
*/
|
*/
|
||||||
private function getExpenseCategory(string $posInfo): string
|
private function getExpenseCategory(string $posInfo): string
|
||||||
{
|
{
|
||||||
|
if (false !== strpos($posInfo, "STOCZEK ETTEREM")) {
|
||||||
|
return 'Étel';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (false !== strpos($posInfo, "BKK AUTOMATA")) {
|
||||||
|
return 'Közlekedés';
|
||||||
|
}
|
||||||
|
|
||||||
if (false !== strpos($posInfo, "TESCO")) {
|
if (false !== strpos($posInfo, "TESCO")) {
|
||||||
return 'Bevásárlás';
|
return 'Bevásárlás';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (false !== strpos($posInfo, "SPAR MAGYARORSZAG")) {
|
||||||
|
return 'Étel';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (false !== strpos($posInfo, "SZLOVàK ABC")) {
|
||||||
|
return 'Bevásárlás';
|
||||||
|
}
|
||||||
|
|
||||||
if (false !== strpos($posInfo, "MCDHU")) {
|
if (false !== strpos($posInfo, "MCDHU")) {
|
||||||
return 'Étel';
|
return 'Étel';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (false !== strpos($posInfo, "OSMANI DÖNER KEBAB")) {
|
||||||
|
return 'Étel';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (false !== strpos($posInfo, "Princess Bakery")) {
|
||||||
|
return 'Étel';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (false !== strpos($posInfo, "PIROG-DA")) {
|
||||||
|
return 'Étel';
|
||||||
|
}
|
||||||
|
|
||||||
if (false !== strpos($posInfo, "GYOGYSZER")) {
|
if (false !== strpos($posInfo, "GYOGYSZER")) {
|
||||||
return 'Egészség';
|
return 'Egészség';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (false !== strpos($posInfo, "GOOGLE *Google Music")) {
|
||||||
|
return 'Szórakozás';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (false !== strpos($posInfo, "Aqua Electromax")) {
|
||||||
|
return 'Szórakozás';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return self::DEFAULT_EXPENSE;
|
return self::DEFAULT_EXPENSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,16 +152,64 @@ class KoinService
|
|||||||
{
|
{
|
||||||
$tags = [];
|
$tags = [];
|
||||||
|
|
||||||
|
if (false !== strpos($posInfo, "SCIENCE PARK ÉTTEREM")) {
|
||||||
|
$tags[] = 'Science Park';
|
||||||
|
$tags[] = 'Menza';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (false !== strpos($posInfo, "STOCZEK ETTEREM")) {
|
||||||
|
$tags[] = "Stoczek";
|
||||||
|
$tags[] = "Menza";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (false !== strpos($posInfo, "BKK AUTOMATA")) {
|
||||||
|
$tags[] = "Bérlet";
|
||||||
|
$tags[] = "BKV";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (false !== strpos($posInfo, "SPAR MAGYARORSZAG")) {
|
||||||
|
$tags[] = 'Spar';
|
||||||
|
}
|
||||||
|
|
||||||
if (false !== strpos($posInfo, "TESCO")) {
|
if (false !== strpos($posInfo, "TESCO")) {
|
||||||
$tags[] = 'Tesco';
|
$tags[] = 'Tesco';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (false !== strpos($posInfo, "SZLOVàK ABC")) {
|
||||||
|
$tags[] = 'Szlovák ABC';
|
||||||
|
}
|
||||||
|
|
||||||
if (false !== strpos($posInfo, "MCDHU")) {
|
if (false !== strpos($posInfo, "MCDHU")) {
|
||||||
$tags[] = 'Junk food';
|
$tags[] = 'Junk food';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (false !== strpos($posInfo, "OSMANI DÖNER KEBAB")) {
|
||||||
|
$tags[] = 'Kebab';
|
||||||
|
$tags[] = 'Junk food';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (false !== strpos($posInfo, "Princess Bakery")) {
|
||||||
|
$tags[] = 'Pricess Bakery';
|
||||||
|
$tags[] = 'Junk food';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (false !== strpos($posInfo, "PIROG-DA")) {
|
||||||
|
$tags[] = 'Pirog-da';
|
||||||
|
$tags[] = 'Junk food';
|
||||||
|
}
|
||||||
|
|
||||||
if (false !== strpos($posInfo, "GYOGYSZER")) {
|
if (false !== strpos($posInfo, "GYOGYSZER")) {
|
||||||
$tags[] = 'Gyógyszer';
|
$tags[] = 'Gyógyszer';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (false !== strpos($posInfo, "GOOGLE *Google Music")) {
|
||||||
|
$tags[] = 'Google play';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (false !== strpos($posInfo, "Aqua Electromax")) {
|
||||||
|
$tags[] = 'Aqua';
|
||||||
|
}
|
||||||
|
|
||||||
$tags[] = 'Auto';
|
$tags[] = 'Auto';
|
||||||
return $tags;
|
return $tags;
|
||||||
}
|
}
|
||||||
@ -137,7 +222,11 @@ class KoinService
|
|||||||
* @param array $tags
|
* @param array $tags
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function saveTransaction(int $amount, string $currency = 'HUF', string $date, string $category, array $tags): int
|
public function saveTransaction(int $amount,
|
||||||
|
string $currency = 'HUF',
|
||||||
|
string $date,
|
||||||
|
string $category,
|
||||||
|
array $tags): int
|
||||||
{
|
{
|
||||||
$pageData = $this->login($this->config['koin.user'], $this->config['koin.pass']);
|
$pageData = $this->login($this->config['koin.user'], $this->config['koin.pass']);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user