Project

General

Profile

Defect #6472 ยป gantt_dates_fix.diff

Nelzin Alexander, 2010-09-23 10:43

View differences:

app/views/gantts/show.html.erb (revision 1550)
170 170
top = headers_height + 10
171 171
@gantt.events.each do |i| 
172 172
  if i.is_a? Issue 
173
	i_start_date = (i.start_date >= @gantt.date_from ? i.start_date : @gantt.date_from )
174
	i_end_date = (i.due_before <= @gantt.date_to ? i.due_before : @gantt.date_to )
175
	
176
	i_done_date = i.start_date + ((i.due_before - i.start_date+1)*i.done_ratio/100).floor
173
	i_start_date = (i.start_date >= @gantt.date_from ? i.start_date.to_date : @gantt.date_from )
174
	i_end_date = (i.due_before <= @gantt.date_to ? i.due_before.to_date : @gantt.date_to )
175

  
176
	i_done_date = (i.start_date + ((i.due_before - i.start_date+1)*i.done_ratio/100).floor).to_date
177 177
	i_done_date = (i_done_date <= @gantt.date_from ? @gantt.date_from : i_done_date )
178 178
	i_done_date = (i_done_date >= @gantt.date_to ? @gantt.date_to : i_done_date )
179 179
	
    (1-1/1)