Changeset 3997


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

Location:
branches/2.2.0.1/calendar
Files:
3 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 
  • branches/2.2.0.1/calendar/templates/default/footer.tpl

    r1154 r3997  
    3737 <font size="-1"> 
    3838    <form action="{acao}" method="post" name="{formname}"> 
     39 
     40        <span style="display: {display}"> 
     41            <b>{day_ini_label}:</b> 
     42            <select name="{day_ini_name}" onchange="{formonchange}"> 
     43                {row_ini} 
     44            </select> 
     45        </span> 
     46 
     47        <br /> <br /> 
     48 
    3949    <span style="display: {display}" > 
    40   
    4150        <label> 
    4251                <b>{num_dias_label}:</b> 
     
    4958                {tip} 
    5059        </span> 
    51         <br /> <br /> 
    5260    </span> 
    53 <span style="display: {display}"> 
    54         <b>{day_ini_label}:</b> 
    55         <select name="{day_ini_name}" onchange="{formonchange}"> 
    56         {row_ini} 
    57         </select> 
    58         </span> 
    5961<input type="hidden" name="user" value="{user}"> 
    6062        <noscript><input type="submit" value="{go}"></noscript> 
Note: See TracChangeset for help on using the changeset viewer.