for {set i $diagram_start_julian} {$i < $diagram_end_julian} {incr i} {
set key "$i"
set val 0
if {[info exists percent_hash($key)]} { set val $percent_hash($key) }
set accumulated_percent [expr$accumulated_percent + $val]
set accumulated_percent_hash($key) $accumulated_percent
if {[info exists planned_hours_hash($key)]} { set val $planned_hours_hash($key) }
set accumulated_planned_hours [expr$accumulated_planned_hours + $val]
set accumulated_planned_hours_hash($key) $accumulated_planned_hours
set val 0
if {[info exists logged_hours_hash($key)]} { set val $logged_hours_hash($key) }
set accumulated_logged_hours [expr$accumulated_logged_hours + $val]
set accumulated_logged_hours_hash($key) $accumulated_logged_hours
if {[info exists percent_completed_hash($key)] && "" ne $percent_completed_hash($key) } { set max_percent_completed $percent_completed_hash($key) }
set max_percent_completed_hash($key) $max_percent_completed
set percent_completed ""
if {[info exists percent_completed_hash($key)]} { set percent_completed $percent_completed_hash($key) }
if {"" ne $percent_completed} { set max_percent_completed $percent_completed }
set accumulated_completed_hours_hash($key) [expr$max_percent_completed * $total_planned_hours / 100.0 * 5.0]
}
#ad_return_complaint 1 $accumulated_percent
if {$accumulated_percent == 0.0} {
if {$accumulated_planned_hours == 0.0} {
set error_html [lang::message::lookup "" intranet-earned-management.No_resources_assigned "You didn't assign any resource percentages to any user in any task in this project"]
set show_diagram_p 0
}
# ad_return_complaint 1 [array get accumulated_logged_hours_hash]