Files
mip/Modules/MIP_ENQUIRY.pck
PriestJ 0297cb54a2 Created new function to allow the association of enquiry to parties. Specifically for the association of Agents and suppliers to an enquiry.
Added rough parties package that contains a couple of useful functions to get the party id and the party role based on the username. and some very rough procedures that may become depreceiated or rewritten at some stage

git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@2859 248e525c-4dfb-0310-94bc-949c084e9493
2007-11-15 16:52:58 +00:00

44 lines
1.3 KiB
Plaintext

create or replace package MIP_ENQUIRY is
-- Author : PRIESTJ
-- Created : 15/11/2007 14:18:24
-- Purpose : Provides useful admin functions/procedures for enquiries
-- Public function and procedure declarations
FUNCTION set_enquiry_role(p_enquiryid in number,p_partyid in number,p_rolecode IN VARCHAR2)
RETURN boolean;
end MIP_ENQUIRY;
/
create or replace package body MIP_ENQUIRY is
/*
FUNCTION set_enquiry_role
- gets the enquiry id, party id and the role type and writes a record in the enquiry_roles table
- allowing you to assign agents, suppliers etc. to an enquiry.
%param p_enquiryid - the current enquiry to save the role against.
%param p_partyid - the user or party to assign to this role.
%param p_rolecode - what kind of role this will be.
*/
FUNCTION set_enquiry_role(p_enquiryid in number,p_partyid in number,p_rolecode IN VARCHAR2)
RETURN boolean as
begin
INSERT INTO enquiry_roles
(enqu_id, prty_id, rt_code)
VALUES
(p_enquiryid,
p_partyid,
p_rolecode);
return TRUE;
--
EXCEPTION
-- edit this to check for a 'unable to write record'
-- only and just pass on all other exceptions
WHEN OTHERS THEN
return FALSE;
RAISE;
end set_enquiry_role;
end MIP_ENQUIRY;
/