Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 213

Přidáno uživatelem Jiří Sviták před více než 15 roky(ů)

Upraveno zobrazovani vsech transakci podle nove verze databaze.

Zobrazit rozdíly:

freenetis/trunk/kohana/application/i18n/cs_CZ/texts.php
'informations about device' => 'Informace o zařízení',
'informations about gateway' => 'Informace o bráně',
'infrastructure account' => 'Účet infrastruktury',
'install' => 'Instalovat',
'installation' => 'Instalace',
'interface detail' => 'Detail rozhraní',
'interface is successfully saved' => 'Rozhraní bylo úspěšně uloženo.',
freenetis/trunk/kohana/application/models/money_transfer.php
public function count_all_money_transfers()
{
return self::$db->count_records('money_transfers');
}
}
/**
* Gets all money transfers from database. In case of transfers between bank accounts it shows
* additional information about transfer, for example account number and variable symbol.
* @return unknown_type
*/
public function get_all_money_transfers()
{
return self::$db->query('
SELECT mt.id, mt.timestamp, mt. text, mt.amount
FROM money_transfers mt
');
// old version
/*
return self::$db->query('SELECT mt.*, mt.id AS mtid,
bi.*, bi.name AS bi_name,
orig_acc.*, orig_acc.name AS orig_acc_name,
dest_acc.*, dest_acc.name AS dest_acc_name
FROM money_transfers AS mt
JOIN money_transfer_bank_infos AS bi
ON bi.id = mt.bank_info_id
JOIN accounts AS orig_acc
ON orig_acc.id = mt.origin_id
JOIN accounts AS dest_acc
ON dest_acc.id = mt.destination_id
return self::$db->query('SELECT mt.id AS mtid, mt.timestamp, mt.text, mt.amount,
bi.variable_symbol, bi.comment,
oa.name AS origin, oa.type AS origin_type,
CONCAT(oba.account_nr, "/", oba.bank_nr),
da.name AS destination, da.type AS destination_type,
CONCAT(dba.account_nr, "/", dba.bank_nr)
FROM money_transfers mt
LEFT JOIN money_transfer_bank_infos bi
ON mt.id = bi.transfer_id
JOIN accounts AS oa
ON oa.id = mt.origin_id
LEFT JOIN bank_accounts AS oba
ON oa.id = oba.account_id
JOIN accounts AS da
ON da.id = mt.destination_id
LEFT JOIN bank_accounts AS dba
ON da.id = dba.account_id
ORDER BY mt.id');
*/
}
}
freenetis/trunk/kohana/application/controllers/money_transfers.php
'order_by' => $order_by,
'order_by_direction' => $order_by_direction,
'limit_results' => $limit_results
));
));
// money_transfers fields
$grid->order_field('id')->label('ID');
$grid->order_field('timestamp')->label(url_lang::lang('texts.Timestamp'));
//$grid->order_field('bi_name')->label('BI name');
//$grid->order_field('variable_symbol')->label('BI variable');
//$grid->order_field('orig_acc_name')->label('Origin account');
//$grid->order_field('dest_acc_name')->label('Destination account');
//$grid->order_field('previous_transfer_id')->label('Previous transfer id');
$grid->order_field('text')->label(url_lang::lang('texts.Text'));
$grid->order_field('amount')->label(url_lang::lang('texts.Amount'));
// money_transfers_bank_infos fields
$grid->order_field('variable_symbol')->label(url_lang::lang('texts.Var'));
$grid->order_field('comment')->label(url_lang::lang('texts.Comment'));
// accounts fields
$grid->order_field('origin')->label(url_lang::lang('texts.From'));
$grid->order_field('origin_type')->label(url_lang::lang('texts.Type'));
$grid->order_field('destination')->label(url_lang::lang('texts.To'));
$grid->order_field('destination_type')->label(url_lang::lang('texts.Type'));
//$grid->order_field('previous_transfer_id')->label('Previous transfer id');
$grid->datasource($alltransfers);
$this->template->content = $grid;

Také k dispozici: Unified diff