Fix for ticket #543, changed tripartite validation to use the overloaded version of the mip_tripartite.enquiry_allowed function as the previous version was looking at the database for the postcode rather than the submitted form, this caused some enquiries to be incorrectly submitted
git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@11372 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
@@ -13,8 +13,8 @@ prompt APPLICATION 155 - webmip
|
||||
-- Application Export:
|
||||
-- Application: 155
|
||||
-- Name: webmip
|
||||
-- Date and Time: 10:51 Thursday August 21, 2008
|
||||
-- Exported By: HARDYA
|
||||
-- Date and Time: 14:38 Tuesday June 9, 2009
|
||||
-- Exported By: PRIESTJ
|
||||
-- Flashback: 0
|
||||
-- Export Type: Application Export
|
||||
-- Version: 3.1.0.00.32
|
||||
@@ -145,7 +145,7 @@ wwv_flow_api.create_flow(
|
||||
p_default_region_template=> 71121389039453369 + wwv_flow_api.g_id_offset,
|
||||
p_error_template => 85292499999520701 + wwv_flow_api.g_id_offset,
|
||||
p_page_protection_enabled_y_n=> 'N',
|
||||
p_checksum_salt_last_reset => '20080821102651',
|
||||
p_checksum_salt_last_reset => '20090609143111',
|
||||
p_home_link => 'f?p=&APP_ID.:101',
|
||||
p_flow_language => 'en-gb',
|
||||
p_flow_language_derived_from=> 'FLOW_PRIMARY_LANGUAGE',
|
||||
@@ -193,8 +193,8 @@ wwv_flow_api.create_flow(
|
||||
p_substitution_value_03 => 'http://www.nationalgrid.com/corporate/legal/privacy.htm',
|
||||
p_substitution_string_04 => 'SITEMAP_URL',
|
||||
p_substitution_value_04 => 'http://www.nationalgrid.com/uk/sitemap.htm',
|
||||
p_last_updated_by => 'HARDYA',
|
||||
p_last_upd_yyyymmddhh24miss=> '20080821102651',
|
||||
p_last_updated_by => 'PRIESTJ',
|
||||
p_last_upd_yyyymmddhh24miss=> '20090609143111',
|
||||
p_required_roles=> wwv_flow_utilities.string_to_table2(''));
|
||||
|
||||
|
||||
@@ -11476,8 +11476,8 @@ wwv_flow_api.create_page(
|
||||
p_step_template => '',
|
||||
p_required_role => 59152281045285598+ wwv_flow_api.g_id_offset,
|
||||
p_required_patch=> null + wwv_flow_api.g_id_offset,
|
||||
p_last_updated_by => 'HARDYA',
|
||||
p_last_upd_yyyymmddhh24miss => '20080813093402',
|
||||
p_last_updated_by => 'PRIESTJ',
|
||||
p_last_upd_yyyymmddhh24miss => '20090609143111',
|
||||
p_page_is_public_y_n=> 'N',
|
||||
p_protection_level=> 'C',
|
||||
p_page_comment => '');
|
||||
@@ -19536,34 +19536,43 @@ wwv_flow_api.create_page_validation(
|
||||
p_flow_step_id => 32,
|
||||
p_validation_name => 'TRIPARTITE',
|
||||
p_validation_sequence=> 1670,
|
||||
p_validation => 'DECLARE'||chr(10)||
|
||||
p_validation => '--Tripartite validation check'||chr(10)||
|
||||
'DECLARE'||chr(10)||
|
||||
' l_tab_messages #OWNER#.mip_tripartite.t_tab_messages;'||chr(10)||
|
||||
' l_idx pls_integer;'||chr(10)||
|
||||
' l_error_text varchar2(2000);'||chr(10)||
|
||||
' l_idx pls_integer;'||chr(10)||
|
||||
' l_error_text varchar2(2000);'||chr(10)||
|
||||
' l_supp_prty_id parties.id%type;'||chr(10)||
|
||||
' l_regi_code regions.code%TYPE;'||chr(10)||
|
||||
'BEGIN'||chr(10)||
|
||||
'if not #OWNER#.mip_tripartite.enquiry_allowed(:P32_ID) then'||chr(10)||
|
||||
' return ''Enquiry not allowed under current Tripartite arrangements'';'||chr(10)||
|
||||
'end if;'||chr(10)||
|
||||
''||chr(10)||
|
||||
'IF #OWNER#.mip_tripartite.tripartite_region(:P32_INSTALL_POSTCODE) THEN'||chr(10)||
|
||||
'l_supp_prty_id := #OWNER#.mip_enquiry.get_enquiry_role(p_enquiryid=>:P32_ID,p_rolecode=>''ENQ SUPP'');'||chr(10)||
|
||||
'IF NOT #OWNER#.mip_tripartite.tripartite_member(p_supp_prty_id=>l_supp_prty_id) AND'||chr(10)||
|
||||
'NOT #OWNER#.mip_tripartite.addons_allowed('||chr(10)||
|
||||
'p_amr_required => :P32_AMR_REQUIRED'||chr(10)||
|
||||
',p_ems_required => :P32_EMS_REQUIRED'||chr(10)||
|
||||
',p_bypass_required => :P32_BYPASS_REQUIRED'||chr(10)||
|
||||
',p_regi_code => #OWNER#.mip_regions.get_region_for_postcode(p_postcode => :P32_INSTALL_POSTCODE)'||chr(10)||
|
||||
',p_tab_messages => l_tab_messages) THEN'||chr(10)||
|
||||
' l_idx := l_tab_messages.first;'||chr(10)||
|
||||
' loop'||chr(10)||
|
||||
' exit when l_idx is null;'||chr(10)||
|
||||
' l_error_text := l_error_text || l_tab_messages(l_idx);'||chr(10)||
|
||||
' l_idx := l_tab_messages.next(l_idx);'||chr(10)||
|
||||
' end loop;'||chr(10)||
|
||||
' return l_error_text;'||chr(10)||
|
||||
'END IF;'||chr(10)||
|
||||
'END IF;'||chr(10)||
|
||||
' --following code is change required to fix ticket #543'||chr(10)||
|
||||
' l_regi_code := mip_regions.get_region_for_postcode(p_postcode => :P32_INSTALL_POSTCODE);'||chr(10)||
|
||||
' l_supp_prty_id := mip_enquiry.get_enquiry_role(p_enquiryid => :P32_ID,'||chr(10)||
|
||||
' p_rolecode => ''ENQ SUPP'');'||chr(10)||
|
||||
' if not mip_tripartite.enquiry_allowed(p_supp_prty_id => l_supp_prty_id,'||chr(10)||
|
||||
' p_enty_code => :P32_ENTY_CODE,'||chr(10)||
|
||||
' p_regi_code => l_regi_code) then'||chr(10)||
|
||||
' return ''Enquiry not allowed under current Tripartite arrangements'';'||chr(10)||
|
||||
' end if;'||chr(10)||
|
||||
' --check for tripartite addons'||chr(10)||
|
||||
' IF #OWNER#.mip_tripartite.tripartite_region(:P32_INSTALL_POSTCODE) THEN'||chr(10)||
|
||||
' l_supp_prty_id := #OWNER#.mip_enquiry.get_enquiry_role(p_enquiryid => :P32_ID,'||chr(10)||
|
||||
' p_rolecode => ''ENQ SUPP'');'||chr(10)||
|
||||
' IF NOT'||chr(10)||
|
||||
' #OWNER#.mip_tripartite.tripartite_member(p_supp_prty_id => l_supp_prty_id) AND NOT'||chr(10)||
|
||||
' #OWNER#.mip_tripartite.addons_allowed(p_amr_required => :P32_AMR_REQUIRED,'||chr(10)||
|
||||
' p_ems_required => :P32_EMS_REQUIRED,'||chr(10)||
|
||||
' p_bypass_required => :P32_BYPASS_REQUIRED,'||chr(10)||
|
||||
' p_regi_code => #OWNER#.mip_regions.get_region_for_postcode(p_postcode => :P32_INSTALL_POSTCODE),'||chr(10)||
|
||||
' p_tab_messages => l_tab_messages) THEN'||chr(10)||
|
||||
' l_idx := l_tab_messages.first;'||chr(10)||
|
||||
' loop'||chr(10)||
|
||||
' exit when l_idx is null;'||chr(10)||
|
||||
' l_error_text := l_error_text || l_tab_messages(l_idx);'||chr(10)||
|
||||
' l_idx := l_tab_messages.next(l_idx);'||chr(10)||
|
||||
' end loop;'||chr(10)||
|
||||
' return l_error_text;'||chr(10)||
|
||||
' END IF;'||chr(10)||
|
||||
' END IF;'||chr(10)||
|
||||
'END;',
|
||||
p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
|
||||
p_error_message => '',
|
||||
@@ -21326,7 +21335,7 @@ wwv_flow_api.create_page(
|
||||
p_required_role => 59152281045285598+ wwv_flow_api.g_id_offset,
|
||||
p_required_patch=> null + wwv_flow_api.g_id_offset,
|
||||
p_last_updated_by => 'PRIESTJ',
|
||||
p_last_upd_yyyymmddhh24miss => '20080721162350',
|
||||
p_last_upd_yyyymmddhh24miss => '20080904153038',
|
||||
p_page_is_public_y_n=> 'N',
|
||||
p_page_comment => '');
|
||||
|
||||
@@ -40686,8 +40695,8 @@ wwv_flow_api.create_page(
|
||||
p_html_page_header => '',
|
||||
p_step_template => '',
|
||||
p_required_patch=> null + wwv_flow_api.g_id_offset,
|
||||
p_last_updated_by => 'PRIESTJ',
|
||||
p_last_upd_yyyymmddhh24miss => '20080411162037',
|
||||
p_last_updated_by => 'HARDYA',
|
||||
p_last_upd_yyyymmddhh24miss => '20081009121230',
|
||||
p_page_is_public_y_n=> 'N',
|
||||
p_page_comment => '');
|
||||
|
||||
@@ -40933,9 +40942,9 @@ s:=s||'SELECT v.enquiry_id AS "Enquiry ID",'||chr(10)||
|
||||
' v.bas_code AS "Base Code",'||chr(10)||
|
||||
' v.qmax AS "Q max",'||chr(10)||
|
||||
' decode(SIGN(:P80_QMIN-nvl(v.qmin,0)),-1 , ''YES'', ''NO'') as "Extra Information",'||chr(10)||
|
||||
' v.inlet_ori';
|
||||
' v.';
|
||||
|
||||
s:=s||'entation AS "Inlet Orientation",'||chr(10)||
|
||||
s:=s||'inlet_orientation AS "Inlet Orientation",'||chr(10)||
|
||||
' v.outlet_orientation AS "Outlet Orientation",'||chr(10)||
|
||||
' v.total_cost AS "Total Cost",'||chr(10)||
|
||||
' v.row_number AS "Row Number",'||chr(10)||
|
||||
@@ -47038,7 +47047,9 @@ c2:=c2||' <a href="&SITEMAP_URL.">Site map</a> | '||chr(10)||
|
||||
'</div>'||chr(10)||
|
||||
'#REGION_POSITION_05#'||chr(10)||
|
||||
'#FORM_CLOSE# '||chr(10)||
|
||||
'<!-- #APP_VERSION# -->'||chr(10)||
|
||||
'<!-- '||chr(10)||
|
||||
' #APP_VERSION# '||chr(10)||
|
||||
'-->'||chr(10)||
|
||||
'</body>'||chr(10)||
|
||||
'</html>';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user