Ignore:
Timestamp:
04/12/11 16:21:25 (13 years ago)
Author:
rafaelraymundo
Message:

Ticket #1595 - Relatorio mensal da agenda adiciona um dia a mais na listagem do que o requisitado

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.0.1/calendar/inc/class.uicalendar.inc.php

    r3989 r3997  
    581581                        else 
    582582                        { 
    583                                 $num_dias = 0; 
     583                                $num_dias = ''; 
    584584                        } 
    585585 
     
    31743174                                $str_ini .= '<option value="'.$i.'"'.($i == $day?' selected':'').'>'.$i.'</option>'."\n"; 
    31753175                        } 
    3176                         $str_qtd = '<option value="'.''.'"'.($i == $_POST['qtd_dias']?' selected':'').'>'.''.'</option>'."\n"; 
     3176                        $str_qtd = '<option value="'.''.'"'.(!$_POST['qtd_dias']?' selected':'').'>'.''.'</option>'."\n"; 
    31773177                        for ($i = 1; $i <= 45; $i++) 
    31783178                        { 
     
    31943194                                'formname'              => 'SelectDay', 
    31953195                                'formonchange'          => 'document.SelectDay.submit()', 
    3196                                 'day_ini_label'         => lang('print starting in'), 
     3196                                'day_ini_label'         => lang('print start day'), 
    31973197                                'num_dias_label'        => lang('quantity of days'), 
    3198                                 'tip'                   => lang('empty prints from the day chosen below to the end of the current month'), 
     3198                                'tip'                   => lang('empty prints from the start day chosen to the end of the current month'), 
    31993199                                'day_ini_name'          => 'day', 
    32003200                                'num_dias_name'         => 'qtd_dias', 
     
    43044304//                      $monthend   = (int)(date('Ymd',mktime(0,0,0,$month + 1,0,$year))); 
    43054305 
    4306                         if($num_dias != 0) 
     4306                        if($num_dias != '') 
    43074307                        { 
    43084308                                //se a qtde de dias for informada, a data final para impressao considera a soma $day_ini+$num_dias; 
    4309                                 $monthend   = (int)(date('Ymd',mktime(0,0,0,$month,$day_ini+$num_dias,$year))); 
     4309                                $monthend   = (int)(date('Ymd',mktime(0,0,0,$month,$day_ini+$num_dias-1,$year))); 
    43104310                        } 
    43114311                        else 
Note: See TracChangeset for help on using the changeset viewer.