Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 495

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

Oprava chyby v identifikaci plateb.

Zobrazit rozdíly:

freenetis/trunk/kohana/application/controllers/transfers.php
$this->origin = $origin_account;
$origin_acc = new Account_Model($origin_account);
$options[$origin_acc->id] = $origin_acc->name.' - '.url_lang::lang('texts.Account ID').' '.$origin_acc->name.' - '.url_lang::lang('texts.Member ID').' '.$origin_acc->member_id;
// default destination account
$operating = ORM::factory('account')->where('account_attribute_id', Account_attribute_Model::$operating)->find();
// form
$form = new Forge(url_lang::base().'transfers/add/'.$origin_account, '', 'POST', array('id' => 'article_form'));
$form->set_attr('class', 'form_class')->set_attr('method', 'post');
$form->group('')->label(url_lang::lang('texts.Transfer'));
$form->dropdown('oname')->label(url_lang::lang('texts.Origin account'))->options($options);
$form->dropdown('aname')->label(url_lang::lang('texts.Destination credit account').':')->options($arr_accounts)->rules('required');
$form->dropdown('aname')->label(url_lang::lang('texts.Destination credit account').':')->options($arr_accounts)->rules('required')->selected($operating->id);
$form->date('datetime')->label(url_lang::lang('texts.Date and time').':')->years(date('Y')-20, date('Y'))->rules('required');
$form->input('amount')->label(url_lang::lang('texts.Amount').':')->rules('required|valid_numeric')->callback(array($this, 'valid_amount_to_send'));
$form->input('text')->label(url_lang::lang('texts.Text'))->rules('required');
freenetis/trunk/kohana/application/controllers/bank_transfers.php
}
// also penalty should be generated
$pen_save = true;
$operating = ORM::factory('account')->find_by_account_attribute_id(Account_attribute_Model::$operating);
if ($form_data['penalty'] > 0)
{
$operating = ORM::factory('account')->find_by_account_attribute_id(Account_attribute_Model::$operating);
$pen = new Transfer_Model();
$pen->origin_id = $dst_id;
$pen->destination_id = $operating->id;

Také k dispozici: Unified diff