Changes made following test of the training environment.

git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3608 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
hardya
2008-02-15 20:34:04 +00:00
parent 7ab0dfc268
commit cd398f258c
3 changed files with 44 additions and 11 deletions

View File

@@ -0,0 +1,18 @@
Enquiry,Type of Meter,To Meter Size,Service Pressure Type,
ENTY_CODE,METY_CODE,MESC_CODE,SVCPT_CODE,LEAD_TIME
INSTALL,DIAPHRAGM,U25,LP,10
INSTALL,DIAPHRAGM,U65,LP,15
INSTALL,DIAPHRAGM,U160,LP,20
INSTALL,DIAPHRAGM,U25,MP,15
INSTALL,DIAPHRAGM,U65,MP,20
INSTALL,DIAPHRAGM,U160,MP,30
INSTALL,ROTARY,,LP,20
INSTALL,ROTARY,,MP,30
REMOVE,DIAPHRAGM,U25,LP,10
REMOVE,DIAPHRAGM,U160,LP,15
REMOVE,DIAPHRAGM,U25,MP,10
REMOVE,DIAPHRAGM,U160,MP,15
REMOVE,ROTARY,,LP,15
REMOVE,ROTARY,,MP,15
REMOVE,TURBINE,,LP,15
REMOVE,TURBINE,,MP,15
1 Enquiry Type of Meter To Meter Size Service Pressure Type
2 ENTY_CODE METY_CODE MESC_CODE SVCPT_CODE LEAD_TIME
3 INSTALL DIAPHRAGM U25 LP 10
4 INSTALL DIAPHRAGM U65 LP 15
5 INSTALL DIAPHRAGM U160 LP 20
6 INSTALL DIAPHRAGM U25 MP 15
7 INSTALL DIAPHRAGM U65 MP 20
8 INSTALL DIAPHRAGM U160 MP 30
9 INSTALL ROTARY LP 20
10 INSTALL ROTARY MP 30
11 REMOVE DIAPHRAGM U25 LP 10
12 REMOVE DIAPHRAGM U160 LP 15
13 REMOVE DIAPHRAGM U25 MP 10
14 REMOVE DIAPHRAGM U160 MP 15
15 REMOVE ROTARY LP 15
16 REMOVE ROTARY MP 15
17 REMOVE TURBINE LP 15
18 REMOVE TURBINE MP 15

BIN
Data/BulkLoad/LeadTimes.xls Normal file

Binary file not shown.

View File

@@ -4,17 +4,17 @@ CREATE OR REPLACE PACKAGE mip_quotation IS
-- Created : 15/11/2007 11:27:58
-- Purpose : Handle life-cycle of quotations
/** Determines whether the given enquiry is ready to quote for
/** Determines whether the given enquiry is ready to quote for
i.e. have all the mandatory fields been completed
%param p_enqu_id the id of the enquiry to be checked
%return TRUE if the enquiry can be quoted for
*/
FUNCTION ready_for_quote(p_enqu_id IN enquiries.id%TYPE) RETURN BOOLEAN;
/** Determines whether the given enquiry is ready to quote for
/** Determines whether the given enquiry is ready to quote for
i.e. have all the mandatory fields been completed
%param p_enqu_id the id of the enquiry to be checked
%p_mandatory_checks contains reasons for the enquiry *not* being ready to quote for
%p_quote_is_ready TRUE if the enquiry can be quoted for
@@ -40,7 +40,7 @@ CREATE OR REPLACE PACKAGE mip_quotation IS
,p_field_name IN VARCHAR2) RETURN VARCHAR2;
/** Generate quotes in response to a 'request for quote' against an enquiry
%param p_enqu_id the id of the enquiry to be checked
%param p_prty_id the id of the party that requested the quotes
%param p_owner_prty_id the id of party that owns the quotes (defaults to the requestor)
@@ -736,9 +736,9 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
WHERE enqu_id = p_enqu_id
AND v.quote_id = id
ORDER BY total_cost) LOOP
produce_quote_summary(l_qute.id);
al(' ');
END LOOP;
@@ -1159,7 +1159,7 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
,p_reason IN quote_reasoning.reason%TYPE
,p_internal_or_external IN quote_reasoning.internal_or_external%TYPE DEFAULT gc_external_reason) IS
BEGIN
pl('add_quote_reason:' || p_enqu_id || ':' || p_reason);
INSERT INTO quote_reasoning
(enqu_id
,reason
@@ -1179,7 +1179,7 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
BEGIN
pl('get_u_meter_size');
-- get the smallest meter code that will support the given Qmax
-- get the smallest meter code that will support the given Qmax
SELECT code
INTO l_meter_size_code
FROM (SELECT code
@@ -1510,7 +1510,7 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
RETURN t_rec_additional_costs IS
l_rec_costs t_rec_additional_costs;
BEGIN
pl('get_aico');
pl('get_aico:' || p_adit_code || ':' || p_regi_code);
SELECT lead_time
,selling_price
,cost_price
@@ -1545,11 +1545,16 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
WHERE adit.code = cost.adit_code
AND adit.code = p_adit_code;
pl('get_aico:exit');
RETURN l_rec_costs;
EXCEPTION
WHEN no_data_found THEN
pl('get_aico:exit:NDF');
RETURN l_rec_costs;
WHEN OTHERS THEN
pl('get_aico:exit:' || SQLERRM);
RAISE;
END get_aico;
FUNCTION get_laco(p_enty_code IN enquiry_types.code%TYPE
@@ -1610,6 +1615,8 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
l_days NUMBER;
BEGIN
pl('get_lead_time:' || p_enty_code || ':' || p_mety_code || ':' ||
p_svcp_code || ':' || p_qmax);
SELECT days
INTO l_days
FROM (SELECT enty_code
@@ -1630,11 +1637,16 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
AND ((v.svcp_code = p_svcp_code) OR
(v.svcp_code IS NULL AND p_svcp_code IS NULL));
pl('get_lead_time:exit:' || l_days);
RETURN l_days;
EXCEPTION
WHEN no_data_found THEN
pl('get_lead_time:exit:NDF');
RETURN NULL;
WHEN OTHERS THEN
pl('get_lead_time:exit:' || SQLERRM);
RAISE;
END get_lead_time;
PROCEDURE produce_module_quotes(p_enqu IN t_enqu
@@ -2180,6 +2192,7 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
END IF;
pl('produce_module_quotes:exit');
END produce_module_quotes;
PROCEDURE produce_install_quotes(p_enqu IN t_enqu
@@ -2202,6 +2215,7 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
,p_owner_prty_id => p_owner_prty_id
,p_manual_or_automatic_quote => p_manual_or_automatic_quote);
pl('produce_install_quotes:exit');
END produce_install_quotes;
PROCEDURE produce_exchange_quotes(p_enqu IN t_enqu
@@ -2445,7 +2459,7 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
--
-- check whether we have the required prices
-- if we do not, then we may need to produce a manual quote
--
--
IF p_enqu.amr_required = 'YES' THEN
l_amr_costs := get_aico(p_adit_code => 'AMR'
,p_regi_code => l_regi_code);
@@ -2676,6 +2690,7 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
cout_err.report_and_stop(p_exception_message => 'Attempted to produce automatic quote for unexpected enquiry type of ' ||
p_enqu.enty_code);
END IF;
pl('produce_automatic_quotes:exit');
END produce_automatic_quotes;
PROCEDURE produce_quotes(p_enqu_id IN enquiries.id%TYPE