Public Member Functions | |
__construct ($id=NULL) | |
Contruct of app, shutdown action logs by default. | |
get_bank_transfers ($ba_id=null, $limit_from=0, $limit_results=20, $order_by= 'id', $order_by_direction= 'DESC', $filter_sql= '') | |
It gets all bank transfers of given bank account. | |
count_bank_transfers ($ba_id, $filter_sql= '') | |
It counts all bank transfers of given bank account. | |
get_bank_transfers_by_statement ($bs_id=null, $limit_from=0, $limit_results=20, $order_by= 'id', $order_by_direction= 'DESC', $filter_values=array()) | |
Gets bank transfers by bank statement. | |
count_bank_transfers_by_statement ($bs_id, $filter_values=array()) | |
It counts all bank transfers of given bank account. | |
get_sum_of_member_fees_by_statement ($bs_id) | |
Gets sum of member fees on statement. | |
get_sum_of_interests_by_statement ($bs_id) | |
get_sum_of_inbound_by_statement ($bs_id) | |
get_sum_of_bank_fees_by_statement ($bs_id) | |
get_sum_of_suppliers_by_statement ($bs_id) | |
get_sum_of_outbound_by_statement ($bs_id) | |
get_unidentified_transfers ($limit_from=0, $limit_results=500, $order_by= 'id', $order_by_direction= 'asc', $filter_sql="") | |
It gets unidentified member fees transfers from db. | |
count_unidentified_transfers ($filter_sql="") | |
Function gets count of unidentified transfers. | |
get_bank_transfer ($trans_id) | |
It gets transfer including bank transfer information. | |
get_duplicities ($data) | |
get_transaction_code_duplicities ($transaction_codes, $bank_account_id) | |
Checks duplicities by comparing given transaction codes and searching them in the database. | |
get_transactions_duplicities ($bank_account_id) | |
Returns duplicities in table for given bank account Used in Tatra banka importer. | |
get_last_transaction_code_of ($bank_account_id) | |
Gets last transaction code of the given bank account. |
Protected Attributes | |
$belons_to |
Bank_transfer_Model::__construct | ( | $id = NULL | ) |
Contruct of app, shutdown action logs by default.
type | $id |
Bank_transfer_Model::count_bank_transfers | ( | $ba_id, | |
$filter_sql = '' |
|||
) |
It counts all bank transfers of given bank account.
$account_id |
Bank_transfer_Model::count_bank_transfers_by_statement | ( | $bs_id, | |
$filter_values = array() |
|||
) |
It counts all bank transfers of given bank account.
$account_id |
Bank_transfer_Model::count_unidentified_transfers | ( | $filter_sql = "" | ) |
Function gets count of unidentified transfers.
Bank_transfer_Model::get_bank_transfer | ( | $trans_id | ) |
It gets transfer including bank transfer information.
Assigned bank transfer must exist.
$trans_id |
Bank_transfer_Model::get_bank_transfers | ( | $ba_id = null , |
|
$limit_from = 0 , |
|||
$limit_results = 20 , |
|||
$order_by = 'id' , |
|||
$order_by_direction = 'DESC' , |
|||
$filter_sql = '' |
|||
) |
It gets all bank transfers of given bank account.
$account_id | |
$limit_from | |
$limit_results | |
$order_by | |
$order_by_direction |
Bank_transfer_Model::get_bank_transfers_by_statement | ( | $bs_id = null , |
|
$limit_from = 0 , |
|||
$limit_results = 20 , |
|||
$order_by = 'id' , |
|||
$order_by_direction = 'DESC' , |
|||
$filter_values = array() |
|||
) |
Gets bank transfers by bank statement.
$bs_id | |
$limit_from | |
$limit_results | |
$order_by | |
$order_by_direction | |
$filter_values |
Bank_transfer_Model::get_duplicities | ( | $data | ) |
$data | - object containing info about a bank transfer (from the bank account listing) parsed_acc_nr => 184932848 //cislo parsovaneho uctu parsed_acc_bank_nr=> 2400 //cislo banky parsovaneho uctu number => 1 //cislo vypisu date_time => 2008-03-25 05:40 //datum a cas comment => Rozpis polozek uveden v soupisu prevodu name => CESKA POSTA, S.P. account_nr => 160987123 account_bank_nr = 0300 type => Příchozí platba variable_symbol => 9081000001 constant_symbol => 998 specific_symbol => 9876543210 amount => 720.00 fee => -6.90 |
The cardinalities of a real-life bank_transfers JOIN transfers table with 10453 rows: datetime:4165, text:3063, variable_symbol:2173 bt.origin_id:1912
Bank_transfer_Model::get_last_transaction_code_of | ( | $bank_account_id | ) |
Gets last transaction code of the given bank account.
integer | $bank_account_id |
Bank_transfer_Model::get_sum_of_bank_fees_by_statement | ( | $bs_id | ) |
unknown_type | $bs_id |
Bank_transfer_Model::get_sum_of_inbound_by_statement | ( | $bs_id | ) |
unknown_type | $bs_id |
Bank_transfer_Model::get_sum_of_interests_by_statement | ( | $bs_id | ) |
unknown_type | $bs_id |
Bank_transfer_Model::get_sum_of_member_fees_by_statement | ( | $bs_id | ) |
Gets sum of member fees on statement.
Used for summary of imported bank statement.
unknown_type | $bs_id |
Bank_transfer_Model::get_sum_of_outbound_by_statement | ( | $bs_id | ) |
unknown_type | $bs_id |
Bank_transfer_Model::get_sum_of_suppliers_by_statement | ( | $bs_id | ) |
unknown_type | $bs_id |
Bank_transfer_Model::get_transaction_code_duplicities | ( | $transaction_codes, | |
$bank_account_id | |||
) |
Checks duplicities by comparing given transaction codes and searching them in the database.
Successful search means duplicity. Used in Fio importer.
Based on assumption, that bank has unique transaction codes in its scope. It is not necessary to check bank code here, because bank account number and bank code are checked before saving transfers.
array | $transaction_codes |
Bank_transfer_Model::get_transactions_duplicities | ( | $bank_account_id | ) |
Returns duplicities in table for given bank account Used in Tatra banka importer.
$bank_account_id |
Bank_transfer_Model::get_unidentified_transfers | ( | $limit_from = 0 , |
|
$limit_results = 500 , |
|||
$order_by = 'id' , |
|||
$order_by_direction = 'asc' , |
|||
$filter_sql = "" |
|||
) |
It gets unidentified member fees transfers from db.
Unidentified transfer is that with member_id=0. We could also find unidentified transfer using previous_transfer_id by this condition: WHERE srct.id NOT IN ( SELECT previous_transfer_id FROM transfers asst JOIN accounts ac ON ac.id = asst.destination_id AND ac.account_attribute_id =".Account_attribute_Model::CREDIT." )
|
protected |