147: if p_release_num is not null and p_release_num <> 0 then
148: /* Fix for Bug#2344105 */
149: select pr.agent_id
150: into l_buyer_id 151: from po_releases_all pr 152: where pr.po_header_id = p_po_header_id
153: and pr.release_num = p_release_num ;
154: else
155: select ph.agent_id