Revize 2231
Přidáno uživatelem Ondřej Fibich před asi 11 roky(ů)
freenetis/branches/1.1/application/controllers/members_fees.php | ||
---|---|---|
|
||
$form->date('to')
|
||
->label('Date to')
|
||
->callback(array($this, 'valid_to'))
|
||
->value('');
|
||
->callback(array($this, 'valid_to'));
|
||
|
||
$form->textarea('comment');
|
||
|
||
... | ... | |
$member = new Member_Model($form_data['member_id']);
|
||
|
||
$from = date('Y-m-d', $form_data['from']);
|
||
$to = date('Y-m-d', $form_data['to']);
|
||
|
||
// to is empthy? uses fee's end date
|
||
if ($to == '')
|
||
if (empty($form_data['to']))
|
||
{
|
||
$fee = new Fee_Model($form_data['fee_id']);
|
||
$to = $fee->to;
|
||
}
|
||
else
|
||
{
|
||
$to = date('Y-m-d', $form_data['to']);
|
||
}
|
||
|
||
$members_fee->member_id = $member->id;
|
||
$members_fee->fee_id = $form_data['fee_id'];
|
||
... | ... | |
self::error(PAGE);
|
||
}
|
||
|
||
$value = date('Y-m-d', trim($input->value));
|
||
|
||
$fee = new Fee_Model($this->input->post('fee_id'));
|
||
|
||
// value is empthy? uses fee's end date
|
||
if ($value == '')
|
||
if (empty($value))
|
||
{
|
||
$fee = new Fee_Model($this->input->post('fee_id'));
|
||
$value = $fee->to;
|
||
}
|
||
else
|
||
{
|
||
$value = date('Y-m-d', trim($input->value));
|
||
}
|
||
|
||
// to cannot be smaller then from
|
||
if ($this->input->post('from') > $value)
|
Také k dispozici: Unified diff
Opravy:
- fixes #801: FreenetIS bug report: Nejde pridat tarif