added new get quote items function for use in the quote accept/reject views and pages.
git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3243 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
@@ -20,5 +20,6 @@ end;
|
||||
@@cout_err.pck
|
||||
@@cout_system_configuration.pck
|
||||
@@mip_contact_details.pck
|
||||
@@get_quote_items.fnc
|
||||
|
||||
exit
|
||||
26
Modules/get_quote_items.fnc
Normal file
26
Modules/get_quote_items.fnc
Normal file
@@ -0,0 +1,26 @@
|
||||
create or replace function get_quote_items(p_quote_id in number) return varchar2 is
|
||||
ret_items varchar2(250);
|
||||
first_item BOOLEAN := TRUE;
|
||||
BEGIN
|
||||
--blank string
|
||||
ret_items := '';
|
||||
|
||||
FOR cur_item IN (SELECT * FROM quote_items quit
|
||||
WHERE quit.qute_id = p_quote_id
|
||||
AND quit.adit_code IS NOT NULL) LOOP
|
||||
|
||||
IF first_item THEN
|
||||
ret_items := cur_item.adit_code;
|
||||
first_item := FALSE;
|
||||
ELSE --add a seperator
|
||||
ret_items := ret_items ||', '|| cur_item.adit_code;
|
||||
END IF;
|
||||
END LOOP;
|
||||
|
||||
return(ret_items);
|
||||
EXCEPTION
|
||||
WHEN OTHERS THEN
|
||||
--return an empty string just in case
|
||||
RETURN(NULL);
|
||||
end get_quote_items;
|
||||
/
|
||||
Reference in New Issue
Block a user