Added cout_assert.pck - provides assertion utilities. Added cout_err.pck - 'standard' error logging utilities. Added gen_mandatory.prc - generates packages to provided mandatory field checks. Schema: Changed primary key of ENQUIRIES to an ID (also made sequence ENQU_SEQ available). Changes ENQUIRIES.CONSUMER_NAME to FIRST_CONTACT_NAME. Added tables DATA_ITEMS and DATA_ITEM_ROLES to support Modules/gen_mandatory.prc. git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@2865 248e525c-4dfb-0310-94bc-949c084e9493
47 lines
1.3 KiB
Plaintext
47 lines
1.3 KiB
Plaintext
CREATE OR REPLACE PACKAGE mip_quotation IS
|
|
|
|
-- Author : HARDYA
|
|
-- Created : 15/11/2007 11:27:58
|
|
-- Purpose : Handle life-cycle of quotations
|
|
|
|
-- Public type declarations
|
|
--type <TypeName> is <Datatype>;
|
|
|
|
-- Public constant declarations
|
|
-- <ConstantName> constant <Datatype> := <Value>;
|
|
|
|
-- Public variable declarations
|
|
--<VariableName> <Datatype>;
|
|
|
|
-- Public function and procedure declarations
|
|
-- function <FunctionName>(<Parameter> <Datatype>) return <Datatype>;
|
|
|
|
FUNCTION ready_for_quote(p_id IN enquiries.id%TYPE) RETURN BOOLEAN;
|
|
|
|
PROCEDURE produce_quotes(p_id IN enquiries.id%TYPE);
|
|
END mip_quotation;
|
|
/
|
|
CREATE OR REPLACE PACKAGE BODY mip_quotation IS
|
|
|
|
FUNCTION ready_for_quote(p_id IN enquiries.id%TYPE) RETURN BOOLEAN IS
|
|
l_mandatory_checks mip_mandatory.t_mandatory_checks;
|
|
BEGIN
|
|
RETURN mip_enquiries_helper.check_mandatory(p_id => p_id
|
|
,p_mandatory_checks => l_mandatory_checks);
|
|
END ready_for_quote;
|
|
|
|
PROCEDURE produce_quotes(p_id IN enquiries.id%TYPE) IS
|
|
BEGIN
|
|
|
|
cout_assert.istrue(ready_for_quote(p_id)
|
|
,'Not all mandatory fields for Enquiry ID=' || p_id ||
|
|
' have been completed');
|
|
|
|
END produce_quotes;
|
|
|
|
BEGIN
|
|
-- Initialization
|
|
NULL;
|
|
END mip_quotation;
|
|
/
|