+ if(!$agentnum or $h_new->agentnum == $agentnum) {
+ if(!$h_old->svcnum and $h_new->svcnum) {
+ # item was put into service.
+ $rows[2][$day]++;
+ }
+ elsif($h_old->svcnum and !$h_new->svcnum) {
+ # item was taken out of service.
+ $rows[3][$day]++;
+ }
+ }
+ if($agentnum and $h_old->agentnum != $agentnum and $h_new->agentnum == $agentnum) {
+ # item was transferred from another agent
+ $rows[4][$day]++;