Changeset 1638

Show
Ignore:
Timestamp:
02/25/10 15:33:31 (5 months ago)
Author:
thomas
Message:

ullTime: period overview: show delta between time and project effort

Location:
trunk/plugins/ullTimePlugin/modules/ullTime
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/plugins/ullTimePlugin/modules/ullTime/lib/BaseUllTimeActions.class.php

    r1608 r1638  
    626626    $calendarWeek = null; 
    627627    $week = null; 
    628     $this->totals = array('time' => 0, 'project' => 0); 
     628    $this->totals = array('time' => 0, 'project' => 0, 'delta' => 0); 
    629629     
    630630    foreach($rawDates as $date => $day) 
     
    648648          $week['sum_project'] = 0; 
    649649          $week['sum_time'] = 0; 
     650          $week['sum_delta'] = 0; 
    650651          $week['future'] = true; 
    651652        } 
     
    664665        $week['sum_project'] += $sumProject; 
    665666        $this->totals['project'] += $sumProject; 
     667         
     668        $sumDelta = $sumTime - $sumProject; 
     669        $week['dates'][$date]['sum_delta'] = $sumDelta; 
     670        $week['sum_delta'] += $sumDelta; 
     671        $this->totals['project'] += $sumDelta; 
    666672         
    667673        // mark future dates 
  • trunk/plugins/ullTimePlugin/modules/ullTime/templates/listSuccess.php

    r1605 r1638  
    2020      <th class="color_dark_bg"><?php echo __('Project reporting', null, 'ullTimeMessages') ?></th> 
    2121      <th class="color_dark_bg"><?php echo __('Total', null, 'common') ?></th> 
     22      <th class="color_dark_bg"><?php echo __('Difference', null, 'ullTimeMessages')?></th> 
    2223    </tr> 
    2324  </thead> 
     
    6364              array('action' => 'createProject', 'date' => $day['date'], 'period' => null)) ?></td> 
    6465          <td class='ull_time_list_time_column'><?php echo $time_duration_widget->render(null, $day['sum_project']) ?></td> 
     66          <td class='ull_time_list_time_column'><?php echo $time_duration_widget->render(null, $day['sum_delta']) ?></td> 
    6567        </tr>     
    6668      <?php endforeach ?> 
     
    7880          <?php        
    7981            echo $time_duration_widget_with_zero->render(null, $calendar_week['sum_project']); 
     82          ?> 
     83        </td> 
     84        <td> 
     85          <?php        
     86            echo $time_duration_widget_with_zero->render(null, $calendar_week['sum_delta']); 
    8087          ?> 
    8188        </td>