Ensure that only required qmax or required mesc code is used in the module enquiry.
git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3925 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
@@ -570,7 +570,7 @@ CREATE OR REPLACE PACKAGE BODY mip_quotation IS
|
|||||||
|
|
||||||
FUNCTION get_system_name RETURN system_configuration.VALUE%TYPE IS
|
FUNCTION get_system_name RETURN system_configuration.VALUE%TYPE IS
|
||||||
BEGIN
|
BEGIN
|
||||||
RETURN 'WEBMIP '|| v('SYSTEM_ENVIRONMENT');
|
RETURN 'WEBMIP ' || v('SYSTEM_ENVIRONMENT');
|
||||||
END get_system_name;
|
END get_system_name;
|
||||||
|
|
||||||
FUNCTION get_customer_support_telephone
|
FUNCTION get_customer_support_telephone
|
||||||
@@ -2081,9 +2081,6 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
|
|||||||
,p_internal_or_external => gc_internal_reason);
|
,p_internal_or_external => gc_internal_reason);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
pl('Required Qmax=' || l_required_qmax
|
|
||||||
,$$PLSQL_LINE);
|
|
||||||
|
|
||||||
IF p_enqu.enty_code IN ('CHANGE CAPACITY', 'EXCHANGE', 'STD EXCHANGE') THEN
|
IF p_enqu.enty_code IN ('CHANGE CAPACITY', 'EXCHANGE', 'STD EXCHANGE') THEN
|
||||||
-- get existing meter details
|
-- get existing meter details
|
||||||
l_existing_rec_metr_details := get_existing_metr_details(p_enqu);
|
l_existing_rec_metr_details := get_existing_metr_details(p_enqu);
|
||||||
@@ -2143,9 +2140,19 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
|
|||||||
ELSE
|
ELSE
|
||||||
l_required_qmax := p_enqu.qmax;
|
l_required_qmax := p_enqu.qmax;
|
||||||
END IF;
|
END IF;
|
||||||
|
pl('Required Qmax=' || l_required_qmax
|
||||||
|
,$$PLSQL_LINE);
|
||||||
END IF; -- Exchange
|
END IF; -- Exchange
|
||||||
|
|
||||||
IF NOT p_manual_or_automatic_quote = gc_manual_quote THEN
|
IF NOT p_manual_or_automatic_quote = gc_manual_quote THEN
|
||||||
|
|
||||||
|
cout_assert.istrue(NOT (l_required_mesc_code IS NULL AND
|
||||||
|
l_required_qmax IS NULL)
|
||||||
|
,p_message => 'Either required_mesc_code is null OR required_qmax is null');
|
||||||
|
cout_assert.istrue(NOT (l_required_mesc_code IS NOT NULL AND
|
||||||
|
l_required_qmax IS NOT NULL)
|
||||||
|
,p_message => 'Either required_mesc_code is null OR required_qmax is null');
|
||||||
|
|
||||||
FOR l_rec_module IN (SELECT modu.code AS modu_code
|
FOR l_rec_module IN (SELECT modu.code AS modu_code
|
||||||
,modu.selling_price AS modu_selling_price
|
,modu.selling_price AS modu_selling_price
|
||||||
,modu.cost_price AS modu_cost_price
|
,modu.cost_price AS modu_cost_price
|
||||||
@@ -2245,9 +2252,8 @@ RECEIVED AT THIS ADDRESS CANNOT BE RESPONDED TO.');
|
|||||||
-- either been given a meter size code to match
|
-- either been given a meter size code to match
|
||||||
-- or a module qmax value to exceed
|
-- or a module qmax value to exceed
|
||||||
--
|
--
|
||||||
AND (((l_required_mesc_code IS NULL) OR
|
AND ((metr.mesc_code = l_required_mesc_code) OR
|
||||||
(metr.mesc_code = l_required_mesc_code)) OR
|
(modu.qmax >= l_required_qmax))) LOOP
|
||||||
modu.qmax >= l_required_qmax)) LOOP
|
|
||||||
l_this_is_automatic_quote := TRUE;
|
l_this_is_automatic_quote := TRUE;
|
||||||
add_quote_reason(p_enqu.id
|
add_quote_reason(p_enqu.id
|
||||||
,p_reason => 'Considering module : ' ||
|
,p_reason => 'Considering module : ' ||
|
||||||
|
|||||||
Reference in New Issue
Block a user