Revize 2269
Přidáno uživatelem Ondřej Fibich před téměř 11 roky(ů)
freenetis/branches/1.1/application/controllers/import.php | ||
---|---|---|
$parser->parse($url);
|
||
|
||
// does imported bank account and bank account on the statement match?
|
||
if ($ba->account_nr != $parser->account_nr &&
|
||
if ($ba->account_nr != $parser->account_nr ||
|
||
$ba->bank_nr != $parser->bank_nr)
|
||
{
|
||
$ba_nr = $ba->account_nr."/".$ba->bank_nr;
|
||
... | ... | |
// does match bank account in system with bank account of statement?
|
||
$ba = new Bank_account_Model($bank_account_id);
|
||
|
||
if ($ba->account_nr != $header['account_nr'] &&
|
||
if ($ba->account_nr != $header['account_nr'] ||
|
||
$ba->bank_nr != $header['bank_nr'])
|
||
{
|
||
$ba_nr = $ba->account_nr.'/'.$ba->bank_nr;
|
freenetis/branches/1.1/application/libraries/Bank_Statement_File_Importer.php | ||
---|---|---|
$header_data->get_bank_id() != $bank_account->bank_nr ||
|
||
$header_data->get_account_id() != $bank_account->account_nr)
|
||
{
|
||
$an = $header_data->get_account_id() . '/' . $header_data->get_bank_id();
|
||
$m = __('Bank account number in listing (%s) header does not match ' .
|
||
'bank account %s in database!', array(strval($bank_account), $acc));
|
||
'bank account %s in database!', array($an, $acc));
|
||
throw new Exception($m);
|
||
}
|
||
|
freenetis/branches/1.1/application/libraries/importers/Fio_Bank_Statement_File_Importer.php | ||
---|---|---|
|
||
if (!$member_id)
|
||
{
|
||
// let's create interest transfer
|
||
$transfer_id = Transfer_Model::insert_transfer(
|
||
$cash->id, $account->id, null, null,
|
||
$user_id, null, $datetime, $now, $item['typ'],
|
||
abs($item['castka'])
|
||
);
|
||
// if VS is empty, that it is deposit (propably
|
||
// accountant came to bank with cash and put
|
||
// them on the association bank account).
|
||
// Otherwise if there is a VS that wrong (because
|
||
// it was not founded in DB) then assume that it
|
||
// is member fee. (#851)
|
||
if (empty($item['vs']))
|
||
{
|
||
// deposit transfer
|
||
$transfer_id = Transfer_Model::insert_transfer(
|
||
$cash->id, $account->id, null, null,
|
||
$user_id, null, $datetime, $now,
|
||
$item['typ'], abs($item['castka'])
|
||
);
|
||
|
||
$stats['deposits'] += abs($item['castka']);
|
||
$stats['deposits_nr']++;
|
||
}
|
||
else // undefined member fee
|
||
{
|
||
// double-entry incoming transfer
|
||
$transfer_id = Transfer_Model::insert_transfer(
|
||
$member_fees->id, $account->id, null,
|
||
null, $user_id, null, $datetime, $now,
|
||
$item['zprava'], abs($item['castka'])
|
||
);
|
||
|
||
$stats['member_fees'] += abs($item['castka']);
|
||
$stats['unidentified_nr']++;
|
||
}
|
||
|
||
$bt->clear();
|
||
$bt->set_logger(false);
|
||
$bt->origin_id = null;
|
||
... | ... | |
$bt->variable_symbol = $item['vs'];
|
||
$bt->specific_symbol = $item['ss'];
|
||
$bt->save();
|
||
$stats['deposits'] += abs($item['castka']);
|
||
$stats['deposits_nr']++;
|
||
}
|
||
else
|
||
{
|
Také k dispozici: Unified diff
Opravy:
- oprava nesmyslne podminky (and misto or !!!) pri kontrole spravneho prirazeni mezi bankovnim uctem a vypisem z banky (tykalo se E-banky a UniCredit)
- oprava chyby v chybovem vypisu pri importu z jineho uctu
- closes #851: FIO - nerozpozna platbu na prepazce s chybnym VS