486:
487: x_reason_status := reason_status;
488:
489: if (p_wip_entity_id is not null) then
490: select owning_department into l_owning_department_id from wip_discrete_jobs where wip_entity_id = p_wip_entity_id;
491: end if;
492:
493:
494: -- Check for Charge Department entered through the JSP
521: --start of fix for 3949853
522:
523: select wdj.status_type, we.entity_type
524: into l_status_type, l_we_entity_type
525: from wip_discrete_jobs wdj, wip_entities we
526: where wdj.wip_entity_id = we.wip_entity_id
527: and wdj.wip_entity_id = l_wip_entity_id;
528:
529: if ( ((l_status_type = 3) or (l_status_type = 4)) and l_we_entity_type = 6) then
717: l_stmt_num := 110;
718:
719: -- Get Project Id and Task Id
720:
721: select project_id,task_id into l_project_id, l_task_id from wip_discrete_jobs
722: where organization_id = l_organization_id and wip_entity_id = l_wip_entity_id;
723:
724: l_stmt_num := 120;
725:
864: l_stmt_num := 200;
865:
866: select scheduled_start_date, scheduled_completion_date
867: into l_start_date, l_completion_date
868: from wip_discrete_jobs where wip_entity_id = l_wip_entity_id;
869:
870: l_stmt_num := 210;
871:
872: if (old_res_status = 0) then