Revize 93fe8f1c
Přidáno uživatelem David Raška před asi 9 roky(ů)
application/controllers/bank_accounts.php | ||
---|---|---|
case Bank_Account_Settings::FIELD_TYPE_DROPDOWN:
|
||
$input = $form->dropdown($column)->selected($ba_driver->$column)->options(array());
|
||
break;
|
||
case Bank_Account_Settings::FIELD_TYPE_DATESELECT:
|
||
$input = $form->dateselect($column)->value($ba_driver->$column)->rules('precise')->minutes(1);
|
||
break;
|
||
default:
|
||
$input = $form->input($column)->value($ba_driver->$column);
|
||
break;
|
||
... | ... | |
if ($form->validate())
|
||
{
|
||
$form_data = $form->as_array();
|
||
|
||
|
||
// real bank account
|
||
$bank_account->type = $form_data['type'];
|
||
$bank_account->IBAN = $form_data['IBAN'];
|
application/i18n/cs_CZ/help.php | ||
---|---|---|
'grid_hide_on_first_load' => 'Určuje, jestli skrývat grid a jeho položky při jeho první načtení. Účelem je optimalizace spotřeby paměti.',
|
||
'gps_coordinates' => 'GPS souřadnice může být ve tvaru desetinného čísla, nebo: hodiny°minuty\'sekundy".',
|
||
'ignore_whitelist' => 'Umožňuje této zprávě, je-li aktivována, ignorovat bílou listinu. Určeno pro velmi speciální případy, například pokud je připojen městský úřad, který je na trvalé bílé listině, aby nebyl obtěžován a i přesto chceme jeho počítače přesměrovat nebo upozornit kvůli informaci o výpadku.',
|
||
'imap_last_download' => 'Určuje od kterého data budou stahovány nové výpisy. Tato hodnota se s každým stažením výpisu automaticky zvyšuje aby se předešlo duplicitním výpisům.<br/>POZOR! Hodnota se může během editace nastavení účtu změnit kvůli možnému stažené výpisu plánovačem.',
|
||
'imap_mailbox' => 'Složka na IMAP serveru, ze které se budou stahovat e-maily. Výchozí je INBOX.',
|
||
'imap_port' => 'Výchozí port pro Žádné a STARTTLS zabezpečení je 143. Pro SSL/TLS je 993.',
|
||
'initial_immunity' => 'Počet dní, po které nemá být nový člen upozorňován na placení. Výchozí hodnota je 14 dní.',
|
application/i18n/cs_CZ/texts.php | ||
---|---|---|
'channel width' => 'Šířka kanálu',
|
||
'chars' => 'Znaků',
|
||
'check again' => 'Znovu zkontrolovat',
|
||
'check e-mails since' => 'Kontrolovat e-maily od',
|
||
'check it' => 'zkontrolujte je',
|
||
'children interfaces' => 'Položky bridge',
|
||
'choose' => 'Vybrat',
|
application/i18n/en_US/help.php | ||
---|---|---|
'gps_coordinates' => 'GPS can be in shape of real number, or: hours°minutes\'seconds".',
|
||
'grid_hide_on_first_load' => 'It determines whether hide grid and its items on its first load. It is used as optimalization of memory usage.',
|
||
'ignore_whitelist' => 'Allows this report, when activated, to ignore the white list. Designed for very special cases, such as when connected to the municipality, which is on permanent white list not to be harassed and even though we want to redirect his computer for information about the outage.',
|
||
'imap_last_download' => 'Defines date from which will be next listings downloaded. This value is automatically increased after each download to prevent duplicities listings.<br/>WARNING! Value can change during editing of account settings due to dowloading listings by scheduler.',
|
||
'imap_mailbox' => 'Folder in IMAP server, from which e-mails will be downloaded. Default is INBOX.',
|
||
'imap_port' => 'Default port for None and STARTTLS encryption is 143. For SSL/TLS 993.',
|
||
'log_queues_info' => 'Errors has been reported (in system or in some network elements), please %s and perform the necessary actions to correct them.',
|
application/libraries/Bank_Account_Settings.php | ||
---|---|---|
const FIELD_TYPE_STRING = 'string';
|
||
/** Dropdown type */
|
||
const FIELD_TYPE_DROPDOWN = 'dropdown';
|
||
/** Dateselect type */
|
||
const FIELD_TYPE_DATESELECT = 'dateselect';
|
||
|
||
/** Data of settings */
|
||
private $data = array();
|
||
... | ... | |
|
||
case self::FIELD_TYPE_DROPDOWN:
|
||
break;
|
||
|
||
case self::FIELD_TYPE_DATESELECT:
|
||
break;
|
||
}
|
||
|
||
$this->data[$column] = $data;
|
application/libraries/bank_account_settings/Tatrabanka_Bank_Account_Settings.php | ||
---|---|---|
(
|
||
'name' => __('Password'),
|
||
'type' => self::FIELD_TYPE_STRING,
|
||
),
|
||
'last_download' => array
|
||
(
|
||
'name' => __('Check E-mails since'),
|
||
'type' => self::FIELD_TYPE_DATESELECT,
|
||
'help' => 'imap_last_download'
|
||
)
|
||
);
|
||
}
|
application/libraries/forge/Form_Dateselect.php | ||
---|---|---|
// No labels or values
|
||
unset($data['label']);
|
||
|
||
$parts = $this->parts;
|
||
|
||
if (in_array('precise', $this->rules()))
|
||
{
|
||
$parts = array_slice($parts, 0, 7, true) +
|
||
array(':', 'second' => array(1)) +
|
||
array_slice($parts, 7, count($parts) - 1, true);
|
||
}
|
||
|
||
$input = '';
|
||
foreach($this->parts as $type => $val)
|
||
foreach($parts as $type => $val)
|
||
{
|
||
if (is_int($type))
|
||
{
|
||
... | ... | |
{
|
||
$time = array_combine
|
||
(
|
||
array('month', 'day', 'year', 'hour', 'minute', 'am_pm'),
|
||
explode('--', date('n--j--Y--g--i--A', $timestamp))
|
||
array('month', 'day', 'year', 'hour', 'minute', 'second', 'am_pm'),
|
||
explode('--', date('n--j--Y--g--i--s--A', $timestamp))
|
||
);
|
||
|
||
// Minutes should always be in 5 minute increments
|
||
$time['minute'] = num::round($time['minute'], current($this->parts['minute']));
|
||
if (!in_array('precise', $this->rules))
|
||
{
|
||
// Minutes should always be in 5 minute increments
|
||
$time['minute'] = num::round($time['minute'], current($this->parts['minute']));
|
||
}
|
||
|
||
return $time;
|
||
}
|
||
... | ... | |
(
|
||
date::adjust($time['hour'], $time['am_pm']),
|
||
$time['minute'],
|
||
0,
|
||
$time['second'],
|
||
$time['month'],
|
||
$time['day'],
|
||
$time['year']
|
||
);
|
||
}
|
||
|
||
public function rule_precise()
|
||
{
|
||
|
||
}
|
||
|
||
} // End Form Dateselect
|
application/libraries/importers/Tatra_Banka_Statement_File_Importer.php | ||
---|---|---|
*/
|
||
abstract class Tatra_Banka_Statement_File_Importer extends Bank_Statement_File_Importer
|
||
{
|
||
const LAST_DOWNLOAD_SETTINGS_KEY = 'tatrabanka_email_last_download';
|
||
const LAST_DOWNLOAD_SETTINGS_KEY = 'last_download';
|
||
|
||
protected $data = array();
|
||
|
||
... | ... | |
throw new Duplicity_Exception($dm);
|
||
}
|
||
|
||
Settings::set(self::LAST_DOWNLOAD_SETTINGS_KEY, $this->last_download_datetime);
|
||
$settings = Bank_Account_Settings::factory($this->get_bank_account()->type);
|
||
$settings->load_column_data($this->get_bank_account()->settings);
|
||
|
||
$key = self::LAST_DOWNLOAD_SETTINGS_KEY;
|
||
$settings->$key = $this->last_download_datetime;
|
||
|
||
$ba->settings = $settings->get_column_data();
|
||
|
||
$ba->save();
|
||
|
||
// done
|
||
$statement->transaction_commit();
|
application/libraries/importers/Txt_Tatra_Banka_Statement_File_Importer.php | ||
---|---|---|
protected function do_download(Bank_account_Model $bank_account,
|
||
Bank_Account_Settings $settings, $url)
|
||
{
|
||
$last_download = Settings::get(self::LAST_DOWNLOAD_SETTINGS_KEY);
|
||
$key = self::LAST_DOWNLOAD_SETTINGS_KEY;
|
||
|
||
$last_download = $settings->$key;
|
||
|
||
if (empty($last_download))
|
||
{
|
Také k dispozici: Unified diff
Support for dateselect field in bank account settings
Support for precise datetime (including seconds) in dateselect field
Tatrabanka last download time moved from config table to bank account table