Addresses #390, bypass_other to be mandatory if bypass_required = bypass_reason description associated with code '7'

git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@4005 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
hardya
2008-03-14 14:44:36 +00:00
parent bdbb396c22
commit 2b164a768e

View File

@@ -13,6 +13,7 @@ CREATE OR REPLACE PACKAGE BODY mip_helper_special_cases IS
PROCEDURE table_enquiries(p_rec IN enquiries%ROWTYPE
,p_mandatory_checks IN OUT mip_mandatory.t_mandatory_checks) IS
l_bypass_other bypass_reasons.description%TYPE;
BEGIN
-- O-M1
IF p_rec.install_building IS NULL
@@ -83,11 +84,17 @@ CREATE OR REPLACE PACKAGE BODY mip_helper_special_cases IS
-- O-M7
IF p_rec.enty_code IN
('INSTALL', 'STD INSTALL', 'EXCHANGE', 'STD EXCHANGE', 'ALTERATION',
'CHANGE CAPACITY', 'ADDON', 'OTHER')
AND (p_rec.bypass_required = '7' AND p_rec.bypass_other IS NULL) THEN
mip_mandatory.add_error(p_mandatory_checks => p_mandatory_checks
,p_field_name => 'BYPASS_OTHER'
,p_error_message => '''Other'' reason must be completed.');
'CHANGE CAPACITY', 'ADDON', 'OTHER') THEN
SELECT description
INTO l_bypass_other
FROM bypass_reasons
WHERE code = '7';
IF (p_rec.bypass_required = l_bypass_other AND
p_rec.bypass_other IS NULL) THEN
mip_mandatory.add_error(p_mandatory_checks => p_mandatory_checks
,p_field_name => 'BYPASS_OTHER'
,p_error_message => '''Other'' reason must be completed.');
END IF;
END IF;
END table_enquiries;
BEGIN