Revize 257
Přidáno uživatelem Jiří Sviták před více než 15 roky(ů)
freenetis/trunk/kohana/application/i18n/cs_CZ/texts.php | ||
---|---|---|
'penalty have to be a number' => 'Pokuta musí být číslo',
|
||
'phone' => 'Telefon',
|
||
'phone already exists in database' => 'Telefon je již v databázi',
|
||
'please fill in the form with information about your administrator member' => 'Prosím, vyplňte formulář informacemi u vašem členu-administrátorovi.',
|
||
'port detail' => 'Detail portu',
|
||
'port is successfully saved' => 'Port byl úspěšně uložen.',
|
||
'port is successfully updated' => 'Port byl úspěšně upraven.',
|
||
... | ... | |
'technology' => 'Technologie',
|
||
'the transfer successfully done' => 'Převod úspěšně dokončen',
|
||
'there are no items yet' => 'Neobsahuje žádné záznamy.',
|
||
'this member represents your association in the system' => 'Tento člen představuje vaše sdružení v systému.',
|
||
'time' => 'čas',
|
||
'timestamp' => 'Čas',
|
||
'to' => 'Komu',
|
||
... | ... | |
'vlan name' => 'Název VLANu',
|
||
'vlans list' => 'Seznam VLANů',
|
||
'vlans' => 'VLANy',
|
||
'welcome to the freenetis!' => 'Vítejte ve Freenetisu!',
|
||
'work confirmation' => 'Potvrzení práce',
|
||
'work successfully added' => 'Práce úspěšně přidána',
|
||
'work successfully deleted' => 'Práce úspěšně smazána',
|
freenetis/trunk/kohana/application/models/account.php | ||
---|---|---|
|
||
/**
|
||
* @author Jiri Svitak
|
||
* Get balance of analytic account. Subtract all outbound transfers from all incoming transfers.
|
||
* It gets balance of analytic account. It subtracts all outbound transfers from all incoming transfers.
|
||
* @param $account_id
|
||
* @return unknown_type
|
||
*/
|
||
... | ... | |
}
|
||
return $in - $out;//(float)$inbound->current()->total - (float)$outbound->current()->total;
|
||
}
|
||
|
||
/**
|
||
* @author Jiri Svitak
|
||
* It gets all double-entry accounts.
|
||
* @return unknown_type
|
||
*/
|
||
public function get_doubleentry_accounts()
|
||
{
|
||
return self::$db->query("SELECT a.* FROM accounts a
|
||
JOIN enum_types e ON e.id = a.type_id
|
||
WHERE e.value <> 'bank'");
|
||
}
|
||
}
|
||
|
||
?>
|
freenetis/trunk/kohana/application/controllers/installation.php | ||
---|---|---|
$member->town = $form_data["town"];
|
||
$member->ZIP_code = $form_data["zip_code"];
|
||
$member->type = 4;
|
||
$member->entrance_date = date("Y-m-d");
|
||
$member->save();
|
||
|
||
$user = new User_Model();
|
||
... | ... | |
$operating_account->member_id = $member->id;
|
||
$operating_account->name = 'Operating account';
|
||
$operating_account->type_id = $operating_enum_type->id;
|
||
$operating_account->comment = 'Operating account of association';
|
||
$operating_account->comment = 'Double-entry operating account of association';
|
||
$operating_account->save();
|
||
|
||
$infrastructure_enum_type = $enum_type_model->where('value','infrastructure')->find();
|
||
... | ... | |
$infrastructure_account->member_id = $member->id;
|
||
$infrastructure_account->name = 'Infrastructure account';
|
||
$infrastructure_account->type_id = $infrastructure_enum_type->id;
|
||
$infrastructure_account->comment = 'Infrastructure account of association';
|
||
$infrastructure_account->comment = 'Double-entry infrastructure account of association';
|
||
$infrastructure_account->save();
|
||
|
||
$suppliers_enum_type = $enum_type_model->where('value','suppliers')->find();
|
||
... | ... | |
$suppliers_account->member_id = $member->id;
|
||
$suppliers_account->name = 'Account of suppliers';
|
||
$suppliers_account->type_id = $suppliers_enum_type->id;
|
||
$suppliers_account->comment = 'doubleentry account of suppliers';
|
||
$suppliers_account->comment = 'Double-entry account of suppliers';
|
||
$suppliers_account->save();
|
||
|
||
|
freenetis/trunk/kohana/application/controllers/accounts.php | ||
---|---|---|
// it selects only bank accounts of association
|
||
$acc_model = new Account_Model();
|
||
// to do - simplification of enum types
|
||
$accs = $acc_model->where(array('member_id' => 1, 'type_id' => 29))->find_all();
|
||
$total_accs = $accs->count();
|
||
$accs = $acc_model->join('enum_types', 'enum_types.id = accounts.type_id')->where(array('member_id' => 1, 'enum_types.value' => 'bank'))->find_all();
|
||
$total_accs = count($accs);
|
||
|
||
$acc_grid = new Grid(url_lang::base().'accounts',
|
||
url_lang::lang('texts.Bank accounts of association'), array(
|
||
... | ... | |
|
||
$view = new View('template');
|
||
$view->header = new View('base/header');
|
||
$view->header->title = url_lang::lang('texts.Display member');
|
||
$view->header->title = url_lang::lang('texts.Bank accounts of association');
|
||
$view->header->menu = Controller::render_menu();
|
||
$view->content = $acc_grid;
|
||
$view->footer = new View('base/footer');
|
||
... | ... | |
|
||
/**
|
||
* @author Jiri Svitak
|
||
* It shows double-entry accounts of members.
|
||
* It shows double-entry accounts like credit accounts of members, project, infrastructure, operating accounts.
|
||
* @param $limit_results
|
||
* @param $order_by
|
||
* @param $order_by_direction
|
||
... | ... | |
*/
|
||
function doubleentry_accounts($limit_results = 50, $order_by = 'id', $order_by_direction = 'DESC')
|
||
{
|
||
// it selects only double
|
||
$acc_model = new Account_Model();
|
||
// to do - simplification of enum types
|
||
$accs = $acc_model->get_doubleentry_accounts();
|
||
$total_accs = count($accs);
|
||
|
||
$acc_grid = new Grid(url_lang::base().'accounts',
|
||
url_lang::lang('texts.Double-entry accounts'), array(
|
||
'separator' => '<br /><br />',
|
||
'current' => $limit_results, // current selected 'records_per_page' value
|
||
'selector_increace' => 50, // increace
|
||
'selector_min' => 50, // minimum where selector start
|
||
'selector_max_multiplier' => 10,
|
||
'base_url' => Config::item('locale.lang').'/accounts/doubleentry_transfers/'.$limit_results.'/'.$order_by.'/'.$order_by_direction ,
|
||
'uri_segment' => 'page', // pass a string as uri_segment to trigger former 'label' functionality
|
||
'total_items' => $total_accs, // use db count query here of course
|
||
'items_per_page' => $limit_results, // it may be handy to set defaults for stuff like this in config/pagination.php
|
||
'style' => 'classic',
|
||
'order_by' => $order_by,
|
||
'order_by_direction' => $order_by_direction,
|
||
'limit_results' => $limit_results,
|
||
));
|
||
// adding account, to do - access rights
|
||
//if ($this->acl_check_new(get_class($this), 'accounts', $member_id))
|
||
// $acc_grid->add_new_button(url_lang::base().'accounts/add_bank_account/'.$member_id, url_lang::lang('texts.Add new bank account'));
|
||
$acc_grid->order_field('id')->label('ID');
|
||
$acc_grid->order_field('name')->label(url_lang::lang('texts.Account name'));
|
||
$acc_grid->order_field('comment')->label(url_lang::lang('texts.Comment'));
|
||
//$acc_grid->action_field('id')->label(url_lang::lang('texts.Transfers'))->url(url_lang::base().'money_transfers/show_by_bank_account')->action(url_lang::lang('texts.Show'));
|
||
$acc_grid->datasource($accs);
|
||
|
||
$view = new View('template');
|
||
$view->header = new View('base/header');
|
||
$view->header->title = url_lang::lang('texts.Double-entry accounts');
|
||
$view->header->menu = Controller::render_menu();
|
||
$view->content = $acc_grid;
|
||
$view->footer = new View('base/footer');
|
||
$view->render(TRUE);
|
||
}
|
||
|
||
// commented by Jiri Svitak, probably useless, similar function is in money_transfers
|
||
/*
|
||
function account_transfers($acc_id = NULL, $limit_results = 50, $order_by = 'mt.id', $order_by_direction = 'DESC')
|
||
{
|
||
if (isset($acc_id))
|
||
... | ... | |
$model_account= new Account_Model();
|
||
$model_account->find_by_id($acc_id);
|
||
|
||
/*if ($model_account->owner_id == $_SESSION['member_id'])
|
||
{
|
||
if (!$this->acl_check_3D('freenetis', 'view_all', 'view_all_transfers')) Controller::error(1);
|
||
}
|
||
else
|
||
{
|
||
if (!$this->acl_check_3D('freenetis', 'view_all', 'view_all_transfers')) Controller::error(1);
|
||
}*/
|
||
//if ($model_account->owner_id == $_SESSION['member_id'])
|
||
//{
|
||
// if (!$this->acl_check_3D('freenetis', 'view_all', 'view_all_transfers')) Controller::error(1);
|
||
//}
|
||
//else
|
||
//{
|
||
// if (!$this->acl_check_3D('freenetis', 'view_all', 'view_all_transfers')) Controller::error(1);
|
||
//}
|
||
|
||
$acc_name = $model_account->name;
|
||
//$acc_id = $model_account->id;
|
||
... | ... | |
}
|
||
|
||
} // end of account_transfers function
|
||
*/
|
||
|
||
// commented by Jiri Svitak
|
||
// moved to Money_transfers controller and rewritten
|
freenetis/trunk/kohana/application/views/installation.php | ||
---|---|---|
<div class="flags">
|
||
<?php echo special::create_language_flags(array('cs' => 'Česky', 'en' => 'English')) ?>
|
||
</div>
|
||
<h2><?php echo $title ?></h2><br />
|
||
<p>Vítejte u instalace Freenetisu! Vyplňte prosím následující údaje pro defaultního uživatele vašeho systému.</p>
|
||
<h2><?php echo $title ?></h2><br />
|
||
<p><?php echo url_lang::lang('texts.Welcome to the Freenetis!'); ?>
|
||
<?php echo url_lang::lang('texts.Please fill in the form with information about your administrator member.'); ?>
|
||
<?php echo url_lang::lang('texts.This member represents your association in the system.'); ?>
|
||
</p>
|
||
<br />
|
||
<?php echo $form ?>
|
||
|
Také k dispozici: Unified diff
Upravena prvni registrace. Pridano zobrazeni vsech podvojnych uctu.