Fixes made for #102, #103, #49, #108

git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3504 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
hardya
2008-02-08 16:23:12 +00:00
parent 073c5f5230
commit 68f300c2ca
16 changed files with 150 additions and 58 deletions

View File

@@ -190,21 +190,21 @@ CREATE OR REPLACE PACKAGE BODY mip_tripartite IS
AND NOT addon_allowed(p_adit_code => 'AMR'
,p_regi_code => p_regi_code) THEN
l_valid := FALSE;
al('Tripartite agreement prevents AMR being requested.'
al('Tripartite Agreement prevents AMR being requested. '
,p_tab_messages);
END IF;
IF p_ems_required = 'YES'
AND NOT addon_allowed(p_adit_code => 'EMS'
,p_regi_code => p_regi_code) THEN
l_valid := FALSE;
al('Tripartite agreement prevents EMS being requested.'
al('Tripartite Agreement prevents EMS being requested. '
,p_tab_messages);
END IF;
IF p_bypass_required = 'YES'
AND NOT addon_allowed(p_adit_code => 'BYPASS'
,p_regi_code => p_regi_code) THEN
l_valid := FALSE;
al('Tripartite agreement prevents Bypass being requested.'
al('Tripartite Agreement prevents Bypass being requested. '
,p_tab_messages);
END IF;
@@ -250,6 +250,7 @@ CREATE OR REPLACE PACKAGE BODY mip_tripartite IS
l_valid BOOLEAN DEFAULT TRUE;
l_regi_code regions.code%TYPE;
l_supp_prty_id parties.id%TYPE;
l_contact_text regions.contact_text%TYPE;
BEGIN
l_regi_code := mip_regions.get_region_for_postcode(p_postcode => p_rec.install_postcode);
l_supp_prty_id := mip_enquiry.get_enquiry_role(p_enquiryid => p_rec.id
@@ -257,7 +258,14 @@ CREATE OR REPLACE PACKAGE BODY mip_tripartite IS
IF NOT enquiry_allowed(p_supp_prty_id => l_supp_prty_id
,p_enty_code => p_rec.enty_code
,p_regi_code => l_regi_code) THEN
al('Tripartite agreement prevents this enquiry being processed.'
SELECT regions.contact_text
INTO l_contact_text
FROM regions
WHERE code = l_regi_code;
al('Unable to quote for the specified postcode due to Tripartite Agreement. Please contact ' ||
l_contact_text || ' metering services. '
,l_tab_messages);
l_valid := FALSE;
ELSE