Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 170ebe5e

Přidáno uživatelem Ondřej Fibich před asi 8 roky(ů)

Allows to import Tatra banka listings with no variable symbol.

Zobrazit rozdíly:

application/libraries/importers/Txt_Tatra_Banka_Statement_File_Importer.php
// Date, account, amount
$match_data = preg_match_all(self::REGEX_DATA, $emails, $data);
// Variable, specific, constant symbol
$match_vs = preg_match_all(self::REGEX_VS, $emails, $vs);
$match_ss = preg_match_all(self::REGEX_SS, $emails, $ss);
$match_cs = preg_match_all(self::REGEX_CS, $emails, $cs);
$accounts = array();
foreach ($data[2] as $e)
......
$this->add_error(__('E-mails contains more than one destination account: %s', implode(', ', array_unique($accounts))), FALSE);
}
return $match_data == $match_vs &&
$match_vs == $match_ss &&
$match_ss == $match_cs &&
count(array_unique($accounts)) <= 1;
return $match_data && count(array_unique($accounts)) <= 1;
}
protected function get_header_data()
......
$email,
$msg);
if (!$match_data || !$match_vs || !$match_ss || !$match_cs)
if (!$match_data)
{
continue;
}
......
'counter_account'=> trim(@$ca[2]),
'counter_bank' => trim(@$ca[1]),
'currency' => $data[6],
'vs' => $vs[1],
'ss' => $ss[1],
'ks' => $cs[1],
'vs' => @$vs[1],
'ss' => @$ss[1],
'ks' => @$cs[1],
'message' => trim(@$msg[1])
);
}
......
$body,
$data);
preg_match(self::REGEX_VS,
$body,
$vs);
preg_match(self::REGEX_SS,
$body,
$ss);
preg_match(self::REGEX_CS,
$body,
$cs);
if (!$data || !$vs || !$ss || !$cs)
if (!$data)
{
continue;
}

Také k dispozici: Unified diff