Modify additional item cost routines in mip_bulk_load.pck and mip_quotation.pck to make use of enquiry type as a cost parameter. Matching changes to the BULK_LOAD.xls spreadsheet.
Change get_quote_items.fnc to return the descriptions of additional items instead of the 'code'. git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@12542 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
@@ -1,26 +1,32 @@
|
||||
create or replace function get_quote_items(p_quote_id in number) return varchar2 is
|
||||
ret_items varchar2(250);
|
||||
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
|
||||
|
||||
FOR cur_item IN (SELECT adit.description
|
||||
FROM quote_items quit
|
||||
JOIN additional_items adit ON (adit.code =
|
||||
quit.adit_code)
|
||||
WHERE quit.qute_id = p_quote_id
|
||||
AND quit.adit_code IS NOT NULL
|
||||
ORDER BY description) LOOP
|
||||
|
||||
IF first_item THEN
|
||||
ret_items := cur_item.adit_code;
|
||||
ret_items := cur_item.description;
|
||||
first_item := FALSE;
|
||||
ELSE --add a seperator
|
||||
ret_items := ret_items ||', '|| cur_item.adit_code;
|
||||
ELSE
|
||||
--add a seperator
|
||||
ret_items := ret_items || ', ' || cur_item.description;
|
||||
END IF;
|
||||
END LOOP;
|
||||
|
||||
return(ret_items);
|
||||
RETURN(ret_items);
|
||||
EXCEPTION
|
||||
WHEN OTHERS THEN
|
||||
--return an empty string just in case
|
||||
RETURN(NULL);
|
||||
end get_quote_items;
|
||||
END get_quote_items;
|
||||
/
|
||||
|
||||
Reference in New Issue
Block a user