Address #504 - Manual Quote not created for Change Capacity (plus fix for subsequently found errors).

git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@4810 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
hardya
2008-04-16 16:29:28 +00:00
parent 9b6d215e2c
commit b3ebbef545
4 changed files with 18 additions and 16 deletions

View File

@@ -213,12 +213,10 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation IS
PROCEDURE pl(p_in VARCHAR2
,p_line IN NUMBER DEFAULT NULL) IS
BEGIN
$IF mip_debug_constants.debugging OR mip_debug_constants.quotation $THEN
mip_debug.pl(p_unit => $$PLSQL_UNIT
,p_line => p_line
,p_in => p_in);
$END
NULL;
$IF mip_debug_constants.debugging OR mip_debug_constants.quotation $THEN mip_debug.pl(p_unit => $$PLSQL_UNIT
,p_line => p_line
,p_in => p_in);
$END NULL;
END pl;
PROCEDURE add_quote_reason(p_enqu_id IN enquiries.id%TYPE
@@ -1722,15 +1720,14 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
PROCEDURE survey_required(p_enqu IN t_enqu
,p_manual_or_automatic_quote IN OUT t_manual_or_automatic_quote) IS
l_svcpt_code service_pressure_types.code%TYPE;
l_rec_metr_details t_rec_metr_details;
l_required_mesc_code meter_size_codes.code%TYPE;
l_svcpt_code service_pressure_types.code%TYPE;
l_rec_metr_details t_rec_metr_details;
l_required_mesc_code meter_size_codes.code%TYPE;
l_manual_or_automatic_quote t_manual_or_automatic_quote := gc_automatic_quote;
BEGIN
pl('survey_required'
,$$PLSQL_LINE);
p_manual_or_automatic_quote := gc_automatic_quote;
-- Site survey required for:
-- Existing meter is (rotary or turbine) AND OFMAT enquiry;
@@ -1739,7 +1736,7 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
l_rec_metr_details := get_existing_metr_details(p_enqu);
IF l_rec_metr_details.mety_code IN ('ROTARY', 'TURBINE') THEN
p_manual_or_automatic_quote := gc_manual_quote;
l_manual_or_automatic_quote := gc_manual_quote;
add_quote_reason(p_enqu.id
,'Site Survey is required for OFMAT of an existing ' ||
initcap(l_rec_metr_details.mety_code) ||
@@ -1748,6 +1745,10 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
END IF; -- ROTARY / TURBINE
END IF; -- OFMAT
IF l_manual_or_automatic_quote = gc_manual_quote THEN
p_manual_or_automatic_quote := gc_manual_quote;
END IF;
END survey_required;
FUNCTION tripartite_agreement_message(p_rec IN mip_enquiries_helper.t_rec_enquiries)
@@ -2304,7 +2305,8 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
pl('Looking for modules to match the following: Service Pressure ' ||
p_enqu.required_svcp_code || ', Outlet Pressure ' ||
p_enqu.required_metering_pressure || CASE l_required_mesc_code IS NULL WHEN TRUE THEN
p_enqu.required_metering_pressure || CASE
l_required_mesc_code IS NULL WHEN TRUE THEN
'and required Qmax ' || l_required_qmax ELSE
'and required Meter Size Code ' || l_required_mesc_code
END || '.');