[Home] [Help]
3726: when no_data_found then
3727: null;
3728: end;
3729:
3730: -- Need to obtain the buyers from po_headers_archive and po_releases_archive
3731: -- for global buyer's need to get buyer name from per_employees_current_x
3732: if (l_document_type in ('PO', 'PA')) THEN
3733: -- there will be an entry in this table regardless of whether there is a revision
3734: -- or not
3744:
3745: else
3746: select full_name into l_buyer
3747: from per_all_people_f --
3748: where person_id = (select agent_id from po_headers_archive
3749: where po_header_id = to_number(l_po_header_id) and
3750: revision_num = 0)
3751: and trunc(sysdate) between trunc(effective_start_date) and trunc(effective_end_date); --Bug#5161502
3752: end if;
3760: begin
3761: if (l_po_revision > 0) then
3762: select full_name into l_revision_buyer
3763: from per_all_people_f --
3764: where person_id = (select agent_id from po_headers_archive
3765: where po_header_id = to_number(l_po_header_id) and
3766: revision_num = l_po_revision)
3767: and trunc(sysdate) between trunc(effective_start_date) and trunc(effective_end_date); --Bug#5161502
3768: end if;