set define off
set verify off
set serveroutput on size 1000000
set feedback off
WHENEVER SQLERROR EXIT SQL.SQLCODE ROLLBACK
begin wwv_flow.g_import_in_progress := true; end; 
/
 
 
--application/set_environment
prompt  APPLICATION 155 - webmip
--
-- Application Export:
--   Application:     155
--   Name:            webmip
--   Exported By:     
--   Flashback:       0
--   Export Type:     Application Export
--   Version: 3.1.0.00.32
 
-- Import:
--   Using application builder
--   or
--   Using SQL*Plus as the Oracle user FLOWS_030100 or as the owner (parsing schema) of the application.
 
-- Application Statistics:
--   Pages:                52
--     Items:             359
--     Computations:        5
--     Validations:       285
--     Processes:         122
--     Regions:            77
--     Buttons:           114
--   Shared Components
--     Breadcrumbs:         1
--        Entries           1
--     Items:              10
--     Computations:        4
--     Processes:           3
--     Parent Tabs:         0
--     Tab Sets:            0
--        Tabs:             0
--     NavBars:             0
--     Lists:               2
--     Shortcuts:           2
--     Themes:              1
--     Templates:
--        Page:             4
--        List:            14
--        Report:           7
--        Label:            5
--        Region:          21
--     Messages:            0
--     Build Options:       0
 
 
--       AAAA       PPPPP   EEEEEE  XX      XX
--      AA  AA      PP  PP  EE       XX    XX
--     AA    AA     PP  PP  EE        XX  XX
--    AAAAAAAAAA    PPPPP   EEEE       XXXX
--   AA        AA   PP      EE        XX  XX
--  AA          AA  PP      EE       XX    XX
--  AA          AA  PP      EEEEEE  XX      XX
prompt  Set Credentials...
 
begin
 
  -- Assumes you are running the script connected to SQL*Plus as the Oracle user FLOWS_030100 or as the owner (parsing schema) of the application.
  wwv_flow_api.set_security_group_id(p_security_group_id=>11019802792885519);
 
end;
/

begin wwv_flow.g_import_in_progress := true; end;
/
begin 

select value into wwv_flow_api.g_nls_numeric_chars from nls_session_parameters where parameter='NLS_NUMERIC_CHARACTERS';

end;

/
begin execute immediate 'alter session set nls_numeric_characters=''.,''';

end;

/
begin wwv_flow.g_browser_language := 'en-us'; end;
/
prompt  Check Compatibility...
 
begin
 
-- This date identifies the minimum version required to import this file.
wwv_flow_api.set_version(p_version_yyyy_mm_dd=>'2007.01.08');
 
end;
/

prompt  Set Application ID...
 
begin
 
   -- SET APPLICATION ID
   wwv_flow.g_flow_id := 155;
   wwv_flow_api.g_id_offset := 0;
null;
 
end;
/

--application/delete_application
 
begin
 
   -- Remove Application
wwv_flow_api.remove_flow(155);
 
end;
/

 
begin
 
wwv_flow_audit.remove_audit_trail(155);
null;
 
end;
/

--application/create_application
 
begin
 
wwv_flow_api.create_flow(
  p_id    => 155,
  p_display_id=> 155,
  p_owner => 'MIP_DEV',
  p_name  => 'webmip',
  p_alias => 'WEBMIP',
  p_page_view_logging => 'YES',
  p_default_page_template=> 28031530009354416 + wwv_flow_api.g_id_offset,
  p_printer_friendly_template=> 28033049158354418 + wwv_flow_api.g_id_offset,
  p_default_region_template=> 28038130488354430 + wwv_flow_api.g_id_offset,
  p_error_template    => 42209241448421762 + wwv_flow_api.g_id_offset,
  p_page_protection_enabled_y_n=> 'N',
  p_checksum_salt_last_reset => '20080408174819',
  p_home_link         => 'f?p=&APP_ID.:101',
  p_flow_language     => 'en-gb',
  p_flow_language_derived_from=> 'FLOW_PRIMARY_LANGUAGE',
  p_flow_image_prefix => '/i/',
  p_documentation_banner=> '',
  p_authentication    => 'CUSTOM2',
  p_login_url         => '',
  p_logout_url        => 'wwv_flow_custom_auth_std.logout?p_this_flow=&FLOW_ID.&p_next_flow_page_sess=&FLOW_ID.:500',
  p_application_tab_set=> 1,
  p_logo_image => 'TEXT:TEXT:TEXT:TEXT:TEXT:TEXT:TEXT:TEXT:TEXT:TEXT:TEXT:TEXT:TEXT:TEXT:TEXT:TEXT:',
  p_logo_image_attributes => 'style="font-family:Arial; color:#004C66; font-size:18px; white-space:nowrap; font-weight:bold;"',
  p_public_url_prefix => '',
  p_public_user       => 'APEX_PUBLIC_USER',
  p_dbauth_url_prefix => '',
  p_proxy_server      => '',
  p_cust_authentication_process=> '.'||to_char(13718119800323842 + wwv_flow_api.g_id_offset)||'.',
  p_cust_authentication_page=> '',
  p_custom_auth_login_url=> '',
  p_flow_version      => '$Rev$:',
  p_flow_status       => 'AVAILABLE_W_EDIT_LINK',
  p_flow_unavailable_text=> 'This application is currently unavailable at this time.',
  p_build_status      => 'RUN_AND_BUILD',
  p_exact_substitutions_only=> 'Y',
  p_vpd               => '',
  p_security_scheme => 14565830986682708+ wwv_flow_api.g_id_offset,
  p_csv_encoding    => 'N',
  p_theme_id => 101,
  p_default_label_template => 28046657494354449 + wwv_flow_api.g_id_offset,
  p_default_report_template => 28041136573354435 + wwv_flow_api.g_id_offset,
  p_default_list_template => 28045831289354443 + wwv_flow_api.g_id_offset,
  p_default_menu_template => 28047751118354455 + wwv_flow_api.g_id_offset,
  p_default_button_template => 28046959836354450 + wwv_flow_api.g_id_offset,
  p_default_chart_template => 28035460347354425 + wwv_flow_api.g_id_offset,
  p_default_form_template => 28035733013354425 + wwv_flow_api.g_id_offset,
  p_default_wizard_template => 28039654408354430 + wwv_flow_api.g_id_offset,
  p_default_tabform_template => 28038130488354430 + wwv_flow_api.g_id_offset,
  p_default_reportr_template   =>28038130488354430 + wwv_flow_api.g_id_offset,
  p_default_menur_template => 28034529370354425 + wwv_flow_api.g_id_offset,
  p_default_listr_template => 28038130488354430 + wwv_flow_api.g_id_offset,
  p_substitution_string_01 => 'SYSTEM_ENVIRONMENT',
  p_substitution_value_01  => '',
  p_substitution_string_02 => 'T_AND_C_URL',
  p_substitution_value_02  => 'http://www.nationalgrid.com/uk/metering/mip/tc.htm',
  p_substitution_string_03 => 'PRIVACY_URL',
  p_substitution_value_03  => 'http://www.nationalgrid.com/corporate/legal/privacy.htm',
  p_substitution_string_04 => 'HELP_URL',
  p_substitution_value_04  => 'http://www.nationalgrid.com/corporate/legal/help.htm',
  p_last_updated_by => 'PRIESTJ',
  p_last_upd_yyyymmddhh24miss=> '20080408174819',
  p_required_roles=> wwv_flow_utilities.string_to_table2(''));
 
 
end;
/

prompt  ...authorization schemes
--
 
begin
 
--application/shared_components/security/authorization/master_page_authorization
wwv_flow_api.create_security_scheme(
  p_id => 14565830986682708 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_name=>'master_page_authorization',
  p_scheme_type=>'FUNCTION_RETURNING_BOOLEAN',
  p_scheme=>'IF wwv_flow_custom_auth.current_page_is_public then'||chr(10)||
'return TRUE;'||chr(10)||
'else'||chr(10)||
'return mip_security.page_authorization(p_app_user=>:app_user, p_page_id=>:app_page_id);'||chr(10)||
'END IF;',
  p_caching=>'BY_USER_BY_PAGE_VIEW',
  p_error_message=>'You are not authorized to access this page');
 
--application/shared_components/security/authorization/check_agent_access
wwv_flow_api.create_security_scheme(
  p_id => 16097609166220701 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_name=>'check agent access',
  p_scheme_type=>'FUNCTION_RETURNING_BOOLEAN',
  p_scheme=>'declare'||chr(10)||
'cursor c_supplier(cp_enqu_id number) is SELECT prty_id FROM v_latest_rt_code_for_enro where rt_code=''ENQ SUPP'' and enqu_id=cp_enqu_id;'||chr(10)||
'supplierid number;'||chr(10)||
'begin'||chr(10)||
'--copied from main authorization scheme'||chr(10)||
'IF wwv_flow_custom_auth.current_page_is_public then'||chr(10)||
'  return TRUE;'||chr(10)||
'else '||chr(10)||
''||chr(10)||
'if mip_security.page_authorization(p_app_user=>:app_user, p_page_id=>:app_page_id) then'||chr(10)||
''||chr(10)||
'--scheme code just for enquiry page, checks records against agent'||chr(10)||
'  if :P32_ID is null then'||chr(10)||
'    return true;'||chr(10)||
'  end if; '||chr(10)||
'  if #OWNER#.mip_parties.get_user_role(v(''APP_USER'')) = ''AGENT'' then '||chr(10)||
'    open c_supplier(:P32_ID);'||chr(10)||
'    fetch c_supplier into supplierid;'||chr(10)||
'    if c_supplier%found then'||chr(10)||
'      if #OWNER#.mip_parties.has_supplier(v(''APP_USER''), supplierid)    then'||chr(10)||
'        close c_supplier;'||chr(10)||
'        return true;'||chr(10)||
'      end if;'||chr(10)||
'    else'||chr(10)||
'      close c_supplier;'||chr(10)||
'      return false;'||chr(10)||
'    end if;'||chr(10)||
'  else'||chr(10)||
'    return true;'||chr(10)||
'  end if;'||chr(10)||
'end if;'||chr(10)||
'END IF;'||chr(10)||
'return false;'||chr(10)||
'end;',
  p_caching=>'BY_USER_BY_PAGE_VIEW',
  p_error_message=>'Unauthorized to view this page');
 
 
end;
/

--application/shared_components/navigation/navigation_bar
prompt  ...navigation bar entries
--
 
begin
 
null;
 
end;
/

prompt  ...application processes
--
--application/shared_components/logic/application_processes/select_xml
 
begin
 
declare
    p varchar2(32767) := null;
    l_clob clob;
    l_length number := 1;
begin
p:=p||'begin'||chr(10)||
'mip_select_xml.select_xml(p_select_list=>:SELECT_LIST_NAME,p_select_list_key1=>:SELECT_LIST_KEY1,p_select_list_key2=>:SELECT_LIST_KEY2  );'||chr(10)||
'end;';

wwv_flow_api.create_flow_process(
  p_id => 7781332501722706 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_process_sequence=> 1,
  p_process_point => 'ON_DEMAND',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Select_XML',
  p_process_sql_clob=> p,
  p_process_error_message=> '',
  p_process_when=> '',
  p_process_when_type=> '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_process_comment=> '');
end;
 
null;
 
end;
/

--application/shared_components/logic/application_processes/geterrormsg
 
begin
 
declare
    p varchar2(32767) := null;
    l_clob clob;
    l_length number := 1;
begin
p:=p||'begin'||chr(10)||
'htp.prn(mip_friendly_messages.get_friendly_message(:ORA_ERR_CODE));'||chr(10)||
'end;';

wwv_flow_api.create_flow_process(
  p_id => 38913520155650213 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_process_sequence=> 1,
  p_process_point => 'ON_DEMAND',
  p_process_type=> 'PLSQL',
  p_process_name=> 'getErrorMsg',
  p_process_sql_clob=> p,
  p_process_error_message=> 'Could not run getErrorMsg...',
  p_process_when=> '',
  p_process_when_type=> '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_process_comment=> '');
end;
 
null;
 
end;
/

--application/shared_components/logic/application_processes/removen
 
begin
 
declare
    p varchar2(32767) := null;
    l_clob clob;
    l_length number := 1;
begin
p:=p||'BEGIN'||chr(10)||
'    FOR rItem IN'||chr(10)||
'      ( SELECT ITEM_NAME'||chr(10)||
'          FROM APEX_APPLICATION_PAGE_ITEMS'||chr(10)||
'         WHERE APPLICATION_ID   = TO_NUMBER(:APP_ID)'||chr(10)||
'           AND PAGE_ID          IN (TO_NUMBER(:APP_PAGE_ID), 0)'||chr(10)||
'           AND LOV_DISPLAY_NULL = ''Yes'''||chr(10)||
'           AND LOV_DEFINITION   IS NOT NULL'||chr(10)||
'           AND LOV_NULL_VALUE   IS NULL'||chr(10)||
'      )'||chr(10)||
'    LOOP'||chr(10)||
'        IF V(rItem.ITEM_NAME) = ''%null'' ';

p:=p||'|| ''%'''||chr(10)||
'        THEN'||chr(10)||
'            Apex_Util.set_session_state(rItem.ITEM_NAME, NULL);'||chr(10)||
'        END IF;'||chr(10)||
'    END LOOP;'||chr(10)||
'END;';

wwv_flow_api.create_flow_process(
  p_id => 29255532498512664 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_process_sequence=> 0,
  p_process_point => 'ON_SUBMIT_BEFORE_COMPUTATION',
  p_process_type=> 'PLSQL',
  p_process_name=> 'RemoveN',
  p_process_sql_clob=> p,
  p_process_error_message=> 'Error within RemoveNulls application process',
  p_process_when=> '',
  p_process_when_type=> '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_process_comment=> '');
end;
 
null;
 
end;
/

prompt  ...application items
--
--application/shared_components/logic/application_items/f155_previous_page
 
begin
 
wwv_flow_api.create_flow_item(
  p_id=> 15927620320666317 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'F155_PREVIOUS_PAGE',
  p_data_type=> 'VARCHAR',
  p_is_persistent=> 'Y',
  p_protection_level=> 'S',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_item_comment=> '');
 
null;
 
end;
/

--application/shared_components/logic/application_items/fsp_after_login_url
 
begin
 
wwv_flow_api.create_flow_item(
  p_id=> 12176708008664422 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'FSP_AFTER_LOGIN_URL',
  p_data_type=> 'VARCHAR',
  p_is_persistent=> 'Y',
  p_protection_level=> '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_item_comment=> '');
 
null;
 
end;
/

--application/shared_components/logic/application_items/fsp_process_state_26081006445874709
 
begin
 
wwv_flow_api.create_flow_item(
  p_id=> 27303231728699616 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'FSP_PROCESS_STATE_26081006445874709',
  p_data_type=> 'VARCHAR',
  p_is_persistent=> 'Y',
  p_protection_level=> '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_item_comment=> '');
 
null;
 
end;
/

--application/shared_components/logic/application_items/ora_err_code
 
begin
 
wwv_flow_api.create_flow_item(
  p_id=> 38912731667634594 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'ORA_ERR_CODE',
  p_data_type=> 'VARCHAR',
  p_is_persistent=> 'Y',
  p_protection_level=> 'N',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_item_comment=> '');
 
null;
 
end;
/

--application/shared_components/logic/application_items/select_list_key1
 
begin
 
wwv_flow_api.create_flow_item(
  p_id=> 7781517049727740 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'SELECT_LIST_KEY1',
  p_data_type=> 'VARCHAR',
  p_is_persistent=> 'Y',
  p_protection_level=> 'N',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_item_comment=> '');
 
null;
 
end;
/

--application/shared_components/logic/application_items/select_list_key2
 
begin
 
wwv_flow_api.create_flow_item(
  p_id=> 7798501006865007 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'SELECT_LIST_KEY2',
  p_data_type=> 'VARCHAR',
  p_is_persistent=> 'Y',
  p_protection_level=> 'N',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_item_comment=> '');
 
null;
 
end;
/

--application/shared_components/logic/application_items/select_list_name
 
begin
 
wwv_flow_api.create_flow_item(
  p_id=> 7781719819728451 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'SELECT_LIST_NAME',
  p_data_type=> 'VARCHAR',
  p_is_persistent=> 'Y',
  p_protection_level=> 'N',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_item_comment=> '');
 
null;
 
end;
/

--application/shared_components/logic/application_items/webmip_prev_page_id
 
begin
 
wwv_flow_api.create_flow_item(
  p_id=> 16615306683233995 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'WEBMIP_PREV_PAGE_ID',
  p_data_type=> 'VARCHAR',
  p_is_persistent=> 'Y',
  p_protection_level=> 'B',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_item_comment=> '');
 
null;
 
end;
/

--application/shared_components/logic/application_items/webmip_this_page_id
 
begin
 
wwv_flow_api.create_flow_item(
  p_id=> 16614903220233044 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'WEBMIP_THIS_PAGE_ID',
  p_data_type=> 'VARCHAR',
  p_is_persistent=> 'Y',
  p_protection_level=> 'N',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_item_comment=> '');
 
null;
 
end;
/

--application/shared_components/logic/application_items/webmip_today
 
begin
 
wwv_flow_api.create_flow_item(
  p_id=> 17475408854086126 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'WEBMIP_TODAY',
  p_data_type=> 'VARCHAR',
  p_is_persistent=> 'Y',
  p_protection_level=> 'N',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_item_comment=> '');
 
null;
 
end;
/

prompt  ...application level computations
--
 
begin
 
--application/shared_components/logic/application_computations/webmip_this_page_id
wwv_flow_api.create_flow_computation (
  p_id => 16617405130271456 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_computation_sequence => 1,
  p_computation_item => 'WEBMIP_THIS_PAGE_ID',
  p_computation_point    => 'AFTER_HEADER',
  p_computation_type => 'FUNCTION_BODY',
  p_computation_processed=> 'REPLACE_EXISTING',
  p_computation => 'IF :APP_PAGE_ID <> 101 THEN'||chr(10)||
' RETURN :APP_PAGE_ID;'||chr(10)||
'ELSE'||chr(10)||
'  RETURN NULL;'||chr(10)||
'END IF;'||chr(10)||
'',
  p_compute_when=> 'WEBMIP_PREV_PAGE_ID',
  p_compute_when_type=> 'ITEM_IS_NULL',
  p_computation_error_message=>'',
  p_computation_comment=> '',
  p_required_patch=> null + wwv_flow_api.g_id_offset);
 
--application/shared_components/logic/application_computations/webmip_prev_page_id
wwv_flow_api.create_flow_computation (
  p_id => 16617826731287108 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_computation_sequence => 2,
  p_computation_item => 'WEBMIP_PREV_PAGE_ID',
  p_computation_point    => 'AFTER_HEADER',
  p_computation_type => 'FUNCTION_BODY',
  p_computation_processed=> 'REPLACE_EXISTING',
  p_computation => 'IF :APP_PAGE_ID = 30 THEN'||chr(10)||
'  RETURN :WEBMIP_THIS_PAGE_ID;'||chr(10)||
'ELSIF :WEBMIP_THIS_PAGE_ID <> :APP_PAGE_ID THEN'||chr(10)||
'  RETURN :WEBMIP_THIS_PAGE_ID;'||chr(10)||
'ELSE'||chr(10)||
'  RETURN nvl(:WEBMIP_PREV_PAGE_ID, :APP_PAGE_ID);'||chr(10)||
'END IF;'||chr(10)||
'',
  p_compute_when=> '',
  p_compute_when_type=> '',
  p_computation_error_message=>'',
  p_computation_comment=> '',
  p_required_patch=> null + wwv_flow_api.g_id_offset);
 
--application/shared_components/logic/application_computations/webmip_this_page_id
wwv_flow_api.create_flow_computation (
  p_id => 16618213010292664 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_computation_sequence => 3,
  p_computation_item => 'WEBMIP_THIS_PAGE_ID',
  p_computation_point    => 'BEFORE_BOX_BODY',
  p_computation_type => 'FUNCTION_BODY',
  p_computation_processed=> 'REPLACE_EXISTING',
  p_computation => 'return :APP_PAGE_ID;',
  p_compute_when=> '',
  p_compute_when_type=> '',
  p_computation_error_message=>'',
  p_computation_comment=> '',
  p_required_patch=> null + wwv_flow_api.g_id_offset);
 
--application/shared_components/logic/application_computations/webmip_today
wwv_flow_api.create_flow_computation (
  p_id => 17476326516091159 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_computation_sequence => 10,
  p_computation_item => 'WEBMIP_TODAY',
  p_computation_point    => 'BEFORE_HEADER',
  p_computation_type => 'FUNCTION_BODY',
  p_computation_processed=> 'REPLACE_EXISTING',
  p_computation => 'return trunc(sysdate);',
  p_compute_when=> '',
  p_compute_when_type=> '',
  p_computation_error_message=>'Unable to set WEBMIP_TODAY',
  p_computation_comment=> '',
  p_required_patch=> null + wwv_flow_api.g_id_offset);
 
 
end;
/

prompt  ...Application Tabs
--
 
begin
 
null;
 
end;
/

prompt  ...Application Parent Tabs
--
 
begin
 
null;
 
end;
/

prompt  ...Shared Lists of values
--
--application/shared_components/user_interface/lov/additionalitems
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 41943506692705728 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'ADDITIONALITEMS',
  p_lov_query=> 'select description d, code r'||chr(10)||
'from  additional_items'||chr(10)||
'order by 1');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/addresses
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 19196913526700708 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'ADDRESSES',
  p_lov_query=> 'SELECT addr.code || '','' || addr.sub_building || '','' || addr.building || '','' ||'||chr(10)||
'       addr.city || '','' || addr.postcode AS address,'||chr(10)||
'       addr.code AS return_value'||chr(10)||
'  FROM addresses addr'||chr(10)||
'');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/address_types
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 20512626684169344 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'ADDRESS_TYPES',
  p_lov_query=> '.'||to_char(20512626684169344 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>20512917515169355 + wwv_flow_api.g_id_offset,
  p_lov_id=>20512626684169344 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>1,
  p_lov_disp_value=>'HOME',
  p_lov_return_value=>'HOME',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>20513103193169356 + wwv_flow_api.g_id_offset,
  p_lov_id=>20512626684169344 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>2,
  p_lov_disp_value=>'OFFICE',
  p_lov_return_value=>'OFFICE',
  p_lov_data_comment=> '');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/agents
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 28764130097094452 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'AGENTS',
  p_lov_query=> 'BEGIN'||chr(10)||
'  IF mip_parties.get_user_role(:APP_USER) IN (''MIPADMIN'', ''ICU'', ''CS'') THEN'||chr(10)||
'    RETURN (q''<SELECT prty.first_name ||'' '' ||prty.last_name display, prty.ID RETURN'||chr(10)||
'                 FROM parties prty, party_roles parl'||chr(10)||
'                WHERE parl.prty_id = prty.ID'||chr(10)||
'                  AND parl.rt_code = ''AGENT''>'');'||chr(10)||
'  ELSIF mip_parties.get_user_role(:APP_USER) = ''SUPPADMIN'' THEN'||chr(10)||
'    RETURN (q''<SELECT prty.first_name || '' '' || prty.last_name || '' - '' || vsuad.supplier || '' '' ||'||chr(10)||
'                     vsuad.shortcode display_value,'||chr(10)||
'                     prty.id return_value'||chr(10)||
'                FROM parties                   prty,'||chr(10)||
'                     party_relationships       parl,'||chr(10)||
'                     v_supplier_administrators vsuad'||chr(10)||
'               WHERE prty.id = parl.from_parl_prty_id'||chr(10)||
'                 AND parl.from_prtp_rt_code = ''AGENT'''||chr(10)||
'                 AND parl.to_prtp_rt_code = ''SUPP'''||chr(10)||
'                 AND parl.to_parl_prty_id = vsuad.supplier_id'||chr(10)||
'                 AND vsuad.supp_admin_id = mip_parties.get_user_id(:APP_USER)'||chr(10)||
'               ORDER BY 1>'');'||chr(10)||
'  ELSE'||chr(10)||
'    RETURN NULL;'||chr(10)||
'  END IF;'||chr(10)||
'END;'||chr(10)||
'');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/assetlocationnotes
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 15952305184685011 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'ASSETLOCATIONNOTES',
  p_lov_query=> '.'||to_char(15952305184685011 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>15952607962685022 + wwv_flow_api.g_id_offset,
  p_lov_id=>15952305184685011 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>1,
  p_lov_disp_value=>'Post',
  p_lov_return_value=>'Post',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>15952826378685023 + wwv_flow_api.g_id_offset,
  p_lov_id=>15952305184685011 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>2,
  p_lov_disp_value=>'Fax',
  p_lov_return_value=>'Fax',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>15953013109685023 + wwv_flow_api.g_id_offset,
  p_lov_id=>15952305184685011 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>3,
  p_lov_disp_value=>'Email',
  p_lov_return_value=>'Email',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>15953207149685023 + wwv_flow_api.g_id_offset,
  p_lov_id=>15952305184685011 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>4,
  p_lov_disp_value=>'Upload',
  p_lov_return_value=>'Upload',
  p_lov_data_comment=> '');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/bases
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 12897128450695770 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'BASES',
  p_lov_query=> 'select code as display_value, code as return_value'||chr(10)||
'from bases'||chr(10)||
'order by code');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/bypass
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 15955922435685026 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'BYPASS',
  p_lov_query=> 'select description as display, description as return from bypass_reasons'||chr(10)||
'order by code');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/caveat_positions
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 24637005488181794 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'CAVEAT_POSITIONS',
  p_lov_query=> '.'||to_char(24637005488181794 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>24637326006181802 + wwv_flow_api.g_id_offset,
  p_lov_id=>24637005488181794 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>1,
  p_lov_disp_value=>'1. Full Description of Works',
  p_lov_return_value=>'DESC_WORK',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>24637516813181803 + wwv_flow_api.g_id_offset,
  p_lov_id=>24637005488181794 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>2,
  p_lov_disp_value=>'2. Contract sum',
  p_lov_return_value=>'CONT_SUM',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>24637713299181803 + wwv_flow_api.g_id_offset,
  p_lov_id=>24637005488181794 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>3,
  p_lov_disp_value=>'3. Terms  and Conditions',
  p_lov_return_value=>'TERM_COND',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>24637920312181803 + wwv_flow_api.g_id_offset,
  p_lov_id=>24637005488181794 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>4,
  p_lov_disp_value=>'4. Contract sum (Quote Acceptance)',
  p_lov_return_value=>'CONT_SUM_QA',
  p_lov_data_comment=> '');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/connectionorientations
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 12859022562256728 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'CONNECTIONORIENTATIONS',
  p_lov_query=> 'select description d, code r'||chr(10)||
'from   connection_orientations'||chr(10)||
'order by 1');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/connectiontypes
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 12861107156290122 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'CONNECTIONTYPES',
  p_lov_query=> 'select description d, code r'||chr(10)||
'from   connection_types'||chr(10)||
'order by 1');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/contactmechanisms
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 15955615056685026 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'CONTACTMECHANISMS',
  p_lov_query=> 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from CONTACT_MECHANISM_TYPES'||chr(10)||
'order by 1');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/drawings
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 12803215955396205 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'DRAWINGS',
  p_lov_query=> 'select code as display_value, code as return_value'||chr(10)||
'from drawings'||chr(10)||
'order by code');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/enquirytypes
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 15310215906546350 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'ENQUIRYTYPES',
  p_lov_query=> 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from ENQUIRY_TYPES'||chr(10)||
'order by 1');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/existingmetersizes
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 15954326962685025 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'EXISTINGMETERSIZES',
  p_lov_query=> 'select CODE display_value, CODE return_value '||chr(10)||
'from METER_SIZE_CODES where VALID_FOR_EXISTING_METER=''YES'''||chr(10)||
'order by 1');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/filters
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 12865824527399233 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'FILTERS',
  p_lov_query=> 'select code x, code y'||chr(10)||
'from filters'||chr(10)||
'order by 1');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/gas_act_owners
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 27933029359434409 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'GAS_ACT_OWNERS',
  p_lov_query=> '.'||to_char(27933029359434409 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>27933305536434411 + wwv_flow_api.g_id_offset,
  p_lov_id=>27933029359434409 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>1,
  p_lov_disp_value=>'Supplier',
  p_lov_return_value=>'S',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>27933510654434412 + wwv_flow_api.g_id_offset,
  p_lov_id=>27933029359434409 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>2,
  p_lov_disp_value=>'Consumer',
  p_lov_return_value=>'C',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>27933701078434412 + wwv_flow_api.g_id_offset,
  p_lov_id=>27933029359434409 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>3,
  p_lov_disp_value=>'GT',
  p_lov_return_value=>'T',
  p_lov_data_comment=> '');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/housing_type
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 12804820935407180 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'HOUSING TYPE',
  p_lov_query=> 'select description as display_value, code as return_value'||chr(10)||
'from housing_types'||chr(10)||
'order by code asc');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/housings
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 12898311751698269 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'HOUSINGS',
  p_lov_query=> 'select code as display_value, code as return_value'||chr(10)||
'from housings'||chr(10)||
'order by code');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/indicative_times
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 25521526688059041 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'INDICATIVE_TIMES',
  p_lov_query=> '.'||to_char(25521526688059041 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>25521814131059044 + wwv_flow_api.g_id_offset,
  p_lov_id=>25521526688059041 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>1,
  p_lov_disp_value=>'8am-8pm',
  p_lov_return_value=>'DY',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>25522013933059045 + wwv_flow_api.g_id_offset,
  p_lov_id=>25521526688059041 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>2,
  p_lov_disp_value=>'8am-1pm',
  p_lov_return_value=>'AM',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>25522215293059045 + wwv_flow_api.g_id_offset,
  p_lov_id=>25521526688059041 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>3,
  p_lov_disp_value=>'12pm-8pm',
  p_lov_return_value=>'PM',
  p_lov_data_comment=> '');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/loadcontroltypes
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 15953402594685025 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'LOADCONTROLTYPES',
  p_lov_query=> '.'||to_char(15953402594685025 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>15953722422685025 + wwv_flow_api.g_id_offset,
  p_lov_id=>15953402594685025 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>1,
  p_lov_disp_value=>'Constant',
  p_lov_return_value=>'Constant',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>15953917650685025 + wwv_flow_api.g_id_offset,
  p_lov_id=>15953402594685025 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>2,
  p_lov_disp_value=>'On/Off',
  p_lov_return_value=>'On/Off',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>15954129021685025 + wwv_flow_api.g_id_offset,
  p_lov_id=>15953402594685025 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>3,
  p_lov_disp_value=>'Modulating',
  p_lov_return_value=>'Modulating',
  p_lov_data_comment=> '');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/manufacturer
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 12805914140414670 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'MANUFACTURER',
  p_lov_query=> 'select name as display_value, id as return_value'||chr(10)||
'from parties prty'||chr(10)||
'where prty.prty_type = ''MANU'''||chr(10)||
'order by name asc');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/marketsectorcodes
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 15954929400685026 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'MARKETSECTORCODES',
  p_lov_query=> '.'||to_char(15954929400685026 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>15955203352685026 + wwv_flow_api.g_id_offset,
  p_lov_id=>15954929400685026 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>1,
  p_lov_disp_value=>'I - Industrial and Commercial',
  p_lov_return_value=>'I',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>15955411496685026 + wwv_flow_api.g_id_offset,
  p_lov_id=>15954929400685026 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>2,
  p_lov_disp_value=>'D - Domestic',
  p_lov_return_value=>'D',
  p_lov_data_comment=> '');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/meters
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 12917416794939297 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'METERS',
  p_lov_query=> 'select code display_value, code return_value '||chr(10)||
'from meters'||chr(10)||
'order by 1');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/metersizecodes
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 15310821793548000 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'METERSIZECODES',
  p_lov_query=> 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from METER_SIZE_CODES'||chr(10)||
'');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/metertypes
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 12868800126505669 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'METERTYPES',
  p_lov_query=> 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from METER_TYPES'||chr(10)||
'order by 1');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/modules
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 15410919772406030 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'MODULES',
  p_lov_query=> 'select code display_value, code return_value '||chr(10)||
'from modules'||chr(10)||
'order by 1');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/newmetersizes
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 15954612045685025 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'NEWMETERSIZES',
  p_lov_query=> 'select CODE display_value, CODE return_value '||chr(10)||
'from METER_SIZE_CODES where VALID_FOR_NEW_METER=''YES''');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/nooryes
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 17436531047269251 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'NOORYES',
  p_lov_query=> '.'||to_char(17436531047269251 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>17436814557269253 + wwv_flow_api.g_id_offset,
  p_lov_id=>17436531047269251 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>1,
  p_lov_disp_value=>'No',
  p_lov_return_value=>'NO',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>17437031066269253 + wwv_flow_api.g_id_offset,
  p_lov_id=>17436531047269251 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>2,
  p_lov_disp_value=>'Yes',
  p_lov_return_value=>'YES',
  p_lov_data_comment=> '');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/p62_supp_admin
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 19408921226760555 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'P62_SUPP_ADMIN',
  p_lov_query=> 'begin'||chr(10)||
'  if mip_parties.get_user_role(:APP_USER) = ''SUPPADMIN'' then'||chr(10)||
'   return '||chr(10)||
'    ''SELECT first_name ||'''' ''''||last_name display_value, supp_admin_id return_value'||chr(10)||
'       FROM v_supplier_administrators v'||chr(10)||
'      WHERE v.supp_admin_id = mip_parties.get_user_id(:APP_USER)'';'||chr(10)||
'  else return'||chr(10)||
'    ''SELECT first_name ||'''' ''''||last_name display_value, supp_admin_id return_value'||chr(10)||
'       FROM v_supplier_administrators'||chr(10)||
'      WHERE supplier_id = :P62_USER_SUPPLIER'';'||chr(10)||
'end if;'||chr(10)||
'end;');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/prty_roles
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 19188714627694567 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'PRTY_ROLES',
  p_lov_query=> 'BEGIN'||chr(10)||
'  IF mip_parties.get_user_role(:app_user) = ''MIPADMIN'' THEN'||chr(10)||
'    IF :p61_prty_type = ''MKTP'' THEN'||chr(10)||
'      RETURN ''SELECT ''''Gas supplier'''' display_value, ''''SUPP'''' return_value'||chr(10)||
'          from dual'';'||chr(10)||
'    ELSIF :p61_prty_type = ''MANU'' THEN'||chr(10)||
'      RETURN ''SELECT ''''External organization'''' display_value, ''''EXTORG'''' return_value'||chr(10)||
'          from dual'';'||chr(10)||
'    ELSE'||chr(10)||
'      RETURN ''select DESCRIPTION display_value, CODE return_value '||chr(10)||
'              from ROLE_TYPES'||chr(10)||
'             where upper(rt_type) = ''''PRT'''''||chr(10)||
'             and not upper(code) in (''''EXTORG'''',''''SUPP'''')'||chr(10)||
'             order by 1'';'||chr(10)||
'    END IF;'||chr(10)||
'  ELSE'||chr(10)||
'    RETURN ''SELECT ''''Agent'''' display_value, ''''AGENT'''' return_value'||chr(10)||
'          from dual'';'||chr(10)||
'  END IF;'||chr(10)||
''||chr(10)||
'END;');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/prty_types
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 19177116607688386 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'PRTY_TYPES',
  p_lov_query=> '.'||to_char(19177116607688386 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>19178008575688395 + wwv_flow_api.g_id_offset,
  p_lov_id=>19177116607688386 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>4,
  p_lov_disp_value=>'Market Participant',
  p_lov_return_value=>'MKTP',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>19178210753688395 + wwv_flow_api.g_id_offset,
  p_lov_id=>19177116607688386 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>5,
  p_lov_disp_value=>'User',
  p_lov_return_value=>'PERS',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>19178410019688395 + wwv_flow_api.g_id_offset,
  p_lov_id=>19177116607688386 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>6,
  p_lov_disp_value=>'Manufacturer',
  p_lov_return_value=>'MANU',
  p_lov_data_comment=> '');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/quote_rejection
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 26086613726877492 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'QUOTE_REJECTION',
  p_lov_query=> '.'||to_char(26086613726877492 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>26086920746877500 + wwv_flow_api.g_id_offset,
  p_lov_id=>26086613726877492 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>1,
  p_lov_disp_value=>'Too expensive',
  p_lov_return_value=>'Too Expensive',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>26087114698877502 + wwv_flow_api.g_id_offset,
  p_lov_id=>26086613726877492 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>2,
  p_lov_disp_value=>'Lead time too long',
  p_lov_return_value=>'Lead Time too Long',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>26087331268877502 + wwv_flow_api.g_id_offset,
  p_lov_id=>26086613726877492 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>3,
  p_lov_disp_value=>'Used competitor',
  p_lov_return_value=>'Used Competitor',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>26087529718877502 + wwv_flow_api.g_id_offset,
  p_lov_id=>26086613726877492 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>4,
  p_lov_disp_value=>'No longer required',
  p_lov_return_value=>'No longer required',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>26087730314877502 + wwv_flow_api.g_id_offset,
  p_lov_id=>26086613726877492 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>5,
  p_lov_disp_value=>'Speculative enquiry',
  p_lov_return_value=>'Speculative enquiry',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>26087926710877502 + wwv_flow_api.g_id_offset,
  p_lov_id=>26086613726877492 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>6,
  p_lov_disp_value=>'Customer changed supplier',
  p_lov_return_value=>'Customer changed supplier',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>26088125952877502 + wwv_flow_api.g_id_offset,
  p_lov_id=>26086613726877492 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>7,
  p_lov_disp_value=>'Other - please specify',
  p_lov_return_value=>'Other',
  p_lov_data_comment=> '');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/quote_status
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 30049007843307297 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'QUOTE_STATUS',
  p_lov_query=> 'select qust.description AS display_value, qust.code AS return_value'||chr(10)||
'from quote_statuses qust'||chr(10)||
'where qust.code <> ''LAPSED'''||chr(10)||
'order by 1');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/quote_type
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 29832218674616748 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'QUOTE_TYPE',
  p_lov_query=> 'SELECT DISTINCT decode(qute.qute_type, ''AQ'', ''Automatic Quotes'','||chr(10)||
'                                        ''MQ'', ''Manual Quotes'') AS display_value,'||chr(10)||
'                qute.qute_type return_value                                  '||chr(10)||
'FROM quotes qute'||chr(10)||
'ORDER BY display_value');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/regions
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 15309304132542973 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'REGIONS',
  p_lov_query=> 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from REGIONS'||chr(10)||
'order by 1');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/regulators
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 12903219201738342 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'REGULATORS',
  p_lov_query=> 'select description display_value, code return_value '||chr(10)||
'from regulators'||chr(10)||
'order by 1');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/reliefvalves
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 12906408661274555 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'RELIEFVALVES',
  p_lov_query=> 'select code display_value, code return_value '||chr(10)||
'from relief_valves'||chr(10)||
'order by 1');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/servicepressures
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 12910606677330773 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'SERVICEPRESSURES',
  p_lov_query=> 'select description d, code r'||chr(10)||
'from   service_pressures');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/servicepressuretier
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 47993512862603264 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'SERVICEPRESSURETIER',
  p_lov_query=> 'select description d, code r'||chr(10)||
'from   service_pressures'||chr(10)||
'order by d'||chr(10)||
'');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/servicepressuretypes
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 15311828027549870 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'SERVICEPRESSURETYPES',
  p_lov_query=> 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from SERVICE_PRESSURE_TYPES'||chr(10)||
'order by 1');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/slamshutvalves
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 12908128316299217 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'SLAMSHUTVALVES',
  p_lov_query=> 'select code display_value, code return_value '||chr(10)||
'from slamshut_valves'||chr(10)||
'order by 1');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/suppliers
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 19189024898694569 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'SUPPLIERS',
  p_lov_query=> 'begin'||chr(10)||
'if mip_parties.get_user_role(:APP_USER) = ''MIPADMIN'' then'||chr(10)||
'  return ''SELECT prty.NAME || '''' - '''' || prty.shortcode display, prty.ID return'||chr(10)||
'            FROM parties prty, party_roles parl'||chr(10)||
'           WHERE parl.prty_id = prty.ID'||chr(10)||
'             AND parl.rt_code = ''''SUPP'''' ORDER BY 1'';'||chr(10)||
'else'||chr(10)||
'  return'||chr(10)||
'    ''SELECT supplier || '''' - '''' || shortcode display,'||chr(10)||
'            supplier_id return'||chr(10)||
'       FROM v_supplier_administrators'||chr(10)||
'      WHERE upper(username) = :APP_USER'';'||chr(10)||
'end if;'||chr(10)||
'end;'||chr(10)||
'');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/user_status
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 19220916817722365 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'USER_STATUS',
  p_lov_query=> '.'||to_char(19220916817722365 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>19221211314722365 + wwv_flow_api.g_id_offset,
  p_lov_id=>19220916817722365 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>1,
  p_lov_disp_value=>'Open',
  p_lov_return_value=>'OPEN',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>19221411632722365 + wwv_flow_api.g_id_offset,
  p_lov_id=>19220916817722365 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>2,
  p_lov_disp_value=>'Expired',
  p_lov_return_value=>'EXPIRED',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>19221618197722365 + wwv_flow_api.g_id_offset,
  p_lov_id=>19220916817722365 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>3,
  p_lov_disp_value=>'Locked',
  p_lov_return_value=>'LOCKED',
  p_lov_data_comment=> '');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/yn
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 12773402618286720 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'YN',
  p_lov_query=> '.'||to_char(12773402618286720 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>12773929609286725 + wwv_flow_api.g_id_offset,
  p_lov_id=>12773402618286720 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>2,
  p_lov_disp_value=>'Yes',
  p_lov_return_value=>'Yes',
  p_lov_data_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>12774128957286725 + wwv_flow_api.g_id_offset,
  p_lov_id=>12773402618286720 + wwv_flow_api.g_id_offset,
  p_lov_disp_sequence=>3,
  p_lov_disp_value=>'No',
  p_lov_return_value=>'No',
  p_lov_data_comment=> '');
 
null;
 
end;
/

prompt  ...Application Trees
--
--application/pages/page_groups
prompt  ...page groups
--
 
begin
 
wwv_flow_api.create_page_group(
  p_id=>28661628162428559 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_group_name=>'Accept/Reject Quotes',
  p_group_desc=>'All screen relating to accepting and rejecting quotes.');
 
wwv_flow_api.create_page_group(
  p_id=>28665606438479059 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_group_name=>'Enquiries',
  p_group_desc=>'All screens related to creating, searching, editing and copying enquiries.');
 
wwv_flow_api.create_page_group(
  p_id=>28663418596435255 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_group_name=>'Login/Logout',
  p_group_desc=>'Screens related to the logging in and out of the system.');
 
wwv_flow_api.create_page_group(
  p_id=>28655803265374130 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_group_name=>'User Management',
  p_group_desc=>'All screens related to the management of parties in the system.');
 
wwv_flow_api.create_page_group(
  p_id=>12956426692725722 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_group_name=>'testgroup',
  p_group_desc=>'');
 
null;
 
end;
/

 
--application/pages/page_00000
prompt  ...PAGE 0: system
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 0,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'system',
  p_step_title=> 'System',
  p_step_sub_title => 'System',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'HARDYA',
  p_last_upd_yyyymmddhh24miss => '20080311173608',
  p_page_is_public_y_n=> 'Y',
  p_protection_level=> 'N',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 17208326022880694 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 0,
  p_plug_name=> 'menu',
  p_region_name=>'',
  p_plug_template=> 0,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'REGION_POSITION_08',
  p_plug_source=> s,
  p_plug_source_type=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => 'CURRENT_PAGE_NOT_IN_CONDITION',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
null;
 
end;
/

 
begin
 
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 0
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00001
prompt  ...PAGE 1: Home
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph := null;
wwv_flow_api.create_page(
  p_id     => 1,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Home',
  p_alias  => 'HOME',
  p_step_title=> 'Home',
  p_step_sub_title => 'login',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'AUTO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => ' ',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'DHARSHANIK',
  p_last_upd_yyyymmddhh24miss => '20080118111222',
  p_page_is_public_y_n=> 'Y',
  p_protection_level=> 'C',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>1,p_text=>h);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||''||chr(10)||
'<H2>This is the National Grid Metering Quotation Website</H2>'||chr(10)||
''||chr(10)||
'<p>'||chr(10)||
'Contact Joe Bloggs on 01234 567890 or Joe.Bloggs@meteringworld.co.uk for details on how to access the quotation system.'||chr(10)||
'</p>'||chr(10)||
''||chr(10)||
'<p><i>This page could be a useful place to add information that is publicly available</i></p>';

wwv_flow_api.create_page_plug (
  p_id=> 15533323897893922 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 1,
  p_plug_name=> 'Home',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 11,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
null;
 
end;
/

 
begin
 
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 1
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00003
prompt  ...PAGE 3: View Pending Manual Quotes
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph := null;
wwv_flow_api.create_page(
  p_id     => 3,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'View Pending Manual Quotes',
  p_step_title=> 'View Pending Manual Quotes',
  p_step_sub_title => 'View Pending Manual Quotes',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> '',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => ' ',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'DHARSHANIK',
  p_last_upd_yyyymmddhh24miss => '20080123140258',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>3,p_text=>h);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'SELECT qute.id AS "Quote Reference Number"'||chr(10)||
'      ,prty_supplier.name AS "Supplier Name"'||chr(10)||
'      ,prty_agent.first_name||'' ''||prty_agent.last_name AS "Agent Name"'||chr(10)||
'      ,quro.start_date AS "Date submitted for quotation"'||chr(10)||
'FROM quotes qute'||chr(10)||
'    ,v_current_quote_status vcqs'||chr(10)||
'    ,quote_roles quro'||chr(10)||
'    ,enquiry_roles enro'||chr(10)||
'    ,parties prty_supplier'||chr(10)||
'    ,parties prty_agent'||chr(10)||
'    ,role_types roty_supplier'||chr(10)||
'    ,r';

s:=s||'ole_types roty_agent'||chr(10)||
'WHERE qute.id = quro.qute_id'||chr(10)||
'AND qute.id = vcqs.qute_id'||chr(10)||
'AND qute.enqu_id = enro.enqu_id'||chr(10)||
'AND quro.prty_id = prty_agent.id'||chr(10)||
'AND enro.prty_id = prty_supplier.id'||chr(10)||
'AND enro.rt_code = roty_supplier.code'||chr(10)||
'AND quro.rt_code = roty_agent.code'||chr(10)||
'AND qute.qute_type = ''MQ'''||chr(10)||
'AND vcqs.qust_code = ''INP'''||chr(10)||
'AND enro.rt_code = ''ENQ SUPP'''||chr(10)||
'AND quro.rt_code = ''Q RFQ'''||chr(10)||
'ORDER BY quro.start_date ASC';

wwv_flow_api.create_report_region (
  p_id=> 28397409946862867 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 3,
  p_name=> 'View Pending Manual Quotes',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 10,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_query_row_template=> 28041136573354435+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'QUERY_COLUMNS',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_no_data_found=> 'No data found.',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_query_row_count_max=> '500',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 28397719232862880 + wwv_flow_api.g_id_offset,
  p_region_id=> 28397409946862867 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'Quote Reference Number',
  p_column_display_sequence=> 1,
  p_column_heading=> 'Quote Reference Number',
  p_column_alignment=>'LEFT',
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 28397808641862880 + wwv_flow_api.g_id_offset,
  p_region_id=> 28397409946862867 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'Supplier Name',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Supplier Name',
  p_column_alignment=>'LEFT',
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 28397923647862880 + wwv_flow_api.g_id_offset,
  p_region_id=> 28397409946862867 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'Agent Name',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Agent Name',
  p_column_alignment=>'LEFT',
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 28398019830862880 + wwv_flow_api.g_id_offset,
  p_region_id=> 28397409946862867 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'Date submitted for quotation',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Date submitted for quotation',
  p_column_alignment=>'LEFT',
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
 
begin
 
null;
 
end;
/

 
begin
 
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 3
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00004
prompt  ...PAGE 4: Design Selection Tool
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 4,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Design Selection Tool',
  p_step_title=> 'Design Selection Tool',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => '',
  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 => '20080317170517',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 47914809592365664 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 4,
  p_plug_name=> 'Design Selection Tool',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'BEFORE_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'SELECT DISTINCT modu.code,'||chr(10)||
'       modu.bas_code,'||chr(10)||
'       modu.hou_code,'||chr(10)||
'       modu.qmax,'||chr(10)||
'       cnor_inlet.description AS inlet_orientation,'||chr(10)||
'       cnor_outlet.description AS outlet_orientation,'||chr(10)||
'       cost_modu.selling_price'||chr(10)||
'FROM modules modu, '||chr(10)||
'     connection_orientations cnor_inlet,'||chr(10)||
'     connection_orientations cnor_outlet,'||chr(10)||
'     v_moco cost_modu'||chr(10)||
'WHERE modu.inlet_cnor_code = cnor_inlet.code'||chr(10)||
'AND ';

s:=s||'modu.outlet_cnor_code = cnor_outlet.code'||chr(10)||
'AND modu.code = cost_modu.modu_code'||chr(10)||
'AND modu.valid_from IS NOT NULL'||chr(10)||
'AND SYSDATE BETWEEN cost_modu.effective_from AND cost_modu.effective_to'||chr(10)||
'AND modu.qmax >= :P4_REQUESTED_QMAX'||chr(10)||
'AND modu.svcp_code LIKE :P4_SERVICE_PRESSURE_TIER';

wwv_flow_api.create_report_region (
  p_id=> 48052218398229257 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 4,
  p_name=> 'Design Selection Tool Report',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 20,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_display_when_condition=> 'declare'||chr(10)||
'  l_count number;'||chr(10)||
'begin'||chr(10)||
''||chr(10)||
'SELECT count(*)'||chr(10)||
' into l_count'||chr(10)||
'FROM modules modu, '||chr(10)||
'     connection_orientations cnor_inlet,'||chr(10)||
'     connection_orientations cnor_outlet,'||chr(10)||
'     v_moco cost_modu'||chr(10)||
'WHERE modu.inlet_cnor_code = cnor_inlet.code'||chr(10)||
'AND modu.outlet_cnor_code = cnor_outlet.code'||chr(10)||
'AND modu.code = cost_modu.modu_code'||chr(10)||
'AND modu.valid_from IS NOT NULL'||chr(10)||
'AND SYSDATE BETWEEN cost_modu.effective_from AND cost_modu.effective_to'||chr(10)||
'AND modu.qmax >= :P4_REQUESTED_QMAX'||chr(10)||
'AND modu.svcp_code LIKE :P4_SERVICE_PRESSURE_TIER;'||chr(10)||
''||chr(10)||
'if l_count > 0 then '||chr(10)||
'  return true;'||chr(10)||
'else '||chr(10)||
'  return false;'||chr(10)||
'end if;'||chr(10)||
''||chr(10)||
'exception'||chr(10)||
'  when others then '||chr(10)||
'   return false;'||chr(10)||
'end;',
  p_display_condition_type=> 'FUNCTION_BODY',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 28041136573354435+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_show_nulls_as=> ' - ',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'no data found',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 48052509339229259 + wwv_flow_api.g_id_offset,
  p_region_id=> 48052218398229257 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'CODE',
  p_column_display_sequence=> 1,
  p_column_heading=> 'Module Code',
  p_column_link=>'f?p=&APP_ID.:8:&SESSION.::&DEBUG.::P8_MODULE_CODE:#CODE#',
  p_column_linktext=>'#CODE#',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'N',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 48052614802229259 + wwv_flow_api.g_id_offset,
  p_region_id=> 48052218398229257 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'BAS_CODE',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Base Code',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 48052701157229259 + wwv_flow_api.g_id_offset,
  p_region_id=> 48052218398229257 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'HOU_CODE',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Housing Code',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 48052808136229259 + wwv_flow_api.g_id_offset,
  p_region_id=> 48052218398229257 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'QMAX',
  p_column_display_sequence=> 4,
  p_column_heading=> 'QMAX',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 48062432007365737 + wwv_flow_api.g_id_offset,
  p_region_id=> 48052218398229257 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'INLET_ORIENTATION',
  p_column_display_sequence=> 5,
  p_column_heading=> 'Inlet Orientation',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 48062510091365737 + wwv_flow_api.g_id_offset,
  p_region_id=> 48052218398229257 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 6,
  p_form_element_id=> null,
  p_column_alias=> 'OUTLET_ORIENTATION',
  p_column_display_sequence=> 6,
  p_column_heading=> 'Outlet Orientation',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1347614040725898 + wwv_flow_api.g_id_offset,
  p_region_id=> 48052218398229257 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 7,
  p_form_element_id=> null,
  p_column_alias=> 'SELLING_PRICE',
  p_column_display_sequence=> 7,
  p_column_heading=> 'Selling Price',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 48000203611657228 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 4,
  p_button_sequence=> 10,
  p_button_plug_id => 47914809592365664+wwv_flow_api.g_id_offset,
  p_button_name    => 'SUBMIT',
  p_button_image_alt=> 'Search',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_cattributes=>'name="Search"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>47997319095632190 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 4,
  p_branch_action=> 'f?p=&FLOW_ID.:4:&SESSION.',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 99,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>47975630380447334 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 4,
  p_name=>'P4_REQUESTED_QMAX',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 47914809592365664+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Requested QMAX',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT_WITH_ENTER_SUBMIT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>47995530660617750 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 4,
  p_name=>'P4_SERVICE_PRESSURE_TIER',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 47914809592365664+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Service Pressure Tier',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'SERVICEPRESSURES',
  p_lov => 'select description d, code r'||chr(10)||
'from   service_pressures',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'- Select Service Pressure Tier - ',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 47981122246482910 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 4,
  p_validation_name => 'P4_REQUESTED_QMAX',
  p_validation_sequence=> 10,
  p_validation => 'P4_REQUESTED_QMAX',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Required QMAX value must be specified.'||chr(10)||
'',
  p_associated_item=> 47975630380447334 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 48009000326694200 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 4,
  p_validation_name => 'P4_SERVICE_PRESSURE_TIER',
  p_validation_sequence=> 20,
  p_validation => 'P4_SERVICE_PRESSURE_TIER',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Service Pressure Tier must be specified.',
  p_associated_item=> 47995530660617750 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 3098812795905028 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 4,
  p_validation_name => 'P4_REQUESTED_QMAX',
  p_validation_sequence=> 30,
  p_validation => 'P4_REQUESTED_QMAX',
  p_validation2 => '^[[:digit:]]*[.]?[[:digit:]]{0,0}$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Requested QMAX must be a positive number with no decimal places',
  p_associated_item=> 47975630380447334 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'reset_pagination';

wwv_flow_api.create_page_process(
  p_id     => 3099009734008259 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 4,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'RESET_PAGINATION',
  p_process_name=> 'Reset Pagination',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>48000203611657228 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 4
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00005
prompt  ...PAGE 5: Data Export
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 5,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Data Export',
  p_alias  => 'DATAEXPORT',
  p_step_title=> 'Data Export',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'HARDYA',
  p_last_upd_yyyymmddhh24miss => '20071204092632',
  p_protection_level=> 'C',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 12766020317244440 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 5,
  p_plug_name=> 'Data Export',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 12767013522251981 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 5,
  p_button_sequence=> 10,
  p_button_plug_id => 12766020317244440+wwv_flow_api.g_id_offset,
  p_button_name    => 'EXPORT_DATA',
  p_button_image_alt=> 'Export Data',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'javascript:this.disabled=false;doSubmit(''EXPORT_DATA'');',
  p_button_cattributes=>'id="Export Data" name="Export Data"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>12767325344251986 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 5,
  p_branch_action=> 'f?p=&APP_ID.:9:&SESSION.::&DEBUG.:RP::',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>12767013522251981+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 10,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Use the Tables field to select the webMIP table you want to export to a CSV file.  The CSV file will be presented as a downloading attachment.';

wwv_flow_api.create_page_item(
  p_id=>12772218417281761 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 5,
  p_name=>'P5_TABLES',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 12766020317244440+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Tables',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX',
  p_lov => 'SELECT table_name d, table_name r from user_tables order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'S',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'The Column Headings field allows you to choose whether you want the exported CSV file to contain the tables column names.  Selecting ''Yes'' will output the column names on the first line of the exported CSV file.';

wwv_flow_api.create_page_item(
  p_id=>12775714739290206 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 5,
  p_name=>'P5_COLUMN_NAMES',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 12766020317244440+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Column Names',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'YN',
  p_lov => '.'||to_char(12773402618286720 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'S',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 5
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00006
prompt  ...PAGE 6: View Accepted Quotes
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph := null;
wwv_flow_api.create_page(
  p_id     => 6,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'View Accepted Quotes',
  p_step_title=> 'View Accepted Quotes',
  p_step_sub_title => 'View Accepted Quotes',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> '',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => ' ',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'DHARSHANIK',
  p_last_upd_yyyymmddhh24miss => '20080123172444',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>6,p_text=>h);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'SELECT qute.id AS "Quote Reference Number"'||chr(10)||
'      ,prty_supplier.name AS "Supplier Name"'||chr(10)||
'      ,prty_agent.first_name||'' ''||prty_agent.last_name AS "Agent Name"'||chr(10)||
'      ,vcqs.event_date AS "Date quote accepted"'||chr(10)||
'FROM quotes qute'||chr(10)||
'    ,v_current_quote_status vcqs'||chr(10)||
'    ,quote_roles quro'||chr(10)||
'    ,enquiry_roles enro'||chr(10)||
'    ,parties prty_supplier'||chr(10)||
'    ,parties prty_agent'||chr(10)||
'    ,role_types roty_supplier'||chr(10)||
'    ,role_types';

s:=s||' roty_agent'||chr(10)||
'WHERE qute.id = quro.qute_id'||chr(10)||
'AND qute.id = vcqs.qute_id'||chr(10)||
'AND qute.enqu_id = enro.enqu_id'||chr(10)||
'AND quro.prty_id = prty_agent.id'||chr(10)||
'AND enro.prty_id = prty_supplier.id'||chr(10)||
'AND enro.rt_code = roty_supplier.code'||chr(10)||
'AND quro.rt_code = roty_agent.code'||chr(10)||
'AND vcqs.qust_code = ''ACCEPTED'''||chr(10)||
'AND enro.rt_code = ''ENQ SUPP'''||chr(10)||
'AND quro.rt_code = ''Q ACC'''||chr(10)||
'ORDER BY quro.start_date ASC';

wwv_flow_api.create_report_region (
  p_id=> 28508716635732923 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 6,
  p_name=> 'View of Accepted Quotes',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 10,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_query_row_template=> 28041136573354435+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'QUERY_COLUMNS',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_no_data_found=> 'No data found.',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_query_row_count_max=> '500',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 28509009714732931 + wwv_flow_api.g_id_offset,
  p_region_id=> 28508716635732923 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'Quote Reference Number',
  p_column_display_sequence=> 1,
  p_column_heading=> 'Quote Reference Number',
  p_column_alignment=>'LEFT',
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 28509116907732933 + wwv_flow_api.g_id_offset,
  p_region_id=> 28508716635732923 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'Supplier Name',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Supplier Name',
  p_column_alignment=>'LEFT',
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 28509219368732933 + wwv_flow_api.g_id_offset,
  p_region_id=> 28508716635732923 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'Agent Name',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Agent Name',
  p_column_alignment=>'LEFT',
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 28509317310732933 + wwv_flow_api.g_id_offset,
  p_region_id=> 28508716635732923 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'Date quote accepted',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Date quote accepted',
  p_column_alignment=>'LEFT',
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
 
begin
 
null;
 
end;
/

 
begin
 
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 6
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00008
prompt  ...PAGE 8: Design Selection Tool
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph:=ph||'<script language="JavaScript" type="text/javascript">'||chr(10)||
'<!--'||chr(10)||
''||chr(10)||
' htmldb_delete_message=''"DELETE_CONFIRM_MSG"'';'||chr(10)||
''||chr(10)||
'//-->'||chr(10)||
'</script>';

wwv_flow_api.create_page(
  p_id     => 8,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Design Selection Tool',
  p_step_title=> 'Design Selection Tool',
  p_step_sub_title => 'design selection tool',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'AUTO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => ' ',
  p_html_page_header => ' ',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'DHARSHANIK',
  p_last_upd_yyyymmddhh24miss => '20080311110538',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>8,p_text=>h);
wwv_flow_api.set_html_page_header(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>8,p_text=>ph);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'--MODULE'||chr(10)||
'SELECT DISTINCT modu.code AS modu_code, modu.svcp_code, '||chr(10)||
'                prty_modu.name AS modu_manf, '||chr(10)||
'                DECODE(doro.drwg_code, NULL, modu.drwg_code,''<a href="p?n=''||wwf.id||''">''||doro.drwg_code||''</a>'')  AS modu_drwg, '||chr(10)||
'                modu.lead_time,'||chr(10)||
'                modu.dim_a AS modu_dima, modu.dim_b AS modu_dimb, '||chr(10)||
'                modu.dim_c AS modu_dimc, modu.dim_d AS mod';

s:=s||'u_dimd, '||chr(10)||
'                modu.dim_e AS modu_dime, modu.dim_f AS modu_dimf, '||chr(10)||
'                modu.dim_h AS modu_dimh, '||chr(10)||
'                modu.weight AS modu_weight, modu.qmax,'||chr(10)||
'                cnor_inlet.description AS inlet_orientation, '||chr(10)||
'                cnty_inlet.description inlet_con_type, '||chr(10)||
'                modu.inlet_height, modu.inlet_size,'||chr(10)||
'                cnor_outlet.description AS outlet_orienta';

s:=s||'tion, '||chr(10)||
'                cnty_outlet.description AS outlet_con_type, '||chr(10)||
'                modu.outlet_height, modu.outlet_size,'||chr(10)||
'                modu.metr_code, '||chr(10)||
'                nvl(cost_modu.selling_price, ''0.00'') AS modu_selling_price'||chr(10)||
'FROM modules modu, parties prty_modu, document_roles doro, documents docu, wwv_flow_files wwf,'||chr(10)||
'     connection_orientations cnor_inlet, connection_types cnty_inlet, '||chr(10)||
'    ';

s:=s||' connection_orientations cnor_outlet, connection_types cnty_outlet,'||chr(10)||
'     v_moco cost_modu, bases bas, v_baco cost_bas, housings hou, '||chr(10)||
'     housing_types hoty, parties prty_hou, v_hoco cost_hou'||chr(10)||
'WHERE modu.prty_id = prty_modu.id'||chr(10)||
'  AND modu.drwg_code = doro.drwg_code(+)'||chr(10)||
'  AND docu.id(+) = doro.docu_id'||chr(10)||
'  AND wwf.name(+) = docu.uri'||chr(10)||
'  AND modu.inlet_cnor_code = cnor_inlet.code'||chr(10)||
'  AND modu.inlet_cnty_code';

s:=s||' = cnty_inlet.code'||chr(10)||
'  AND modu.outlet_cnor_code = cnor_outlet.code'||chr(10)||
'  AND modu.outlet_cnty_code = cnty_outlet.code'||chr(10)||
'  AND modu.code = cost_modu.modu_code'||chr(10)||
'  AND modu.bas_code = bas.code(+)'||chr(10)||
'  AND bas.code = cost_bas.bas_code(+)'||chr(10)||
'  AND modu.hou_code = hou.code(+)'||chr(10)||
'  AND hou.hoty_code = hoty.code(+)'||chr(10)||
'  AND hou.prty_id = prty_hou.id(+)'||chr(10)||
'  AND hou.code = cost_hou.hou_code(+)'||chr(10)||
'  AND doro.rt_code(+) = ''HIGH DEFIN';

s:=s||'ITION DRAWING'''||chr(10)||
'  AND modu.valid_from IS NOT NULL'||chr(10)||
'  AND SYSDATE BETWEEN cost_modu.effective_from(+) AND cost_modu.effective_to(+)'||chr(10)||
'  AND SYSDATE BETWEEN cost_bas.effective_from(+) AND cost_bas.effective_to(+)'||chr(10)||
'  AND SYSDATE BETWEEN cost_hou.effective_from(+) AND cost_hou.effective_to(+)'||chr(10)||
'  AND modu.code = :P8_MODULE_CODE'||chr(10)||
'';

wwv_flow_api.create_report_region (
  p_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 8,
  p_name=> 'Module Details',
  p_region_name=>'module',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 10,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'Y',
  p_query_row_template=> 3,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_show_nulls_as=> ' - ',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'No data found.',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_query_row_count_max=> '500',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'Y',
  p_csv_output_link_text=> 'Export to spreadsheet',
  p_prn_output=> 'N',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1012027876760050 + wwv_flow_api.g_id_offset,
  p_region_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'MODU_CODE',
  p_column_display_sequence=> 1,
  p_column_heading=> 'Module Reference',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 997609459433896 + wwv_flow_api.g_id_offset,
  p_region_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'SVCP_CODE',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Service Pressure',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1012110998760051 + wwv_flow_api.g_id_offset,
  p_region_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'MODU_MANF',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Manufacturer',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1012225189760053 + wwv_flow_api.g_id_offset,
  p_region_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'MODU_DRWG',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Drawing',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 997905716433896 + wwv_flow_api.g_id_offset,
  p_region_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'LEAD_TIME',
  p_column_display_sequence=> 11,
  p_column_heading=> 'Lead Time',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1012324085760053 + wwv_flow_api.g_id_offset,
  p_region_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 6,
  p_form_element_id=> null,
  p_column_alias=> 'MODU_DIMA',
  p_column_display_sequence=> 5,
  p_column_heading=> 'Dimension A',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1012403180760053 + wwv_flow_api.g_id_offset,
  p_region_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 7,
  p_form_element_id=> null,
  p_column_alias=> 'MODU_DIMB',
  p_column_display_sequence=> 6,
  p_column_heading=> 'Dimension B',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1012503711760053 + wwv_flow_api.g_id_offset,
  p_region_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 8,
  p_form_element_id=> null,
  p_column_alias=> 'MODU_DIMC',
  p_column_display_sequence=> 7,
  p_column_heading=> 'Dimension C',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1012611777760053 + wwv_flow_api.g_id_offset,
  p_region_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 9,
  p_form_element_id=> null,
  p_column_alias=> 'MODU_DIMD',
  p_column_display_sequence=> 8,
  p_column_heading=> 'Dimension D',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1012706593760053 + wwv_flow_api.g_id_offset,
  p_region_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 10,
  p_form_element_id=> null,
  p_column_alias=> 'MODU_DIME',
  p_column_display_sequence=> 9,
  p_column_heading=> 'Dimension E',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1012821859760053 + wwv_flow_api.g_id_offset,
  p_region_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 11,
  p_form_element_id=> null,
  p_column_alias=> 'MODU_DIMF',
  p_column_display_sequence=> 10,
  p_column_heading=> 'Dimension F',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1012909088760053 + wwv_flow_api.g_id_offset,
  p_region_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 12,
  p_form_element_id=> null,
  p_column_alias=> 'MODU_DIMH',
  p_column_display_sequence=> 12,
  p_column_heading=> 'Dimension H',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1013011302760053 + wwv_flow_api.g_id_offset,
  p_region_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 13,
  p_form_element_id=> null,
  p_column_alias=> 'MODU_WEIGHT',
  p_column_display_sequence=> 13,
  p_column_heading=> 'Weight',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 998821565433896 + wwv_flow_api.g_id_offset,
  p_region_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 14,
  p_form_element_id=> null,
  p_column_alias=> 'QMAX',
  p_column_display_sequence=> 14,
  p_column_heading=> 'QMAX',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1001321446568954 + wwv_flow_api.g_id_offset,
  p_region_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 15,
  p_form_element_id=> null,
  p_column_alias=> 'INLET_ORIENTATION',
  p_column_display_sequence=> 15,
  p_column_heading=> 'Inlet Connection Orientation',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1001429908568956 + wwv_flow_api.g_id_offset,
  p_region_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 16,
  p_form_element_id=> null,
  p_column_alias=> 'INLET_CON_TYPE',
  p_column_display_sequence=> 16,
  p_column_heading=> 'Inlet Connection Type',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 999123285433896 + wwv_flow_api.g_id_offset,
  p_region_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 17,
  p_form_element_id=> null,
  p_column_alias=> 'INLET_HEIGHT',
  p_column_display_sequence=> 17,
  p_column_heading=> 'Inlet Height',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 999206283433896 + wwv_flow_api.g_id_offset,
  p_region_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 18,
  p_form_element_id=> null,
  p_column_alias=> 'INLET_SIZE',
  p_column_display_sequence=> 18,
  p_column_heading=> 'Inlet Size',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1001529403568957 + wwv_flow_api.g_id_offset,
  p_region_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 19,
  p_form_element_id=> null,
  p_column_alias=> 'OUTLET_ORIENTATION',
  p_column_display_sequence=> 19,
  p_column_heading=> 'Outlet Connection Orientation',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1001620097568957 + wwv_flow_api.g_id_offset,
  p_region_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 20,
  p_form_element_id=> null,
  p_column_alias=> 'OUTLET_CON_TYPE',
  p_column_display_sequence=> 20,
  p_column_heading=> 'Outlet Connection Type',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 999528601433896 + wwv_flow_api.g_id_offset,
  p_region_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 21,
  p_form_element_id=> null,
  p_column_alias=> 'OUTLET_HEIGHT',
  p_column_display_sequence=> 21,
  p_column_heading=> 'Outlet Height',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 999608373433896 + wwv_flow_api.g_id_offset,
  p_region_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 22,
  p_form_element_id=> null,
  p_column_alias=> 'OUTLET_SIZE',
  p_column_display_sequence=> 22,
  p_column_heading=> 'Outlet Size',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 999732468433896 + wwv_flow_api.g_id_offset,
  p_region_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 23,
  p_form_element_id=> null,
  p_column_alias=> 'METR_CODE',
  p_column_display_sequence=> 23,
  p_column_heading=> 'Meter Code',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1013113319760053 + wwv_flow_api.g_id_offset,
  p_region_id=> 997215818433865 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 24,
  p_form_element_id=> null,
  p_column_alias=> 'MODU_SELLING_PRICE',
  p_column_display_sequence=> 24,
  p_column_heading=> 'Material Cost (Selling Price)',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'--BASE'||chr(10)||
'SELECT DISTINCT nvl(bas.code, ''No Base'') AS bas_code, '||chr(10)||
'                DECODE(bas.drwg_code, NULL, ''No Drawing'' '||chr(10)||
'                                    ,''OTHER'', bas.drwg_code'||chr(10)||
'                                    ,''UNKNOWN'', bas.drwg_code'||chr(10)||
'                                    ,''<a href="p?n=''||wwf.id||''">''||bas.drwg_code||''</a>'') AS bas_drwg,  '||chr(10)||
'                nvl(bas.description, ''-'') AS bas_des';

s:=s||'cription, '||chr(10)||
'                nvl(bas.dim_a, 0) AS bas_dima, '||chr(10)||
'                nvl(bas.dim_b, 0) AS bas_dimb, '||chr(10)||
'                nvl(bas.dim_c, 0) AS bas_dimc, '||chr(10)||
'                nvl(bas.dim_d, 0) AS bas_dimd, '||chr(10)||
'                nvl(bas.dim_e, 0) AS bas_dime, '||chr(10)||
'                nvl(bas.dim_f, 0) AS bas_dimf, '||chr(10)||
'                nvl(bas.dim_g, 0) AS bas_dimg, '||chr(10)||
'                nvl(bas.dim_h, 0) AS bas_dimh, '||chr(10)||
'     ';

s:=s||'           nvl(bas.dim_i, 0) AS bas_dimi, '||chr(10)||
'                nvl(bas.depth, 0), '||chr(10)||
'                nvl(cost_bas.selling_price, 0.00) AS bas_selling_price'||chr(10)||
'FROM modules modu, parties prty_modu, document_roles doro, documents docu, wwv_flow_files wwf,'||chr(10)||
'     connection_orientations cnor_inlet, connection_types cnty_inlet, '||chr(10)||
'     connection_orientations cnor_outlet, connection_types cnty_outlet,'||chr(10)||
'     v_moco ';

s:=s||'cost_modu, bases bas, v_baco cost_bas, housings hou, '||chr(10)||
'     housing_types hoty, parties prty_hou, v_hoco cost_hou'||chr(10)||
'WHERE modu.prty_id = prty_modu.id'||chr(10)||
'  AND bas.drwg_code = doro.drwg_code(+)'||chr(10)||
'  AND docu.id(+) = doro.docu_id'||chr(10)||
'  AND wwf.name(+) = docu.uri     '||chr(10)||
'  AND modu.inlet_cnor_code = cnor_inlet.code'||chr(10)||
'  AND modu.inlet_cnty_code = cnty_inlet.code'||chr(10)||
'  AND modu.outlet_cnor_code = cnor_outlet.code'||chr(10)||
'  AND modu';

s:=s||'.outlet_cnty_code = cnty_outlet.code'||chr(10)||
'  AND modu.code = cost_modu.modu_code'||chr(10)||
'  AND modu.bas_code = bas.code(+)'||chr(10)||
'  AND bas.code = cost_bas.bas_code(+)'||chr(10)||
'  AND modu.hou_code = hou.code(+)'||chr(10)||
'  AND hou.hoty_code = hoty.code(+)'||chr(10)||
'  AND hou.prty_id = prty_hou.id(+)'||chr(10)||
'  AND hou.code = cost_hou.hou_code(+)'||chr(10)||
'  AND modu.valid_from IS NOT NULL'||chr(10)||
'  AND doro.rt_code(+) = ''HIGH DEFINITION DRAWING'''||chr(10)||
'  AND SYSDATE BETWEEN cost_';

s:=s||'modu.effective_from(+) AND cost_modu.effective_to(+)'||chr(10)||
'  AND SYSDATE BETWEEN cost_bas.effective_from(+) AND cost_bas.effective_to(+)'||chr(10)||
'  AND SYSDATE BETWEEN cost_hou.effective_from(+) AND cost_hou.effective_to(+)'||chr(10)||
'  AND modu.code = :P8_MODULE_CODE';

wwv_flow_api.create_report_region (
  p_id=> 1057420210079578 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 8,
  p_name=> 'Base Details',
  p_region_name=>'base',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 20,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'Y',
  p_query_row_template=> 3,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_show_nulls_as=> ' - ',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'no data found',
  p_query_num_rows_type=> 'NEXT_PREVIOUS_LINKS',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'Y',
  p_csv_output_link_text=> 'Export to spreadsheet',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1057710091079584 + wwv_flow_api.g_id_offset,
  p_region_id=> 1057420210079578 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'BAS_CODE',
  p_column_display_sequence=> 1,
  p_column_heading=> 'Base Code',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1057828380079584 + wwv_flow_api.g_id_offset,
  p_region_id=> 1057420210079578 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'BAS_DRWG',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Drawing',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1057908273079584 + wwv_flow_api.g_id_offset,
  p_region_id=> 1057420210079578 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'BAS_DESCRIPTION',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Description',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1058009888079584 + wwv_flow_api.g_id_offset,
  p_region_id=> 1057420210079578 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'BAS_DIMA',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Dimension A',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1058117676079584 + wwv_flow_api.g_id_offset,
  p_region_id=> 1057420210079578 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'BAS_DIMB',
  p_column_display_sequence=> 5,
  p_column_heading=> 'Dimension B',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1058232659079584 + wwv_flow_api.g_id_offset,
  p_region_id=> 1057420210079578 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 6,
  p_form_element_id=> null,
  p_column_alias=> 'BAS_DIMC',
  p_column_display_sequence=> 6,
  p_column_heading=> 'Dimension C',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1058302882079584 + wwv_flow_api.g_id_offset,
  p_region_id=> 1057420210079578 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 7,
  p_form_element_id=> null,
  p_column_alias=> 'BAS_DIMD',
  p_column_display_sequence=> 7,
  p_column_heading=> 'Dimension D',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1058424114079584 + wwv_flow_api.g_id_offset,
  p_region_id=> 1057420210079578 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 8,
  p_form_element_id=> null,
  p_column_alias=> 'BAS_DIME',
  p_column_display_sequence=> 8,
  p_column_heading=> 'Dimension E',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1058520321079584 + wwv_flow_api.g_id_offset,
  p_region_id=> 1057420210079578 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 9,
  p_form_element_id=> null,
  p_column_alias=> 'BAS_DIMF',
  p_column_display_sequence=> 9,
  p_column_heading=> 'Dimension F',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1058612754079584 + wwv_flow_api.g_id_offset,
  p_region_id=> 1057420210079578 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 10,
  p_form_element_id=> null,
  p_column_alias=> 'BAS_DIMG',
  p_column_display_sequence=> 10,
  p_column_heading=> 'Dimension G',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1058731729079584 + wwv_flow_api.g_id_offset,
  p_region_id=> 1057420210079578 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 11,
  p_form_element_id=> null,
  p_column_alias=> 'BAS_DIMH',
  p_column_display_sequence=> 11,
  p_column_heading=> 'Dimension H',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1058809152079584 + wwv_flow_api.g_id_offset,
  p_region_id=> 1057420210079578 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 12,
  p_form_element_id=> null,
  p_column_alias=> 'BAS_DIMI',
  p_column_display_sequence=> 12,
  p_column_heading=> 'Dimension I',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1058907671079584 + wwv_flow_api.g_id_offset,
  p_region_id=> 1057420210079578 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 13,
  p_form_element_id=> null,
  p_column_alias=> 'NVL(BAS.DEPTH,0)',
  p_column_display_sequence=> 13,
  p_column_heading=> 'Depth',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1059016815079584 + wwv_flow_api.g_id_offset,
  p_region_id=> 1057420210079578 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 14,
  p_form_element_id=> null,
  p_column_alias=> 'BAS_SELLING_PRICE',
  p_column_display_sequence=> 14,
  p_column_heading=> 'Material Cost (Selling Price)',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'--HOUSING'||chr(10)||
'SELECT DISTINCT nvl(hou.code, ''No Housing'') AS hou_code, '||chr(10)||
'                DECODE(doro.drwg_code, NULL, hou.drwg_code,''<a href="p?n=''||wwf.id||''">''||doro.drwg_code||''</a>'') AS hou_drwg, '||chr(10)||
'                nvl(hoty.description,''-'') AS hoty_decription, '||chr(10)||
'                nvl(hou.description, ''-'') AS hou_description, '||chr(10)||
'                nvl(hou.dim_l, 0), '||chr(10)||
'                nvl(hou.dim_w, 0), '||chr(10)||
'      ';

s:=s||'          nvl(hou.dim_h, 0) AS hou_dimh, '||chr(10)||
'                nvl(hou.weight, 0) AS hou_weight, '||chr(10)||
'                nvl(prty_hou.name,''-'') AS hou_manf, '||chr(10)||
'                nvl(cost_hou.selling_price, 0.00) AS hou_selling_price'||chr(10)||
'FROM modules modu, parties prty_modu, document_roles doro, documents docu, wwv_flow_files wwf,'||chr(10)||
'     connection_orientations cnor_inlet, connection_types cnty_inlet, '||chr(10)||
'     connection_o';

s:=s||'rientations cnor_outlet, connection_types cnty_outlet,'||chr(10)||
'     v_moco cost_modu, bases bas, v_baco cost_bas, housings hou, '||chr(10)||
'     housing_types hoty, parties prty_hou, v_hoco cost_hou'||chr(10)||
'WHERE modu.prty_id = prty_modu.id'||chr(10)||
'  AND hou.drwg_code = doro.drwg_code(+)'||chr(10)||
'  AND docu.id(+) = doro.docu_id'||chr(10)||
'  AND wwf.name(+) = docu.uri'||chr(10)||
'  AND modu.inlet_cnor_code = cnor_inlet.code'||chr(10)||
'  AND modu.inlet_cnty_code = cnty_inlet.';

s:=s||'code'||chr(10)||
'  AND modu.outlet_cnor_code = cnor_outlet.code'||chr(10)||
'  AND modu.outlet_cnty_code = cnty_outlet.code'||chr(10)||
'  AND modu.code = cost_modu.modu_code'||chr(10)||
'  AND modu.bas_code = bas.code(+)'||chr(10)||
'  AND bas.code = cost_bas.bas_code(+)'||chr(10)||
'  AND modu.hou_code = hou.code(+)'||chr(10)||
'  AND hou.hoty_code = hoty.code(+)'||chr(10)||
'  AND hou.prty_id = prty_hou.id(+)'||chr(10)||
'  AND hou.code = cost_hou.hou_code(+)'||chr(10)||
'  AND modu.valid_from IS NOT NULL'||chr(10)||
'  AND SYSDATE B';

s:=s||'ETWEEN cost_modu.effective_from(+) AND cost_modu.effective_to(+)'||chr(10)||
'  AND SYSDATE BETWEEN cost_bas.effective_from(+) AND cost_bas.effective_to(+)'||chr(10)||
'  AND SYSDATE BETWEEN cost_hou.effective_from(+) AND cost_hou.effective_to(+)'||chr(10)||
'  AND modu.code = :P8_MODULE_CODE';

wwv_flow_api.create_report_region (
  p_id=> 1121013209172151 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 8,
  p_name=> 'Housing Details',
  p_region_name=>'housing',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 30,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'Y',
  p_query_row_template=> 3,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_show_nulls_as=> ' - ',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'no data found',
  p_query_num_rows_type=> 'NEXT_PREVIOUS_LINKS',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'Y',
  p_csv_output_link_text=> 'Export to spreadsheet',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1121306998172153 + wwv_flow_api.g_id_offset,
  p_region_id=> 1121013209172151 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'HOU_CODE',
  p_column_display_sequence=> 1,
  p_column_heading=> 'Housing Code',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1121417438172153 + wwv_flow_api.g_id_offset,
  p_region_id=> 1121013209172151 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'HOU_DRWG',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Drawing',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1121523546172153 + wwv_flow_api.g_id_offset,
  p_region_id=> 1121013209172151 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'HOTY_DECRIPTION',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Housing Type',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1121628959172153 + wwv_flow_api.g_id_offset,
  p_region_id=> 1121013209172151 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'HOU_DESCRIPTION',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Description',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1121708821172153 + wwv_flow_api.g_id_offset,
  p_region_id=> 1121013209172151 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'NVL(HOU.DIM_L,0)',
  p_column_display_sequence=> 5,
  p_column_heading=> 'Dimension L',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1121803134172153 + wwv_flow_api.g_id_offset,
  p_region_id=> 1121013209172151 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 6,
  p_form_element_id=> null,
  p_column_alias=> 'NVL(HOU.DIM_W,0)',
  p_column_display_sequence=> 6,
  p_column_heading=> 'Dimension W',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1121904678172153 + wwv_flow_api.g_id_offset,
  p_region_id=> 1121013209172151 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 7,
  p_form_element_id=> null,
  p_column_alias=> 'HOU_DIMH',
  p_column_display_sequence=> 7,
  p_column_heading=> 'Dimenstion H',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1122031403172153 + wwv_flow_api.g_id_offset,
  p_region_id=> 1121013209172151 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 8,
  p_form_element_id=> null,
  p_column_alias=> 'HOU_WEIGHT',
  p_column_display_sequence=> 8,
  p_column_heading=> 'Weight',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1122123341172153 + wwv_flow_api.g_id_offset,
  p_region_id=> 1121013209172151 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 9,
  p_form_element_id=> null,
  p_column_alias=> 'HOU_MANF',
  p_column_display_sequence=> 9,
  p_column_heading=> 'Manufacturer',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 1122207976172153 + wwv_flow_api.g_id_offset,
  p_region_id=> 1121013209172151 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 10,
  p_form_element_id=> null,
  p_column_alias=> 'HOU_SELLING_PRICE',
  p_column_display_sequence=> 10,
  p_column_heading=> 'Material Cost (Selling Price)',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 3034532741475553 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 8,
  p_button_sequence=> 10,
  p_button_plug_id => 997215818433865+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image_alt=> 'Back to Search Results',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:4:&SESSION.::&DEBUG.:::',
  p_button_cattributes=>'id="back_modu"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 1080004244112656 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 8,
  p_button_sequence=> 20,
  p_button_plug_id => 997215818433865+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:4:&SESSION.::&DEBUG.:4::',
  p_button_cattributes=>'id="cancel_modu"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 3060323784501289 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 8,
  p_button_sequence=> 30,
  p_button_plug_id => 1057420210079578+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image_alt=> 'Back to Search Results',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:4:&SESSION.::&DEBUG.:::',
  p_button_cattributes=>'id="back_bas"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 3029600862315017 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 8,
  p_button_sequence=> 40,
  p_button_plug_id => 1057420210079578+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:4:&SESSION.::&DEBUG.:4::',
  p_button_cattributes=>'id="cancel_bas"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 3060817681509054 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 8,
  p_button_sequence=> 50,
  p_button_plug_id => 1121013209172151+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image_alt=> 'Back to Search Results',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:4:&SESSION.::&DEBUG.:::',
  p_button_cattributes=>'id="back_hou"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 3030000647324340 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 8,
  p_button_sequence=> 60,
  p_button_plug_id => 1121013209172151+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:4:&SESSION.::&DEBUG.:4::',
  p_button_cattributes=>'id="cancel_hou"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>3029431172301846 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 8,
  p_branch_action=> 'f?p=&FLOW_ID.:8:&SESSION.',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 99,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>1000824816513153 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 8,
  p_name=>'P8_MODULE_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 997215818433865+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Module Code',
  p_source=>'CODE',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 8
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00009
prompt  ...PAGE 9: CSV Export
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 9,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'CSV Export',
  p_alias  => 'CSV_EXPORT',
  p_step_title=> 'CSV Export',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_role => 14572900838700208+ 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 => '20080130155246',
  p_page_is_public_y_n=> 'N',
  p_protection_level=> 'C',
  p_page_comment  => '');
 
end;
 
end;
/

 
begin
 
null;
 
end;
/

 
begin
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'begin'||chr(10)||
'  mip_files.export_table_to_csv(v(''P5_TABLES''),v(''P5_COLUMN_NAMES''));'||chr(10)||
'  -- Send an error code so that the'||chr(10)||
'  -- rest of the HTML template does not render in the export file'||chr(10)||
'  htmldb_application.g_unrecoverable_error := true;'||chr(10)||
'  --'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 12780216171318969 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 9,
  p_process_sequence=> 10,
  p_process_point=> 'BEFORE_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'export',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'This process will export the table passed by session variable P5_TABLES to a CSV file.  Ask A Gilbert about the finer workings if you need to know. ');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 9
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00014
prompt  ...PAGE 14: Quotes Reports
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 14,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Quotes Reports',
  p_step_title=> 'Quotes Reports',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'DHARSHANIK',
  p_last_upd_yyyymmddhh24miss => '20080403155704',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 29830416072578069 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 14,
  p_plug_name=> 'Search Quotes',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'SELECT qute.id AS "Quote Reference Number"'||chr(10)||
'      ,prty_supplier.name AS "Supplier Name"'||chr(10)||
'      ,prty_agent.first_name||'' ''||prty_agent.last_name AS "Agent Name"'||chr(10)||
'      ,quote_status.event_date AS "Date Status Change"'||chr(10)||
'      ,v_files.id as View_PDF '||chr(10)||
'FROM (SELECT DISTINCT vlare.*'||chr(10)||
'      FROM quotes qute, v_latest_rt_code_for_enro vlare'||chr(10)||
'      WHERE vlare.enqu_id = qute.enqu_id'||chr(10)||
'      AND vlare.rt_';

s:=s||'code = ''ENQ SUPP'''||chr(10)||
'      ) supplier'||chr(10)||
'    ,quotes qute'||chr(10)||
'    ,quote_roles quro'||chr(10)||
'    ,parties prty_supplier'||chr(10)||
'    ,parties prty_agent'||chr(10)||
'    ,(SELECT vcqs.*'||chr(10)||
'        FROM v_current_quote_status vcqs'||chr(10)||
'       WHERE vcqs.qust_code = decode(:P14_QUTE_STATUS, ''%'', vcqs.qust_code, :P14_QUTE_STATUS)) quote_status'||chr(10)||
'    ,document_roles docro'||chr(10)||
'    ,documents docs'||chr(10)||
'    ,wwv_flow_files v_files'||chr(10)||
'       '||chr(10)||
'WHERE qute.';

s:=s||'id = quro.qute_id'||chr(10)||
'AND supplier.prty_id = prty_supplier.id'||chr(10)||
'AND supplier.enqu_id = qute.enqu_id'||chr(10)||
'AND quro.prty_id = prty_agent.id'||chr(10)||
'AND qute.id = quote_status.qute_id'||chr(10)||
'AND qute.qute_type = decode(:P14_QUTE_TYPE,''%'', qute.qute_type, :P14_QUTE_TYPE)'||chr(10)||
'AND quro.rt_code = (decode(quote_status.qust_code, ''ACCEPTED'', ''Q ACC'','||chr(10)||
'                                                   ''INP'', ''Q RFQ'','||chr(10)||
'           ';

s:=s||'                                        ''REJECTED'', ''Q REJ'','||chr(10)||
'                                                   ''SELECTED'', ''Q SEL'','||chr(10)||
'                                                   ''Q OWN''))'||chr(10)||
'AND quote_status.qust_code <> ''LAPSED'''||chr(10)||
'   and docro.qute_id = qute.id'||chr(10)||
'   and docs.id = docro.docu_id'||chr(10)||
'   and v_files.name = docs.uri'||chr(10)||
'ORDER BY quote_status.event_date ASC';

wwv_flow_api.create_report_region (
  p_id=> 29838414799785978 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 14,
  p_name=> 'All Quotes ',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 20,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_display_when_condition=> 'if upper(mip_parties.get_user_role(:APP_USER)) in (''ICU'',''MIPADMIN'',''CS'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_condition_type=> 'FUNCTION_BODY',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 28041136573354435+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_show_nulls_as=> ' - ',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'no data found',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 29838715716785998 + wwv_flow_api.g_id_offset,
  p_region_id=> 29838414799785978 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'Quote Reference Number',
  p_column_display_sequence=> 1,
  p_column_heading=> 'Quote Reference Number',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'Y',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 30444812811710777 + wwv_flow_api.g_id_offset,
  p_region_id=> 29838414799785978 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'Supplier Name',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Supplier Name',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 30444205538708744 + wwv_flow_api.g_id_offset,
  p_region_id=> 29838414799785978 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'Agent Name',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Agent Name',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 30530325810878456 + wwv_flow_api.g_id_offset,
  p_region_id=> 29838414799785978 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'Date Status Change',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Date Status Change',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 8083704250341885 + wwv_flow_api.g_id_offset,
  p_region_id=> 29838414799785978 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'VIEW_PDF',
  p_column_display_sequence=> 5,
  p_column_heading=> '',
  p_column_link=>'p?n=#VIEW_PDF#',
  p_column_linktext=>'View PDF',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'N',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'SELECT DISTINCT qute.id "Quote Reference Number"'||chr(10)||
'               ,prty_supplier.name "Supplier"'||chr(10)||
'               ,prty_agent.first_name||'' ''||prty_agent.last_name "Agent"'||chr(10)||
'               ,vcqs.event_date "Date Status Change"'||chr(10)||
'               ,v_files.id as View_PDF '||chr(10)||
'FROM (SELECT DISTINCT vlare.*'||chr(10)||
'      FROM quote_roles quro, quotes qute, v_latest_rt_code_for_enro vlare'||chr(10)||
'      WHERE quro.qute_id = q';

s:=s||'ute.id'||chr(10)||
'      AND vlare.enqu_id = qute.enqu_id'||chr(10)||
'      AND quro.rt_code = ''Q OWN'''||chr(10)||
'      AND vlare.rt_code = ''ENQ SUPP'''||chr(10)||
'      AND quro.prty_id = mip_parties.get_user_id(:APP_USER)'||chr(10)||
'      ) supplier'||chr(10)||
'      ,quotes qute'||chr(10)||
'      ,quote_roles quro'||chr(10)||
'      ,v_latest_rt_code_for_enro vlare'||chr(10)||
'      ,v_current_quote_status vcqs'||chr(10)||
'      ,parties prty_supplier'||chr(10)||
'      ,parties prty_agent'||chr(10)||
'      ,document_roles d';

s:=s||'ocro'||chr(10)||
'      ,documents docs'||chr(10)||
'      ,wwv_flow_files v_files'||chr(10)||
'WHERE quro.qute_id = qute.id'||chr(10)||
'AND vlare.enqu_id = qute.enqu_id'||chr(10)||
'AND vlare.prty_id = supplier.prty_id'||chr(10)||
'AND supplier.enqu_id = qute.enqu_id'||chr(10)||
'AND vcqs.qute_id = qute.id'||chr(10)||
'AND supplier.prty_id = prty_supplier.id'||chr(10)||
'AND quro.prty_id = prty_agent.id'||chr(10)||
'AND quro.rt_code = ''Q OWN'''||chr(10)||
'AND qute.qute_type = decode(:P14_QUTE_TYPE,''%'', qute.qute_type, :P14_Q';

s:=s||'UTE_TYPE)'||chr(10)||
'AND vcqs.qust_code = decode(:P14_QUTE_STATUS, ''%'', vcqs.qust_code, :P14_QUTE_STATUS)'||chr(10)||
'AND vcqs.qust_code <> ''LAPSED'''||chr(10)||
'   and docro.qute_id = qute.id'||chr(10)||
'   and docs.id = docro.docu_id'||chr(10)||
'   and v_files.name = docs.uri'||chr(10)||
'ORDER BY vcqs.event_date ASC';

wwv_flow_api.create_report_region (
  p_id=> 30454210649729114 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 14,
  p_name=> 'Supplier Quotes',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 30,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_display_when_condition=> 'return mip_parties.check_user_role(:APP_USER, ''AGENT'');',
  p_display_condition_type=> 'FUNCTION_BODY',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 28041136573354435+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'QUERY_COLUMNS',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_show_nulls_as=> ' - ',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'no data found',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 30454512727729130 + wwv_flow_api.g_id_offset,
  p_region_id=> 30454210649729114 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'Quote Reference Number',
  p_column_display_sequence=> 1,
  p_column_heading=> 'Quote Reference Number',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 30454604873729130 + wwv_flow_api.g_id_offset,
  p_region_id=> 30454210649729114 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'Supplier',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Supplier',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 30454717180729130 + wwv_flow_api.g_id_offset,
  p_region_id=> 30454210649729114 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'Agent',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Agent',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 30531032043880197 + wwv_flow_api.g_id_offset,
  p_region_id=> 30454210649729114 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'Date Status Change',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Date Status Change',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 8084917372392970 + wwv_flow_api.g_id_offset,
  p_region_id=> 30454210649729114 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'VIEW_PDF',
  p_column_display_sequence=> 5,
  p_column_heading=> 'View Pdf',
  p_column_link=>'p?n=#VIEW_PDF#',
  p_column_linktext=>'View PDF',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'N',
  p_column_comment=>'');
end;
/
 
begin
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>29840730584794241 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 14,
  p_branch_action=> 'f?p=&FLOW_ID.:14:&SESSION.',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 99,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>29837413975776258 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 14,
  p_name=>'P14_QUTE_TYPE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 29830416072578069+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Quote Type',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'QUOTE_TYPE',
  p_lov => 'SELECT DISTINCT decode(qute.qute_type, ''AQ'', ''Automatic Quotes'','||chr(10)||
'                                        ''MQ'', ''Manual Quotes'') AS display_value,'||chr(10)||
'                qute.qute_type return_value                                  '||chr(10)||
'FROM quotes qute'||chr(10)||
'ORDER BY display_value',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'- All -',
  p_lov_null_value=> '%',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>30050812476318116 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 14,
  p_name=>'P14_SEARCH',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 30,
  p_item_plug_id => 29830416072578069+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default => 'Go',
  p_prompt=>'Search',
  p_source=>'Go',
  p_source_type=> 'STATIC',
  p_display_as=> 'BUTTON',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_tag_attributes  => 'id="search"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>30052619533329611 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 14,
  p_name=>'P14_QUTE_STATUS',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 29830416072578069+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Quote Status',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'QUOTE_STATUS',
  p_lov => 'select qust.description AS display_value, qust.code AS return_value'||chr(10)||
'from quote_statuses qust'||chr(10)||
'where qust.code <> ''LAPSED'''||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'- All -',
  p_lov_null_value=> '%',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>30572105415175345 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 14,
  p_name=>'P14_HID_QTYPE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 40,
  p_item_plug_id => 29838414799785978+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 14
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00018
prompt  ...PAGE 18: Report on Costs
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph := null;
wwv_flow_api.create_page(
  p_id     => 18,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Report on Costs',
  p_step_title=> 'Report on &P18_COSTS_TITLE.',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'AUTO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => ' ',
  p_html_page_header => '',
  p_step_template => '',
  p_required_role => 14572900838700208+ 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 => '20080326172255',
  p_page_is_public_y_n=> 'N',
  p_protection_level=> 'C',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>18,p_text=>h);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select "ID", '||chr(10)||
'"ENTY_CODE", -- Labour costs'||chr(10)||
'-- Base Costs'||chr(10)||
'"BAS_CODE",'||chr(10)||
'-- Housing Costs'||chr(10)||
'"HOU_CODE",'||chr(10)||
'-- Meter Costs'||chr(10)||
'"METR_CODE",'||chr(10)||
'-- Additional Item Costs'||chr(10)||
'"ADIT_CODE",'||chr(10)||
''||chr(10)||
''||chr(10)||
'"REGI_CODE", -- all'||chr(10)||
'"MESC_CODE",-- Labour costs'||chr(10)||
'"MODU_CODE",-- Labour costs'||chr(10)||
'"SVCPT_CODE",-- Labour costs'||chr(10)||
'"SELLING_PRICE",-- all'||chr(10)||
'"COST_PRICE",-- all'||chr(10)||
'"VALID_FROM",-- all'||chr(10)||
'"VALID_TO",-- all'||chr(10)||
'"COST_TYPE"-- all'||chr(10)||
'from "#OW';

s:=s||'NER#"."COSTS" '||chr(10)||
'where "#OWNER#"."COSTS"."COST_TYPE" = nvl(:P18_REQUIRED_COST_TYPE,''LACO'')'||chr(10)||
'  '||chr(10)||
'';

wwv_flow_api.create_report_region (
  p_id=> 15248017156197270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 18,
  p_name=> 'Report on &P18_COSTS_TITLE.',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 10,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_display_when_condition=> 'P18_REQUIRED_COST_TYPE',
  p_display_when_cond2=> 'LACO:AICO:MOCO:BACO:HOCO',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 28041136573354435+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'no data found',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_query_row_count_max=> '20000',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'Y',
  p_csv_output_link_text=> 'Export to Spreadsheet',
  p_prn_output=> 'N',
  p_prn_format=> 'PDF',
  p_prn_output_show_link=> 'Y',
  p_prn_output_link_text=> 'Print',
  p_prn_units=> 'MILLIMETERS',
  p_prn_paper_size=> 'A4',
  p_prn_width=> 297,
  p_prn_height=> 210,
  p_prn_orientation=> 'HORIZONTAL',
  p_prn_page_header_font_color=> '#000000',
  p_prn_page_header_font_family=> 'Helvetica',
  p_prn_page_header_font_weight=> 'normal',
  p_prn_page_header_font_size=> '12',
  p_prn_page_footer_font_color=> '#000000',
  p_prn_page_footer_font_family=> 'Helvetica',
  p_prn_page_footer_font_weight=> 'normal',
  p_prn_page_footer_font_size=> '12',
  p_prn_header_bg_color=> '#9bafde',
  p_prn_header_font_color=> '#ffffff',
  p_prn_header_font_family=> 'Helvetica',
  p_prn_header_font_weight=> 'normal',
  p_prn_header_font_size=> '10',
  p_prn_body_bg_color=> '#efefef',
  p_prn_body_font_color=> '#000000',
  p_prn_body_font_family=> 'Helvetica',
  p_prn_body_font_weight=> 'normal',
  p_prn_body_font_size=> '10',
  p_prn_border_width=> .5,
  p_prn_page_header_alignment=> 'LEFT',
  p_prn_page_footer_alignment=> 'LEFT',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_exp_filename=> '&P18_EXPORT_FILENAME.',
  p_plug_query_exp_separator=> ',',
  p_plug_query_exp_enclosed_by=> '"',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 15425002597449475 + wwv_flow_api.g_id_offset,
  p_region_id=> 15248017156197270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'ID',
  p_column_display_sequence=> 1,
  p_column_heading=> '',
  p_column_link=>'f?p=&APP_ID.:19:&SESSION.::&DEBUG.::P19_REQUIRED_COST_TYPE,P19_ID:#COST_TYPE#,#ID#',
  p_column_linktext=>'Edit',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'N',
  p_print_col_width=> '6',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 15425631753449475 + wwv_flow_api.g_id_offset,
  p_region_id=> 15248017156197270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'ENTY_CODE',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Enquiry Type',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_display_when_condition=> 'P18_REQUIRED_COST_TYPE',
  p_display_when_condition2=> 'LACO',
  p_display_as=>'TEXT_FROM_LOV',
  p_named_lov=>15310215906546350 + wwv_flow_api.g_id_offset,
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'Y',
  p_print_col_width=> '6',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 15435506209611412 + wwv_flow_api.g_id_offset,
  p_region_id=> 15248017156197270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'BAS_CODE',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Base',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_display_when_condition=> 'P18_REQUIRED_COST_TYPE',
  p_display_when_condition2=> 'BACO',
  p_display_as=>'TEXT_FROM_LOV',
  p_named_lov=>12897128450695770 + wwv_flow_api.g_id_offset,
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'Y',
  p_print_col_width=> '6',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 15435626300611412 + wwv_flow_api.g_id_offset,
  p_region_id=> 15248017156197270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'HOU_CODE',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Housing',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_display_when_condition=> 'P18_REQUIRED_COST_TYPE',
  p_display_when_condition2=> 'HOCO',
  p_display_as=>'TEXT_FROM_LOV',
  p_named_lov=>12898311751698269 + wwv_flow_api.g_id_offset,
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'Y',
  p_print_col_width=> '6',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 15435716151611412 + wwv_flow_api.g_id_offset,
  p_region_id=> 15248017156197270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'METR_CODE',
  p_column_display_sequence=> 5,
  p_column_heading=> 'Meter',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_display_when_condition=> 'P18_REQUIRED_COST_TYPE',
  p_display_when_condition2=> 'MECO',
  p_display_as=>'TEXT_FROM_LOV',
  p_named_lov=>12917416794939297 + wwv_flow_api.g_id_offset,
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'Y',
  p_print_col_width=> '6',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 34085128423634578 + wwv_flow_api.g_id_offset,
  p_region_id=> 15248017156197270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 6,
  p_form_element_id=> null,
  p_column_alias=> 'ADIT_CODE',
  p_column_display_sequence=> 9,
  p_column_heading=> 'Additional Item',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_display_when_condition=> 'P18_REQUIRED_COST_TYPE',
  p_display_when_condition2=> 'AICO',
  p_display_as=>'TEXT_FROM_LOV',
  p_named_lov=>41943506692705728 + wwv_flow_api.g_id_offset,
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'NO',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 15425303579449475 + wwv_flow_api.g_id_offset,
  p_region_id=> 15248017156197270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 7,
  p_form_element_id=> null,
  p_column_alias=> 'REGI_CODE',
  p_column_display_sequence=> 10,
  p_column_heading=> 'Region',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'TEXT_FROM_LOV',
  p_named_lov=>15309304132542973 + wwv_flow_api.g_id_offset,
  p_lov_show_nulls=> 'YES',
  p_lov_null_text=> 'Not Applicable',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'Y',
  p_print_col_width=> '6',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 15425710224449475 + wwv_flow_api.g_id_offset,
  p_region_id=> 15248017156197270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 8,
  p_form_element_id=> null,
  p_column_alias=> 'MESC_CODE',
  p_column_display_sequence=> 7,
  p_column_heading=> 'Meter Size',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_display_when_condition=> 'P18_REQUIRED_COST_TYPE',
  p_display_when_condition2=> 'LACO',
  p_display_as=>'TEXT_FROM_LOV',
  p_named_lov=>15310821793548000 + wwv_flow_api.g_id_offset,
  p_lov_show_nulls=> 'YES',
  p_lov_null_text=> 'Not Applicable',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'NO',
  p_include_in_export=> 'Y',
  p_print_col_width=> '6',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 15425824857449475 + wwv_flow_api.g_id_offset,
  p_region_id=> 15248017156197270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 9,
  p_form_element_id=> null,
  p_column_alias=> 'MODU_CODE',
  p_column_display_sequence=> 8,
  p_column_heading=> 'Module',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_display_when_condition=> 'P18_REQUIRED_COST_TYPE',
  p_display_when_condition2=> 'MOCO',
  p_display_as=>'TEXT_FROM_LOV',
  p_named_lov=>15410919772406030 + wwv_flow_api.g_id_offset,
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'Y',
  p_print_col_width=> '6',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 15433621391511676 + wwv_flow_api.g_id_offset,
  p_region_id=> 15248017156197270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 10,
  p_form_element_id=> null,
  p_column_alias=> 'SVCPT_CODE',
  p_column_display_sequence=> 6,
  p_column_heading=> 'Service Pressure Type',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_display_when_condition=> 'P18_REQUIRED_COST_TYPE',
  p_display_when_condition2=> 'LACO',
  p_display_as=>'TEXT_FROM_LOV',
  p_named_lov=>15311828027549870 + wwv_flow_api.g_id_offset,
  p_lov_show_nulls=> 'YES',
  p_lov_null_text=> 'Not Applicable',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'Y',
  p_print_col_width=> '6',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 15425408450449475 + wwv_flow_api.g_id_offset,
  p_region_id=> 15248017156197270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 11,
  p_form_element_id=> null,
  p_column_alias=> 'SELLING_PRICE',
  p_column_display_sequence=> 11,
  p_column_heading=> 'Selling Price',
  p_column_format=> 'FML999G999G999G999G990D00',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'Y',
  p_print_col_width=> '6',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 15425115006449475 + wwv_flow_api.g_id_offset,
  p_region_id=> 15248017156197270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 12,
  p_form_element_id=> null,
  p_column_alias=> 'COST_PRICE',
  p_column_display_sequence=> 12,
  p_column_heading=> 'Cost Price',
  p_column_format=> 'FML999G999G999G999G990D00',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'Y',
  p_print_col_width=> '6',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 15425210616449475 + wwv_flow_api.g_id_offset,
  p_region_id=> 15248017156197270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 13,
  p_form_element_id=> null,
  p_column_alias=> 'VALID_FROM',
  p_column_display_sequence=> 13,
  p_column_heading=> 'Valid From',
  p_column_format=> 'DD/MM/YYYY',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'Y',
  p_print_col_width=> '6',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 15425530111449475 + wwv_flow_api.g_id_offset,
  p_region_id=> 15248017156197270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 14,
  p_form_element_id=> null,
  p_column_alias=> 'VALID_TO',
  p_column_display_sequence=> 15,
  p_column_heading=> 'Valid To',
  p_column_format=> 'DD/MM/YYYY',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'Y',
  p_print_col_width=> '6',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 15490701285054684 + wwv_flow_api.g_id_offset,
  p_region_id=> 15248017156197270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 15,
  p_form_element_id=> null,
  p_column_alias=> 'COST_TYPE',
  p_column_display_sequence=> 14,
  p_column_heading=> 'Cost Type',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_include_in_export=> 'Y',
  p_print_col_width=> '6',
  p_column_comment=>'');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 15254413855197275 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 18,
  p_button_sequence=> 30,
  p_button_plug_id => 15248017156197270+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Create',
  p_button_position=> 'REGION_TEMPLATE_CREATE',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:19:&SESSION.::&DEBUG.:19:P19_REQUIRED_COST_TYPE:&P18_REQUIRED_COST_TYPE.',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>7576517614702693 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 18,
  p_branch_action=> 'f?p=&FLOW_ID.:19:&SESSION.::&DEBUG.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>7576228008702692+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 10,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>15376131107965739 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 18,
  p_name=>'P18_REQUIRED_COST_TYPE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 15248017156197270+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'S',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>15384902298127656 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 18,
  p_name=>'P18_COSTS_TITLE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 15248017156197270+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'S',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>15849532460120984 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 18,
  p_name=>'P18_EXPORT_FILENAME',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 30,
  p_item_plug_id => 15248017156197270+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'S',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_computation(
  p_id=> 15885506862340692 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 18,
  p_computation_sequence => 10,
  p_computation_item=> 'P18_EXPORT_FILENAME',
  p_computation_point=> 'AFTER_BOX_BODY',
  p_computation_type=> 'PLSQL_EXPRESSION',
  p_computation_processed=> 'REPLACE_EXISTING',
  p_computation=> 'apex_util.url_encode(''MIP_&P18_COSTS_TITLE.'')||''.CSV''',
  p_compute_when => '',
  p_compute_when_type=>'');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'IF :P18_REQUIRED_COST_TYPE = ''LACO'' THEN'||chr(10)||
' :P18_COSTS_TITLE := ''Labour Costs'';'||chr(10)||
'ELSIF :P18_REQUIRED_COST_TYPE = ''AICO'' THEN'||chr(10)||
' :P18_COSTS_TITLE := ''Additional Item Costs'';'||chr(10)||
'ELSIF :P18_REQUIRED_COST_TYPE = ''MOCO'' THEN'||chr(10)||
' :P18_COSTS_TITLE := ''Module Materials Costs'';'||chr(10)||
'ELSIF :P18_REQUIRED_COST_TYPE = ''BACO'' THEN'||chr(10)||
' :P18_COSTS_TITLE := ''Base Costs'';'||chr(10)||
'ELSIF :P18_REQUIRED_COST_TYPE = ''HOCO'' THEN'||chr(10)||
' :P18_COS';

p:=p||'TS_TITLE := ''Housing Costs'';'||chr(10)||
'ELSE'||chr(10)||
' :P18_COSTS_TITLE := ''UNKNOWN:''||:P18_REQUIRED_COST_TYPE;'||chr(10)||
'END IF;';

wwv_flow_api.create_page_process(
  p_id     => 15384224330124575 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 18,
  p_process_sequence=> 10,
  p_process_point=> 'BEFORE_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'SetRegionTitle',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 18
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00019
prompt  ...PAGE 19: Manage Costs
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph:=ph||'<script language="JavaScript" type="text/javascript">'||chr(10)||
'<!--'||chr(10)||
''||chr(10)||
' htmldb_delete_message=''"DELETE_CONFIRM_MSG"'';'||chr(10)||
''||chr(10)||
'//-->'||chr(10)||
'</script>';

wwv_flow_api.create_page(
  p_id     => 19,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Manage Costs',
  p_step_title=> 'Manage &P19_COSTS_TITLE.',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'AUTO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => ' ',
  p_html_page_header => ' ',
  p_step_template => '',
  p_required_role => 14572900838700208+ 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 => '20080326172339',
  p_page_is_public_y_n=> 'N',
  p_protection_level=> 'C',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>19,p_text=>h);
wwv_flow_api.set_html_page_header(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>19,p_text=>ph);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 15243225601197264 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 19,
  p_plug_name=> 'Manage &P19_COSTS_TITLE.',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 15243508783197264 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 19,
  p_button_sequence=> 30,
  p_button_plug_id => 15243225601197264+wwv_flow_api.g_id_offset,
  p_button_name    => 'SAVE',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Apply Changes',
  p_button_position=> 'REGION_TEMPLATE_CHANGE',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P19_ID',
  p_button_condition_type=> 'ITEM_IS_NOT_NULL',
  p_database_action=>'UPDATE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 15243803319197264 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 19,
  p_button_sequence=> 10,
  p_button_plug_id => 15243225601197264+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'REGION_TEMPLATE_CLOSE',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:18:&SESSION.::&DEBUG.::P18_REQUIRED_COST_TYPE:&P19_REQUIRED_COST_TYPE.',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 15243408038197264 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 19,
  p_button_sequence=> 40,
  p_button_plug_id => 15243225601197264+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Create',
  p_button_position=> 'REGION_TEMPLATE_CREATE',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P19_ID',
  p_button_condition_type=> 'ITEM_IS_NULL',
  p_database_action=>'INSERT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 15243612979197264 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 19,
  p_button_sequence=> 20,
  p_button_plug_id => 15243225601197264+wwv_flow_api.g_id_offset,
  p_button_name    => 'DELETE',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Delete',
  p_button_position=> 'REGION_TEMPLATE_DELETE',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'javascript:confirmDelete(htmldb_delete_message,''DELETE'');',
  p_button_condition=> 'P19_ID',
  p_button_condition_type=> 'ITEM_IS_NOT_NULL',
  p_database_action=>'DELETE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>15244421119197265 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 19,
  p_branch_action=> 'f?p=&APP_ID.:18:&SESSION.::&DEBUG.:::',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 1,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>15244621334197267 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 19,
  p_name=>'P19_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1026,
  p_item_plug_id => 15243225601197264+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Id',
  p_source=>'ID',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 255,
  p_cHeight=> null,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_protection_level => 'S',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>15244806184197267 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 19,
  p_name=>'P19_COST_PRICE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1028,
  p_item_plug_id => 15243225601197264+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Cost Price',
  p_source=>'COST_PRICE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>15245028377197267 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 19,
  p_name=>'P19_VALID_FROM',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1039,
  p_item_plug_id => 15243225601197264+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Valid From',
  p_source=>'VALID_FROM',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'PICK_DATE_DD_MM_YYYY',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 15,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>15245410255197267 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 19,
  p_name=>'P19_REGI_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1030,
  p_item_plug_id => 15243225601197264+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Region',
  p_source=>'REGI_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'REGIONS',
  p_lov => 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from REGIONS'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not Applicable',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>15245615928197267 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 19,
  p_name=>'P19_SELLING_PRICE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1027,
  p_item_plug_id => 15243225601197264+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Selling Price',
  p_source=>'SELLING_PRICE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>15246020972197269 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 19,
  p_name=>'P19_VALID_TO',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1040,
  p_item_plug_id => 15243225601197264+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Valid To',
  p_source=>'VALID_TO',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'PICK_DATE_DD_MM_YYYY',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 15,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>15246209154197269 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 19,
  p_name=>'P19_ENTY_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1031,
  p_item_plug_id => 15243225601197264+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Enquiry Type',
  p_source=>'ENTY_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'ENQUIRYTYPES',
  p_lov => 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from ENQUIRY_TYPES'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please Select a Value-',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 3,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P19_REQUIRED_COST_TYPE',
  p_display_when2=>'LACO',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>15246405644197269 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 19,
  p_name=>'P19_MESC_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1032,
  p_item_plug_id => 15243225601197264+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Meter Size Range',
  p_source=>'MESC_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'METERSIZECODES',
  p_lov => 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from METER_SIZE_CODES'||chr(10)||
'',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not Applicable',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P19_REQUIRED_COST_TYPE',
  p_display_when2=>'LACO',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>15246614096197269 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 19,
  p_name=>'P19_SVCPT_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1034,
  p_item_plug_id => 15243225601197264+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Service Pressure Range',
  p_source=>'SVCPT_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'SERVICEPRESSURETYPES',
  p_lov => 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from SERVICE_PRESSURE_TYPES'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not Applicable',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P19_REQUIRED_COST_TYPE',
  p_display_when2=>'LACO',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>15306204993505336 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 19,
  p_name=>'P19_COST_TYPE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1050,
  p_item_plug_id => 15243225601197264+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default => '&P18_REQUIRED_COST_TYPE.',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source=>'COST_TYPE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>15471112873944481 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 19,
  p_name=>'P19_HOU_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1035,
  p_item_plug_id => 15243225601197264+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Housing Name',
  p_source=>'HOU_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'HOUSINGS',
  p_lov => 'select code as display_value, code as return_value'||chr(10)||
'from housings'||chr(10)||
'order by code',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please Select a Value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P19_REQUIRED_COST_TYPE',
  p_display_when2=>'HOCO',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>15484430759015848 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 19,
  p_name=>'P19_COSTS_TITLE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1025,
  p_item_plug_id => 15243225601197264+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_protection_level => 'S',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>15485008380018887 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 19,
  p_name=>'P19_REQUIRED_COST_TYPE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1060,
  p_item_plug_id => 15243225601197264+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 1,
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>16280124321493478 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 19,
  p_name=>'P19_BAS_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1036,
  p_item_plug_id => 15243225601197264+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Base Name',
  p_source=>'BAS_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'BASES',
  p_lov => 'select code as display_value, code as return_value'||chr(10)||
'from bases'||chr(10)||
'order by code',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please Select a Value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P19_REQUIRED_COST_TYPE',
  p_display_when2=>'BACO',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>16296514549585269 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 19,
  p_name=>'P19_ADIT_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1037,
  p_item_plug_id => 15243225601197264+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Additional Item',
  p_source=>'ADIT_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'ADDITIONALITEMS',
  p_lov => 'select description d, code r'||chr(10)||
'from  additional_items'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please Select a Value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P19_REQUIRED_COST_TYPE',
  p_display_when2=>'AICO',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18434325650862609 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 19,
  p_name=>'P19_MODU_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1038,
  p_item_plug_id => 15243225601197264+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Module Name',
  p_source=>'MODU_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'MODULES',
  p_lov => 'select code display_value, code return_value '||chr(10)||
'from modules'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please Select a Value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P19_REQUIRED_COST_TYPE',
  p_display_when2=>'MOCO',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>39724531496558605 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 19,
  p_name=>'P19_DELIVERY_COST',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1029,
  p_item_plug_id => 15243225601197264+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Delivery Price',
  p_source=>'DELIVERY_COST',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>43722932628273750 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 19,
  p_name=>'P19_METY_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1033,
  p_item_plug_id => 15243225601197264+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Meter Type',
  p_source=>'METY_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'METERTYPES',
  p_lov => 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from METER_TYPES'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please Select a Value-',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 3,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P19_REQUIRED_COST_TYPE',
  p_display_when2=>'LACO',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 15245309681197267 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_validation_name => 'P19_VALID_FROM not null',
  p_validation_sequence=> 40,
  p_validation => 'P19_VALID_FROM',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Valid From must have some value.',
  p_associated_item=> 15245028377197267 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 15245923245197269 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_validation_name => 'P19_SELLING_PRICE not null',
  p_validation_sequence=> 70,
  p_validation => 'P19_SELLING_PRICE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Selling Price must have some value.',
  p_associated_item=> 15245615928197267 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39723225478547414 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_validation_name => 'P19_COST_PRICE',
  p_validation_sequence=> 90,
  p_validation => 'P19_COST_PRICE',
  p_validation2 => '^[[:digit:]]{0,36}(\.[[:digit:]]{0,2}|)$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Cost Price must be a monetary value, without a currency symbol and less than three decimal places.',
  p_associated_item=> 15244806184197267 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 42046213364464547 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_validation_name => 'P19_DELIVERY_COST',
  p_validation_sequence=> 100,
  p_validation => 'P19_DELIVERY_COST',
  p_validation2 => '^[[:digit:]]{0,36}(\.[[:digit:]]{0,2}|)$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Delivery Cost must be a monetary value, without a currency symbol and less than three decimal places.',
  p_associated_item=> 39724531496558605 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39855411316196238 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_validation_name => 'P19_SELLING_PRICE',
  p_validation_sequence=> 105,
  p_validation => 'P19_SELLING_PRICE',
  p_validation2 => '^[[:digit:]]{0,36}(\.[[:digit:]]{0,2}|)$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Selling Price must be a monetary value, without currency symbol and less than three decimal places',
  p_associated_item=> 15245615928197267 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39731917952602003 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_validation_name => 'P19_ENTY_CODE',
  p_validation_sequence=> 110,
  p_validation => 'P19_ENTY_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Enquiry Type must not be selected',
  p_validation_condition=> ':P19_COST_TYPE <> ''LACO'' AND :P19_ENTY_CODE IS NOT NULL',
  p_validation_condition_type=> 'PLSQL_EXPRESSION',
  p_associated_item=> 15246209154197269 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39733317737611442 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_validation_name => 'P19_VALID_FROM',
  p_validation_sequence=> 120,
  p_validation => 'P19_VALID_FROM',
  p_validation_type => 'ITEM_IS_DATE',
  p_error_message => 'Valid From must be a date value',
  p_associated_item=> 15245028377197267 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39734329858614964 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_validation_name => 'P19_VALID_TO',
  p_validation_sequence=> 130,
  p_validation => 'P19_VALID_TO',
  p_validation_type => 'ITEM_IS_DATE',
  p_error_message => 'Valid To must be a date value',
  p_associated_item=> 15246020972197269 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39738418439687338 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_validation_name => 'VALID_FROM_LTE_VALID_TO',
  p_validation_sequence=> 140,
  p_validation => 'BEGIN'||chr(10)||
'IF :P19_VALID_FROM is NULL and :P19_VALID_TO is not NULL then'||chr(10)||
' RETURN ''Cannot enter Valid To without Valid From'';'||chr(10)||
'ELSIF :P19_VALID_FROM IS NOT NULL AND :P19_VALID_TO IS NOT NULL THEN'||chr(10)||
'  IF to_date(:P19_VALID_FROM,''DD/MM/YYYY'') > to_date(:P19_VALID_TO,''DD/MM/YYYY'') THEN'||chr(10)||
'    RETURN ''Valid From must be before Valid To'';'||chr(10)||
'  END IF;'||chr(10)||
'END IF;'||chr(10)||
'RETURN NULL;'||chr(10)||
'END;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_associated_item=> 15245028377197267 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39739401947692063 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_validation_name => 'VALID_TO_GTE_VALID_FROM',
  p_validation_sequence=> 150,
  p_validation => 'BEGIN'||chr(10)||
'IF :P19_VALID_FROM is NULL and :P19_VALID_TO is not NULL then'||chr(10)||
' RETURN ''Cannot enter Valid To without Valid From'';'||chr(10)||
'ELSIF :P19_VALID_FROM IS NOT NULL AND :P19_VALID_TO IS NOT NULL THEN'||chr(10)||
'  IF to_date(:P19_VALID_FROM,''DD/MM/YYYY'') > to_date(:P19_VALID_TO,''DD/MM/YYYY'') THEN'||chr(10)||
'    RETURN ''Valid To must after Valid From'';'||chr(10)||
'  END IF;'||chr(10)||
'END IF;'||chr(10)||
'RETURN NULL;'||chr(10)||
'END;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_associated_item=> 15246020972197269 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 3323329640076829 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_validation_name => 'Base code must not be null',
  p_validation_sequence=> 160,
  p_validation => 'if :P19_COST_TYPE = ''BACO'' and :P19_BAS_CODE is null then'||chr(10)||
'  return ''Base Name must have some value.'';'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_associated_item=> 16280124321493478 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 3323410724080776 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_validation_name => 'Housing code must not be null',
  p_validation_sequence=> 170,
  p_validation => 'if :P19_COST_TYPE = ''HOCO'' and :P19_HOU_CODE is null then'||chr(10)||
'  return ''Housing Name must have some value.'';'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_associated_item=> 15471112873944481 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 3323725269085031 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_validation_name => 'Module code must not be null',
  p_validation_sequence=> 180,
  p_validation => 'if :P19_COST_TYPE = ''MOCO'' and :P19_MODU_CODE is null then'||chr(10)||
'  return ''Module Name must have some value.'';'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_associated_item=> 18434325650862609 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 3324014664091396 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_validation_name => 'Meter size range must not be null',
  p_validation_sequence=> 190,
  p_validation => 'if :P19_COST_TYPE = ''LACO'' and :P19_MESC_CODE is null then'||chr(10)||
'  return ''Meter size range must have some value.'';'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_associated_item=> 15246405644197269 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 3324328863095454 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_validation_name => 'Additional item must not be null',
  p_validation_sequence=> 200,
  p_validation => 'if :P19_COST_TYPE = ''AICO'' and :P19_ADIT_CODE is null then'||chr(10)||
'  return ''Additional Item must have some value.'';'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_associated_item=> 16296514549585269 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 6571427905689231 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_validation_name => 'Meter type must not be null',
  p_validation_sequence=> 210,
  p_validation => 'if :P19_COST_TYPE = ''LACO'' and :P19_METY_CODE is null then'||chr(10)||
'  return ''Meter type must have some value.'';'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_associated_item=> 43722932628273750 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'F|#OWNER#:COSTS:P19_ID:ID';

wwv_flow_api.create_page_process(
  p_id     => 15246907960197269 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'DML_FETCH_ROW',
  p_process_name=> 'Fetch Row from COSTS',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to fetch row.',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare '||chr(10)||
'  function get_pk return varchar2 '||chr(10)||
'  is '||chr(10)||
'  begin '||chr(10)||
'    for c1 in (select COST_SEQ.nextval next_val'||chr(10)||
'               from dual)'||chr(10)||
'    loop'||chr(10)||
'        return c1.next_val;'||chr(10)||
'    end loop;'||chr(10)||
'  end; '||chr(10)||
'begin '||chr(10)||
'  :P19_ID := get_pk; '||chr(10)||
'end; ';

wwv_flow_api.create_page_process(
  p_id     => 15247119138197269 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Get PK',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to get primary key item value.',
  p_process_when_button_id=>15243408038197264 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'#OWNER#:COSTS:P19_ID:ID|IUD';

wwv_flow_api.create_page_process(
  p_id     => 15247328281197269 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_process_sequence=> 30,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'DML_PROCESS_ROW',
  p_process_name=> 'Process Row of COSTS',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to process row of table COSTS.',
  p_process_success_message=> 'Action Processed.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'19';

wwv_flow_api.create_page_process(
  p_id     => 15247504405197269 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_process_sequence=> 40,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_PAGES',
  p_process_name=> 'reset page',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>15243612979197264 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'18';

wwv_flow_api.create_page_process(
  p_id     => 43167513920092008 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_process_sequence=> 50,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'INITIALIZE_PAGE_PAGINATION',
  p_process_name=> 'Reset Pagination',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>15243612979197264 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'IF :P19_REQUIRED_COST_TYPE = ''LACO'' THEN'||chr(10)||
' :P19_COSTS_TITLE := ''Labour Costs'';'||chr(10)||
'ELSIF :P19_REQUIRED_COST_TYPE = ''AICO'' THEN'||chr(10)||
' :P19_COSTS_TITLE := ''Additional Item Costs'';'||chr(10)||
'ELSIF :P19_REQUIRED_COST_TYPE = ''MOCO'' THEN'||chr(10)||
' :P19_COSTS_TITLE := ''Module Materials Costs'';'||chr(10)||
'ELSIF :P19_REQUIRED_COST_TYPE = ''BACO'' THEN'||chr(10)||
' :P19_COSTS_TITLE := ''Base Costs'';'||chr(10)||
'ELSIF :P19_REQUIRED_COST_TYPE = ''HOCO'' THEN'||chr(10)||
' :P19_COS';

p:=p||'TS_TITLE := ''Housing Costs'';'||chr(10)||
'ELSE'||chr(10)||
' :P19_COSTS_TITLE := ''UNKNOWN:''||:P19_REQUIRED_COST_TYPE;'||chr(10)||
'END IF;';

wwv_flow_api.create_page_process(
  p_id     => 15486101931026470 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_process_sequence=> 50,
  p_process_point=> 'BEFORE_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'SetRegionTitle',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 19
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00023
prompt  ...PAGE 23: Additional Items
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph := null;
wwv_flow_api.create_page(
  p_id     => 23,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Additional Items',
  p_step_title=> 'Additional Items',
  p_step_sub_title => 'Additional Items',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'AUTO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => ' ',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'DHARSHANIK',
  p_last_upd_yyyymmddhh24miss => '20080305144849',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>23,p_text=>h);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select "CODE", '||chr(10)||
'"DESCRIPTION",'||chr(10)||
'"LEAD_TIME"'||chr(10)||
'from "#OWNER#"."ADDITIONAL_ITEMS" '||chr(10)||
'  '||chr(10)||
'';

wwv_flow_api.create_report_region (
  p_id=> 36075426620068192 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 23,
  p_name=> 'Additional Items',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 10,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_query_row_template=> 28041136573354435+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'no data found',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_query_row_count_max=> '500',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 36075606722068200 + wwv_flow_api.g_id_offset,
  p_region_id=> 36075426620068192 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'CODE',
  p_column_display_sequence=> 1,
  p_column_heading=> 'Code',
  p_column_link=>'f?p=&APP_ID.:24:&SESSION.::&DEBUG.::P24_CODE,P24_CREATEUPDATE:#CODE#,UPDATE',
  p_column_linktext=>'#CODE#',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'ADDITIONAL_ITEMS',
  p_ref_column_name=> 'CODE',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 36075717724068200 + wwv_flow_api.g_id_offset,
  p_region_id=> 36075426620068192 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'DESCRIPTION',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Description',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'ADDITIONAL_ITEMS',
  p_ref_column_name=> 'DESCRIPTION',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 36075816088068200 + wwv_flow_api.g_id_offset,
  p_region_id=> 36075426620068192 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'LEAD_TIME',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Lead Time',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'ADDITIONAL_ITEMS',
  p_ref_column_name=> 'LEAD_TIME',
  p_column_comment=>'');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 36075929948068202 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 23,
  p_button_sequence=> 30,
  p_button_plug_id => 36075426620068192+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image_alt=> 'Create',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:24:&SESSION.::&DEBUG.:24::',
  p_button_cattributes=>'id="create"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 23
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00024
prompt  ...PAGE 24: Create/Edit Additional Item
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph:=ph||'<script language="JavaScript" type="text/javascript">'||chr(10)||
'<!--'||chr(10)||
''||chr(10)||
' htmldb_delete_message=''"DELETE_CONFIRM_MSG"'';'||chr(10)||
''||chr(10)||
'//-->'||chr(10)||
'</script>';

wwv_flow_api.create_page(
  p_id     => 24,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Create/Edit Additional Item',
  p_step_title=> 'Create/Edit Additional Item',
  p_step_sub_title => 'Create/Edit Additional Item',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'AUTO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => ' ',
  p_html_page_header => ' ',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'HARDYA',
  p_last_upd_yyyymmddhh24miss => '20080222143233',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>24,p_text=>h);
wwv_flow_api.set_html_page_header(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>24,p_text=>ph);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 36171622104352250 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 24,
  p_plug_name=> 'Create/Edit Additional Item',
  p_region_name=>'',
  p_plug_template=> 28035733013354425+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 36171819184352253 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 24,
  p_button_sequence=> 10,
  p_button_plug_id => 36171622104352250+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:23:&SESSION.::&DEBUG.:::',
  p_button_cattributes=>'id="cancel"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 36172019689352255 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 24,
  p_button_sequence=> 20,
  p_button_plug_id => 36171622104352250+wwv_flow_api.g_id_offset,
  p_button_name    => 'DELETE',
  p_button_image_alt=> 'Delete',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'javascript:confirmDelete(htmldb_delete_message,''DELETE'');',
  p_button_condition=> 'P24_CREATEUPDATE',
  p_button_condition2=> 'UPDATE',
  p_button_condition_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_button_cattributes=>'id="delete"',
  p_database_action=>'DELETE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 36172231244352255 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 24,
  p_button_sequence=> 30,
  p_button_plug_id => 36171622104352250+wwv_flow_api.g_id_offset,
  p_button_name    => 'SAVE',
  p_button_image_alt=> 'Apply Changes',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P24_CREATEUPDATE',
  p_button_condition2=> 'UPDATE',
  p_button_condition_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_button_cattributes=>'id="apply_changes"',
  p_database_action=>'UPDATE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 36172411656352255 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 24,
  p_button_sequence=> 40,
  p_button_plug_id => 36171622104352250+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image_alt=> 'Create',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P24_CREATEUPDATE',
  p_button_condition2=> 'CREATE',
  p_button_condition_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_button_cattributes=>'id="create"',
  p_database_action=>'INSERT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>36173906745352270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 24,
  p_branch_action=> 'f?p=&APP_ID.:23:&SESSION.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 1,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>36172620452352256 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 24,
  p_name=>'P24_DESCRIPTION',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 36171622104352250+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Description',
  p_source=>'DESCRIPTION',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 240,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>36172819156352259 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 24,
  p_name=>'P24_LEAD_TIME',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 30,
  p_item_plug_id => 36171622104352250+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Lead Time',
  p_source=>'LEAD_TIME',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 240,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>36173015607352259 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 24,
  p_name=>'P24_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1,
  p_item_plug_id => 36171622104352250+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Code',
  p_source=>'CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'P24_CREATEUPDATE',
  p_read_only_when2=>'UPDATE',
  p_read_only_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>41736007489206898 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 24,
  p_name=>'P24_CREATEUPDATE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 40,
  p_item_plug_id => 36171622104352250+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default => 'CREATE',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39571107431571991 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 24,
  p_validation_name => 'P24_LEAD_TIME',
  p_validation_sequence=> 10,
  p_validation => 'P24_LEAD_TIME',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Lead Time must be a numeric value',
  p_associated_item=> 36172819156352259 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'F|#OWNER#:ADDITIONAL_ITEMS:P24_CODE:CODE';

wwv_flow_api.create_page_process(
  p_id     => 36173217758352261 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 24,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'DML_FETCH_ROW',
  p_process_name=> 'Fetch Row from ADDITIONAL_ITEMS',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to fetch row.',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'#OWNER#:ADDITIONAL_ITEMS:P24_CODE:CODE|IUD';

wwv_flow_api.create_page_process(
  p_id     => 36173425215352263 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 24,
  p_process_sequence=> 30,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'DML_PROCESS_ROW',
  p_process_name=> 'Process Row of ADDITIONAL_ITEMS',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to process row of table ADDITIONAL_ITEMS.',
  p_process_success_message=> 'Action Processed.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'7';

wwv_flow_api.create_page_process(
  p_id     => 36173623126352263 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 24,
  p_process_sequence=> 40,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_PAGES',
  p_process_name=> 'reset page',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>36172019689352255 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||':p24_code := upper(:p24_code);';

wwv_flow_api.create_page_process(
  p_id     => 41789230270308148 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 24,
  p_process_sequence=> 50,
  p_process_point=> 'ON_SUBMIT_BEFORE_COMPUTATION',
  p_process_type=> 'PLSQL',
  p_process_name=> 'SetCase',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 24
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00030
prompt  ...PAGE 30: Search Enquiries
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 30,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Search Enquiries',
  p_step_title=> 'Search Enquiries',
  p_step_sub_title => 'Search Enquiries',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 28665606438479059+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  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 => '20080317171622',
  p_page_is_public_y_n=> 'N',
  p_protection_level=> 'C',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 15912328383649956 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 30,
  p_plug_name=> 'Search Enquiry',
  p_region_name=>'',
  p_plug_template=> 28034529370354425+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 1,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'REGION_POSITION_01',
  p_plug_source=> s,
  p_plug_source_type=> 'M'|| to_char(11415104405355842 + wwv_flow_api.g_id_offset),
  p_menu_template_id=> 28047751118354455+ wwv_flow_api.g_id_offset,
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'SELECT DISTINCT enquiries.id "Enquiry ID"'||chr(10)||
'                ,enquiries.mprn "MPRN"'||chr(10)||
'                ,enquiries.transaction_reference "Transaction Reference"'||chr(10)||
'                ,enquiries.install_postcode "Postcode"'||chr(10)||
'                ,''View'' AS "Details"'||chr(10)||
'                ,''Copy'' AS "Copy"'||chr(10)||
'                ,(SELECT ''View quotes'''||chr(10)||
'                   FROM dual'||chr(10)||
'                  WHERE EXISTS (SELECT 1'||chr(10)||
'  ';

s:=s||'                         FROM quotes q'||chr(10)||
'                          WHERE q.enqu_id = enquiries.id)) AS "View Quotes"'||chr(10)||
'  FROM (SELECT enq.id'||chr(10)||
'              ,enq.mprn'||chr(10)||
'              ,enq.transaction_reference'||chr(10)||
'              ,enq.install_postcode'||chr(10)||
'          FROM enquiries enq'||chr(10)||
'         WHERE (enq.id LIKE :p30_enquiry_id OR'||chr(10)||
'               (REPLACE(:p30_enquiry_id'||chr(10)||
'                        ,''_%'''||chr(10)||
'      ';

s:=s||'                  ,'''') IS NULL))'||chr(10)||
'           AND (enq.mprn LIKE :p30_mprn OR'||chr(10)||
'               (REPLACE(:p30_mprn'||chr(10)||
'                        ,''_%'''||chr(10)||
'                        ,'''') IS NULL))'||chr(10)||
'           AND (upper(enq.transaction_reference) LIKE upper(:p30_trans_ref) OR'||chr(10)||
'               (REPLACE(:p30_trans_ref'||chr(10)||
'                        ,''_%'''||chr(10)||
'                        ,'''') IS NULL))'||chr(10)||
'           AND (upper(REP';

s:=s||'LACE(enq.install_postcode'||chr(10)||
'                             ,'' '''||chr(10)||
'                             ,'''')) LIKE'||chr(10)||
'               upper(REPLACE(:p30_postcode'||chr(10)||
'                             ,'' '''||chr(10)||
'                             ,'''')) OR'||chr(10)||
'               (REPLACE(:p30_postcode'||chr(10)||
'                        ,''_%'''||chr(10)||
'                        ,'''') IS NULL))) enquiries'||chr(10)||
'';

wwv_flow_api.create_report_region (
  p_id=> 15912526122649965 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 30,
  p_name=> 'All Enquiries',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 21,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_display_when_condition=> 'if upper(mip_parties.get_user_role(:APP_USER)) in (''ICU'',''MIPADMIN'',''CS'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_condition_type=> 'FUNCTION_BODY',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 28041136573354435+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_show_nulls_as=> ' - ',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'No enquiries matching the search criteria found.',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_query_row_count_max=> '8000',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_prn_output=> 'N',
  p_prn_format=> 'PDF',
  p_prn_output_show_link=> 'Y',
  p_prn_output_link_text=> 'Print',
  p_prn_units=> 'MILLIMETERS',
  p_prn_paper_size=> 'A4',
  p_prn_width=> 297,
  p_prn_height=> 210,
  p_prn_orientation=> 'HORIZONTAL',
  p_prn_page_header_font_color=> '#000000',
  p_prn_page_header_font_family=> 'Helvetica',
  p_prn_page_header_font_weight=> 'normal',
  p_prn_page_header_font_size=> '12',
  p_prn_page_footer_font_color=> '#000000',
  p_prn_page_footer_font_family=> 'Helvetica',
  p_prn_page_footer_font_weight=> 'normal',
  p_prn_page_footer_font_size=> '12',
  p_prn_header_bg_color=> '#9bafde',
  p_prn_header_font_color=> '#ffffff',
  p_prn_header_font_family=> 'Helvetica',
  p_prn_header_font_weight=> 'normal',
  p_prn_header_font_size=> '10',
  p_prn_body_bg_color=> '#efefef',
  p_prn_body_font_color=> '#000000',
  p_prn_body_font_family=> 'Helvetica',
  p_prn_body_font_weight=> 'normal',
  p_prn_body_font_size=> '10',
  p_prn_border_width=> .5,
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26338419783971220 + wwv_flow_api.g_id_offset,
  p_region_id=> 15912526122649965 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'Enquiry ID',
  p_column_display_sequence=> 1,
  p_column_heading=> 'Enquiry ID',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26338511964971220 + wwv_flow_api.g_id_offset,
  p_region_id=> 15912526122649965 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'MPRN',
  p_column_display_sequence=> 2,
  p_column_heading=> 'MPRN',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26338609400971220 + wwv_flow_api.g_id_offset,
  p_region_id=> 15912526122649965 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'Transaction Reference',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Transaction Reference',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26338728298971220 + wwv_flow_api.g_id_offset,
  p_region_id=> 15912526122649965 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'Postcode',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Postcode',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 28338910793150950 + wwv_flow_api.g_id_offset,
  p_region_id=> 15912526122649965 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'Details',
  p_column_display_sequence=> 5,
  p_column_heading=> '',
  p_column_link=>'f?p=&APP_ID.:32:&SESSION.::&DEBUG.::P32_ID:#Enquiry ID#',
  p_column_linktext=>'#Details#',
  p_column_link_attr=>'name="View_enquiry_#Enquiry ID#"',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 28333423036088253 + wwv_flow_api.g_id_offset,
  p_region_id=> 15912526122649965 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 6,
  p_form_element_id=> null,
  p_column_alias=> 'Copy',
  p_column_display_sequence=> 6,
  p_column_heading=> '',
  p_column_link=>'f?p=&APP_ID.:31:&SESSION.::&DEBUG.:31:P31_ENQUIRY_ID:#Enquiry ID#',
  p_column_linktext=>'#Copy#',
  p_column_link_attr=>'name="Copy_#Enquiry ID#"',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'FUNCTION_BODY',
  p_display_when_condition=> 'if upper(mip_parties.get_user_role(:APP_USER)) in (''ICU'',''MIPADMIN'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 27167631542235845 + wwv_flow_api.g_id_offset,
  p_region_id=> 15912526122649965 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 7,
  p_form_element_id=> null,
  p_column_alias=> 'View Quotes',
  p_column_display_sequence=> 7,
  p_column_heading=> '',
  p_column_link=>'f?p=&APP_ID.:80:&SESSION.::&DEBUG.::P80_ENQU_ID:#Enquiry ID#',
  p_column_linktext=>'#View Quotes#',
  p_column_link_attr=>'name="View_quote_#Enquiry ID#"',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'Search for the enquiry.';

wwv_flow_api.create_page_plug (
  p_id=> 15913329967649969 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 30,
  p_plug_name=> 'Search Enquiries',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 11,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'BEFORE_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_footer=> 'When searching for enquiries, wildcard characters (''%'' and ''_''), may be used in any of the fields above.',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'SELECT DISTINCT enquiries.id "Enquiry ID"'||chr(10)||
'                ,enquiries.mprn "MPRN"'||chr(10)||
'                ,enquiries.transaction_reference "Transaction Reference"'||chr(10)||
'                ,enquiries.install_postcode "Postcode"'||chr(10)||
'                ,''View'' "Details"'||chr(10)||
'                ,''Copy'' "Copy"'||chr(10)||
'                ,(SELECT ''View quotes'''||chr(10)||
'                   FROM dual'||chr(10)||
'                  WHERE EXISTS (SELECT 1'||chr(10)||
'        ';

s:=s||'                   FROM quotes q'||chr(10)||
'                          WHERE q.enqu_id = enquiries.id)) AS "View Quotes"'||chr(10)||
'  FROM (SELECT enq.id'||chr(10)||
'              ,enq.mprn'||chr(10)||
'              ,enq.transaction_reference'||chr(10)||
'              ,enq.install_postcode'||chr(10)||
'          FROM enquiries enq'||chr(10)||
'         WHERE (enq.id LIKE :p30_enquiry_id OR'||chr(10)||
'               (REPLACE(:p30_enquiry_id'||chr(10)||
'                        ,''_%'''||chr(10)||
'            ';

s:=s||'            ,'''') IS NULL))'||chr(10)||
'           AND (enq.mprn LIKE :p30_mprn OR'||chr(10)||
'               (REPLACE(:p30_mprn'||chr(10)||
'                        ,''_%'''||chr(10)||
'                        ,'''') IS NULL))'||chr(10)||
'           AND (upper(enq.transaction_reference) LIKE upper(:p30_trans_ref) OR'||chr(10)||
'               (REPLACE(:p30_trans_ref'||chr(10)||
'                        ,''_%'''||chr(10)||
'                        ,'''') IS NULL))'||chr(10)||
'           AND (upper(REPLACE(e';

s:=s||'nq.install_postcode'||chr(10)||
'                             ,'' '''||chr(10)||
'                             ,'''')) LIKE'||chr(10)||
'               upper(REPLACE(:p30_postcode'||chr(10)||
'                             ,'' '''||chr(10)||
'                             ,'''')) OR'||chr(10)||
'               (REPLACE(:p30_postcode'||chr(10)||
'                        ,''_%'''||chr(10)||
'                        ,'''') IS NULL))) enquiries'||chr(10)||
'      ,enquiry_roles er'||chr(10)||
'      ,parties p'||chr(10)||
' WHERE enquiries.id I';

s:=s||'N'||chr(10)||
'       (SELECT veps.enqu_id'||chr(10)||
'          FROM v_enquiry_prty_supp veps'||chr(10)||
'              ,v_enquiry_prty_supp veps2'||chr(10)||
'         WHERE mip_parties.get_user_id(:app_user) = veps2.prty_id'||chr(10)||
'           AND veps.supp_prty_id = veps2.supp_prty_id)'||chr(10)||
'   AND er.prty_id = p.id'||chr(10)||
'   AND er.enqu_id = enquiries.id'||chr(10)||
'   AND er.rt_code IN (''ENQ OWN'')'||chr(10)||
'';

wwv_flow_api.create_report_region (
  p_id=> 26337132465965452 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 30,
  p_name=> 'Supplier Enquiries',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 31,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_display_when_condition=> 'return mip_parties.check_user_role(:APP_USER, ''AGENT'');',
  p_display_condition_type=> 'FUNCTION_BODY',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 28041136573354435+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_show_nulls_as=> ' - ',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'no data found',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_query_row_count_max=> '8000',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26337424472965475 + wwv_flow_api.g_id_offset,
  p_region_id=> 26337132465965452 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'Enquiry ID',
  p_column_display_sequence=> 1,
  p_column_heading=> 'Enquiry ID',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26337502584965475 + wwv_flow_api.g_id_offset,
  p_region_id=> 26337132465965452 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'MPRN',
  p_column_display_sequence=> 2,
  p_column_heading=> 'MPRN',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26337612196965475 + wwv_flow_api.g_id_offset,
  p_region_id=> 26337132465965452 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'Transaction Reference',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Transaction Reference',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26337729636965475 + wwv_flow_api.g_id_offset,
  p_region_id=> 26337132465965452 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'Postcode',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Postcode',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 27180500468283645 + wwv_flow_api.g_id_offset,
  p_region_id=> 26337132465965452 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'Details',
  p_column_display_sequence=> 5,
  p_column_heading=> '',
  p_column_link=>'f?p=&APP_ID.:32:&SESSION.::&DEBUG.::P32_ID:#Enquiry ID#',
  p_column_linktext=>'#Details#',
  p_column_link_attr=>'name="View_enquiry_#Enquiry ID#"',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26337927968965475 + wwv_flow_api.g_id_offset,
  p_region_id=> 26337132465965452 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 6,
  p_form_element_id=> null,
  p_column_alias=> 'Copy',
  p_column_display_sequence=> 6,
  p_column_heading=> '',
  p_column_link=>'f?p=&APP_ID.:31:&SESSION.::&DEBUG.:31:P31_ENQUIRY_ID:#Enquiry ID#',
  p_column_linktext=>'#Copy#',
  p_column_link_attr=>'name="Copy_#Enquiry ID#"',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 27169227864244255 + wwv_flow_api.g_id_offset,
  p_region_id=> 26337132465965452 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 7,
  p_form_element_id=> null,
  p_column_alias=> 'View Quotes',
  p_column_display_sequence=> 7,
  p_column_heading=> '',
  p_column_link=>'f?p=&APP_ID.:80:&SESSION.::&DEBUG.::P80_ENQU_ID:#Enquiry ID#',
  p_column_linktext=>'#View Quotes#',
  p_column_link_attr=>'name="View_quotes_#Enquiry ID#"',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_column_comment=>'');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 15913501633649970 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 30,
  p_button_sequence=> 10,
  p_button_plug_id => 15913329967649969+wwv_flow_api.g_id_offset,
  p_button_name    => 'SEARCH',
  p_button_image_alt=> 'Search',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_cattributes=>'name="Search"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 15975820835978731 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 30,
  p_button_sequence=> 20,
  p_button_plug_id => 15913329967649969+wwv_flow_api.g_id_offset,
  p_button_name    => 'NEW',
  p_button_image_alt=> 'New',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:32:&SESSION.::&DEBUG.:32::',
  p_button_condition=> 'if mip_parties.get_user_role(:APP_USER) in (''AGENT'', ''MIPADMIN'', ''ICU'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_button_condition_type=> 'FUNCTION_BODY',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>15915829317650008 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 30,
  p_branch_action=> 'f?p=&APP_ID.:30:&SESSION.::&DEBUG.::F155_PREVIOUS_PAGE:30&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 20,
  p_branch_comment=> 'Created 20-NOV-2007 14:56 by MULLENM');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'The ID of the enquiry to search for.';

wwv_flow_api.create_page_item(
  p_id=>15913714619649975 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 30,
  p_name=>'P30_ENQUIRY_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 15913329967649969+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Enquiry ID',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT_WITH_ENTER_SUBMIT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'S',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'The Meter Point Reference Number (MPRN) for the enquiry to search for.';

wwv_flow_api.create_page_item(
  p_id=>15914228435649992 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 30,
  p_name=>'P30_MPRN',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 15913329967649969+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'MPRN',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT_WITH_ENTER_SUBMIT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'S',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'The transaction reference of the enquiry to search for.';

wwv_flow_api.create_page_item(
  p_id=>15914712709649994 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 30,
  p_name=>'P30_TRANS_REF',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 30,
  p_item_plug_id => 15913329967649969+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Transaction Reference',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT_WITH_ENTER_SUBMIT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'S',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'The postcode of the enquiry to search for.';

wwv_flow_api.create_page_item(
  p_id=>15915219673649994 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 30,
  p_name=>'P30_POSTCODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 40,
  p_item_plug_id => 15913329967649969+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Postcode',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT_WITH_ENTER_SUBMIT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'S',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'reset_pagination';

wwv_flow_api.create_page_process(
  p_id     => 44998830930744577 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 30,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'RESET_PAGINATION',
  p_process_name=> 'Reset Pagination',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>15913501633649970 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 30
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00031
prompt  ...PAGE 31: Copy Enquiry
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 31,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Copy Enquiry',
  p_step_title=> 'Copy Enquiry',
  p_step_sub_title => 'Copy Enquiry',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 28665606438479059+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  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 => '20080310155952',
  p_page_is_public_y_n=> 'N',
  p_protection_level=> 'C',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 15920725834653559 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 31,
  p_plug_name=> 'Copy Enquiry',
  p_region_name=>'',
  p_plug_template=> 28034529370354425+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 1,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'REGION_POSITION_01',
  p_plug_source=> s,
  p_plug_source_type=> 'M'|| to_char(11415104405355842 + wwv_flow_api.g_id_offset),
  p_menu_template_id=> 28047751118354455+ wwv_flow_api.g_id_offset,
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 15920930466653559 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 31,
  p_plug_name=> 'Additional Info',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 11,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 15921311862653561 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 31,
  p_button_sequence=> 5,
  p_button_plug_id => 15920930466653559+wwv_flow_api.g_id_offset,
  p_button_name    => 'COPY',
  p_button_image_alt=> 'Copy',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'if not mip_parties.get_user_role(p_username => :APP_USER) in (''AGENT'',''ICU'',''MIPADMIN'') then'||chr(10)||
'  return false;'||chr(10)||
'else return true;'||chr(10)||
'end if;',
  p_button_condition_type=> 'FUNCTION_BODY',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 15921120138653561 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 31,
  p_button_sequence=> 10,
  p_button_plug_id => 15920930466653559+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:30:&SESSION.::&DEBUG.:::',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>15923005297653567 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 31,
  p_branch_action=> 'f?p=&APP_ID.:30:&SESSION.::&DEBUG.:::&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>15921311862653561+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 10,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>36909132432614302 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 31,
  p_branch_action=> 'f?p=&APP_ID.:31:&SESSION.::&DEBUG.:::',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 20,
  p_branch_comment=> 'Created 14-FEB-2008 18:29 by MULLENM');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>2862704982595445 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 31,
  p_name=>'P31_URL',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 60,
  p_item_plug_id => 15920930466653559+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Url',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>15921514639653561 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 31,
  p_name=>'P31_SUPPLIER',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 15920930466653559+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Supplier',
  p_source=>'select prty.id'||chr(10)||
'from parties prty, enquiry_roles enro'||chr(10)||
'where enro.prty_id = prty.id'||chr(10)||
'and enro.rt_code like ''ENQ SUPP'''||chr(10)||
'and enro.enqu_id = :P31_ENQUIRY_ID',
  p_source_type=> 'QUERY',
  p_display_as=> 'COMBOBOX_WITH_SUBMIT',
  p_lov => 'select NAME display_value, ID return_value '||chr(10)||
'  from PARTIES '||chr(10)||
' where PRTY_TYPE=''MKTP'' '||chr(10)||
' order by 1 ',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'if not mip_parties.get_user_role(:APP_USER) in(''ICU'',''MIPADMIN'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'S',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>15921700531653562 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 31,
  p_name=>'P31_AGENT',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 15920930466653559+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Agent',
  p_source=>'select prty.id'||chr(10)||
'from parties prty'||chr(10)||
'where upper(prty.username) = upper(:APP_USER)',
  p_source_type=> 'QUERY',
  p_display_as=> 'COMBOBOX',
  p_lov => 'select FIRST_NAME || '' '' || LAST_NAME display_value, ID return_value'||chr(10)||
'  from PARTIES prty, PARTY_RELATIONSHIPS parl'||chr(10)||
' where prty.id = parl.from_parl_prty_id'||chr(10)||
'   and parl.FROM_PRTP_RT_CODE = ''AGENT'''||chr(10)||
'   and parl.TO_PRTP_RT_CODE = ''SUPP'''||chr(10)||
'   and parl.TO_PARL_PRTY_ID = :P31_SUPPLIER'||chr(10)||
' order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'if mip_parties.get_user_role(:APP_USER) = ''AGENT'' then'||chr(10)||
'  return true;'||chr(10)||
'else '||chr(10)||
'  return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>15921908639653562 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 31,
  p_name=>'P31_ENQUIRY_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 30,
  p_item_plug_id => 15920930466653559+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_protection_level => 'S',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>15922128718653562 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 31,
  p_name=>'P31_PREVIOUS_PAGE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 40,
  p_item_plug_id => 15920930466653559+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_protection_level => 'S',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>15922320015653562 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 31,
  p_name=>'P31_NEW_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 50,
  p_item_plug_id => 15920930466653559+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_protection_level => 'S',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39649531234189555 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 31,
  p_validation_name => 'P31_SUPPLIER not null',
  p_validation_sequence=> 5,
  p_validation => 'P31_SUPPLIER',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'A supplier must be specified before copying an enquiry.',
  p_when_button_pressed=> 15921311862653561 + wwv_flow_api.g_id_offset,
  p_associated_item=> 15921514639653561 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39648615651185008 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 31,
  p_validation_name => 'P31_AGENT not null',
  p_validation_sequence=> 10,
  p_validation => 'P31_AGENT',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'An agent must be specified before copying an enquiry.',
  p_when_button_pressed=> 15921311862653561 + wwv_flow_api.g_id_offset,
  p_associated_item=> 15921700531653562 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare'||chr(10)||
'  l_ret_str varchar2(250) := '''';'||chr(10)||
'  l_session number := v(''APP_SESSION'');'||chr(10)||
'  l_new_url varchar2(500) := '''';'||chr(10)||
'begin'||chr(10)||
'  l_ret_str :=mip_enquiry.copy_enquiry(p_enquiry_id => :P31_ENQUIRY_ID, p_enqu_owner => :P31_AGENT, p_enqu_supp =>:P31_SUPPLIER);'||chr(10)||
''||chr(10)||
'  :P31_NEW_ID := l_ret_str;'||chr(10)||
'  l_new_url := apex_util.prepare_url(''f?p=''||v(''APP_ID'')||'':32:''||v(''APP_SESSION'')||''::::P32_ID:''||l_ret_str);'||chr(10)||
' ';

p:=p||' :P31_URL := l_new_url;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 15922504978653562 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 31,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Copy_Enquiry',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>15921311862653561 + wwv_flow_api.g_id_offset,
  p_process_success_message=> 'Enquiry &P31_ENQUIRY_ID. copied successfully as &P31_NEW_ID.. Click <a href="&P31_URL.">here</a> to open',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'f?p=&APP_ID.:32:&SESSION.::::P32_ID:&P31_NEW_ID.'||chr(10)||
'apex_util.prepare_url(''f?p=''||v(''APP_ID'')||'':32:''||v(''APP_SESSION'')||''::::''||:P32_ID||'':''||l_ret_str);'||chr(10)||
'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 31
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00032
prompt  ...PAGE 32: Enquiry
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 32,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Enquiry',
  p_step_title=> 'Enquiry',
  p_step_sub_title => 'Enquiry',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 28665606438479059+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_role => 16097609166220701+ 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 => '20080408174357',
  p_page_is_public_y_n=> 'N',
  p_protection_level=> 'C',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'<script language="JavaScript1.1" type="text/javascript">'||chr(10)||
''||chr(10)||
' function get_AJAX_SELECT_XML(pSelectList,pSelect,pFirstKey,pSecondKey){ '||chr(10)||
'	var l_Return = null;'||chr(10)||
'	var l_Select = $x(pSelect);'||chr(10)||
'	var get = new htmldb_Get(null,$x(''pFlowId'').value,''APPLICATION_PROCESS=Select_XML'',0);'||chr(10)||
'	get.add(''SELECT_LIST_NAME'',pSelectList);'||chr(10)||
'	get.add(''SELECT_LIST_KEY1'',pFirstKey);'||chr(10)||
'	get.add(''SELECT_LIST_KEY2'',pSecondKey)';

s:=s||';'||chr(10)||
'	gReturn = get.get(''XML'');'||chr(10)||
'	if(gReturn && l_Select){'||chr(10)||
'		var l_Count = gReturn.getElementsByTagName("option").length;'||chr(10)||
'		l_Select.length = 0;'||chr(10)||
'		for(var i=0;i<l_Count;i++){'||chr(10)||
'			var l_Opt_Xml = gReturn.getElementsByTagName("option")[i];'||chr(10)||
'			appendToSelect(l_Select, l_Opt_Xml.getAttribute(''value''), l_Opt_Xml.firstChild.nodeValue)'||chr(10)||
'		}'||chr(10)||
'	}'||chr(10)||
'	get = null;'||chr(10)||
' }'||chr(10)||
' '||chr(10)||
' '||chr(10)||
' function appendToSelect(pSelect,';

s:=s||' pValue, pContent) {'||chr(10)||
'    var l_Opt = document.createElement("option");'||chr(10)||
'    l_Opt.value = pValue;'||chr(10)||
'	if(document.all){/* why is ie different ask bill */'||chr(10)||
'		pSelect.options.add(l_Opt);'||chr(10)||
'		l_Opt.innerText = pContent;'||chr(10)||
'	 }else{'||chr(10)||
'		l_Opt.appendChild(document.createTextNode(pContent));'||chr(10)||
'		pSelect.appendChild(l_Opt);'||chr(10)||
'	}'||chr(10)||
''||chr(10)||
'}'||chr(10)||
''||chr(10)||
''||chr(10)||
'</script>';

wwv_flow_api.create_page_plug (
  p_id=> 26597504596798255 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 32,
  p_plug_name=> 'Job Info',
  p_region_name=>'5',
  p_plug_template=> 28035733013354425+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 70,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 26597727520798255 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 32,
  p_plug_name=> 'Site Detail',
  p_region_name=>'1',
  p_plug_template=> 28035733013354425+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 20,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 26597913925798255 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 32,
  p_plug_name=> 'Contact Details',
  p_region_name=>'3',
  p_plug_template=> 28035733013354425+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 40,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 26598112910798256 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 32,
  p_plug_name=> 'Site Address',
  p_region_name=>'2',
  p_plug_template=> 28035733013354425+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 30,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 26598328443798256 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 32,
  p_plug_name=> 'Second Contact Details',
  p_region_name=>'4',
  p_plug_template=> 28035733013354425+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 60,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => 'PLSQL_EXPRESSION',
  p_plug_display_when_condition => ':P32_SECOND_CONTACT = ''Yes'' or (:P32_SECOND_CONTACT_NAME IS NOT NULL or :P32_SECOND_ALT_SUB_BUILDING IS NOT NULL or :P32_SECOND_ALT_BUILDING IS NOT NULL or :P32_SECOND_ALT_STREET IS NOT NULL or :P32_SECOND_ALT_CITY IS NOT NULL or :P32_SECOND_ALT_POSTCODE IS NOT NULL)',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 26601511471798259 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 32,
  p_button_sequence=> 150,
  p_button_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_button_name    => 'UPLOAD_FILE',
  p_button_image_alt=> 'Upload File',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> ':P32_ID is not null and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'')',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 31049718065161170 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 32,
  p_button_sequence=> 160,
  p_button_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_button_name    => 'DELETE_FILE',
  p_button_image_alt=> 'Delete File',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:41:&SESSION.::&DEBUG.:41:P41_ENQU_ID,P41_PREVIOUS_PAGE,P41_DRWG_CODE,P41_QUTE_ID:&P32_ID.,32,,',
  p_button_condition=> ':P32_ID is not null and '||chr(10)||
'#OWNER#.mip_security.component_authorization(v(''APP_USER''),''icadmin'')',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 26601725488798259 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 32,
  p_button_sequence=> 170,
  p_button_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_button_name    => 'MANUAL_QUOTE',
  p_button_image_alt=> 'Manual Quote',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'declare'||chr(10)||
'l_quote_rec quotes%ROWTYPE;'||chr(10)||
' CURSOR c_get_quote(cp_enqu_id number) IS'||chr(10)||
'   select * '||chr(10)||
'   from quotes q'||chr(10)||
'   where q.enqu_id = cp_enqu_id'||chr(10)||
'   and upper(q.qute_type) = ''MQ'';'||chr(10)||
'begin'||chr(10)||
'  IF NOT c_get_quote%ISOPEN THEN'||chr(10)||
'    OPEN c_get_quote(:P32_ID);'||chr(10)||
'  END IF;'||chr(10)||
'  FETCH c_get_quote'||chr(10)||
'    INTO l_quote_rec;'||chr(10)||
'  CLOSE c_get_quote;'||chr(10)||
'if not l_quote_rec.id is null and #OWNER#.mip_security.component_authorization(v(''APP_USER''),''icadmin'') and not #OWNER#.mip_files.quote_file_exists(l_quote_rec.id) then'||chr(10)||
'  return true;'||chr(10)||
'else'||chr(10)||
'  return false;'||chr(10)||
'end if;'||chr(10)||
'end;',
  p_button_condition_type=> 'FUNCTION_BODY',
  p_button_cattributes=>'name="Manual Quote"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 28015631689078569 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 32,
  p_button_sequence=> 180,
  p_button_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_button_name    => 'REQUEST_QUOTATION',
  p_button_image_alt=> 'Request Quotation',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> ':P32_ID is not null and :P32_ENTY_CODE is not null and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'')'||chr(10)||
'and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP''',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_button_cattributes=>'id="request_quote" name="request_quote"',
  p_database_action=>'UPDATE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 31354104183698139 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 32,
  p_button_sequence=> 190,
  p_button_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_button_name    => 'delete_enquiry',
  p_button_image_alt=> 'Delete Enquiry',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'javascript:confirmDelete(''Are you sure you want to delete this enquiry'',''delete_enquiry'');',
  p_button_condition=> ':P32_ID is not null and '||chr(10)||
'#OWNER#.mip_security.component_authorization(v(''APP_USER''),''icadmin'') and #OWNER#.mip_enquiry.can_enquiry_be_deleted(:P32_ID)',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 31857019013517337 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 32,
  p_button_sequence=> 200,
  p_button_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_button_name    => 'DELETE_MANUAL_QUOTE',
  p_button_image_alt=> 'Delete Manual Quote',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'declare'||chr(10)||
'l_quote_rec quotes%ROWTYPE;'||chr(10)||
' CURSOR c_get_quote(cp_enqu_id number) IS'||chr(10)||
'   select * '||chr(10)||
'   from quotes q'||chr(10)||
'   where q.enqu_id = cp_enqu_id'||chr(10)||
'   and upper(q.qute_type) = ''MQ'';'||chr(10)||
'begin'||chr(10)||
'  IF NOT c_get_quote%ISOPEN THEN'||chr(10)||
'    OPEN c_get_quote(:P32_ID);'||chr(10)||
'  END IF;'||chr(10)||
'  FETCH c_get_quote'||chr(10)||
'    INTO l_quote_rec;'||chr(10)||
'  CLOSE c_get_quote;'||chr(10)||
'if not l_quote_rec.id is null and #OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'') and #OWNER#.mip_files.quote_file_exists(l_quote_rec.id) then'||chr(10)||
'  return true;'||chr(10)||
'else'||chr(10)||
'  return false;'||chr(10)||
'end if;'||chr(10)||
'end;',
  p_button_condition_type=> 'FUNCTION_BODY',
  p_button_cattributes=>'name="Manual Quote"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 8192812719443370 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 32,
  p_button_sequence=> 210,
  p_button_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_button_name    => 'delete_quotes',
  p_button_image_alt=> 'Delete Quotes',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'javascript:confirmDelete(''Are you sure you want to delete associated with this enquiry'',''delete_quotes'');',
  p_button_condition=> ':P32_ID is not null and '||chr(10)||
'#OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'') and #OWNER#.mip_enquiry.enquiry_has_quotes(:P32_ID)and #OWNER#.mip_enquiry.can_enquiry_be_deleted(:P32_ID)',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 26599921946798258 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 32,
  p_button_sequence=> 10,
  p_button_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_button_name    => 'JOB_INFO_CANCEL',
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'REGION_TEMPLATE_NEXT',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'if :P32_ID is not null then'||chr(10)||
'  if #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP'' and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'    return true;'||chr(10)||
'  else'||chr(10)||
'    return false;'||chr(10)||
'  end if;'||chr(10)||
'else'||chr(10)||
' return true;'||chr(10)||
'end if;',
  p_button_condition_type=> 'FUNCTION_BODY',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 26600112314798258 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 32,
  p_button_sequence=> 10,
  p_button_plug_id => 26597727520798255+wwv_flow_api.g_id_offset,
  p_button_name    => 'SITE_DETAIL_CANCEL',
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'REGION_TEMPLATE_NEXT',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'if :P32_ID is not null then'||chr(10)||
'  if #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP'' and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'    return true;'||chr(10)||
'  else'||chr(10)||
'    return false;'||chr(10)||
'  end if;'||chr(10)||
'else'||chr(10)||
' return true;'||chr(10)||
'end if;',
  p_button_condition_type=> 'FUNCTION_BODY',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 26600314416798258 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 32,
  p_button_sequence=> 60,
  p_button_plug_id => 26598112910798256+wwv_flow_api.g_id_offset,
  p_button_name    => 'SITE_ADDRESS_CANCEL',
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'REGION_TEMPLATE_NEXT',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'if :P32_ID is not null then'||chr(10)||
'  if #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP'' and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'    return true;'||chr(10)||
'  else'||chr(10)||
'    return false;'||chr(10)||
'  end if;'||chr(10)||
'else'||chr(10)||
' return true;'||chr(10)||
'end if;',
  p_button_condition_type=> 'FUNCTION_BODY',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 26600522430798258 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 32,
  p_button_sequence=> 90,
  p_button_plug_id => 26597913925798255+wwv_flow_api.g_id_offset,
  p_button_name    => 'CONTACT_DETAILS_CANCEL',
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'REGION_TEMPLATE_NEXT',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'if :P32_ID is not null then'||chr(10)||
'  if #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP'' and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'    return true;'||chr(10)||
'  else'||chr(10)||
'    return false;'||chr(10)||
'  end if;'||chr(10)||
'else'||chr(10)||
' return true;'||chr(10)||
'end if;',
  p_button_condition_type=> 'FUNCTION_BODY',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 26600725245798259 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 32,
  p_button_sequence=> 120,
  p_button_plug_id => 26598328443798256+wwv_flow_api.g_id_offset,
  p_button_name    => 'SECOND_CONTACT_DETAILS_CANCEL',
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'REGION_TEMPLATE_NEXT',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'if :P32_ID is not null then'||chr(10)||
'  if #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP'' and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'    return true;'||chr(10)||
'  else'||chr(10)||
'    return false;'||chr(10)||
'  end if;'||chr(10)||
'else'||chr(10)||
' return true;'||chr(10)||
'end if;',
  p_button_condition_type=> 'FUNCTION_BODY',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 26600909234798259 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 32,
  p_button_sequence=> 30,
  p_button_plug_id => 26597727520798255+wwv_flow_api.g_id_offset,
  p_button_name    => 'SITE_DETAIL_UPDATE',
  p_button_image_alt=> 'Save',
  p_button_position=> 'REGION_TEMPLATE_PREVIOUS',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> ':P32_ID is not null and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') '||chr(10)||
'and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP''',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_button_cattributes=>'class="update"',
  p_database_action=>'UPDATE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 26601130350798259 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 32,
  p_button_sequence=> 30,
  p_button_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_button_name    => 'JOB_INFO_UPDATE',
  p_button_image_alt=> 'Save',
  p_button_position=> 'REGION_TEMPLATE_PREVIOUS',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> ':P32_ID is not null and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP''',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_button_cattributes=>'class="update"',
  p_database_action=>'UPDATE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 26601328613798259 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 32,
  p_button_sequence=> 40,
  p_button_plug_id => 26597727520798255+wwv_flow_api.g_id_offset,
  p_button_name    => 'SITE_DETAIL_SAVE',
  p_button_image_alt=> 'Save',
  p_button_position=> 'REGION_TEMPLATE_PREVIOUS',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> ':P32_ID is null and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'')',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_button_cattributes=>'class="save"',
  p_database_action=>'INSERT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 26598527409798256 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 32,
  p_button_sequence=> 50,
  p_button_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_button_name    => 'JOB_INFO_SAVE',
  p_button_image_alt=> 'Save',
  p_button_position=> 'REGION_TEMPLATE_PREVIOUS',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> ':P32_ID is null and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'')',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_button_cattributes=>'class="save"',
  p_database_action=>'INSERT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 26598728141798256 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 32,
  p_button_sequence=> 70,
  p_button_plug_id => 26598112910798256+wwv_flow_api.g_id_offset,
  p_button_name    => 'SITE_ADDRESS_UPDATE',
  p_button_image_alt=> 'Save',
  p_button_position=> 'REGION_TEMPLATE_PREVIOUS',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> ':P32_ID is not null and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP''',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_button_cattributes=>'class="update"',
  p_database_action=>'UPDATE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 26598901317798256 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 32,
  p_button_sequence=> 80,
  p_button_plug_id => 26598112910798256+wwv_flow_api.g_id_offset,
  p_button_name    => 'SITE_ADDRESS_SAVE',
  p_button_image_alt=> 'Save',
  p_button_position=> 'REGION_TEMPLATE_PREVIOUS',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> ':P32_ID is null and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'')',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_button_cattributes=>'class="save"',
  p_database_action=>'INSERT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 26599115471798256 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 32,
  p_button_sequence=> 100,
  p_button_plug_id => 26597913925798255+wwv_flow_api.g_id_offset,
  p_button_name    => 'CONTACT_DETAILS_UPDATE',
  p_button_image_alt=> 'Save',
  p_button_position=> 'REGION_TEMPLATE_PREVIOUS',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> ':P32_ID is not null and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP''',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_button_cattributes=>'class="update"',
  p_database_action=>'UPDATE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 26599313763798256 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 32,
  p_button_sequence=> 110,
  p_button_plug_id => 26597913925798255+wwv_flow_api.g_id_offset,
  p_button_name    => 'CONTACT_DETAILS_SAVE',
  p_button_image_alt=> 'Save',
  p_button_position=> 'REGION_TEMPLATE_PREVIOUS',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> ':P32_ID is null and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'')',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_button_cattributes=>'class="save"',
  p_database_action=>'INSERT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 26599518339798258 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 32,
  p_button_sequence=> 130,
  p_button_plug_id => 26598328443798256+wwv_flow_api.g_id_offset,
  p_button_name    => 'SECOND_CONTACT_DETAILS_UPDATE',
  p_button_image_alt=> 'Save',
  p_button_position=> 'REGION_TEMPLATE_PREVIOUS',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> ':P32_ID is not null and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'')',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_button_cattributes=>'class="update"',
  p_database_action=>'UPDATE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 26599711872798258 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 32,
  p_button_sequence=> 140,
  p_button_plug_id => 26598328443798256+wwv_flow_api.g_id_offset,
  p_button_name    => 'SECOND_CONTACT_DETAILS_SAVE',
  p_button_image_alt=> 'Save',
  p_button_position=> 'REGION_TEMPLATE_PREVIOUS',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> ':P32_ID is null and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'')',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_button_cattributes=>'class="save"',
  p_database_action=>'INSERT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>7066226620289645 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_branch_action=> 'f?p=&APP_ID.:&APP_PAGE_ID.:&SESSION.::&DEBUG.::::#&P32_ANCHOR.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 1,
  p_branch_condition_type=> 'ITEM_IS_NOT_NULL',
  p_branch_condition=> 'P32_ANCHOR',
  p_branch_comment=> 'Created 18-MAR-2008 14:41 by HARDYA');
 
wwv_flow_api.create_page_branch(
  p_id=>31354418922698169 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_branch_action=> 'f?p=&APP_ID.:30:&SESSION.::&DEBUG.:::&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>31354104183698139+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 12,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>26621402583798277 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_branch_action=> 'f?p=&APP_ID.:41:&SESSION.::&DEBUG.:41:P41_ENQU_ID,P41_PREVIOUS_PAGE,P41_QUTE_ID,P41_DRWG_CODE:&P32_ID.,&APP_PAGE_ID.,,&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>26601511471798259+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 14,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>31883124647575766 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_branch_action=> 'f?p=&APP_ID.:41:&SESSION.::&DEBUG.::P41_PREVIOUS_PAGE:&APP_PAGE_ID.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>31857019013517337+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 16,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>26621619537798277 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_branch_action=> 'f?p=&APP_ID.:41:&SESSION.::&DEBUG.::P41_PREVIOUS_PAGE:&APP_PAGE_ID.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>26601725488798259+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 18,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>28015925492078573 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_branch_action=> 'f?p=&APP_ID.:80:&SESSION.::&DEBUG.:RP,80,32:P80_ENQU_ID:&P32_ID.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>28015631689078569+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 20,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>44999506127746877 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_branch_action=> 'f?p=&APP_ID.:32:&SESSION.::&DEBUG.:32:P32_ID:&P32_ID.',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 130,
  p_branch_condition_type=> 'REQUEST_IN_CONDITION',
  p_branch_condition=> 'SITE_DETAIL_CANCEL,SITE_ADDRESS_CANCEL,CONTACT_DETAILS_CANCEL,SECOND_CONTACT_DETAILS_CANCEL,JOB_INFO_CANCEL',
  p_branch_comment=> 'Created 28-FEB-2008 16:11 by PRIESTJ');
 
wwv_flow_api.create_page_branch(
  p_id=>8225624370263532 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_branch_action=> 'f?p=&APP_ID.:32:&SESSION.::&DEBUG.:::&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>8192812719443370+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 140,
  p_branch_comment=> 'Created 28-FEB-2008 16:11 by PRIESTJ');
 
wwv_flow_api.create_page_branch(
  p_id=>26619827768798275 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_branch_action=> 'f?p=&APP_ID.:32:&SESSION.::&DEBUG.:::',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 500,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>7744500563814329 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_branch_action=> 'f?p=&APP_ID.:&PAGE_ID.:&SESSION.::&DEBUG.:::&P32_ANCHOR.',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 510,
  p_branch_condition_type=> 'ITEM_IS_NOT_NULL',
  p_branch_condition=> 'P32_ANCHOR',
  p_branch_comment=> 'Created 20-MAR-2008 18:08 by HARDYA');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3327020645149917 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_REQUIRED_MESC_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 2,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Required Mesc Code',
  p_source=>'begin'||chr(10)||
'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''REQUIRED_MESC_CODE'')'||chr(10)||
');'||chr(10)||
'end;',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap" ',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 2,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3498312418846371 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_EXISTING_CONVERTOR',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 3,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Existing Convertor',
  p_source=>'begin'||chr(10)||
'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''EXISTING_CONVERTOR'')'||chr(10)||
');'||chr(10)||
'end;',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap style="visibility: hidden;"',
  p_cattributes_element=>'style="visibility: hidden;"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3499432073870932 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_QMAX',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 4,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Qmax',
  p_source=>'begin'||chr(10)||
'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''QMAX'')'||chr(10)||
');'||chr(10)||
'end;',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap" ',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3511532475975106 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_BYPASS_REQUIRED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 5,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Bypass Required',
  p_source=>'begin'||chr(10)||
'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''BYPASS_REQUIRED'')'||chr(10)||
');'||chr(10)||
'end;',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap" style="visibility: hidden;"',
  p_cattributes_element=>'style="visibility: hidden;"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3512320186009462 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_EXISTING_MESC_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 6,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Existing Mesc Code',
  p_source=>'begin'||chr(10)||
'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''EXISTING_MESC_CODE'')'||chr(10)||
');'||chr(10)||
'end;',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap style="visibility: hidden;"',
  p_cattributes_element=>'style="visibility: hidden;"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3513210929063559 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_EXISTING_PRTY_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 7,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Existing Prty Id',
  p_source=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''EXISTING_PRTY_ID'')'||chr(10)||
');',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap style="visibility: hidden;"',
  p_cattributes_element=>'style="visibility: hidden;"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3514017771084404 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_REQUIRED_SVCP_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 8,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Required Svcp Code',
  p_source=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''REQUIRED_SVCP_CODE'')'||chr(10)||
');',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap style="visibility: hidden;"',
  p_cattributes_element=>'style="visibility: hidden;"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3514925090114931 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_REQUIRED_IP_MBAR',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 9,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Required Ip Mbar',
  p_source=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''REQUIRED_IP_MBAR'')'||chr(10)||
');',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap style="visibility: hidden;"',
  p_cattributes_element=>'style="visibility: hidden;"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3544723668161876 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_ANNUAL_QUANTITY',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Annual Quantity',
  p_source=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''ANNUAL_QUANTITY'')'||chr(10)||
');',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap style="visibility: hidden;"',
  p_cattributes_element=>'style="visibility: hidden;"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3545529471182404 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_BASE_REQUIRED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 11,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Base Required',
  p_source=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''BASE_REQUIRED'')'||chr(10)||
');',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap style="visibility: hidden;"',
  p_cattributes_element=>'style="visibility: hidden;"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3546303760193921 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_REQUIRED_METERING_PRESSURE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 12,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Required Metering Pressure',
  p_source=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''REQUIRED_METERING_PRESSURE'')'||chr(10)||
');',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap" style="visibility: hidden;"',
  p_cattributes_element=>'style="visibility: hidden;"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3547108870214385 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_EXISTING_METR_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 13,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Existing Metr Code',
  p_source=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''EXISTING_METR_CODE'')'||chr(10)||
');',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap style="visibility: hidden;"',
  p_cattributes_element=>'style="visibility: hidden;"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3553413073243906 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_CONVERTOR_REQUIRED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 14,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Convertor Required',
  p_source=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''CONVERTOR_REQUIRED'')'||chr(10)||
');',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_cattributes_element=>'style="visibility: hidden;"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3559608140261482 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_EXISTING_METER_OWNER',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 15,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Existing Meter Owner',
  p_source=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''EXISTING_METER_OWNER'')'||chr(10)||
');',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_cattributes_element=>'style="visibility: hidden;"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3560407709280196 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_LOAD_CONTROL_TYPE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 16,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Load Control Type',
  p_source=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''LOAD_CONTROL_TYPE'')'||chr(10)||
');',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3566827234295389 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_HOUSING_REQUIRED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 17,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Housing Required',
  p_source=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''HOUSING_REQUIRED'')'||chr(10)||
');',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3567622647312932 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_TWIN_STREAM_REQUIRED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 18,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Twin Stream Required',
  p_source=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''TWIN_STREAM_REQUIRED'')'||chr(10)||
');',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3568401785325862 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_EMS_REQUIRED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 19,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Ems Required',
  p_source=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''EMS_REQUIRED'')'||chr(10)||
');',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3569228235342912 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_EXISTING_METER_SERIAL_NO',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Existing Meter Serial No',
  p_source=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''EXISTING_METER_SERIAL_NO'')'||chr(10)||
');',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3570011874357109 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_AMR_REQUIRED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 21,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Amr Required',
  p_source=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''AMR_REQUIRED'')'||chr(10)||
');',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3603614588603950 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_REQUIRED_IP_DETAILS',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 22,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Required Ip Details',
  p_source=>'begin'||chr(10)||
'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''REQUIRED_IP_DETAILS'')'||chr(10)||
');'||chr(10)||
'end;',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3604411172631312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_EXISTING_METY_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 24,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Existing Mety Code',
  p_source=>'begin'||chr(10)||
'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''EXISTING_METY_CODE'')'||chr(10)||
');'||chr(10)||
'end;',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3605224940654215 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_MPRN',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 23,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Mprn',
  p_source=>'begin'||chr(10)||
'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''MPRN'')'||chr(10)||
');'||chr(10)||
'end;',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3606127542692825 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_DS_BOOSTER_OR_COMPRESS',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 25,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Downstream Booster Or Compress',
  p_source=>'begin'||chr(10)||
'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''DOWNSTREAM_BOOSTER_OR_COMPRESS'')'||chr(10)||
');'||chr(10)||
'end;',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3606903694714360 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_EXISTING_LOGGER',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 26,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Existing Logger',
  p_source=>'begin'||chr(10)||
'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''EXISTING_LOGGER'')'||chr(10)||
');'||chr(10)||
'end;',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>3631909946867595 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_L_MPRN_ALT',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 27,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'L Mprn Alt',
  p_source=>'begin'||chr(10)||
'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''MPRN_ALT'')'||chr(10)||
');'||chr(10)||
'end;',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>7063026349195004 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_ANCHOR',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1303,
  p_item_plug_id => 26597727520798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Anchor',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'There are 3 types of load profile; Modulating, On/Off, Constant'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26601900800798259 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_LOAD_CONTROL_TYPE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 37,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Load Control Type &P32_L_LOAD_CONTROL_TYPE.',
  p_source=>'LOAD_CONTROL_TYPE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'LOADCONTROLTYPES',
  p_lov => '.'||to_char(15953402594685025 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_L_LOAD_CONTROL_TYPE',
  p_display_when2=>'H',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Select the exisiting meter size from the drop-down menu.  This is only necessary for diaphragm meters.'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26602128209798259 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_EXISTING_MESC_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 54,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Existing Meter Size &P32_L_EXISTING_MESC_CODE.',
  p_source=>'EXISTING_MESC_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'NEWMETERSIZES',
  p_lov => 'select CODE display_value, CODE return_value '||chr(10)||
'from METER_SIZE_CODES where VALID_FOR_NEW_METER=''YES''',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'RETURN(:P32_L_EXISTING_MESC_CODE <> ''H'' AND :P32_EXISTING_METER_MODEL = ''OTHER'')',
  p_display_when2=>'H',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26602310647798259 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_ASSET_LOCATION_NOTE_FILES',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1148,
  p_item_plug_id => 26597727520798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Asset Location Note (uploaded files)',
  p_source=>'declare'||chr(10)||
' cursor c_filename is SELECT uri, dost_code, dst.description '||chr(10)||
'FROM documents d, document_roles dr, v_current_document_status s, document_status_types dst '||chr(10)||
'where enqu_id=:P32_ID and d.id= dr.docu_id and s.docu_id = d.id and s.dost_code = dst.code;'||chr(10)||
' cursor c_fileid (p_filename varchar2) is select * from APEX_APPLICATION_FILES where NAME = p_filename;'||chr(10)||
' filelist varchar2(10000);'||chr(10)||
' l_file APEX_APPLICATION_FILES%ROWTYPE;'||chr(10)||
'begin'||chr(10)||
'    filelist := ''<ul>'';'||chr(10)||
'    FOR file_rec IN c_filename LOOP'||chr(10)||
'      open c_fileid(file_rec.uri);'||chr(10)||
'      fetch c_fileid into l_file;'||chr(10)||
'      close c_fileid;'||chr(10)||
'      if file_rec.dost_code = ''AVAILABLE'' then     '||chr(10)||
'        filelist:=filelist||''<li><a href="p?n=''||to_char(l_file.id)||''">''||l_file.filename||'' download</a></li>'';'||chr(10)||
'      else'||chr(10)||
'        filelist:=filelist||''<li>''||file_rec.uri||'' unavailable: ''||file_rec.description||''</li>'';'||chr(10)||
'      end if;'||chr(10)||
'    end loop;     '||chr(10)||
'    filelist := filelist||''</ul>'';'||chr(10)||
'    return filelist;'||chr(10)||
'end;',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'DISPLAY_ONLY_HTML',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_ASSET_LOCATION_NOTES',
  p_display_when2=>'Upload',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Select the market sector.  NGM will only be able to produce an automatic quotation if you select I&C'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26602501801798261 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_MARKET_SECTOR_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 61,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Market Sector Code',
  p_source=>'MARKET_SECTOR_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'MARKETSECTORCODES',
  p_lov => '.'||to_char(15954929400685026 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26602702706798261 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_AGENT_ID2',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1141,
  p_item_plug_id => 26597727520798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Agent',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX',
  p_lov => 'select FIRST_NAME || '' '' || LAST_NAME display_value, ID return_value'||chr(10)||
'  from PARTIES'||chr(10)||
' where id = #OWNER#.mip_parties.get_user_id(v(''APP_USER''))'||chr(10)||
' order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if :P32_ID is null and #OWNER#.mip_parties.get_user_role(v(''APP_USER'')) = ''AGENT'' then'||chr(10)||
'  return true;'||chr(10)||
'else'||chr(10)||
'  if #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP'' and #OWNER#.mip_parties.get_user_role(v(''APP_USER'')) = ''AGENT'' then'||chr(10)||
'    return true;'||chr(10)||
'  else'||chr(10)||
'    return false;'||chr(10)||
'  end if;'||chr(10)||
'  return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26602904093798261 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_ENQUIRY_FILES',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 63,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Upload file for enquiry',
  p_source_type=> 'STATIC',
  p_display_as=> 'FILE',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'class="assetlocnot"',
  p_cattributes_element=>'class="assetlocnot"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when_type=>'NEVER',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26603121131798261 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_ENQUIRY_UPLOADED_FILES',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 64,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Enquiry uploaded files',
  p_source=>'declare'||chr(10)||
' cursor c_filename is SELECT uri, dost_code, dst.description '||chr(10)||
'FROM documents d, document_roles dr, v_current_document_status s, document_status_types dst '||chr(10)||
'where enqu_id=:P32_ID and d.id= dr.docu_id and s.docu_id = d.id and s.dost_code = dst.code;'||chr(10)||
' cursor c_fileid (p_filename varchar2) is select * from APEX_APPLICATION_FILES where NAME = p_filename;'||chr(10)||
' filelist varchar2(10000);'||chr(10)||
' l_file APEX_APPLICATION_FILES%ROWTYPE;'||chr(10)||
'begin'||chr(10)||
'    filelist := ''<ul>'';'||chr(10)||
'    FOR file_rec IN c_filename LOOP'||chr(10)||
'      open c_fileid(file_rec.uri);'||chr(10)||
'      fetch c_fileid into l_file;'||chr(10)||
'      close c_fileid;'||chr(10)||
'      if file_rec.dost_code = ''AVAILABLE'' then     '||chr(10)||
'        filelist:=filelist||''<li><a href="p?n=''||to_char(l_file.id)||''">''||l_file.filename||'' download</a></li>'';'||chr(10)||
'      else'||chr(10)||
'        filelist:=filelist||''<li>''||file_rec.uri||'' unavailable: ''||file_rec.description||''</li>'';'||chr(10)||
'      end if;'||chr(10)||
'    end loop;     '||chr(10)||
'    filelist := filelist||''</ul>'';'||chr(10)||
'    return filelist;'||chr(10)||
'end;',
  p_source_type=> 'FUNCTION_BODY',
  p_display_as=> 'DISPLAY_ONLY_HTML',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Select the exisiting meter type from the drop-down menu. '||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26603305232798261 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_EXISTING_METY_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 51,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Existing Meter Type &P32_L_EXISTING_METY_CODE.',
  p_source=>'EXISTING_METY_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'METERTYPES',
  p_lov => 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from METER_TYPES'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> 'OTHER',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_tag_attributes  => 'onchange="get_AJAX_SELECT_XML(''METY_MANU'',''P32_EXISTING_PRTY_ID'',this.value,'''');get_AJAX_SELECT_XML(''MANU_METR'',''P32_EXISTING_METER_MODEL'',$x(''P32_EXISTING_PRTY_ID'').value,this.value);"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_L_EXISTING_METY_CODE',
  p_display_when2=>'H',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'From the T/PM/GT/1 application to the gas transporter, what is the service pressure?  This is the LOPu or lowest operating pressure.'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26603523570798261 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_REQUIRED_SVCP_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 31,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Service Pressure &P32_L_REQUIRED_SVCP_CODE.',
  p_source=>'REQUIRED_SVCP_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX_WITH_SUBMIT',
  p_lov => 'if :P32_ENTY_CODE = ''STD INSTALL'' or :P32_ENTY_CODE = ''STD EXCHANGE'' or :P32_ENTY_CODE = ''STD REMOVE'' then '||chr(10)||
' return ''select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from SERVICE_PRESSURES where not CODE = ''''IP'''''';'||chr(10)||
'else'||chr(10)||
' return ''select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from SERVICE_PRESSURES'';'||chr(10)||
'end if;',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_L_REQUIRED_SVCP_CODE',
  p_display_when2=>'H',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter the full site contact name including title'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26603731632798261 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_FIRST_CONTACT_NAME',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 845,
  p_item_plug_id => 26597913925798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Contact Name',
  p_source=>'FIRST_CONTACT_NAME',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 30,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'What metering pressure do you require?  If you are selecting a standard (design) installation/exchange, the default metering pressure will be 21 mbar.  If you require a higher metering pressure, please do not select standard install/standard exchange'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26603910634798262 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_REQUIRED_METERING_PRESSURE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 35,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default => '21',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Required Metering Pressure (mbar)',
  p_post_element_text=>'mbar',
  p_source=>'REQUIRED_METERING_PRESSURE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 4,
  p_cMaxlength=> 8,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_L_REQUIRED_METERING_PRESSURE',
  p_display_when2=>'H',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Input a preferential substantial competion date.  National Grid Metering will endeavour to meet this date.  The planned dates will be confirmed within 5 working days of quotation acceptance'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26604106758798262 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_INDICATIVE_DATE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 38,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Indicative Date',
  p_source=>'INDICATIVE_DATE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'PICK_DATE_DD_MM_YYYY',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Is this enquiry related to any other job or project?  If so, please indicate by stating connected web-enquiry/project/job reference numbers and site addressess.'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26604329069798262 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_OTHER_PROJECT_REFERENCE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 39,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Other Project Reference',
  p_source=>'OTHER_PROJECT_REFERENCE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 40,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'If you choose no, then please ensure that the housing you are supplying meets the design criteria set out in IGE/GM/8 Part 2: Location, housings and compounds, and is suitably sized to ensure that the meter work can take place.  '||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26604530316798262 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_HOUSING_REQUIRED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 41,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Housing Required &P32_L_HOUSING_REQUIRED.',
  p_source=>'HOUSING_REQUIRED',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'NOORYES',
  p_lov => '.'||to_char(17436531047269251 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 240,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_L_HOUSING_REQUIRED',
  p_display_when2=>'H',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Does the site require a new base to position the meter module?  If the proposed area that the meter module is to be installed on is not suitable (or large enough for the module housing) the meterwork may not take place on the planned date.'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26604701016798262 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_BASE_REQUIRED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 42,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Base Required &P32_L_BASE_REQUIRED.',
  p_source=>'BASE_REQUIRED',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'NOORYES',
  p_lov => '.'||to_char(17436531047269251 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 240,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_L_BASE_REQUIRED',
  p_display_when2=>'H',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Would you like a converter installed?  A Converter will adjust the measured volume of gas displayed on the meter index by considering the temperature and pressure of the gas flowing through the meter rather than using a fixed conversion factor.  Converters are required by some consumers to meet their carbon trading emissions obligations.  By choosing yes, you will not be able to generate an automa';

h:=h||'tic quotation.  A manual quote will be generated off-line and uploaded back onto the system within the normal SLA.'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26604902973798262 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_CONVERTOR_REQUIRED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 43,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Convertor Required &P32_L_CONVERTOR_REQUIRED.',
  p_source=>'CONVERTOR_REQUIRED',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'NOORYES',
  p_lov => '.'||to_char(17436531047269251 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 240,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_L_CONVERTOR_REQUIRED',
  p_display_when2=>'H',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26605117677798262 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_EXISTING_CONVERTOR',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 57,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default => 'LOGGER_REQUIRED',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Has Existing Convertor &P32_L_EXISTING_CONVERTOR.',
  p_source=>'EXISTING_CONVERTOR',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'NOORYES',
  p_lov => '.'||to_char(17436531047269251 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_L_EXISTING_CONVERTOR',
  p_display_when2=>'H',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'If the site occupier has a care category, please select from the drop down list.  '||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26605306451798262 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_CACA_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1149,
  p_item_plug_id => 26597727520798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Care Category',
  p_source=>'CACA_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_lov => 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from CARE_CATEGORIES'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'How are you sending location information to National Grid Metering?  The upload option is available on the enquiry screen.'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26605531033798264 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_ASSET_LOCATION_NOTES',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1146,
  p_item_plug_id => 26597727520798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Asset Location Notes - Mechanism for delivery',
  p_source=>'ASSET_LOCATION_NOTES',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX_WITH_SUBMIT',
  p_named_lov=> 'ASSETLOCATIONNOTES',
  p_lov => '.'||to_char(15952305184685011 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 100,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter a specific password (if required) for the engineers to gain access to the site';

wwv_flow_api.create_page_item(
  p_id=>26605726253798264 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_ACCESS_PASSWORD',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1150,
  p_item_plug_id => 26597727520798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Access Password',
  p_source=>'ACCESS_PASSWORD',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 30,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Are there any additional access requirements to gain access to the site?';

wwv_flow_api.create_page_item(
  p_id=>26605928498798264 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_ACCESS_ADDITIONAL',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1151,
  p_item_plug_id => 26597727520798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Access Instructions',
  p_source=>'ACCESS_ADDITIONAL',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXTAREA',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 50,
  p_cMaxlength=> 210,
  p_cHeight=> 3,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter the Meter Point Reference Number (MPRN).  If you do not enter an MPRN, you will not be able to generate an automatic quotation.  A manual quote will be generated off-line and uploaded back onto the system within the normal SLA. Pleaes note that if you have a UIP reference number, this should be entered and clearly marked.'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26606111771798264 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_MPRN',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1152,
  p_item_plug_id => 26597727520798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'MPRN &P32_L_MPRN.',
  p_source=>'MPRN',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 30,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_L_MPRN',
  p_display_when2=>'H',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter the Meter Point Reference Number (MPRN).  If you do not enter an MPRN, you will not be able to generate an automatic quotation.  A manual quote will be generated off-line and uploaded back onto the system within the normal SLA.'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26606304208798264 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_MPRN_ALT',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1153,
  p_item_plug_id => 26597727520798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Additional Information, including UIP reference &P32_L_MPRN_ALT.',
  p_source=>'MPRN_ALT',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXTAREA',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 50,
  p_cMaxlength=> 210,
  p_cHeight=> 2,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_L_MPRN_ALT',
  p_display_when2=>'H',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26606530043798264 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_ADD_SERVICES',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 40,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Additional Services',
  p_source=>'<hr />',
  p_source_type=> 'STATIC',
  p_display_as=> 'DISPLAY_ONLY_HTML',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_ENTY_CODE',
  p_display_when2=>'OFMAT',
  p_display_when_type=>'VALUE_OF_ITEM_IN_CONDITION_NOT_IN_COLON_DELIMITED_LIST',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26606719376798264 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_BLANKLINE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 49,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>' ',
  p_source=>'<hr />',
  p_source_type=> 'STATIC',
  p_display_as=> 'DISPLAY_ONLY_HTML',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 2,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_display_when=>'P32_ENTY_CODE',
  p_display_when2=>'OFMAT',
  p_display_when_type=>'VALUE_OF_ITEM_IN_CONDITION_NOT_IN_COLON_DELIMITED_LIST',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter the communication method details, such as mobile number or email address'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26606909427798264 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_AGENT_CONTACT_VALUE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1143,
  p_item_plug_id => 26597727520798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Agent Contact Value',
  p_post_element_text=>'&nbsp;',
  p_source=>'AGENT_CONTACT_VALUE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'POPUP',
  p_lov => 'select contact_value display_value, contact_value return_value'||chr(10)||
'from party_contact_mechanisms pacm,'||chr(10)||
'     contact_mechanisms come'||chr(10)||
'where pacm.come_id = come.id and come.comt_code = :P32_AGENT_COMT_CODE'||chr(10)||
'and (pacm.prty_id = :P32_AGENT_ID OR pacm.prty_id = :P32_AGENT_ID2)',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 50,
  p_cMaxlength=> 240,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if :P32_ID is not null then'||chr(10)||
'  if :P32_AGENT_COMT_CODE is not null and :P32_AGENT_COMT_CODE <> ''%''||''null%'' and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) =''INP'' and not(#OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'')) then'||chr(10)||
'    return true;'||chr(10)||
'  else'||chr(10)||
'    return false;'||chr(10)||
'  end if;'||chr(10)||
'else'||chr(10)||
'  if :P32_AGENT_COMT_CODE is not null and :P32_AGENT_COMT_CODE <> ''%''||''null%'' then'||chr(10)||
'    return true;'||chr(10)||
'  else'||chr(10)||
'    return false;'||chr(10)||
'  end if;'||chr(10)||
'end if;'||chr(10)||
'',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Please enter the estimated annual quantiy of gas that the consumer expects to use in kWh?  Please note that this is a mandatory field.'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26607102425798264 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_ANNUAL_QUANTITY',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 34,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Annual Quantity(KWh) &P32_L_ANNUAL_QUANTITY.',
  p_post_element_text=>'kWh',
  p_source=>'ANNUAL_QUANTITY',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_L_ANNUAL_QUANTITY',
  p_display_when2=>'H',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Please select the job type from the drop down list. Standard Install – A standard install will allow the user to select standard 21 mbar metering pressure designs for LP and MP services.  If you require a higher metering pressure please select ‘install’.Install – for installations with a metering pressure above 21 mbar. Standard Exchange – to exchange a meter module with a metering pressure of 21 ';

h:=h||'mbar.  Please note, the new meter module must be installed on the same MPRN.  For new services (and MPRN’s) please select one of the install options. Exchange – for all exchanges where the requested metering pressure is above 21 mbar. OFMAT – To request an OFGEM accuracy test. Standard Removal – For removal of meter modules that are on LP or MP services. Removal – For all other removals. Adversari';

h:=h||'al – for adversarial meter removals. Alteration – used to request alterations such as pressure changes.  Change Capacity – used if the site occupier wants to change the amount of gas consumed.  Add-on – If EMS/AMR/Converter are requested, but as a stand alone job. Other – used if none of the other jobs types are suitable.  Please indicate in the Job Description field the requirements of the reques';

h:=h||'t for quotation.  '||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26607312806798264 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_ENTY_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Job Type',
  p_source=>'ENTY_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX_WITH_SUBMIT',
  p_lov => 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from ENQUIRY_TYPES'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Is there a Booster/Compressor installed downstream? To protect the metering equipment, a non return valve must be integrated into the meter module design where boosters/compressors are fitted downstream.  If selected, this will prevent an automatic quote from being generated.  A manual quote will be generated off-line and uploaded back onto the system within the normal SLA'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26607507464798266 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_DS_BOOSTER_OR_COMPRESS',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 36,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Booster/Compressor &P32_L_DS_BOOSTER_OR_COMPRESS.',
  p_source=>'DOWNSTREAM_BOOSTER_OR_COMPRESS',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'NOORYES',
  p_lov => '.'||to_char(17436531047269251 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_L_DS_BOOSTER_OR_COMPRESS',
  p_display_when2=>'H',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Use this field to enter any specific circumstance, design consideration, or unique on site condition that might affect the requested meterworks. If you want NGM to provide a firm quote for purging of downstream equipment, please indicate this here. Please note that entering data into this field will prevent an automatic quotation from being generated.  A manual quote will be generated off-line and';

h:=h||' uploaded back onto the system within the normal SLA.'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26607719093798266 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_JOB_DESCRIPTION',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 50,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Job Description/Special Instructions <br>(Will result in a manual quote.)',
  p_source=>'JOB_DESCRIPTION',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXTAREA',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 50,
  p_cMaxlength=> 200,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26607923845798266 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_BYPASS_OTHER',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 48,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Other',
  p_source=>'BYPASS_OTHER',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 40,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_BYPASS_REQUIRED',
  p_display_when2=>'Please enter other reason for bypass',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Select the gas act owner from the drop down menu?  GT - The gas transporter, Supplier - if the meter is supplier owned, Consumer if the meter is privately owned'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26608106868798266 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_EXISTING_METER_OWNER',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 28,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Gas Act Owner (GAO) &P32_L_EXISTING_METER_OWNER.',
  p_source=>'EXISTING_METER_OWNER',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'GAS_ACT_OWNERS',
  p_lov => '.'||to_char(27933029359434409 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please Select a Value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_L_EXISTING_METER_OWNER',
  p_display_when2=>'H',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Please state the existing meter asset provider.  Gas transporter, Supplier, Consumer?'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26608328874798266 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_EXISTING_METER_ASSET_PROVIDER',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 29,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Meter Asset Manager',
  p_source=>'EXISTING_METER_ASSET_PROVIDER',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXTAREA',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 50,
  p_cMaxlength=> 210,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Indicate an appointment preferential time slot.  NGM will endevour to meet this time wherever possible, but cannot guarantee it.'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26608511759798266 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_INDICATIVE_TIME',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 30,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default => '8am-8pm;DY',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Appointment Preference',
  p_source=>'INDICATIVE_TIME',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'INDICATIVE_TIMES',
  p_lov => '.'||to_char(25521526688059041 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter the site street name'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26608720661798266 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_INSTALL_STREET',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 775,
  p_item_plug_id => 26598112910798256+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Thoroughfare(Road)',
  p_source=>'INSTALL_STREET',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Please input your transaction reference number.'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26608900764798266 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_TRANSACTION_REFERENCE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1213,
  p_item_plug_id => 26597727520798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Transaction Reference',
  p_source=>'TRANSACTION_REFERENCE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 35,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter the Sub-building name if possible'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26609114666798266 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_INSTALL_SUB_BUILDING',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 755,
  p_item_plug_id => 26598112910798256+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Sub-Building Name/Number',
  p_source=>'INSTALL_SUB_BUILDING',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter the alternative contact name including title'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26609324237798266 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_SECOND_CONTACT_NAME',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 905,
  p_item_plug_id => 26598328443798256+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Contact Name',
  p_source=>'SECOND_CONTACT_NAME',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 30,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26609514489798267 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_SECOND_CONTACT',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1283,
  p_item_plug_id => 26597913925798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default => 'No',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Second Contact',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX_WITH_SUBMIT',
  p_named_lov=> 'YN',
  p_lov => '.'||to_char(12773402618286720 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 10,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter the sub-building name if possible'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26609711157798267 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_FIRST_ALT_SUB_BUILDING',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 945,
  p_item_plug_id => 26597913925798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Sub-Building Name/Number',
  p_source=>'FIRST_ALT_SUB_BUILDING',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>':P32_INSTALL_ADDRESS = ''No'' or not(:P32_FIRST_CONTACT_NAME is NULL or :P32_FIRST_CONTACT_NAME = ''%''||''null%'' or :P32_FIRST_ALT_SUB_BUILDING IS NULL or :P32_FIRST_ALT_SUB_BUILDING = ''%''||''null%'' or :P32_FIRST_ALT_BUILDING IS NULL or :P32_FIRST_ALT_BUILDING = ''%''||''null%'' or :P32_FIRST_ALT_STREET IS NULL or :P32_FIRST_ALT_STREET = ''%''||''null%'' or :P32_FIRST_ALT_CITY IS NULL or :P32_FIRST_ALT_CITY = ''%''||''null%'' or :P32_FIRST_ALT_POSTCODE IS NULL or :P32_FIRST_ALT_POSTCODE = ''%''||''null%'')',
  p_display_when_type=>'PLSQL_EXPRESSION',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter an alternative building name if possible'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26609924545798267 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_FIRST_ALT_BUILDING',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1163,
  p_item_plug_id => 26597913925798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Building Name/Number',
  p_source=>'FIRST_ALT_BUILDING',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>':P32_INSTALL_ADDRESS = ''No'' or not(:P32_FIRST_CONTACT_NAME is NULL or :P32_FIRST_CONTACT_NAME = ''%''||''null%'' or :P32_FIRST_ALT_SUB_BUILDING IS NULL or :P32_FIRST_ALT_SUB_BUILDING = ''%''||''null%'' or :P32_FIRST_ALT_BUILDING IS NULL or :P32_FIRST_ALT_BUILDING = ''%''||''null%'' or :P32_FIRST_ALT_STREET IS NULL or :P32_FIRST_ALT_STREET = ''%''||''null%'' or :P32_FIRST_ALT_CITY IS NULL or :P32_FIRST_ALT_CITY = ''%''||''null%'' or :P32_FIRST_ALT_POSTCODE IS NULL or :P32_FIRST_ALT_POSTCODE = ''%''||''null%'')',
  p_display_when_type=>'PLSQL_EXPRESSION',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter the street name for the alternative site contact'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26610129513798267 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_FIRST_ALT_STREET',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1173,
  p_item_plug_id => 26597913925798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Thoroughfare(Road)',
  p_source=>'FIRST_ALT_STREET',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>':P32_INSTALL_ADDRESS = ''No'' or not(:P32_FIRST_CONTACT_NAME is NULL or :P32_FIRST_CONTACT_NAME = ''%''||''null%'' or :P32_FIRST_ALT_SUB_BUILDING IS NULL or :P32_FIRST_ALT_SUB_BUILDING = ''%''||''null%'' or :P32_FIRST_ALT_BUILDING IS NULL or :P32_FIRST_ALT_BUILDING = ''%''||''null%'' or :P32_FIRST_ALT_STREET IS NULL or :P32_FIRST_ALT_STREET = ''%''||''null%'' or :P32_FIRST_ALT_CITY IS NULL or :P32_FIRST_ALT_CITY = ''%''||''null%'' or :P32_FIRST_ALT_POSTCODE IS NULL or :P32_FIRST_ALT_POSTCODE = ''%''||''null%'')',
  p_display_when_type=>'PLSQL_EXPRESSION',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter the City or Postal Town for the alternative contact'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26610318025798267 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_FIRST_ALT_CITY',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1223,
  p_item_plug_id => 26597913925798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Post Town(Town)',
  p_source=>'FIRST_ALT_CITY',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>':P32_INSTALL_ADDRESS = ''No'' or not(:P32_FIRST_CONTACT_NAME is NULL or :P32_FIRST_CONTACT_NAME = ''%''||''null%'' or :P32_FIRST_ALT_SUB_BUILDING IS NULL or :P32_FIRST_ALT_SUB_BUILDING = ''%''||''null%'' or :P32_FIRST_ALT_BUILDING IS NULL or :P32_FIRST_ALT_BUILDING = ''%''||''null%'' or :P32_FIRST_ALT_STREET IS NULL or :P32_FIRST_ALT_STREET = ''%''||''null%'' or :P32_FIRST_ALT_CITY IS NULL or :P32_FIRST_ALT_CITY = ''%''||''null%'' or :P32_FIRST_ALT_POSTCODE IS NULL or :P32_FIRST_ALT_POSTCODE = ''%''||''null%'')',
  p_display_when_type=>'PLSQL_EXPRESSION',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter the postcode for the alternative contact'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26610512478798267 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_FIRST_ALT_POSTCODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1243,
  p_item_plug_id => 26597913925798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Post Code',
  p_source=>'FIRST_ALT_POSTCODE',
  p_source_type=> 'DB_COLUMN',
  p_source_post_computation => 'UPPER(:P32_FIRST_ALT_POSTCODE)',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 8,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>':P32_INSTALL_ADDRESS = ''No'' or not(:P32_FIRST_CONTACT_NAME is NULL or :P32_FIRST_CONTACT_NAME = ''%''||''null%'' or :P32_FIRST_ALT_SUB_BUILDING IS NULL or :P32_FIRST_ALT_SUB_BUILDING = ''%''||''null%'' or :P32_FIRST_ALT_BUILDING IS NULL or :P32_FIRST_ALT_BUILDING = ''%''||''null%'' or :P32_FIRST_ALT_STREET IS NULL or :P32_FIRST_ALT_STREET = ''%''||''null%'' or :P32_FIRST_ALT_CITY IS NULL or :P32_FIRST_ALT_CITY = ''%''||''null%'' or :P32_FIRST_ALT_POSTCODE IS NULL or :P32_FIRST_ALT_POSTCODE = ''%''||''null%'')',
  p_display_when_type=>'PLSQL_EXPRESSION',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter second alternative sub building name'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26610718023798267 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_SECOND_ALT_SUB_BUILDING',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1193,
  p_item_plug_id => 26598328443798256+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Sub-Building Name/Number',
  p_source=>'SECOND_ALT_SUB_BUILDING',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter second alternative building name.'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26610900181798267 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_SECOND_ALT_BUILDING',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1233,
  p_item_plug_id => 26598328443798256+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Building Name/Number',
  p_source=>'SECOND_ALT_BUILDING',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter second alternative street name'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26611132293798267 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_SECOND_ALT_STREET',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1253,
  p_item_plug_id => 26598328443798256+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Thoroughfare(Road)',
  p_source=>'SECOND_ALT_STREET',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter second alternative post code'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26611305903798267 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_SECOND_ALT_POSTCODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1293,
  p_item_plug_id => 26598328443798256+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Post Code',
  p_source=>'SECOND_ALT_POSTCODE',
  p_source_type=> 'DB_COLUMN',
  p_source_post_computation => 'UPPER(:P32_SECOND_ALT_POSTCODE)',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 8,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26611530383798269 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_INSTALL_ADDRESS',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1263,
  p_item_plug_id => 26597913925798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default => 'Yes',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Contact address the same as site address',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX_WITH_SUBMIT',
  p_named_lov=> 'YN',
  p_lov => '.'||to_char(12773402618286720 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 10,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26611728775798269 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_MKTP_REF',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1138,
  p_item_plug_id => 26597727520798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Supplier',
  p_source=>'SELECT prty_id FROM v_latest_rt_code_for_enro where rt_code=''ENQ SUPP'' and enqu_id=:p32_ID;',
  p_source_type=> 'QUERY',
  p_display_as=> 'COMBOBOX_WITH_SUBMIT',
  p_lov => 'select unique p.NAME display_value, p.ID return_value from PARTIES p , PARTY_RELATIONSHIPS pr where p.PRTY_TYPE=''MKTP'' and p.id =  pr.to_parl_prty_id and pr.to_parl_rt_code = ''SUPP''  and pr.from_parl_rt_code = ''AGENT'' order by 1 ',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'#OWNER#.mip_parties.get_user_role(v(''APP_USER'')) <> ''AGENT'' or :P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'' and #OWNER#.mip_parties.get_user_role(v(''APP_USER'')) = ''AGENT''',
  p_display_when_type=>'PLSQL_EXPRESSION',
  p_read_only_when=>'declare '||chr(10)||
'partytime number;'||chr(10)||
'privilege boolean;'||chr(10)||
'begin'||chr(10)||
'SELECT count (*) into partytime FROM v_latest_rt_code_for_enro where rt_code=''ENQ SUPP'' and enqu_id=:P32_ID;'||chr(10)||
''||chr(10)||
'privilege := #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'');'||chr(10)||
'if privilege or partytime>0 or #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'' then'||chr(10)||
' return true;'||chr(10)||
'else '||chr(10)||
' return false;'||chr(10)||
'end if;'||chr(10)||
'end;'||chr(10)||
'',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26611911945798269 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_AGENT_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1140,
  p_item_plug_id => 26597727520798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Agent',
  p_source=>'SELECT prty_id FROM v_latest_rt_code_for_enro where rt_code=''ENQ OWN'' and enqu_id=:P32_ID;',
  p_source_type=> 'QUERY',
  p_display_as=> 'COMBOBOX_WITH_SUBMIT',
  p_lov => 'select FIRST_NAME || '' '' || LAST_NAME display_value, ID return_value'||chr(10)||
'  from PARTIES, PARTY_RELATIONSHIPS'||chr(10)||
' where from_parl_prty_id = id'||chr(10)||
'   and FROM_PRTP_RT_CODE = ''AGENT'''||chr(10)||
'   and TO_PRTP_RT_CODE = ''SUPP'''||chr(10)||
'   and TO_PARL_PRTY_ID = :P32_MKTP_REF'||chr(10)||
' order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if #OWNER#.mip_parties.get_user_role(v(''APP_USER'')) <> ''AGENT'' and :P32_MKTP_REF is not null then'||chr(10)||
'  return true;'||chr(10)||
'else'||chr(10)||
'  if :P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'' and #OWNER#.mip_parties.get_user_role(v(''APP_USER'')) = ''AGENT'' then'||chr(10)||
'    return true;'||chr(10)||
'  else'||chr(10)||
'    return false;'||chr(10)||
'  end if;'||chr(10)||
'  return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;'||chr(10)||
'',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26612101344798269 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_UPLOAD_ASSET_LOCATION_NOTES',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1147,
  p_item_plug_id => 26597727520798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Upload Asset Location Notes',
  p_source_type=> 'STATIC',
  p_display_as=> 'FILE',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap" class="assetlocnot"',
  p_cattributes_element=>'class="assetlocnot"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_ASSET_LOCATION_NOTES',
  p_display_when2=>'Upload',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26612331522798269 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_MKTP_REF2',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1139,
  p_item_plug_id => 26597727520798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Supplier',
  p_source=>'SELECT prty_id FROM v_latest_rt_code_for_enro where rt_code=''ENQ SUPP'' and enqu_id=:P32_ID;',
  p_source_type=> 'QUERY',
  p_display_as=> 'COMBOBOX_WITH_SUBMIT',
  p_lov => 'select NAME display_value, ID return_value'||chr(10)||
'  from PARTIES p, PARTY_RELATIONSHIPS pr'||chr(10)||
' where p.ID = pr.TO_PARL_PRTY_ID'||chr(10)||
'   and pr.FROM_PARL_PRTY_ID = #OWNER#.mip_parties.get_user_id(v(''APP_USER''))'||chr(10)||
'   and pr.TO_PARL_RT_CODE = ''SUPP'''||chr(10)||
'   and pr.FROM_PARL_RT_CODE = ''AGENT'''||chr(10)||
' order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 50,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'#OWNER#.mip_parties.get_user_role(v(''APP_USER'')) = ''AGENT'' and (:P32_ID is null '||chr(10)||
'or #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP'')',
  p_display_when_type=>'PLSQL_EXPRESSION',
  p_read_only_when=>'declare '||chr(10)||
'partytime number;'||chr(10)||
'privilege boolean;'||chr(10)||
'begin'||chr(10)||
'SELECT count (*) into partytime FROM v_latest_rt_code_for_enro where rt_code=''ENQ SUPP'' and enqu_id=:P32_ID;'||chr(10)||
''||chr(10)||
'privilege := #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'');'||chr(10)||
'if privilege or partytime>0 or #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'' then'||chr(10)||
' return true;'||chr(10)||
'else '||chr(10)||
' return false;'||chr(10)||
'end if;'||chr(10)||
'end;'||chr(10)||
'',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter the site Building Name'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26612524742798269 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_INSTALL_BUILDING',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 765,
  p_item_plug_id => 26598112910798256+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Building Name/Number',
  p_source=>'INSTALL_BUILDING',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter the City or Postal Town of the site'||chr(10)||
''||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26612702420798269 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_INSTALL_CITY',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 785,
  p_item_plug_id => 26598112910798256+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Post Town(Town)',
  p_source=>'INSTALL_CITY',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter your prefered method of communication';

wwv_flow_api.create_page_item(
  p_id=>26612930232798269 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_AGENT_COMT_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1142,
  p_item_plug_id => 26597727520798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Agent Preferred Contact Mechanism',
  p_source=>'AGENT_COMT_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX_WITH_SUBMIT',
  p_named_lov=> 'CONTACTMECHANISMS',
  p_lov => 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from CONTACT_MECHANISM_TYPES'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'(#OWNER#.mip_parties.get_user_role(v(''APP_USER'')) <> ''AGENT'' and :P32_AGENT_ID is not null and :P32_AGENT_ID<> ''%''||''null%'') or (#OWNER#.mip_parties.get_user_role(v(''APP_USER'')) =''AGENT'')',
  p_display_when_type=>'PLSQL_EXPRESSION',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter the site postcode - please note, if you do not enter a postcode, NGM will not be able to produce an automatic quotation'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26613107326798269 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_INSTALL_POSTCODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 795,
  p_item_plug_id => 26598112910798256+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Post Code',
  p_source=>'INSTALL_POSTCODE',
  p_source_type=> 'DB_COLUMN',
  p_source_post_computation => 'UPPER(:P32_INSTALL_POSTCODE)',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 8,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Please enter Qmin, or the minimum flowrate.  The minimum flowrate is the lowest consumption of gas that the consumer will use over any sustained period. '||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26613331508798269 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_QMIN',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 60,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Measuring Capacity QMIN(kWh)',
  p_post_element_text=>' kWh',
  p_source=>'QMIN',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter second alternative city name'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26613513722798270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_SECOND_ALT_CITY',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1273,
  p_item_plug_id => 26598328443798256+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Post Town(Town)',
  p_source=>'SECOND_ALT_CITY',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'"Please input the T/PM/GT/1(Management procedure for requesting gas service pipe pressure and capacity information from National Gid Gas/GT) information.  Through the T/PM/GT/1, a requestor can acquire the following essential information from the gas transporter regarding the supply of gas: -'||chr(10)||
'a) Confirmation of a live gas service pipe (for an existing installation),'||chr(10)||
'b) Design minimum pressure DM';

h:=h||'P,'||chr(10)||
'c) Lowest operating pressure LOP,'||chr(10)||
'd) Maximum operating pressure MOP,'||chr(10)||
'e) Design pressure DP,'||chr(10)||
'f) Design maximum incidental pressure DMIP,'||chr(10)||
'g) Nominated or maximum capacity of the service pipe (energy capacity or volumetric'||chr(10)||
'capacity),'||chr(10)||
'h) Any constraints that National Grid Gas (or other GT) has imposed on the service, meter installation, or'||chr(10)||
'use of the meter housing."'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26613728313798270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_REQUIRED_IP_DETAILS',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 32,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'IP Details &P32_L_REQUIRED_IP_DETAILS.',
  p_source=>'REQUIRED_IP_DETAILS',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXTAREA',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 50,
  p_cMaxlength=> 250,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>':P32_L_REQUIRED_IP_DETAILS <> ''H'' AND :P32_REQUIRED_SVCP_CODE =''IP''',
  p_display_when_type=>'PLSQL_EXPRESSION',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter the ''service'' pressure in mbar?  This is the LOPu or lowest operating pressure. '||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26613900401798270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_REQUIRED_IP_MBAR',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 33,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'IP Inlet pressure &P32_L_REQUIRED_IP_MBAR.',
  p_post_element_text=>'mbar',
  p_source=>'REQUIRED_IP_MBAR',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_REQUIRED_SVCP_CODE',
  p_display_when2=>'IP',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26614128028798270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_EXISTING_LOGGER',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 56,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default => 'EXISTING_LOGGER',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Has Existing Logger &P32_L_EXISTING_LOGGER.',
  p_source=>'EXISTING_LOGGER',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'NOORYES',
  p_lov => '.'||to_char(17436531047269251 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_L_EXISTING_LOGGER',
  p_display_when2=>'H',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Would you like AMR? (Automated Meter Reading).  There are many advantages to Smart Metering; better budget management, accurate billing, environmental benefits, no meter reading visits. '||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26614331239798270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_AMR_REQUIRED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 44,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'AMR Required &P32_L_AMR_REQUIRED.',
  p_source=>'AMR_REQUIRED',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'NOORYES',
  p_lov => '.'||to_char(17436531047269251 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 240,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'DECLARE'||chr(10)||
'  l_tripartite_region BOOLEAN;'||chr(10)||
'  l_regi_code         regions.code%TYPE;'||chr(10)||
'BEGIN'||chr(10)||
'  IF :p32_l_amr_required = ''H'' THEN'||chr(10)||
'    RETURN FALSE; -- Not valid for this enquiry type'||chr(10)||
'  ELSIF (mip_parties.is_tripartite(:p32_mktp_ref) OR'||chr(10)||
'        mip_parties.is_tripartite(:p32_mktp_ref2)) THEN'||chr(10)||
'    RETURN TRUE; -- Tripartite members can do anything.'||chr(10)||
'  ELSE'||chr(10)||
'    IF mip_regions.valid_postcode_format(:p32_install_postcode) THEN'||chr(10)||
'      l_tripartite_region := mip_tripartite.tripartite_region(:p32_install_postcode);'||chr(10)||
'      l_regi_code         := mip_regions.get_region_for_postcode(:p32_install_postcode);'||chr(10)||
'    ELSE'||chr(10)||
'      l_tripartite_region := FALSE;'||chr(10)||
'    END IF;'||chr(10)||
'  '||chr(10)||
'    IF NOT l_tripartite_region THEN'||chr(10)||
'      RETURN TRUE; -- not a tripartite region'||chr(10)||
'    ELSE'||chr(10)||
'      RETURN(mip_tripartite.addon_allowed(''AMR'''||chr(10)||
'                                         ,l_regi_code));'||chr(10)||
'    END IF;'||chr(10)||
'  END IF;'||chr(10)||
'END;'||chr(10)||
''||chr(10)||
'',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'An Energy Management System Connection will connect the pulse output of a meter or converter to a site occupier''s Energy Management System. Please note, not all meters can have an EMS, so for EMS installations on existing meters, further chargable work may be required.'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26614501130798270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_EMS_REQUIRED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 45,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'EMS Required &P32_L_EMS_REQUIRED.',
  p_source=>'EMS_REQUIRED',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'NOORYES',
  p_lov => '.'||to_char(17436531047269251 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 240,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_L_EMS_REQUIRED',
  p_display_when2=>'H',
  p_display_when_type=>'VALUE_OF_ITEM_IN_CONDITION_NOT_IN_COLON_DELIMITED_LIST',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'"Does the meter module require a by-pass?  A by-pass will allow continuity of the supply of gas during times of meter maintenance/replacement.  You will also need to specify why you require a by-pass as the facility may not be possible if the Gas Transporter deems it unecessary in the T/PM/GT/3 process.  A meter by-pass should only be provided where the provision of a meter by-pass would, in the M';

h:=h||'AM’s or Gas Supplier’s opinion, be prudent in order to avoid the risk, of personal injury or death or damage to property (including prejudice to animal welfare) arising from a fault on the meter or metering equipment. And where gas is supplied to the following types of premises:'||chr(10)||
'a) Hospitals or hospice'||chr(10)||
'b) institutionalised accommodation (for example homes for the elderly, schools, and prisons)'||chr(10)||
'';

h:=h||'c) premises utilising large or complex plant supporting continuous bulk manufacturing (for'||chr(10)||
'example agricultural, baking or other commercial processes) and in comparable'||chr(10)||
'circumstances'||chr(10)||
'd) and at meter installations connected to:'||chr(10)||
'• exceptionally extensive and complex pipework and gas consuming plant'||chr(10)||
'• multi-occupied premises or a number of discrete consumers (for example a single'||chr(10)||
'meter installa';

h:=h||'tion serving a block of flats)."'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26614727217798270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_BYPASS_REQUIRED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 47,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Bypass Required &P32_L_BYPASS_REQUIRED.',
  p_source=>'BYPASS_REQUIRED',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX_WITH_SUBMIT',
  p_named_lov=> 'BYPASS',
  p_lov => 'select description as display, description as return from bypass_reasons'||chr(10)||
'order by code',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 40,
  p_cMaxlength=> 240,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_L_BYPASS_REQUIRED',
  p_display_when2=>'H',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'YES',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'"Multi-stream systems may be installed for a variety of commercial and technical reasons, including:'||chr(10)||
'• continuity of supply'||chr(10)||
'• partial continuity of supply for essential loads'||chr(10)||
'• improved pressure control over the required flow range'||chr(10)||
'• achieving the required capacity'||chr(10)||
'• provision of standby metering'||chr(10)||
'• provision of reference metering'||chr(10)||
'For supply pressures of MP and above with a single stream ins';

h:=h||'tallation - supply disruption will be necessary during maintenance.  By choosing ''yes'' to Twin Stream, you will not be able to generate an automatic quotation.  A manual quote will be generated off-line and uploaded back onto the system within the normal SLA."'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26614928894798270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_TWIN_STREAM_REQUIRED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 46,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Twin Stream Required &P32_L_TWIN_STREAM_REQUIRED.',
  p_source=>'TWIN_STREAM_REQUIRED',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'NOORYES',
  p_lov => '.'||to_char(17436531047269251 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 240,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_L_TWIN_STREAM_REQUIRED',
  p_display_when2=>'H',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Please indicate the requested peak hourly load, or Qmax in kWh.  The Qmax, or maximum flowrate will determine the designs available for selection.  If you do not enter the correct information into this field the quotation will not contain the correct design, and you must populate this field to generate an automatic quotation'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26615123286798270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_QMAX',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 59,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Measuring Capacity QMAX (kWh) &P32_L_QMAX.',
  p_post_element_text=>' kWh',
  p_source=>'QMAX',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'return mip_enquiry.show_qmax('||chr(10)||
'p_enty_code => :p32_enty_code, '||chr(10)||
'p_existing_metr_code => :p32_existing_meter_model,'||chr(10)||
'p_existing_mesc_code => :p32_existing_mesc_code,'||chr(10)||
'p_required_mesc_code => :p32_meter_size'||chr(10)||
');'||chr(10)||
'',
  p_display_when2=>'H',
  p_display_when_type=>'ALWAYS',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Please select a meter size from the dropdown menu.  If you have not specified a Qmax, this field is mandatory. Please note that only diaphragm meter sizes are available.'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26615316517798270 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_METER_SIZE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 58,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Meter Size &P32_L_REQUIRED_MESC_CODE. ',
  p_source=>'REQUIRED_MESC_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX_WITH_SUBMIT',
  p_named_lov=> 'NEWMETERSIZES',
  p_lov => 'select CODE display_value, CODE return_value '||chr(10)||
'from METER_SIZE_CODES where VALID_FOR_NEW_METER=''YES''',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 240,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_L_REQUIRED_MESC_CODE',
  p_display_when2=>'H',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter the meter serial number.'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26615501727798272 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_EXISTING_METER_SERIAL_NO',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 55,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Existing Meter Serial No &P32_L_EXISTING_METER_SERIAL_NO.',
  p_source=>'EXISTING_METER_SERIAL_NO',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 30,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_L_EXISTING_METER_SERIAL_NO',
  p_display_when2=>'H',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Please select the existing meter model from the drop down menu.  If you are unsure of the meter model, or if the existing model is not listed, please select ''other''.  If you select ''other'', you will not be able to generate an automatic quotation.  A manual quote will be generated off-line and uploaded back onto the system within the normal SLA.'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26615702745798272 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_EXISTING_METER_MODEL',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 53,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Existing Meter Model &P32_L_EXISTING_METR_CODE.',
  p_source=>'EXISTING_METR_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX_WITH_SUBMIT',
  p_lov => 'select code display_value, code return_value '||chr(10)||
'from meters'||chr(10)||
'where prty_id = decode(:P32_EXISTING_PRTY_ID,''%''||''null%'',NULL,:P32_EXISTING_PRTY_ID)'||chr(10)||
'and mety_code = :P32_EXISTING_METY_CODE'||chr(10)||
'union'||chr(10)||
'select ''- OTHER -'', ''OTHER'''||chr(10)||
'from DUAL'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 50,
  p_cMaxlength=> 50,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_L_EXISTING_METR_CODE',
  p_display_when2=>'H',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'This field is for additional information.  Please note, entering any information into this field will prevent an automatic quotation from being generated.  A manual quote will be generated off-line and uploaded back onto the system within the normal SLA.'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26615918096798272 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_OTHER_INFORMATION',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 62,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Other Information',
  p_source=>'OTHER_INFORMATION',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 50,
  p_cMaxlength=> 250,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26616110785798272 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1137,
  p_item_plug_id => 26597727520798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Enquiry Reference',
  p_source=>'ID',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT_DISABLED_AND_SAVE',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Select the location of the meter installation from the drop down list.  If you are unsure of where the meter is, please select Unknown.'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26616308477798272 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_ALTY_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1145,
  p_item_plug_id => 26597727520798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Asset Location Code',
  p_source=>'ALTY_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_lov => 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from ASSET_LOCATION_TYPES'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter the telephone number for the site contact '||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26616529848798273 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_FIRST_CONTACT_TELEPHONE_1',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 855,
  p_item_plug_id => 26597913925798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Telephone',
  p_source=>'FIRST_CONTACT_TELEPHONE_1',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 15,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter a secondary number for the site contact, such as a mobile'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26616711658798273 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_FIRST_CONTACT_TELEPHONE_2',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 865,
  p_item_plug_id => 26597913925798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Alternative Telephone',
  p_source=>'FIRST_CONTACT_TELEPHONE_2',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 15,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter the telephone number for the alternative site contact '||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26616901506798273 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_SECOND_CONTACT_TELEPHONE_1',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 915,
  p_item_plug_id => 26598328443798256+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Telephone',
  p_source=>'SECOND_CONTACT_TELEPHONE_1',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 15,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter a secondary number for the alternative contact, such as a mobile'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>26617106700798273 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_SECOND_CONTACT_TELEPHONE_2',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 925,
  p_item_plug_id => 26598328443798256+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Alternative Telephone',
  p_source=>'SECOND_CONTACT_TELEPHONE_2',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 15,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>28537620076074492 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_AGENT_CONTACT_VALUE2',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1144,
  p_item_plug_id => 26597727520798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Agent Contact Value',
  p_source=>'select AGENT_CONTACT_VALUE from enquiries where id = :P32_ID',
  p_source_type=> 'QUERY',
  p_display_as=> 'DISPLAY_ONLY_HTML',
  p_lov => 'select contact_value display_value, contact_value return_value'||chr(10)||
'from party_contact_mechanisms pacm,'||chr(10)||
'     contact_mechanisms come'||chr(10)||
'where pacm.come_id = come.id and come.comt_code = :P32_AGENT_COMT_CODE'||chr(10)||
'and (pacm.prty_id = :P32_AGENT_ID OR pacm.prty_id = :P32_AGENT_ID2)',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 50,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'#OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'' or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'')',
  p_display_when_type=>'PLSQL_EXPRESSION',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => 'This crappy field is required because APEX will not display (in read mode) Popup LOV''s so I need to duplicate and set the condition of two fields rather than just the read only condition of one field.');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter the fax number for the site contact'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>32613513350016433 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_FIRST_CONTACT_FAX',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 875,
  p_item_plug_id => 26597913925798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Fax',
  p_source=>'FIRST_CONTACT_FAX',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 15,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter a secondary fax number for the site contact'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>32615311019072533 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_SECOND_CONTACT_FAX',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 935,
  p_item_plug_id => 26598328443798256+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Fax',
  p_source=>'SECOND_CONTACT_FAX',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 15,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>34353706940303142 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_FIRST_CONTACT_TITLE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 815,
  p_item_plug_id => 26597913925798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Contact Title',
  p_source=>'FIRST_CONTACT_TITLE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 10,
  p_cMaxlength=> 6,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>34356108634350913 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_SECOND_CONTACT_TITLE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 835,
  p_item_plug_id => 26598328443798256+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Contact Title',
  p_source=>'SECOND_CONTACT_TITLE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 10,
  p_cMaxlength=> 6,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>34359208812388867 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_FIRST_CONTACT_INITIALS',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 825,
  p_item_plug_id => 26597913925798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Contact Initials',
  p_source=>'FIRST_CONTACT_INITIALS',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 5,
  p_cMaxlength=> 4,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>34360126258403305 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_SECOND_CONTACT_INITIALS',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 895,
  p_item_plug_id => 26598328443798256+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Contact Initials',
  p_source=>'SECOND_CONTACT_INITIALS',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 5,
  p_cMaxlength=> 4,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter the email address for the site contact'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>34361128776460844 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_FIRST_CONTACT_EMAIL',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 885,
  p_item_plug_id => 26597913925798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Contact Email',
  p_source=>'FIRST_CONTACT_EMAIL',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 50,
  p_cMaxlength=> 240,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter a secondary email address for the alternative contact'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>34363102026472077 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_SECOND_CONTACT_EMAIL',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1183,
  p_item_plug_id => 26598328443798256+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Contact Email',
  p_source=>'SECOND_CONTACT_EMAIL',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 50,
  p_cMaxlength=> 240,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||''||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>47849507964147543 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_EXISTING_PRTY_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 52,
  p_item_plug_id => 26597504596798255+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Existing Meter Manufacturer &P32_L_EXISTING_PRTY_ID.',
  p_source=>'EXISTING_PRTY_ID',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_lov => 'select name as display_value, id as return_value'||chr(10)||
'from parties prty'||chr(10)||
'where prty.prty_type = ''MANU'''||chr(10)||
'order by 1 asc',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please Select a Value-',
  p_lov_null_value=> '',
  p_cSize=> 20,
  p_cMaxlength=> 20,
  p_cHeight=> 1,
  p_tag_attributes  => 'onchange="get_AJAX_SELECT_XML(''MANU_METR'',''P32_EXISTING_METER_MODEL'',this.value,$x(''P32_EXISTING_METY_CODE'').value);"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_L_EXISTING_PRTY_ID'||chr(10)||
'',
  p_display_when2=>'H',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_computation(
  p_id=> 7063231244224784 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_computation_sequence => 10,
  p_computation_item=> 'P32_ANCHOR',
  p_computation_point=> 'AFTER_SUBMIT',
  p_computation_type=> 'PLSQL_EXPRESSION',
  p_computation_processed=> 'REPLACE_EXISTING',
  p_computation=> 'case :REQUEST'||chr(10)||
' when ''SITE_DETAIL_CANCEL'' then 1'||chr(10)||
' when ''SITE_DETAIL_UPDATE'' then 1'||chr(10)||
' when ''SITE_DETAIL_SAVE''   then 1'||chr(10)||
''||chr(10)||
' when ''SITE_ADDRESS_CANCEL'' then 2'||chr(10)||
' when ''SITE_ADDRESS_UPDATE'' then 2'||chr(10)||
' when ''SITE_ADDRESS_SAVE''   then 2'||chr(10)||
' when ''P32_INSTALL_ADDRESS'' then 2'||chr(10)||
''||chr(10)||
' when ''CONTACT_DETAILS_CANCEL'' then 3'||chr(10)||
' when ''CONTACT_DETAILS_UPDATE'' then 3'||chr(10)||
' when ''CONTACT_DETAILS_SAVE''   then 3'||chr(10)||
''||chr(10)||
''||chr(10)||
' when ''SECOND_CONTACTS_DETAIL_CANCEL'' then 4'||chr(10)||
' when ''SECOND_CONTACTS_DETAIL_UPDATE'' then 4'||chr(10)||
' when ''SECOND_CONTACTS_DETAIL_SAVE''   then 4'||chr(10)||
' when ''P32_SECOND_CONTACT''            then 4'||chr(10)||
''||chr(10)||
''||chr(10)||
' when ''JOB_INFO_CANCEL'' then 5'||chr(10)||
' when ''JOB_INFO_UPDATE'' then 5'||chr(10)||
' when ''JOB_INFO_SAVE''   then 5'||chr(10)||
' when ''P32_ENTY_CODE''   then 5'||chr(10)||
' when ''P32_METER_SIZE''  then 5'||chr(10)||
' when ''P32_REQUIRED_SVCP_CODE''   then 5'||chr(10)||
' when ''APPLY_METER_MODEL_CHANGES'' then 5'||chr(10)||
' when ''P32_EXISTING_METER_MODEL''  then 5'||chr(10)||
' when ''P32_EXISTING_PRTY_ID''     then 5'||chr(10)||
' when ''P32_BYPASS_REQUIRED'' then 5'||chr(10)||
''||chr(10)||
' else null'||chr(10)||
'end;',
  p_compute_when => '',
  p_compute_when_type=>'');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_computation(
  p_id=> 7584717319078076 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_computation_sequence => 20,
  p_computation_item=> 'P32_INSTALL_POSTCODE',
  p_computation_point=> 'AFTER_SUBMIT',
  p_computation_type=> 'PLSQL_EXPRESSION',
  p_computation_processed=> 'REPLACE_EXISTING',
  p_computation=> 'trim(:P32_INSTALL_POSTCODE)',
  p_compute_when => 'P32_INSTALL_POSTCODE',
  p_compute_when_type=>'ITEM_IS_NOT_NULL');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_computation(
  p_id=> 7584929009100332 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_computation_sequence => 30,
  p_computation_item=> 'P32_FIRST_ALT_POSTCODE',
  p_computation_point=> 'AFTER_SUBMIT',
  p_computation_type=> 'PLSQL_EXPRESSION',
  p_computation_processed=> 'REPLACE_EXISTING',
  p_computation=> 'trim(:P32_FIRST_ALT_POSTCODE)',
  p_compute_when => 'P32_FIRST_ALT_POSTCODE',
  p_compute_when_type=>'ITEM_IS_NOT_NULL');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_computation(
  p_id=> 7585117020106381 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_computation_sequence => 40,
  p_computation_item=> 'P32_SECOND_ALT_POSTCODE',
  p_computation_point=> 'AFTER_SUBMIT',
  p_computation_type=> 'PLSQL_EXPRESSION',
  p_computation_processed=> 'REPLACE_EXISTING',
  p_computation=> 'trim(:P32_SECOND_ALT_POSTCODE)',
  p_compute_when => 'P32_SECOND_ALT_POSTCODE',
  p_compute_when_type=>'ITEM_IS_NOT_NULL');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 26617608473798273 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'Check user is authorized to save or create',
  p_validation_sequence=> 10,
  p_validation => '#OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'')',
  p_validation_type => 'PLSQL_EXPRESSION',
  p_error_message => 'Sorry you do not have authorization to save or update this page',
  p_error_display_location=>'INLINE_IN_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 26617421984798273 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'Check agent is authorized to save or create',
  p_validation_sequence=> 20,
  p_validation => '#OWNER#.mip_parties.get_user_role(v(''APP_USER'')) = ''AGENT'' and #OWNER#.mip_parties.has_supplier(v(''APP_USER''),:P32_MKTP2) or :P32_MKTP2 is null',
  p_validation_type => 'PLSQL_EXPRESSION',
  p_error_message => 'Sorry you do not have authorization to save or update this page',
  p_validation_condition=> '#OWNER#.mip_parties.get_user_role(v(''APP_USER'')) = ''AGENT''',
  p_validation_condition_type=> 'PLSQL_EXPRESSION',
  p_error_display_location=>'INLINE_IN_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 30033532122267016 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'REQUIRED_METERING_PRESSURE_a_number',
  p_validation_sequence=> 100,
  p_validation => 'P32_REQUIRED_METERING_PRESSURE',
  p_validation2 => '^[[:digit:]]*[.]?[[:digit:]]{0,3}$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'number required 3 decimal places or less',
  p_associated_item=> 26603910634798262 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'When checking for numeric values, typically PL/SQL will throw an exception, unfortunately this is not what we want as we get a nasty error when trying to run AH''s handy validation routine.  So we set those fields that are dates or numbers to check if they are numbers if not then we display an error, we''ve set a condition on AH''s routine and others to only run if there are no errors on the page and this way we avoid the exception raising and can validate safely.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 30082318044546819 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'INDICATIVE_DATE_a_date',
  p_validation_sequence=> 200,
  p_validation => 'P32_INDICATIVE_DATE',
  p_validation2 => '^([012][0-9]|[3][01])/([0][0-9]|[1][012])/[0-9]{4}$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Required format is DD/MM/YYYY',
  p_associated_item=> 26604106758798262 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'When checking for numeric values, typically PL/SQL will throw an exception, unfortunately this is not what we want as we get a nasty error when trying to run AH''s handy validation routine.  So we set those fields that are dates or numbers to check if they are numbers if not then we display an error, we''ve set a condition on AH''s routine and others to only run if there are no errors on the page and this way we avoid the exception raising and can validate safely.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 30109332617778145 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'QMAX_a_number',
  p_validation_sequence=> 300,
  p_validation => 'P32_QMAX',
  p_validation2 => '^[[:digit:]]*[.]?[[:digit:]]{0,3}$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Number required 3 decimal places or less',
  p_associated_item=> 26615123286798270 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'When checking for numeric values, typically PL/SQL will throw an exception, unfortunately this is not what we want as we get a nasty error when trying to run AH''s handy validation routine.  So we set those fields that are dates or numbers to check if they are numbers if not then we display an error, we''ve set a condition on AH''s routine and others to only run if there are no errors on the page and this way we avoid the exception raising and can validate safely.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 30110811885800541 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'QMIN_a_number',
  p_validation_sequence=> 400,
  p_validation => 'P32_QMIN',
  p_validation2 => '^[[:digit:]]*[.]?[[:digit:]]{0,3}$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Number required 3 decimal places or less',
  p_associated_item=> 26613331508798269 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'When checking for numeric values, typically PL/SQL will throw an exception, unfortunately this is not what we want as we get a nasty error when trying to run AH''s handy validation routine.  So we set those fields that are dates or numbers to check if they are numbers if not then we display an error, we''ve set a condition on AH''s routine and others to only run if there are no errors on the page and this way we avoid the exception raising and can validate safely.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 41768802865271855 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'IP_mbar_a_number',
  p_validation_sequence=> 450,
  p_validation => 'P32_REQUIRED_IP_MBAR',
  p_validation2 => '^[[:digit:]]*[.]?[[:digit:]]{0,3}$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'number required 3 decimal places or less',
  p_associated_item=> 26613900401798270 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'When checking for numeric values, typically PL/SQL will throw an exception, unfortunately this is not what we want as we get a nasty error when trying to run AH''s handy validation routine.  So we set those fields that are dates or numbers to check if they are numbers if not then we display an error, we''ve set a condition on AH''s routine and others to only run if there are no errors on the page and this way we avoid the exception raising and can validate safely.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 41168811787825027 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'MPRN a number (up to 30 digits)',
  p_validation_sequence=> 451,
  p_validation => 'P32_MPRN',
  p_validation2 => '^[[:digit:]]{0,30}$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Must be a number(up to 30 digits)',
  p_associated_item=> 26606111771798264 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'When checking for numeric values, typically PL/SQL will throw an exception, unfortunately this is not what we want as we get a nasty error when trying to run AH''s handy validation routine.  So we set those fields that are dates or numbers to check if they are numbers if not then we display an error, we''ve set a condition on AH''s routine and others to only run if there are no errors on the page and this way we avoid the exception raising and can validate safely.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 41299100593331363 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'Annual Quantity a number',
  p_validation_sequence=> 452,
  p_validation => 'P32_ANNUAL_QUANTITY',
  p_validation2 => '^[[:digit:]]*[.]?[[:digit:]]*$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Number required',
  p_associated_item=> 26607102425798264 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'When checking for numeric values, typically PL/SQL will throw an exception, unfortunately this is not what we want as we get a nasty error when trying to run AH''s handy validation routine.  So we set those fields that are dates or numbers to check if they are numbers if not then we display an error, we''ve set a condition on AH''s routine and others to only run if there are no errors on the page and this way we avoid the exception raising and can validate safely.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 36549430795270180 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'QMAX_greater_than_or_equal_to_QMIN',
  p_validation_sequence=> 500,
  p_validation => 'if :P32_QMAX is null or :P32_QMIN is null then'||chr(10)||
'  return null;'||chr(10)||
'else'||chr(10)||
'  if to_number(:P32_QMAX) < to_number(:P32_QMIN) then'||chr(10)||
'    return ''QMAX must be greater than or equal to QMIN'';'||chr(10)||
'  end if;'||chr(10)||
'  return null;'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26615123286798270 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'Although not specified in the spec it''s generally accepted round here that the QMAX should be greater than the QMIN');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29253514490507455 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'Save and Validate live page',
  p_validation_sequence=> 1000,
  p_validation => '--create record'||chr(10)||
'declare'||chr(10)||
'l enquiries%ROWTYPE;'||chr(10)||
'begin'||chr(10)||
'  l.ID := :P32_ID;'||chr(10)||
'   l.AGENT_COMT_CODE := :P32_AGENT_COMT_CODE;'||chr(10)||
'  l.AGENT_CONTACT_VALUE := :P32_AGENT_CONTACT_VALUE;'||chr(10)||
'  l.ALTY_CODE := :P32_ALTY_CODE;'||chr(10)||
'  l.ASSET_LOCATION_NOTES := :P32_ASSET_LOCATION_NOTES;'||chr(10)||
'  l.CACA_CODE := :P32_CACA_CODE;'||chr(10)||
'  l.ACCESS_PASSWORD := :P32_ACCESS_PASSWORD;'||chr(10)||
'  l.ACCESS_ADDITIONAL := :P32_ACCESS_ADDITIONAL;'||chr(10)||
'  l.MPRN := :P32_MPRN;'||chr(10)||
'  l.MPRN_ALT := :P32_MPRN_ALT;'||chr(10)||
'  l.TRANSACTION_REFERENCE := :P32_TRANSACTION_REFERENCE;'||chr(10)||
'  l.INSTALL_SUB_BUILDING := :P32_INSTALL_SUB_BUILDING;'||chr(10)||
'  l.INSTALL_BUILDING := :P32_INSTALL_BUILDING;'||chr(10)||
'  l.INSTALL_STREET := :P32_INSTALL_STREET;'||chr(10)||
'  l.INSTALL_CITY := :P32_INSTALL_CITY;'||chr(10)||
'  l.INSTALL_POSTCODE := :P32_INSTALL_POSTCODE;'||chr(10)||
'  l.FIRST_CONTACT_NAME := :P32_FIRST_CONTACT_NAME;'||chr(10)||
'  l.FIRST_CONTACT_TELEPHONE_1 := :P32_FIRST_CONTACT_TELEPHONE_1;'||chr(10)||
'  l.FIRST_CONTACT_TELEPHONE_2 := :P32_FIRST_CONTACT_TELEPHONE_2;'||chr(10)||
'  l.FIRST_ALT_SUB_BUILDING := :P32_FIRST_ALT_SUB_BUILDING;'||chr(10)||
'  l.FIRST_ALT_BUILDING := :P32_FIRST_ALT_BUILDING;'||chr(10)||
'  l.FIRST_ALT_STREET := :P32_FIRST_ALT_STREET;'||chr(10)||
'  l.FIRST_ALT_CITY := :P32_FIRST_ALT_CITY;'||chr(10)||
'  l.FIRST_ALT_POSTCODE := :P32_FIRST_ALT_POSTCODE;'||chr(10)||
'  l.SECOND_CONTACT_NAME := :P32_SECOND_CONTACT_NAME;'||chr(10)||
'  l.SECOND_CONTACT_TELEPHONE_1 := :P32_SECOND_CONTACT_TELEPHONE_1;'||chr(10)||
'  l.SECOND_CONTACT_TELEPHONE_2 := :P32_SECOND_CONTACT_TELEPHONE_2;'||chr(10)||
'  l.SECOND_ALT_SUB_BUILDING := :P32_SECOND_ALT_SUB_BUILDING;'||chr(10)||
'  l.SECOND_ALT_BUILDING := :P32_SECOND_ALT_BUILDING;'||chr(10)||
'  l.SECOND_ALT_STREET := :P32_SECOND_ALT_STREET;'||chr(10)||
'  l.SECOND_ALT_CITY := :P32_SECOND_ALT_CITY;'||chr(10)||
'  l.SECOND_ALT_POSTCODE := :P32_SECOND_ALT_POSTCODE;'||chr(10)||
'  l.ENTY_CODE := :P32_ENTY_CODE;'||chr(10)||
'  l.EXISTING_METER_OWNER := :P32_EXISTING_METER_OWNER;'||chr(10)||
'  l.EXISTING_METER_ASSET_PROVIDER := v(''P32_EXISTING_METER_ASSET_PROVIDER'');'||chr(10)||
'  l.INDICATIVE_TIME := :P32_INDICATIVE_TIME;'||chr(10)||
'  l.REQUIRED_SVCP_CODE := :P32_REQUIRED_SVCP_CODE;'||chr(10)||
'  l.REQUIRED_IP_DETAILS := :P32_REQUIRED_IP_DETAILS;'||chr(10)||
'  l.REQUIRED_IP_MBAR := :P32_REQUIRED_IP_MBAR;'||chr(10)||
'  l.ANNUAL_QUANTITY := :P32_ANNUAL_QUANTITY;'||chr(10)||
'  l.REQUIRED_METERING_PRESSURE := :P32_REQUIRED_METERING_PRESSURE;'||chr(10)||
'  l.DOWNSTREAM_BOOSTER_OR_COMPRESS := :P32_DS_BOOSTER_OR_COMPRESS;'||chr(10)||
'  l.LOAD_CONTROL_TYPE := :P32_LOAD_CONTROL_TYPE;'||chr(10)||
'  l.INDICATIVE_DATE := to_date(:P32_INDICATIVE_DATE, ''DD/MM/YYYY'');'||chr(10)||
'  l.OTHER_PROJECT_REFERENCE := :P32_OTHER_PROJECT_REFERENCE;'||chr(10)||
'  l.HOUSING_REQUIRED := :P32_HOUSING_REQUIRED;'||chr(10)||
'  l.BASE_REQUIRED := :P32_BASE_REQUIRED;'||chr(10)||
'  l.CONVERTOR_REQUIRED := :P32_CONVERTOR_REQUIRED;'||chr(10)||
'  l.AMR_REQUIRED := :P32_AMR_REQUIRED;'||chr(10)||
'  l.EMS_REQUIRED := :P32_EMS_REQUIRED;'||chr(10)||
'  l.TWIN_STREAM_REQUIRED := :P32_TWIN_STREAM_REQUIRED;'||chr(10)||
'  l.BYPASS_REQUIRED := :P32_BYPASS_REQUIRED;'||chr(10)||
'  l.BYPASS_OTHER := :P32_BYPASS_OTHER;'||chr(10)||
'  l.JOB_DESCRIPTION := :P32_JOB_DESCRIPTION;'||chr(10)||
'  l.QMAX := :P32_QMAX;'||chr(10)||
'  l.QMIN := :P32_QMIN;'||chr(10)||
'  l.REQUIRED_MESC_CODE := :P32_METER_SIZE;'||chr(10)||
'  l.EXISTING_METY_CODE := :P32_EXISTING_METY_CODE;'||chr(10)||
'  l.EXISTING_MESC_CODE := :P32_EXISTING_MESC_CODE;'||chr(10)||
'  l.EXISTING_METER_SERIAL_NO := :P32_EXISTING_METER_SERIAL_NO;'||chr(10)||
'  l.EXISTING_METR_CODE := :P32_EXISTING_METER_MODEL;'||chr(10)||
'  l.EXISTING_PRTY_ID := :P32_EXISTING_PRTY_ID;'||chr(10)||
'  l.EXISTING_LOGGER := :P32_EXISTING_LOGGER;'||chr(10)||
'  l.EXISTING_CONVERTOR := :P32_EXISTING_CONVERTOR;'||chr(10)||
'  l.MARKET_SECTOR_CODE :=:P32_MARKET_SECTOR_CODE;'||chr(10)||
'  l.OTHER_INFORMATION := :P32_OTHER_INFORMATION;'||chr(10)||
'  #OWNER#.mip_quotation.validate(l);'||chr(10)||
'  return true;'||chr(10)||
'end;',
  p_validation_type => 'FUNC_BODY_RETURNING_BOOLEAN',
  p_error_message => 'Error occurred during saving and validating',
  p_validation_condition_type=> 'NOT_DISPLAYING_INLINE_VALIDATION_ERRORS',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'ON_ERROR_PAGE',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29269507189628406 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'MKTP',
  p_validation_sequence=> 1010,
  p_validation => 'if :P32_MKTP_REF is not null or :P32_MKTP_REF2 is not null then'||chr(10)||
'  return true;'||chr(10)||
'else'||chr(10)||
'  return false;'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_BOOLEAN',
  p_error_message => 'Mandatory field',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26611728775798269 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29274709576676403 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'AGENT_ID',
  p_validation_sequence=> 1020,
  p_validation => 'if :P32_AGENT_ID is not null or :P32_AGENT_ID2 is not null then'||chr(10)||
'  return true;'||chr(10)||
'else'||chr(10)||
'  return false;'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_BOOLEAN',
  p_error_message => 'Mandatory field',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26611911945798269 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29278115294715917 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'AGENT_COMT_CODE',
  p_validation_sequence=> 1030,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''AGENT_COMT_CODE'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26612930232798269 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29279118196726209 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'AGENT_CONTACT_VALUE',
  p_validation_sequence=> 1040,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''AGENT_CONTACT_VALUE'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26606909427798264 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29280810147742791 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'ALTY_CODE',
  p_validation_sequence=> 1050,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''ALTY_CODE'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26616308477798272 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29282211316752559 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'ASSET_LOCATION_NOTES',
  p_validation_sequence=> 1060,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''ASSET_LOCATION_NOTES'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26605531033798264 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29283702228768867 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'CACA_CODE',
  p_validation_sequence=> 1070,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''CACA_CODE'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26605306451798262 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29285212748781411 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'ACCESS_PASSWORD',
  p_validation_sequence=> 1080,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''ACCESS_PASSWORD'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26605726253798264 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29300501798787711 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'ACCESS_ADDITIONAL',
  p_validation_sequence=> 1090,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''ACCESS_ADDITIONAL'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26605928498798264 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29301526385794777 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'MPRN',
  p_validation_sequence=> 1100,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''MPRN'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26606111771798264 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29302514396800761 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'MPRN_ALT',
  p_validation_sequence=> 1110,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''MPRN_ALT'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26606304208798264 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29304324270841480 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'TRANSACTION_REFERENCE',
  p_validation_sequence=> 1120,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''TRANSACTION_REFERENCE'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26608900764798266 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29305215051848305 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'INSTALL_SUB_BUILDING',
  p_validation_sequence=> 1130,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''INSTALL_SUB_BUILDING'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26609114666798266 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29306319338858936 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'INSTALL_BUILDING',
  p_validation_sequence=> 1140,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''INSTALL_BUILDING'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26612524742798269 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29307300768863037 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'INSTALL_STREET',
  p_validation_sequence=> 1150,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''INSTALL_STREET'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26608720661798266 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29308117044867794 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'INSTALL_CITY',
  p_validation_sequence=> 1160,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''INSTALL_CITY'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26612702420798269 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29309516829877180 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'INSTALL_POSTCODE',
  p_validation_sequence=> 1170,
  p_validation => 'if #OWNER#.mip_regions.valid_postcode_format(:P32_INSTALL_POSTCODE) then'||chr(10)||
'  return #OWNER#.mip_quotation.validation_result(:P32_ID,''INSTALL_POSTCODE'');'||chr(10)||
'else'||chr(10)||
'  return ''Invalid postcode format'';'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26613107326798269 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 34370204993662125 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'FIRST_CONTACT_TITLE',
  p_validation_sequence=> 1175,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''FIRST_CONTACT_TITLE'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 34353706940303142 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 34371332351670022 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'FIRST_CONTACT_INITIALS ',
  p_validation_sequence=> 1177,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''FIRST_CONTACT_INITIALS'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 34359208812388867 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29310619731887461 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'FIRST_CONTACT_NAME',
  p_validation_sequence=> 1180,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''FIRST_CONTACT_NAME'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26603731632798261 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29311631636900344 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'FIRST_CONTACT_TELEPHONE_1',
  p_validation_sequence=> 1190,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''FIRST_CONTACT_TELEPHONE_1'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26616529848798273 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29312410989903867 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'FIRST_CONTACT_TELEPHONE_2',
  p_validation_sequence=> 1200,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''FIRST_CONTACT_TELEPHONE_2'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26616711658798273 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 34367303692642864 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'FIRST_CONTACT_FAX',
  p_validation_sequence=> 1205,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''FIRST_CONTACT_FAX'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 32613513350016433 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29313424495907761 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'FIRST_ALT_SUB_BUILDING',
  p_validation_sequence=> 1210,
  p_validation => 'if upper(:P32_INSTALL_ADDRESS) = ''NO'' and :P32_FIRST_ALT_SUB_BUILDING is null and :P32_FIRST_ALT_BUILDING is null then'||chr(10)||
'  return ''Mandatory field'';'||chr(10)||
'else'||chr(10)||
'  return #OWNER#.mip_quotation.validation_result(:P32_ID,''FIRST_ALT_SUB_BUILDING'');'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26609711157798267 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29314606618912081 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'FIRST_ALT_BUILDING',
  p_validation_sequence=> 1220,
  p_validation => 'if upper(:P32_INSTALL_ADDRESS) = ''NO'' and :P32_FIRST_ALT_SUB_BUILDING is null and :P32_FIRST_ALT_BUILDING is null then'||chr(10)||
'  return ''Mandatory field'';'||chr(10)||
'else'||chr(10)||
'  return #OWNER#.mip_quotation.validation_result(:P32_ID,''FIRST_ALT_BUILDING'');'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26609924545798267 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29315418046915405 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'FIRST_ALT_STREET',
  p_validation_sequence=> 1230,
  p_validation => 'if upper(:P32_INSTALL_ADDRESS) = ''NO'' and :P32_FIRST_ALT_STREET is null then'||chr(10)||
'  return ''Mandatory field'';'||chr(10)||
'else'||chr(10)||
'  return #OWNER#.mip_quotation.validation_result(:P32_ID,''FIRST_ALT_STREET'');'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26610129513798267 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29316604109930259 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'FIRST_ALT_CITY',
  p_validation_sequence=> 1240,
  p_validation => 'if upper(:P32_INSTALL_ADDRESS) = ''NO'' and :P32_FIRST_ALT_CITY is null then'||chr(10)||
'  return ''Mandatory field'';'||chr(10)||
'else'||chr(10)||
'  return #OWNER#.mip_quotation.validation_result(:P32_ID,''FIRST_ALT_CITY'');'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26610318025798267 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29317618308934328 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'FIRST_ALT_POSTCODE',
  p_validation_sequence=> 1250,
  p_validation => 'if upper(:P32_INSTALL_ADDRESS) = ''NO'' and :P32_FIRST_ALT_POSTCODE is null then'||chr(10)||
'  return ''Mandatory field'';'||chr(10)||
'end if;'||chr(10)||
'if upper(:P32_INSTALL_ADDRESS) = ''NO'' and not (:P32_FIRST_ALT_POSTCODE is null) then'||chr(10)||
'  if not #OWNER#.mip_regions.valid_postcode_format(:P32_FIRST_ALT_POSTCODE) then'||chr(10)||
'    return ''Invalid postcode'';'||chr(10)||
'  end if;'||chr(10)||
'else'||chr(10)||
'  return #OWNER#.mip_quotation.validation_result(:P32_ID,''FIRST_ALT_POSTCODE'');'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26610512478798267 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 34372116552674953 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'SECOND_CONTACT_TITLE',
  p_validation_sequence=> 1255,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''SECOND_CONTACT_TITLE'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 34356108634350913 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 34372901099679930 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'SECOND_CONTACT_INITIALS ',
  p_validation_sequence=> 1257,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''SECOND_CONTACT_INITIALS'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 34360126258403305 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29318607703940759 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'SECOND_CONTACT_NAME',
  p_validation_sequence=> 1260,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''SECOND_CONTACT_NAME'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26609324237798266 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29319625711945998 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'SECOND_CONTACT_TELEPHONE_1',
  p_validation_sequence=> 1270,
  p_validation => 'if upper(:P32_SECOND_CONTACT) = ''YES'' and :P32_SECOND_CONTACT_TELEPHONE_1 is null then'||chr(10)||
'  return ''Mandatory field'';'||chr(10)||
'else'||chr(10)||
'  return #OWNER#.mip_quotation.validation_result(:P32_ID,''SECOND_CONTACT_TELEPHONE_1'');'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26616901506798273 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29320406103949803 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'SECOND_CONTACT_TELEPHONE_2',
  p_validation_sequence=> 1280,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''SECOND_CONTACT_TELEPHONE_2'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26617106700798273 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 34368806593653122 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'SECOND_CONTACT_FAX',
  p_validation_sequence=> 1285,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''SECOND_CONTACT_FAX'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 32615311019072533 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29321622033954398 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'SECOND_ALT_SUB_BUILDING',
  p_validation_sequence=> 1290,
  p_validation => 'if upper(:P32_SECOND_CONTACT) = ''YES'' and :P32_SECOND_ALT_SUB_BUILDING is null and :P32_SECOND_ALT_BUILDING is null then'||chr(10)||
'  return ''Mandatory field'';'||chr(10)||
'else'||chr(10)||
'  return #OWNER#.mip_quotation.validation_result(:P32_ID,''SECOND_ALT_SUB_BUILDING'');'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26610718023798267 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29322512467961081 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'SECOND_ALT_BUILDING',
  p_validation_sequence=> 1300,
  p_validation => 'if upper(:P32_SECOND_CONTACT) = ''YES'' and :P32_SECOND_ALT_SUB_BUILDING is null and :P32_SECOND_ALT_BUILDING is null then'||chr(10)||
'  return ''Mandatory field'';'||chr(10)||
'else'||chr(10)||
'  return #OWNER#.mip_quotation.validation_result(:P32_ID,''SECOND_ALT_BUILDING'');'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26610900181798267 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29323630475966320 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'SECOND_ALT_STREET',
  p_validation_sequence=> 1310,
  p_validation => 'if upper(:P32_SECOND_CONTACT) = ''YES'' and :P32_SECOND_ALT_STREET is null then'||chr(10)||
'  return ''Mandatory field'';'||chr(10)||
'else'||chr(10)||
'  return #OWNER#.mip_quotation.validation_result(:P32_ID,''SECOND_ALT_STREET'');'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26611132293798267 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29324612252970444 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'SECOND_ALT_CITY',
  p_validation_sequence=> 1320,
  p_validation => 'if upper(:P32_SECOND_CONTACT) = ''YES'' and :P32_SECOND_ALT_CITY is null then'||chr(10)||
'  return ''Mandatory field'';'||chr(10)||
'else'||chr(10)||
'  return #OWNER#.mip_quotation.validation_result(:P32_ID,''SECOND_ALT_CITY'');'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26613513722798270 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29325631299976022 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'SECOND_ALT_POSTCODE',
  p_validation_sequence=> 1330,
  p_validation => 'if upper(:P32_SECOND_CONTACT) = ''YES'' and :P32_SECOND_ALT_POSTCODE is null then'||chr(10)||
'  return ''Mandatory field'';'||chr(10)||
'end if;'||chr(10)||
''||chr(10)||
'if upper(:P32_SECOND_CONTACT) = ''YES'' and not :P32_SECOND_ALT_POSTCODE is null then'||chr(10)||
'  if not #OWNER#.mip_regions.valid_postcode_format(:P32_SECOND_ALT_POSTCODE) then'||chr(10)||
'    return ''Invalid postcode'';'||chr(10)||
'  end if;'||chr(10)||
'else'||chr(10)||
'  return #OWNER#.mip_quotation.validation_result(:P32_ID,''SECOND_ALT_POSTCODE'');'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26611305903798267 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29326618270981720 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'ENTY_CODE',
  p_validation_sequence=> 1340,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''ENTY_CODE'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26607312806798264 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29327615547009250 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'EXISTING_METER_OWNER',
  p_validation_sequence=> 1350,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''EXISTING_METER_OWNER'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26608106868798266 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29328729530022769 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'EXISTING_METER_ASSET_PROVIDER',
  p_validation_sequence=> 1360,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''EXISTING_METER_ASSET_PROVIDER'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26608328874798266 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29329711999027220 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'INDICATIVE_TIME',
  p_validation_sequence=> 1370,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''INDICATIVE_TIME'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26608511759798266 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29330731046032634 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'REQUIRED_SVCP_CODE',
  p_validation_sequence=> 1380,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''REQUIRED_SVCP_CODE'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26603523570798261 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29331720095039000 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'REQUIRED_IP_DETAILS',
  p_validation_sequence=> 1390,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''REQUIRED_IP_DETAILS'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26613728313798270 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29332812608046306 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'REQUIRED_IP_MBAR',
  p_validation_sequence=> 1400,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''REQUIRED_IP_MBAR'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26613900401798270 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29333828884050977 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'ANNUAL_QUANTITY',
  p_validation_sequence=> 1410,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''ANNUAL_QUANTITY'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26607102425798264 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29335115855056697 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'REQUIRED_METERING_PRESSURE',
  p_validation_sequence=> 1420,
  p_validation => 'if not :P32_REQUIRED_METERING_PRESSURE is null then'||chr(10)||
'  if :P32_REQUIRED_METERING_PRESSURE<0 or :P32_REQUIRED_METERING_PRESSURE>7000 then'||chr(10)||
'    return ''Permitted range 0 - 7000'';'||chr(10)||
'  end if;'||chr(10)||
'else'||chr(10)||
'  return #OWNER#.mip_quotation.validation_result(:P32_ID,''REQUIRED_METERING_PRESSURE'');'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_validation_condition_type=> 'NOT_DISPLAYING_INLINE_VALIDATION_ERRORS',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26603910634798262 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29336128322060241 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'DOWNSTREAM_BOOSTER_OR_COMPRESS',
  p_validation_sequence=> 1430,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''DOWNSTREAM_BOOSTER_OR_COMPRESS'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26607507464798266 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29337107675063752 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'LOAD_CONTROL_TYPE',
  p_validation_sequence=> 1440,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''LOAD_CONTROL_TYPE'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26601900800798259 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29338121527067744 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'INDICATIVE_DATE',
  p_validation_sequence=> 1450,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''INDICATIVE_DATE'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_validation_condition_type=> 'NOT_DISPLAYING_INLINE_VALIDATION_ERRORS',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26604106758798262 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29339102958071922 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'OTHER_PROJECT_REFERENCE',
  p_validation_sequence=> 1460,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''OTHER_PROJECT_REFERENCE'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26604329069798262 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29340120966077041 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'HOUSING_REQUIRED',
  p_validation_sequence=> 1470,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''HOUSING_REQUIRED'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26604530316798262 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29341303089081416 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'BASE_REQUIRED',
  p_validation_sequence=> 1480,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''BASE_REQUIRED'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26604701016798262 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29342417980085680 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'CONVERTOR_REQUIRED',
  p_validation_sequence=> 1490,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''CONVERTOR_REQUIRED'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26604902973798262 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29343707722092222 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'AMR_REQUIRED',
  p_validation_sequence=> 1500,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''AMR_REQUIRED'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26614331239798270 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29344728847098323 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'EMS_REQUIRED',
  p_validation_sequence=> 1510,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''EMS_REQUIRED'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26614501130798270 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29345709931102317 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'TWIN_STREAM_REQUIRED',
  p_validation_sequence=> 1520,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''TWIN_STREAM_REQUIRED'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26614928894798270 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29346724476106452 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'BYPASS_REQUIRED',
  p_validation_sequence=> 1530,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''BYPASS_REQUIRED'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26614727217798270 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29347705906110542 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'BYPASS_OTHER',
  p_validation_sequence=> 1540,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''BYPASS_OTHER'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26607923845798266 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29348728070117017 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'JOB_DESCRIPTION',
  p_validation_sequence=> 1550,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''JOB_DESCRIPTION'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26607719093798266 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29349606730120255 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'QMAX',
  p_validation_sequence=> 1560,
  p_validation => 'if not :P32_QMAX is null then'||chr(10)||
'  if :P32_QMAX<0 or :P32_QMAX>999999.999 then'||chr(10)||
'    return ''Permitted range 0 - 999999.999'';'||chr(10)||
'  end if;'||chr(10)||
'else'||chr(10)||
'  return #OWNER#.mip_quotation.validation_result(:P32_ID,''QMAX'');'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_validation_condition_type=> 'NOT_DISPLAYING_INLINE_VALIDATION_ERRORS',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26615123286798270 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29350729932127002 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'QMIN',
  p_validation_sequence=> 1570,
  p_validation => 'if not :P32_QMIN is null then'||chr(10)||
'  if :P32_QMIN<0 or :P32_QMIN>999999.999 then'||chr(10)||
'    return ''Permitted range 0 - 999999.999'';'||chr(10)||
'  end if;'||chr(10)||
'else'||chr(10)||
'  return #OWNER#.mip_quotation.validation_result(:P32_ID,''QMIN'');'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_validation_condition_type=> 'NOT_DISPLAYING_INLINE_VALIDATION_ERRORS',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26613331508798269 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29352121406133950 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'METER_SIZE(REQUIRED_MESC_CODE)',
  p_validation_sequence=> 1580,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''REQUIRED_MESC_CODE'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26615316517798270 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29353221190143377 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'EXISTING_METY_CODE',
  p_validation_sequence=> 1590,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''EXISTING_METY_CODE'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26603305232798261 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29368509201149391 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'EXISTING_MESC_CODE',
  p_validation_sequence=> 1600,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''EXISTING_MESC_CODE'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26602128209798259 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29369504137157387 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'EXISTING_METER_SERIAL_NO',
  p_validation_sequence=> 1610,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''EXISTING_METER_SERIAL_NO'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26615501727798272 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 1016825630797242 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'EXISTING_PRTY_ID',
  p_validation_sequence=> 1615,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''EXISTING_PRTY_ID'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 47849507964147543 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29370521452162408 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'EXISTING_METER_MODEL',
  p_validation_sequence=> 1620,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''EXISTING_METR_CODE'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26615702745798272 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29371501498166094 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'EXISTING_LOGGER',
  p_validation_sequence=> 1630,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''EXISTING_LOGGER'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26614128028798270 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29372514311169812 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'EXISTING_CONVERTOR',
  p_validation_sequence=> 1640,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''EXISTING_CONVERTOR'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26605117677798262 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29373502321175772 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'MARKET_SECTOR_CODE',
  p_validation_sequence=> 1650,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''MARKET_SECTOR_CODE'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26602501801798261 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 29374625870182544 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'OTHER_INFORMATION',
  p_validation_sequence=> 1660,
  p_validation => 'return #OWNER#.mip_quotation.validation_result(:P32_ID,''OTHER_INFORMATION'');',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26615918096798272 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 31933320266208509 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'TRIPARTITE',
  p_validation_sequence=> 1670,
  p_validation => '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_supp_prty_id parties.id%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)||
'END;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_when_button_pressed=> 28015631689078569 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_IN_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 45375510983592023 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'Agent Contact Mech Val  limit to 240 chars',
  p_validation_sequence=> 1675,
  p_validation => 'if length(:P32_AGENT_CONTACT_VALUE) > 240 then'||chr(10)||
'   return ''Limit of 240 chars'';'||chr(10)||
'else'||chr(10)||
'   return null;'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_associated_item=> 26606909427798264 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 41166830440802003 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'Access Instructions limit to 210 chars',
  p_validation_sequence=> 1680,
  p_validation => 'if length(:P32_ACCESS_ADDITIONAL) > 210 then'||chr(10)||
'   return ''Limit of 210 chars'';'||chr(10)||
'else'||chr(10)||
'   return null;'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_associated_item=> 26605928498798264 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 41199805693908489 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'MPRN_ALT limit to 250 chars',
  p_validation_sequence=> 1700,
  p_validation => 'if length(:P32_MPRN_ALT) > 250 then'||chr(10)||
'   return ''Limit of 250 chars'';'||chr(10)||
'else'||chr(10)||
'   return null;'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_associated_item=> 26606304208798264 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 41285327717197264 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'Access Instructions limit to 210 chars',
  p_validation_sequence=> 1710,
  p_validation => 'if length(v(''P32_EXISTING_METER_ASSET_PROVIDER'')) > 210 then'||chr(10)||
'   return ''Limit of 210 chars'';'||chr(10)||
'else'||chr(10)||
'   return null;'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_associated_item=> 26608328874798266 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 41355218348393261 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'Required metering pressure <=7000',
  p_validation_sequence=> 1740,
  p_validation => 'if :P32_REQUIRED_METERING_PRESSURE >7000 then'||chr(10)||
'   return ''Maximum value allowed 7000'';'||chr(10)||
'else'||chr(10)||
'   return null;'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_validation_condition_type=> 'NOT_DISPLAYING_INLINE_VALIDATION_ERRORS',
  p_associated_item=> 26603910634798262 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 41358511338410184 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'P32_INDICATIVE_DATE',
  p_validation_sequence=> 1750,
  p_validation => 'P32_INDICATIVE_DATE',
  p_validation2 => '^([012]?[[:digit:]]|3[01])[-/. ]?(0?[[:digit:]]|1[012])[-/. ]?[[:digit:]]{4}$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Date format not recognized.',
  p_associated_item=> 26604106758798262 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 41361727184433666 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'Job description limit to 500 chars',
  p_validation_sequence=> 1760,
  p_validation => 'if length(v(''P32_JOB_DESCRIPTION'')) > 500 then'||chr(10)||
'   return ''Limit of 500 chars'';'||chr(10)||
'else'||chr(10)||
'   return null;'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_associated_item=> 26607719093798266 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 41450809671939625 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'QMAX <= 999999',
  p_validation_sequence=> 1770,
  p_validation => 'if :P32_QMAX > 999999.999 then'||chr(10)||
'   return ''Maximum value allowed 999999.999'';'||chr(10)||
'else'||chr(10)||
'   return null;'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_validation_condition_type=> 'NOT_DISPLAYING_INLINE_VALIDATION_ERRORS',
  p_associated_item=> 26615123286798270 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 41451604954947694 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'QMIN<= 999999',
  p_validation_sequence=> 1780,
  p_validation => 'if :P32_QMIN > 999999.999 then'||chr(10)||
'   return ''Maximum value allowed 999999.999'';'||chr(10)||
'else'||chr(10)||
'   return null;'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_validation_condition_type=> 'NOT_DISPLAYING_INLINE_VALIDATION_ERRORS',
  p_associated_item=> 26613331508798269 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 41779623082287092 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'REQUIRE_IP_MBAR >=2000 <=7000',
  p_validation_sequence=> 1800,
  p_validation => 'if :P32_REQUIRED_IP_MBAR < 2000 or :P32_REQUIRED_IP_MBAR > 7000 then'||chr(10)||
'   return ''Values allowed 2000-7000'';'||chr(10)||
'else'||chr(10)||
'   return null;'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_validation_condition_type=> 'NOT_DISPLAYING_INLINE_VALIDATION_ERRORS',
  p_associated_item=> 26613900401798270 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 41786810184302359 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'IP DETAILS limit to 250 chars',
  p_validation_sequence=> 1810,
  p_validation => 'if length(v(''P32_REQUIRED_IP_DETAILS'')) > 250 then'||chr(10)||
'   return ''Limit of 250 chars'';'||chr(10)||
'else'||chr(10)||
'   return null;'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_associated_item=> 26613728313798270 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 45379526876643917 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'Meter Serial Num limit to 30 chars',
  p_validation_sequence=> 1820,
  p_validation => 'if length(:P32_EXISTING_METER_SERIAL_NO) > 30 then'||chr(10)||
'   return ''Limit of 30 chars'';'||chr(10)||
'else'||chr(10)||
'   return null;'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_associated_item=> 26615501727798272 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 45382431855654822 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'Meter model limit to 20 chars',
  p_validation_sequence=> 1830,
  p_validation => 'if length(:P32_EXISTING_METER_MODEL) > 20 then'||chr(10)||
'   return ''Limit of 20 chars'';'||chr(10)||
'else'||chr(10)||
'   return null;'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_associated_item=> 26615702745798272 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'F|#OWNER#:ENQUIRIES:P32_ID:ID';

wwv_flow_api.create_page_process(
  p_id     => 26617929321798273 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'DML_FETCH_ROW',
  p_process_name=> 'Fetch Row from ENQUIRIES',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to fetch enquiry.',
  p_process_when=>''||chr(10)||
'',
  p_process_when_type=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P32_EXISTING_METER_MODEL';

wwv_flow_api.create_page_process(
  p_id     => 7116409931155337 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 3,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET EXISTING METER MODEL',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P32_L_EXISTING_METR_CODE',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P32_AMR_REQUIRED';

wwv_flow_api.create_page_process(
  p_id     => 7112226844056157 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'Reset AMR',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P32_L_AMR_REQUIRED',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P32_ANNUAL_QUANTITY';

wwv_flow_api.create_page_process(
  p_id     => 7112521434063976 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'Reset Annual Quantity',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P32_L_ANNUAL_QUANTITY',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P32_BASE_REQUIRED';

wwv_flow_api.create_page_process(
  p_id     => 7112706674069215 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'Reset Base Required',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P32_L_BASE_REQUIRED',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P32_BYPASS_REQUIRED';

wwv_flow_api.create_page_process(
  p_id     => 7113028491075526 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'Reset Bypass Required',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P32_L_BYPASS_REQUIRED',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P32_CONVERTOR_REQUIRED';

wwv_flow_api.create_page_process(
  p_id     => 7113217194081739 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'Reset Convertor Required',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P32_L_CONVERTOR_REQUIRED',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P32_DS_BOOSTER_OR_COMPRESS';

wwv_flow_api.create_page_process(
  p_id     => 7113406590088137 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'Reset DS Booster',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P32_L_DS_BOOSTER_OR_COMPRESS',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P32_EMS_REQUIRED';

wwv_flow_api.create_page_process(
  p_id     => 7113600487095793 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'Reset EMS required',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P32_L_EMS_REQUIRED',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P32_EXISTING_CONVERTOR';

wwv_flow_api.create_page_process(
  p_id     => 7113823343102454 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'Reset EXISTING CONVERTOR',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P32_L_EXISTING_CONVERTOR',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P32_EXISTING_LOGGER';

wwv_flow_api.create_page_process(
  p_id     => 7114011354108404 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET EXISTING LOGGER',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P32_L_EXISTING_LOGGER',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P32_EXISTING_METER_OWNER';

wwv_flow_api.create_page_process(
  p_id     => 7115826984141315 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET EXISTING METER OWNER',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P32_L_EXISTING_METER_OWNER',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P32_EXISTING_METER_SERIAL_NO';

wwv_flow_api.create_page_process(
  p_id     => 7116229193151421 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET EXISTING METER SERIAL NO',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P32_L_EXISTING_METER_SERIAL_NO',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P32_HOUSING_REQUIRED';

wwv_flow_api.create_page_process(
  p_id     => 7117110885174521 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET HOUSING REQUIRED',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P32_L_HOUSING_REQUIRED',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P32_LOAD_CONTROL_TYPE';

wwv_flow_api.create_page_process(
  p_id     => 7117331664180482 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET LOAD CONTROL TYPE',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P32_L_LOAD_CONTROL_TYPE',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P32_MPRN';

wwv_flow_api.create_page_process(
  p_id     => 7117509978183764 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET MPRN',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P32_L_MPRN',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P32_MPRN_ALT';

wwv_flow_api.create_page_process(
  p_id     => 7117725215188117 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET MPRN ALT',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P32_L_MPRN_ALT',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P32_REQUIRED_IP_DETAILS';

wwv_flow_api.create_page_process(
  p_id     => 7118823755282300 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET REQUIRED IP DETAILS',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P32_L_REQUIRED_IP_DETAILS',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P32_REQUIRED_IP_MBAR';

wwv_flow_api.create_page_process(
  p_id     => 7119013150288687 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET REQUIRED IP MBAR',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P32_L_REQUIRED_IP_MBAR',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P32_METER_SIZE';

wwv_flow_api.create_page_process(
  p_id     => 7119210857297525 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET REQUIRED MESC CODE',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P32_L_REQUIRED_MESC_CODE',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P32_REQUIRED_METERING_PRESSURE';

wwv_flow_api.create_page_process(
  p_id     => 7119611250326026 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET REQUIRED METERING PRESSURE',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P32_L_REQUIRED_METERING_PRESSURE',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P32_L_REQUIRED_SVCP_CODE';

wwv_flow_api.create_page_process(
  p_id     => 7119827527330707 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET REQUIRED SVCP CPDE',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P32_L_REQUIRED_SVCP_CODE',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P32_TWIN_STREAM_REQUIRED';

wwv_flow_api.create_page_process(
  p_id     => 7120014498336406 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET TWIN STREAM REQUIRED',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P32_L_TWIN_STREAM_REQUIRED',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P32_EXISTING_MESC_CODE';

wwv_flow_api.create_page_process(
  p_id     => 7812331311961920 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET EXISTING MESC CODE',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'RETURN (:P32_L_EXISTING_MESC_CODE = ''H'' OR :P32_EXISTING_METER_MODEL <> ''OTHER'');',
  p_process_when_type=>'FUNCTION_BODY',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P32_QMAX';

wwv_flow_api.create_page_process(
  p_id     => 7740121136555315 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 7,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET QMAX',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'RETURN NOT mip_enquiry.show_qmax('||chr(10)||
'p_enty_code => :p32_enty_code, '||chr(10)||
'p_existing_metr_code => :p32_existing_meter_model,'||chr(10)||
'p_existing_mesc_code => :p32_existing_mesc_code,'||chr(10)||
'p_required_mesc_code => :p32_meter_size);',
  p_process_when_type=>'FUNCTION_BODY',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'IF :P32_ID IS NULL THEN'||chr(10)||
'  apex_application.g_request := ''INSERT'';'||chr(10)||
'ELSE'||chr(10)||
'  apex_application.g_request := ''UPDATE'';'||chr(10)||
'END IF;';

wwv_flow_api.create_page_process(
  p_id     => 7743721810754248 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 35,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'ChangeRequest',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P32_EXISTING_METER_MODEL',
  p_process_when_type=>'REQUEST_EQUALS_CONDITION',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare '||chr(10)||
'  function get_pk return varchar2 '||chr(10)||
'  is '||chr(10)||
'  begin '||chr(10)||
'    for c1 in (select ENQU_SEQ.nextval next_val'||chr(10)||
'               from dual)'||chr(10)||
'    loop'||chr(10)||
'        return c1.next_val;'||chr(10)||
'    end loop;'||chr(10)||
'  end; '||chr(10)||
'begin '||chr(10)||
'  :P32_ID := get_pk; '||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 26618115320798275 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 40,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Get PK',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to create enquiry, primary key error',
  p_process_when=>'SITE_DETAIL_SAVE,SITE_ADDRESS_SAVE,CONTACT_DETAILS_SAVE,SECOND_CONTACT_DETAILS_SAVE,JOB_INFO_SAVE,INSERT',
  p_process_when_type=>'REQUEST_IN_CONDITION',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'#OWNER#:ENQUIRIES:P32_ID:ID|IU';

wwv_flow_api.create_page_process(
  p_id     => 26618322200798275 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 50,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'DML_PROCESS_ROW',
  p_process_name=> 'Process Row of ENQUIRIES',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to save enquiry',
  p_process_when=>'delete_enquiry,MANUAL_QUOTE,APPLY_METER_MODEL_CHANGES',
  p_process_when_type=>'REQUEST_NOT_IN_CONDITION',
  p_process_success_message=> 'Enquiry has been saved.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'--Used to set the agent and supplier associations by writing records to the enquiry_roles table'||chr(10)||
'declare '||chr(10)||
'  success  boolean;'||chr(10)||
'begin'||chr(10)||
'  if :P32_ID is not null then'||chr(10)||
'    if :P32_MKTP_REF is not null then'||chr(10)||
'      success := #OWNER#.mip_enquiry.set_enquiry_role(:P32_ID,:P32_MKTP_REF,''ENQ SUPP'');'||chr(10)||
'    end if;'||chr(10)||
'    --Used when an agent creates an enquiry'||chr(10)||
'    if :P32_MKTP_REF2 is not null then'||chr(10)||
'      s';

p:=p||'uccess := #OWNER#.mip_enquiry.set_enquiry_role(:P32_ID,:P32_MKTP_REF2,''ENQ SUPP'');'||chr(10)||
'    end if;'||chr(10)||
'  end if;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 26618525140798275 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 90,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Create ENQ SUPP',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to create enquiry, primary key error',
  p_process_when=>'mip_enquiry.get_enquiry_role(p_enquiryid => :P32_ID,'||chr(10)||
'                                          p_rolecode => ''ENQ SUPP'') is null'||chr(10)||
'',
  p_process_when_type=>'PLSQL_EXPRESSION',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'--Used to set the creator associations by writing records to the enquiry_roles table'||chr(10)||
'declare '||chr(10)||
'  success  boolean;'||chr(10)||
'begin'||chr(10)||
'  if :P32_ID is not null then'||chr(10)||
'    success := #OWNER#.mip_enquiry.set_enquiry_role(:P32_ID, #OWNER#.mip_parties.get_user_id(v(''APP_USER'')), ''ENQ CREATE'');'||chr(10)||
'  end if;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 26618723882798275 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 100,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Created By',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to create enquiry, primary key error',
  p_process_when=>'mip_enquiry.get_enquiry_status(p_enquiryid => :P32_ID) is null',
  p_process_when_type=>'PLSQL_EXPRESSION',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'--Used to set the in progress event to the enquiry_events table'||chr(10)||
'declare '||chr(10)||
'  success  boolean;'||chr(10)||
'begin'||chr(10)||
'  if :P32_ID is not null then'||chr(10)||
'    success := #OWNER#.mip_enquiry.set_enquiry_event(:P32_ID, ''INP'');'||chr(10)||
'  end if;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 26618931737798275 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 110,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Created On',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to save created on date',
  p_process_when=>'mip_enquiry.get_enquiry_status(p_enquiryid => :P32_ID) is null',
  p_process_when_type=>'PLSQL_EXPRESSION',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'--Used to set the agent and supplier associations by writing records to the enquiry_roles table'||chr(10)||
'declare'||chr(10)||
'  e_file_error EXCEPTION;'||chr(10)||
'  l_msg varchar2(400) := ''There was a problem attempting to save file to enquiry (files must be less than 3 megabytes in size, there is a 10 megabyte limit for files attached to an enquiry)'';'||chr(10)||
'  success  boolean;'||chr(10)||
'begin'||chr(10)||
'  if :P32_ID is not null then'||chr(10)||
'    if v(''P32_U';

p:=p||'PLOAD_ASSET_LOCATION_NOTES'') is not null then'||chr(10)||
'      success := #OWNER#.mip_files.set_file_association(v(''P32_UPLOAD_ASSET_LOCATION_NOTES''),'||chr(10)||
'                                                        ''Asset Location file for enquiry'','||chr(10)||
'                                                        ''INDO'','||chr(10)||
'                                                        ''ENQUIRY SUPPORTING DOC'','||chr(10)||
'                  ';

p:=p||'                                      null,'||chr(10)||
'                                                        :P32_ID,'||chr(10)||
'                                                        null,'||chr(10)||
'                                                        ''ENDO'');'||chr(10)||
'      if not success then raise_application_error(-20001, l_msg); end if;'||chr(10)||
'      #OWNER#.mip_virus_check.check_file(v(''P32_UPLOAD_ASSET_LOCATION_NOTES''));'||chr(10)||
'    ';

p:=p||'end if;'||chr(10)||
'   '||chr(10)||
'  end if;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 26617705439798273 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 120,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Create File Association',
  p_process_sql_clob => p, 
  p_process_error_message=> 'There was a problem attempting to save file to enquiry (files must be less than 3 megabytes in size, there is a 10 megabyte limit for files attached to an enquiry)',
  p_process_when=>'',
  p_process_when_type=>'REQUEST_EQUALS_CONDITION',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'--Used to set the agent and supplier associations by writing records to the enquiry_roles table'||chr(10)||
'declare '||chr(10)||
'  success  boolean;'||chr(10)||
'begin'||chr(10)||
'  if :P32_ID is not null then'||chr(10)||
'    if nvl(:P32_AGENT_ID,''%null%'') <> ''%null%'' then '||chr(10)||
'      success := #OWNER#.mip_enquiry.set_enquiry_role(:P32_ID,:P32_AGENT_ID,''ENQ OWN'');'||chr(10)||
'    end if;'||chr(10)||
'    --Used when an agent creates an enquiry'||chr(10)||
'    if nvl(:P32_AGENT_ID2,''%null%';

p:=p||''') <> ''%null%'' then'||chr(10)||
'      success := #OWNER#.mip_enquiry.set_enquiry_role(:P32_ID,:P32_AGENT_ID2,''ENQ OWN'');'||chr(10)||
'    end if;'||chr(10)||
'  end if;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 26619110557798275 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 200,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Create ENQ OWN role',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to create enquiry, primary key error',
  p_process_when=>'mip_enquiry.get_enquiry_role(p_enquiryid => :P32_ID,'||chr(10)||
'                                          p_rolecode => ''ENQ OWN'') is null'||chr(10)||
'',
  p_process_when_type=>'PLSQL_EXPRESSION',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'--Used to set the agent and supplier associations by writing records to the enquiry_roles table'||chr(10)||
'declare '||chr(10)||
'  success boolean;'||chr(10)||
'  partyid number;'||chr(10)||
'  cursor c_partyid is SELECT prty_id FROM v_latest_rt_code_for_enro where rt_code=''ENQ OWN'' and enqu_id=:P32_ID;'||chr(10)||
''||chr(10)||
'begin'||chr(10)||
''||chr(10)||
''||chr(10)||
'    open c_partyid;'||chr(10)||
'      fetch c_partyid into partyid;'||chr(10)||
'    close c_partyid;'||chr(10)||
''||chr(10)||
'  if :P32_ID is not null then'||chr(10)||
'    if nvl(:P3';

p:=p||'2_AGENT_ID,''%null%'') <> ''%null%'' and :P32_AGENT_ID <> partyid then'||chr(10)||
'      success := #OWNER#.mip_enquiry.set_enquiry_role(:P32_ID,:P32_AGENT_ID,''ENQ OWN'');'||chr(10)||
'    end if;'||chr(10)||
'    --Used when an agent creates an enquiry'||chr(10)||
'    if nvl(:P32_AGENT_ID,''%null%'') <> ''%null%'' and :P32_AGENT_ID2 <> partyid then'||chr(10)||
'      success := #OWNER#.mip_enquiry.set_enquiry_role(:P32_ID,:P32_AGENT_ID2,''ENQ OWN'');'||chr(10)||
'    end if;';

p:=p||''||chr(10)||
'  end if;'||chr(10)||
''||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 26619325386798275 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 210,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Create Agent Role',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to create enquiry, primary key error',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'--Used to set the amender associations by writing records to the enquiry_roles table'||chr(10)||
'declare '||chr(10)||
'  success  boolean;'||chr(10)||
'begin'||chr(10)||
'  if :P32_ID is not null then'||chr(10)||
'    success := #OWNER#.mip_enquiry.set_enquiry_role(:P32_ID, #OWNER#.mip_parties.get_user_id(v(''APP_USER'')), ''ENQ AMEND'');'||chr(10)||
'  end if;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 26619506100798275 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 220,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Amended By',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to create enquiry, primary key error',
  p_process_when=>'SITE_DETAIL_UPDATE,SITE_ADDRESS_UPDATE,CONTACT_DETAILS_UPDATE,SECOND_CONTACT_DETAILS_UPDATE,JOB_INFO_UPDATE',
  p_process_when_type=>'REQUEST_IN_CONDITION',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||''||chr(10)||
''||chr(10)||
'--if the user is a I&C User then pass the current user + the agent on behalf, else sent the agent id'||chr(10)||
'if :P32_AGENT_ID is not null then  #OWNER#.mip_quotation.produce_quotes(:P32_ID,#OWNER#.mip_parties.get_user_id(v(''APP_USER'')),:P32_AGENT_ID);'||chr(10)||
'else'||chr(10)||
'  #OWNER#.mip_quotation.produce_quotes(:P32_ID,:P32_AGENT_ID2);'||chr(10)||
'end if;';

wwv_flow_api.create_page_process(
  p_id     => 28016423555114012 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 230,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Request Quotation',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>28015631689078569 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare'||chr(10)||
'l_success varchar2(240);'||chr(10)||
'begin'||chr(10)||
'l_success := #OWNER#.mip_enquiry.delete_enquiry(:P32_ID);'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 31425221873930380 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 240,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'delete enquiry',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to delete enquiry, live quote may exist for this enquiry',
  p_process_when_button_id=>31354104183698139 + wwv_flow_api.g_id_offset,
  p_process_when=>':P32_ID is not null and #OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'')',
  p_process_when_type=>'PLSQL_EXPRESSION',
  p_process_success_message=> 'Enquiry has been deleted',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'--write code to get the quote id'||chr(10)||
'declare'||chr(10)||
'l_qute_id number;'||chr(10)||
'  partyid number;'||chr(10)||
'  cursor c_partyid is SELECT prty_id FROM v_latest_rt_code_for_enro where rt_code=''ENQ OWN'' and enqu_id=:P32_ID;'||chr(10)||
'begin'||chr(10)||
'  open c_partyid;'||chr(10)||
'    fetch c_partyid into partyid;'||chr(10)||
'  close c_partyid;'||chr(10)||
'  select id into l_qute_id from quotes where enqu_id = :P32_ID;'||chr(10)||
'  :P41_QUTE_ID := l_qute_id; '||chr(10)||
'  :P41_AGENT_ID := :partyid;';

p:=p||''||chr(10)||
'  :P41_DELETE_ONLY := ''NO'';'||chr(10)||
'  :P41_ENQU_ID := null;'||chr(10)||
'  :P41_DRWG_CODE := null;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 31663127018004072 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 250,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'manual_quote',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>26601725488798259 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'--write code to get the quote id'||chr(10)||
'declare'||chr(10)||
'l_qute_id number;'||chr(10)||
''||chr(10)||
'begin'||chr(10)||
''||chr(10)||
'  select id into l_qute_id from quotes where enqu_id = :P32_ID;'||chr(10)||
'  :P41_QUTE_ID := l_qute_id; '||chr(10)||
'  :P41_DELETE_ONLY := ''YES'';'||chr(10)||
'  :P41_ENQU_ID := null;'||chr(10)||
'  :P41_DRWG_CODE := null;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 31859422953527981 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 260,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'delete manual_quote',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>31857019013517337 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare'||chr(10)||
'l_success varchar2(240);'||chr(10)||
'begin'||chr(10)||
' if not #OWNER#.mip_quotation.delete_quotes_for_enquiry(:P32_ID,l_success) then'||chr(10)||
'   raise no_data_found;'||chr(10)||
' end if;'||chr(10)||
'   '||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 8193103237481506 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 270,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Delete Quotes',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to delete quotes for this enquiry, live quote may exist for this enquiry',
  p_process_when_button_id=>8192812719443370 + wwv_flow_api.g_id_offset,
  p_process_when=>':P32_ID is not null and #OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'')',
  p_process_when_type=>'PLSQL_EXPRESSION',
  p_process_success_message=> 'All quotes associated with this enquiry have been deleted',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 32
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00040
prompt  ...PAGE 40: Administration
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 40,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Administration',
  p_step_title=> 'Administration',
  p_step_sub_title => 'Administration',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'DHARSHANIK',
  p_last_upd_yyyymmddhh24miss => '20080128103127',
  p_page_comment  => '');
 
end;
 
end;
/

 
begin
 
null;
 
end;
/

 
begin
 
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 40
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00041
prompt  ...PAGE 41: Upload File
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 41,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Upload File',
  p_step_title=> 'Upload File',
  p_step_sub_title => 'Upload File',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_role => 16097609166220701+ 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 => '20080313102950',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 26588632458789811 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 41,
  p_plug_name=> 'Upload File',
  p_region_name=>'',
  p_plug_template=> 28035733013354425+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 20,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => 'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_plug_display_when_condition => 'P41_DELETE_ONLY',
  p_plug_display_when_cond2=>'YES',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'SELECT d.uri, d.id as "ID",''Delete'' as "Delete", apex_util.prepare_url(''f?p=&APP_ID.:42:&SESSION.::&DEBUG.::P41_ID:''||d.id) as url FROM documents d, document_roles dr,v_current_document_status s where (dr.enqu_id=:P41_ENQU_ID or dr.DRWG_CODE=:P41_DRWG_CODE or dr.QUTE_ID=:P41_QUTE_ID) and d.id=dr.docu_id and s.docu_id = d.id and s.dost_code = ''AVAILABLE'';';

wwv_flow_api.create_report_region (
  p_id=> 30931518094987903 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 41,
  p_name=> 'Current Files',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 10,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_display_when_condition=> 'if not :P41_ENQU_ID is null and :P41_DRWG_CODE is null and :P41_QUTE_ID is null then'||chr(10)||
'  return true;'||chr(10)||
'else'||chr(10)||
'  if not :P41_DRWG_CODE is null or not :P41_QUTE_ID is null and #OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'') then'||chr(10)||
'    return true;'||chr(10)||
'  else'||chr(10)||
'    return false;'||chr(10)||
'  end if;'||chr(10)||
'end if;',
  p_display_condition_type=> 'FUNCTION_BODY',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 28041136573354435+ wwv_flow_api.g_id_offset,
  p_plug_query_max_columns=> 4,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '50',
  p_query_options=> 'GENERIC_REPORT_COLUMNS',
  p_query_show_nulls_as=> ' - ',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'no data found',
  p_query_num_rows_type=> 'NEXT_PREVIOUS_LINKS',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 30957600985247897 + wwv_flow_api.g_id_offset,
  p_region_id=> 30931518094987903 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'COL01',
  p_column_display_sequence=> 1,
  p_column_heading=> 'File Name',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 30957713582247897 + wwv_flow_api.g_id_offset,
  p_region_id=> 30931518094987903 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'COL02',
  p_column_display_sequence=> 2,
  p_column_heading=> 'id',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 30957814871247897 + wwv_flow_api.g_id_offset,
  p_region_id=> 30931518094987903 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'COL03',
  p_column_display_sequence=> 3,
  p_column_heading=> '',
  p_column_link=>'javascript:var confDel = null;confDel= confirm(''Are you sure you want to delete this file'');if (confDel==true){redirect(''#COL04#'');}  else{redirect(''f?p=&APP_ID.:41:&SESSION.::&DEBUG.::'');}   ',
  p_column_linktext=>'Delete',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'NOT_EXISTS',
  p_display_when_condition=> 'select * from v_current_quote_status t where t.qust_code = ''ACCEPTED'' and t.qute_id = :P41_QUTE_ID;',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'N',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 30957923724247897 + wwv_flow_api.g_id_offset,
  p_region_id=> 30931518094987903 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'COL04',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Col04',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 26588816352789811 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 41,
  p_button_sequence=> 10,
  p_button_plug_id => 26588632458789811+wwv_flow_api.g_id_offset,
  p_button_name    => 'UPLOAD',
  p_button_image_alt=> 'Upload',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_cattributes=>'id="upload" name="upload"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>26590701997789814 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 41,
  p_branch_action=> 'f?p=&APP_ID.:&P41_PREVIOUS_PAGE.:&SESSION.::&DEBUG.::P41_DELETE_ONLY:NO&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 10,
  p_branch_comment=> 'Created 16-JAN-2008 17:06 by PRIESTJ');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26589000567789811 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 41,
  p_name=>'P41_ENQU_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 26588632458789811+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26589205513789812 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 41,
  p_name=>'P41_QUTE_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 26588632458789811+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26589422554789812 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 41,
  p_name=>'P41_DRWG_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 30,
  p_item_plug_id => 26588632458789811+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26589627456789812 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 41,
  p_name=>'P41_FILE_UPLOAD',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 40,
  p_item_plug_id => 26588632458789811+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'File Upload',
  p_source_type=> 'STATIC',
  p_display_as=> 'FILE',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26589831824789812 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 41,
  p_name=>'P41_PREVIOUS_PAGE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 50,
  p_item_plug_id => 26588632458789811+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>31006832554711233 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 41,
  p_name=>'P41_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 60,
  p_item_plug_id => 30931518094987903+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>31863404169541469 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 41,
  p_name=>'P41_AGENT_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 70,
  p_item_plug_id => 26588632458789811+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>31881110533552747 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 41,
  p_name=>'P41_DELETE_ONLY',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 80,
  p_item_plug_id => 30931518094987903+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 45007827738838281 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 41,
  p_validation_name => 'Must Enter Filename',
  p_validation_sequence=> 10,
  p_validation => 'P41_FILE_UPLOAD',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Filename must be entered',
  p_when_button_pressed=> 26588816352789811 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26589627456789812 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare '||chr(10)||
'  success  boolean;'||chr(10)||
'  l_file_exists boolean;'||chr(10)||
'begin'||chr(10)||
'  --find exisiting'||chr(10)||
'  l_file_exists := #OWNER#.mip_files.drawing_file_exists(:P41_DRWG_CODE);'||chr(10)||
'  if l_file_exists then'||chr(10)||
'    --overwrite the current document reference'||chr(10)||
'    success := #OWNER#.mip_files.update_file_association(v(''P41_FILE_UPLOAD''),'||chr(10)||
'                                                        ''Drawing manually updated'','||chr(10)||
'   ';

p:=p||'                                                     ''INDO'','||chr(10)||
'                                                        null,'||chr(10)||
'                                                        null,'||chr(10)||
'                                                        :P41_DRWG_CODE);'||chr(10)||
'    #OWNER#.mip_virus_check.check_file(v(''P41_FILE_UPLOAD''));      '||chr(10)||
'  else'||chr(10)||
'    --upload a new document'||chr(10)||
'    success := #OWNER#.mip_files';

p:=p||'.set_file_association(v(''P41_FILE_UPLOAD''),'||chr(10)||
'                                                      ''Drawing manually uploaded'','||chr(10)||
'                                                      ''INDO'','||chr(10)||
'                                                      ''HIGH DEFINITION DRAWING'','||chr(10)||
'                                                      null,'||chr(10)||
'                                                      null,'||chr(10)||
'    ';

p:=p||'                                                  :P41_DRWG_CODE,'||chr(10)||
'                                                      ''DRRO'');'||chr(10)||
'    #OWNER#.mip_virus_check.check_file(v(''P41_FILE_UPLOAD''));'||chr(10)||
'  end if;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 26590400402789814 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 41,
  p_process_sequence=> 20,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Upload Drawing',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Failed to upload drawing',
  p_process_when=>'not :P41_DRWG_CODE is null and :P41_ENQU_ID is null and :P41_QUTE_ID is null',
  p_process_when_type=>'PLSQL_EXPRESSION',
  p_process_success_message=> 'Drawing uploaded',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare '||chr(10)||
'  success  boolean;'||chr(10)||
'begin'||chr(10)||
'  if not #OWNER#.mip_files.quote_file_exists(:P41_QUTE_ID) then'||chr(10)||
'    success := #OWNER#.mip_files.set_file_association(v(''P41_FILE_UPLOAD''),'||chr(10)||
'                                     ''Manual Quotation uploaded'','||chr(10)||
'                                     ''INDO'','||chr(10)||
'                                     ''MANUAL QUOTATION'','||chr(10)||
'                                     :P41_QUTE_ID';

p:=p||','||chr(10)||
'                                     null,'||chr(10)||
'                                     null,'||chr(10)||
'                                     ''QUDO'');'||chr(10)||
'    #OWNER#.mip_virus_check.check_file(v(''P41_FILE_UPLOAD'')); '||chr(10)||
'    if success then'||chr(10)||
'      #OWNER#.mip_quotation.select_quote(:P41_QUTE_ID, #OWNER#.mip_parties.get_user_id(v(''APP_USER'')), :P41_AGENT,''Manually uploaded quote'');'||chr(10)||
'    end if;'||chr(10)||
'  end if;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 26590228048789814 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 41,
  p_process_sequence=> 30,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Upload Manual Quote',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Failed to upload Manual Quote',
  p_process_when=>'not :P41_QUTE_ID is null and :P41_ENQU_ID is null and :P41_DRWG_CODE is null',
  p_process_when_type=>'PLSQL_EXPRESSION',
  p_process_success_message=> 'Manual Quotation uploaded',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare '||chr(10)||
'  e_file_error EXCEPTION;'||chr(10)||
'  success  boolean;'||chr(10)||
'begin'||chr(10)||
'  success:= #OWNER#.mip_files.set_file_association(v(''P41_FILE_UPLOAD''),'||chr(10)||
'                                                    ''File added to Enquiry'','||chr(10)||
'                                                    ''INDO'','||chr(10)||
'                                                    ''ENQUIRY SUPPORTING DOC'','||chr(10)||
'                                           ';

p:=p||'         null,'||chr(10)||
'                                                    :P41_ENQU_ID,'||chr(10)||
'                                                    null,'||chr(10)||
'                                                    ''ENDO'');'||chr(10)||
''||chr(10)||
'  if not success then'||chr(10)||
'    RAISE e_file_error;'||chr(10)||
'  end if;'||chr(10)||
'  #OWNER#.mip_virus_check.check_file(v(''P41_FILE_UPLOAD''));'||chr(10)||
'EXCEPTION'||chr(10)||
'when e_file_error then'||chr(10)||
'  #OWNER#.cout_err.report_and_stop(-201';

p:=p||'00);'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 26590027120789814 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 41,
  p_process_sequence=> 40,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Upload Enquiry File',
  p_process_sql_clob => p, 
  p_process_error_message=> 'There was a problem attempting to save file to enquiry (files must be less than 3 megabytes in size, there is a 10 megabyte limit for files attached to an enquiry)',
  p_process_when=>'not :P41_ENQU_ID is null and :P41_QUTE_ID is null and :P41_DRWG_CODE is null',
  p_process_when_type=>'PLSQL_EXPRESSION',
  p_process_success_message=> 'File for enquiry uploaded',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 41
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00042
prompt  ...PAGE 42: Delete File
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 42,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Delete File',
  p_step_title=> 'Delete File',
  p_step_sub_title => 'Delete File',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_role => 14572900838700208+ 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 => '20080212133433',
  p_page_is_public_y_n=> 'N',
  p_protection_level=> 'C',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 31047604428147819 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 42,
  p_plug_name=> 'Deleted file',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 31048631093155545 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 42,
  p_button_sequence=> 10,
  p_button_plug_id => 31047604428147819+wwv_flow_api.g_id_offset,
  p_button_name    => 'BACK',
  p_button_image_alt=> 'Back',
  p_button_position=> 'TOP',
  p_button_alignment=> 'LEFT',
  p_button_cattributes=>'id="back" name="back"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>31040504119100441 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 42,
  p_branch_action=> 'f?p=&APP_ID.:&P41_PREVIOUS_PAGE.:&SESSION.::&DEBUG.:::&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'BEFORE_COMPUTATION',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 10,
  p_branch_comment=> 'Created 30-JAN-2008 17:21 by PRIESTJ');
 
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare'||chr(10)||
'  l_success boolean;'||chr(10)||
'begin'||chr(10)||
'  l_success := #OWNER#.mip_files.delete_file(v(''P41_ID''),''REMOVED USER'',''removed by ''||v(''APP_USER''));'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 30987424221558752 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 42,
  p_process_sequence=> 10,
  p_process_point=> 'BEFORE_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Delete',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to delete file',
  p_process_success_message=> 'File deleted successfully',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'This process will delete the file selected on page 41 ');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 42
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00050
prompt  ...PAGE 50: Bases
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph := null;
wwv_flow_api.create_page(
  p_id     => 50,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Bases',
  p_step_title=> 'Bases',
  p_step_sub_title => 'Bases',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> '',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => ' ',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'HARDYA',
  p_last_upd_yyyymmddhh24miss => '20080222150954',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>50,p_text=>h);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select "CODE", '||chr(10)||
'"DRWG_CODE",'||chr(10)||
'"DESCRIPTION",'||chr(10)||
'"DIM_A",'||chr(10)||
'"DIM_B",'||chr(10)||
'"DIM_C",'||chr(10)||
'"DIM_D",'||chr(10)||
'"DIM_E",'||chr(10)||
'"DIM_F",'||chr(10)||
'"DIM_G",'||chr(10)||
'"DIM_H",'||chr(10)||
'"DIM_I",'||chr(10)||
'"DEPTH"'||chr(10)||
'from "#OWNER#"."BASES" '||chr(10)||
'  '||chr(10)||
'';

wwv_flow_api.create_report_region (
  p_id=> 17926505274676344 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 50,
  p_name=> 'Bases',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 10,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_query_row_template=> 28041136573354435+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'no data found',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_query_row_count_max=> '500',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17927204186676348 + wwv_flow_api.g_id_offset,
  p_region_id=> 17926505274676344 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'CODE',
  p_column_display_sequence=> 1,
  p_column_heading=> 'Base',
  p_column_link=>'f?p=&APP_ID.:51:&SESSION.::&DEBUG.::P51_CODE,P51_CREATEUPDATE:#CODE#,UPDATE',
  p_column_linktext=>'#CODE#',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>1,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'BASES',
  p_ref_column_name=> 'CODE',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17927322360676348 + wwv_flow_api.g_id_offset,
  p_region_id=> 17926505274676344 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'DRWG_CODE',
  p_column_display_sequence=> 13,
  p_column_heading=> 'Drawing Code',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'BASES',
  p_ref_column_name=> 'DRWG_CODE',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17927404472676348 + wwv_flow_api.g_id_offset,
  p_region_id=> 17926505274676344 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'DESCRIPTION',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Base Description',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'BASES',
  p_ref_column_name=> 'DESCRIPTION',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17927500882676348 + wwv_flow_api.g_id_offset,
  p_region_id=> 17926505274676344 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'DIM_A',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Dim A (mm)',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'BASES',
  p_ref_column_name=> 'DIM_A',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17927600829676348 + wwv_flow_api.g_id_offset,
  p_region_id=> 17926505274676344 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'DIM_B',
  p_column_display_sequence=> 5,
  p_column_heading=> 'Dim B (mm)',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'BASES',
  p_ref_column_name=> 'DIM_B',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17927725445676348 + wwv_flow_api.g_id_offset,
  p_region_id=> 17926505274676344 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 6,
  p_form_element_id=> null,
  p_column_alias=> 'DIM_C',
  p_column_display_sequence=> 6,
  p_column_heading=> 'Dim C (mm)',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'BASES',
  p_ref_column_name=> 'DIM_C',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17927824175676350 + wwv_flow_api.g_id_offset,
  p_region_id=> 17926505274676344 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 7,
  p_form_element_id=> null,
  p_column_alias=> 'DIM_D',
  p_column_display_sequence=> 7,
  p_column_heading=> 'Dim D (mm)',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'BASES',
  p_ref_column_name=> 'DIM_D',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17926706846676347 + wwv_flow_api.g_id_offset,
  p_region_id=> 17926505274676344 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 8,
  p_form_element_id=> null,
  p_column_alias=> 'DIM_E',
  p_column_display_sequence=> 8,
  p_column_heading=> 'Dim E (mm)',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'BASES',
  p_ref_column_name=> 'DIM_E',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17926828492676348 + wwv_flow_api.g_id_offset,
  p_region_id=> 17926505274676344 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 9,
  p_form_element_id=> null,
  p_column_alias=> 'DIM_F',
  p_column_display_sequence=> 9,
  p_column_heading=> 'Dim F (mm)',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'BASES',
  p_ref_column_name=> 'DIM_F',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17926929575676348 + wwv_flow_api.g_id_offset,
  p_region_id=> 17926505274676344 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 10,
  p_form_element_id=> null,
  p_column_alias=> 'DIM_G',
  p_column_display_sequence=> 10,
  p_column_heading=> 'Dim G (mm)',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'BASES',
  p_ref_column_name=> 'DIM_G',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17927017873676348 + wwv_flow_api.g_id_offset,
  p_region_id=> 17926505274676344 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 11,
  p_form_element_id=> null,
  p_column_alias=> 'DIM_H',
  p_column_display_sequence=> 11,
  p_column_heading=> 'Dim H (mm)',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'BASES',
  p_ref_column_name=> 'DIM_H',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17927126016676348 + wwv_flow_api.g_id_offset,
  p_region_id=> 17926505274676344 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 12,
  p_form_element_id=> null,
  p_column_alias=> 'DIM_I',
  p_column_display_sequence=> 12,
  p_column_heading=> 'Dim I (mm)',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'BASES',
  p_ref_column_name=> 'DIM_I',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 24436512523431845 + wwv_flow_api.g_id_offset,
  p_region_id=> 17926505274676344 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 13,
  p_form_element_id=> null,
  p_column_alias=> 'DEPTH',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Depth (mm)',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 17927911554676350 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 50,
  p_button_sequence=> 30,
  p_button_plug_id => 17926505274676344+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image_alt=> 'Create',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:51:&SESSION.::&DEBUG.:51::',
  p_button_cattributes=>'id="create"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 50
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00051
prompt  ...PAGE 51: Create/Edit Base
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph:=ph||'<script language="JavaScript" type="text/javascript">'||chr(10)||
'<!--'||chr(10)||
''||chr(10)||
' htmldb_delete_message=''"DELETE_CONFIRM_MSG"'';'||chr(10)||
''||chr(10)||
'//-->'||chr(10)||
'</script>';

wwv_flow_api.create_page(
  p_id     => 51,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Create/Edit Base',
  p_step_title=> 'Create/Edit Base',
  p_step_sub_title => 'Create/Edit Base',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> '',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => ' ',
  p_html_page_header => ' ',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'HARDYA',
  p_last_upd_yyyymmddhh24miss => '20080222150922',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>51,p_text=>h);
wwv_flow_api.set_html_page_header(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>51,p_text=>ph);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 17935625087694720 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 51,
  p_plug_name=> 'Create/Edit Base',
  p_region_name=>'',
  p_plug_template=> 28035733013354425+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 17936402024694720 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 51,
  p_button_sequence=> 10,
  p_button_plug_id => 17935625087694720+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:50:&SESSION.::&DEBUG.:::',
  p_button_cattributes=>'id="cancel"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 17935831662694720 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 51,
  p_button_sequence=> 20,
  p_button_plug_id => 17935625087694720+wwv_flow_api.g_id_offset,
  p_button_name    => 'DELETE',
  p_button_image_alt=> 'Delete',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'javascript:confirmDelete(htmldb_delete_message,''DELETE'');',
  p_button_condition=> 'P51_CREATEUPDATE',
  p_button_condition2=> 'UPDATE',
  p_button_condition_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_button_cattributes=>'id="delete"',
  p_database_action=>'DELETE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 17936028723694720 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 51,
  p_button_sequence=> 30,
  p_button_plug_id => 17935625087694720+wwv_flow_api.g_id_offset,
  p_button_name    => 'SAVE',
  p_button_image_alt=> 'Apply Changes',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P51_CREATEUPDATE',
  p_button_condition2=> 'UPDATE',
  p_button_condition_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_button_cattributes=>'id="apply_changes"',
  p_database_action=>'UPDATE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 17936218129694720 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 51,
  p_button_sequence=> 40,
  p_button_plug_id => 17935625087694720+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image_alt=> 'Create',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P51_CREATEUPDATE',
  p_button_condition2=> 'CREATE',
  p_button_condition_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_button_cattributes=>'id="create"',
  p_database_action=>'INSERT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>17939908385694733 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 51,
  p_branch_action=> 'f?p=&APP_ID.:50:&SESSION.::&DEBUG.:::&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 1,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>17936611650694720 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 51,
  p_name=>'P51_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1,
  p_item_plug_id => 17935625087694720+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Base',
  p_source=>'CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'P51_CREATEUPDATE',
  p_read_only_when2=>'UPDATE',
  p_read_only_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>17936815146694726 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 51,
  p_name=>'P51_DRWG_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 130,
  p_item_plug_id => 17935625087694720+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Drawing Code',
  p_source=>'DRWG_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'DRAWINGS',
  p_lov => 'select code as display_value, code as return_value'||chr(10)||
'from drawings'||chr(10)||
'order by code',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>17937011527694726 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 51,
  p_name=>'P51_DESCRIPTION',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 17935625087694720+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Base Description',
  p_source=>'DESCRIPTION',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>17937219416694726 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 51,
  p_name=>'P51_DIM_A',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 40,
  p_item_plug_id => 17935625087694720+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Dim A (mm)',
  p_source=>'DIM_A',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>17937401506694726 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 51,
  p_name=>'P51_DIM_B',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 50,
  p_item_plug_id => 17935625087694720+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Dim B (mm)',
  p_source=>'DIM_B',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>17937621747694726 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 51,
  p_name=>'P51_DIM_D',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 70,
  p_item_plug_id => 17935625087694720+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Dim D (mm)',
  p_source=>'DIM_D',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>17937819933694728 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 51,
  p_name=>'P51_DIM_E',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 80,
  p_item_plug_id => 17935625087694720+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Dim E (mm)',
  p_source=>'DIM_E',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>17938007717694728 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 51,
  p_name=>'P51_DIM_F',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 90,
  p_item_plug_id => 17935625087694720+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Dim F (mm)',
  p_source=>'DIM_F',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>17938222205694728 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 51,
  p_name=>'P51_DIM_G',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 100,
  p_item_plug_id => 17935625087694720+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Dim G (mm)',
  p_source=>'DIM_G',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>17938400671694728 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 51,
  p_name=>'P51_DIM_H',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 110,
  p_item_plug_id => 17935625087694720+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Dim H (mm)',
  p_source=>'DIM_H',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>17938631626694728 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 51,
  p_name=>'P51_DIM_I',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 120,
  p_item_plug_id => 17935625087694720+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Dim I (mm)',
  p_source=>'DIM_I',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>17938813223694730 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 51,
  p_name=>'P51_DIM_C',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 60,
  p_item_plug_id => 17935625087694720+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Dim C (mm)',
  p_source=>'DIM_C',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>24503116763764192 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 51,
  p_name=>'P51_DEPTH',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 30,
  p_item_plug_id => 17935625087694720+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Depth (mm)',
  p_source=>'DEPTH',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>41757125890240672 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 51,
  p_name=>'P51_CREATEUPDATE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 140,
  p_item_plug_id => 17935625087694720+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default => 'CREATE',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 17939107852694730 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 51,
  p_validation_name => 'P51_CODE',
  p_validation_sequence=> 10,
  p_validation => 'P51_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Base code must be specified',
  p_associated_item=> 17936611650694720 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39171806415572197 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 51,
  p_validation_name => 'P51_DEPTH',
  p_validation_sequence=> 20,
  p_validation => 'P51_DEPTH',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Depth must be a numeric value',
  p_associated_item=> 24503116763764192 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39173118189575539 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 51,
  p_validation_name => 'P51_DIM_A',
  p_validation_sequence=> 30,
  p_validation => 'P51_DIM_A',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Dim A  must be a numeric value',
  p_associated_item=> 17937219416694726 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39174328925578717 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 51,
  p_validation_name => 'P51_DIM_B',
  p_validation_sequence=> 40,
  p_validation => 'P51_DIM_B',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Dim B must be a numeric value',
  p_associated_item=> 17937401506694726 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39175805507581363 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 51,
  p_validation_name => 'P51_DIM_C',
  p_validation_sequence=> 50,
  p_validation => 'P51_DIM_C',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Dim C must be a numeric value',
  p_associated_item=> 17938813223694730 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39177417281584816 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 51,
  p_validation_name => 'P51_DIM_D',
  p_validation_sequence=> 60,
  p_validation => 'P51_DIM_D',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Dim D must be a numeric value',
  p_associated_item=> 17937621747694726 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39179004945590636 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 51,
  p_validation_name => 'P51_DIM_E',
  p_validation_sequence=> 70,
  p_validation => 'P51_DIM_E',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Dim E must be a numeric value',
  p_associated_item=> 17937819933694728 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39180013949593308 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 51,
  p_validation_name => 'P51_DIM_F',
  p_validation_sequence=> 80,
  p_validation => 'P51_DIM_F',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Dim F must be a numeric value',
  p_associated_item=> 17938007717694728 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39181022261595686 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 51,
  p_validation_name => 'P51_DIM_G',
  p_validation_sequence=> 90,
  p_validation => 'P51_DIM_G',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Dim G must be a numeric value',
  p_associated_item=> 17938222205694728 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39182030572598050 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 51,
  p_validation_name => 'P51_DIM_H',
  p_validation_sequence=> 100,
  p_validation => 'P51_DIM_H',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Dim H must be a numeric value',
  p_associated_item=> 17938400671694728 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39183905769600423 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 51,
  p_validation_name => 'P51_DIM_I',
  p_validation_sequence=> 110,
  p_validation => 'P51_DIM_I',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Dim I must be a numeric value',
  p_associated_item=> 17938631626694728 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'F|#OWNER#:BASES:P51_CODE:CODE';

wwv_flow_api.create_page_process(
  p_id     => 17939217509694730 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 51,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'DML_FETCH_ROW',
  p_process_name=> 'Fetch Row from BASES',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to fetch row.',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'#OWNER#:BASES:P51_CODE:CODE|IUD';

wwv_flow_api.create_page_process(
  p_id     => 17939422862694733 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 51,
  p_process_sequence=> 30,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'DML_PROCESS_ROW',
  p_process_name=> 'Process Row of BASES',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to process row of table BASES.',
  p_process_success_message=> 'Action Processed.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'19';

wwv_flow_api.create_page_process(
  p_id     => 17939610197694733 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 51,
  p_process_sequence=> 40,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_PAGES',
  p_process_name=> 'reset page',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>17935831662694720 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||':p51_code := upper(:p51_code);';

wwv_flow_api.create_page_process(
  p_id     => 39122531901494403 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 51,
  p_process_sequence=> 20,
  p_process_point=> 'ON_SUBMIT_BEFORE_COMPUTATION',
  p_process_type=> 'PLSQL',
  p_process_name=> 'SetCase',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 51
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00052
prompt  ...PAGE 52: Drawings
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph := null;
wwv_flow_api.create_page(
  p_id     => 52,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Drawings',
  p_step_title=> 'Drawings',
  p_step_sub_title => 'Drawings',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> '',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => ' ',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'HARDYA',
  p_last_upd_yyyymmddhh24miss => '20080222143658',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>52,p_text=>h);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select "CODE", '||chr(10)||
'"DESCRIPTION"'||chr(10)||
'from "#OWNER#"."DRAWINGS" '||chr(10)||
''||chr(10)||
'  '||chr(10)||
'';

wwv_flow_api.create_report_region (
  p_id=> 17958408877825565 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 52,
  p_name=> 'Drawings',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 10,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_query_row_template=> 28041136573354435+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'no data found',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_query_row_count_max=> '500',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17958626712825565 + wwv_flow_api.g_id_offset,
  p_region_id=> 17958408877825565 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'CODE',
  p_column_display_sequence=> 1,
  p_column_heading=> 'Code',
  p_column_link=>'f?p=&APP_ID.:53:&SESSION.::&DEBUG.::P53_CODE,P53_CREATEUPDATE:#CODE#,UPDATE',
  p_column_linktext=>'#CODE#',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>1,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'DRAWINGS',
  p_ref_column_name=> 'CODE',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17958731266825565 + wwv_flow_api.g_id_offset,
  p_region_id=> 17958408877825565 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'DESCRIPTION',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Description',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'DRAWINGS',
  p_ref_column_name=> 'DESCRIPTION',
  p_column_comment=>'');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 17958807523825565 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 52,
  p_button_sequence=> 30,
  p_button_plug_id => 17958408877825565+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image_alt=> 'Create',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:53:&SESSION.::&DEBUG.:53::',
  p_button_cattributes=>'id="create"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 52
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00053
prompt  ...PAGE 53: Create/Edit Drawings
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph:=ph||'<script language="JavaScript" type="text/javascript">'||chr(10)||
'<!--'||chr(10)||
''||chr(10)||
' htmldb_delete_message=''"DELETE_CONFIRM_MSG"'';'||chr(10)||
''||chr(10)||
'//-->'||chr(10)||
'</script>';

wwv_flow_api.create_page(
  p_id     => 53,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Create/Edit Drawings',
  p_step_title=> 'Create/Edit Drawings',
  p_step_sub_title => 'Create/Edit Drawings',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> '',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => ' ',
  p_html_page_header => ' ',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'HARDYA',
  p_last_upd_yyyymmddhh24miss => '20080222144507',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>53,p_text=>h);
wwv_flow_api.set_html_page_header(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>53,p_text=>ph);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 17962003142833714 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 53,
  p_plug_name=> 'Create/Edit Drawings',
  p_region_name=>'',
  p_plug_template=> 28035733013354425+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 17962817365833714 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 53,
  p_button_sequence=> 10,
  p_button_plug_id => 17962003142833714+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:52:&SESSION.::&DEBUG.:::',
  p_button_cattributes=>'id="cancel"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 17962211912833714 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 53,
  p_button_sequence=> 20,
  p_button_plug_id => 17962003142833714+wwv_flow_api.g_id_offset,
  p_button_name    => 'DELETE',
  p_button_image_alt=> 'Delete',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'javascript:confirmDelete(htmldb_delete_message,''DELETE'');',
  p_button_condition=> 'P53_CREATEUPDATE',
  p_button_condition2=> 'UPDATE',
  p_button_condition_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_button_cattributes=>'id="delete"',
  p_database_action=>'DELETE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 17962402360833714 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 53,
  p_button_sequence=> 30,
  p_button_plug_id => 17962003142833714+wwv_flow_api.g_id_offset,
  p_button_name    => 'SAVE',
  p_button_image_alt=> 'Apply Changes',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P53_CREATEUPDATE',
  p_button_condition2=> 'UPDATE',
  p_button_condition_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_button_cattributes=>'id="apply_changes"',
  p_database_action=>'UPDATE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 17962600308833714 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 53,
  p_button_sequence=> 40,
  p_button_plug_id => 17962003142833714+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image_alt=> 'Create',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P53_CREATEUPDATE',
  p_button_condition2=> 'CREATE',
  p_button_condition_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_button_cattributes=>'id="create"',
  p_database_action=>'INSERT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 27124631317169514 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 53,
  p_button_sequence=> 50,
  p_button_plug_id => 17962003142833714+wwv_flow_api.g_id_offset,
  p_button_name    => 'UPLOAD',
  p_button_image_alt=> 'Upload/Replace Drawing',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:41:&SESSION.::&DEBUG.:41:P41_DRWG_CODE,P41_PREVIOUS_PAGE:&P53_CODE.,&APP_PAGE_ID.',
  p_button_condition=> 'P53_CREATEUPDATE',
  p_button_condition2=> 'UPDATE',
  p_button_condition_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_button_cattributes=>'id="upload" name="upload"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>17964321583833717 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 53,
  p_branch_action=> 'f?p=&APP_ID.:52:&SESSION.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 1,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>27124909084169517 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 53,
  p_branch_action=> 'f?p=&FLOW_ID.:41:&SESSION.::&DEBUG.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>27124631317169514+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 10,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>17963003163833714 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 53,
  p_name=>'P53_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 21,
  p_item_plug_id => 17962003142833714+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Code',
  p_source=>'CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'select 1 from drawings where code = upper(:p53_code)',
  p_read_only_when_type=>'EXISTS',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>17963226229833715 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 53,
  p_name=>'P53_DESCRIPTION',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 22,
  p_item_plug_id => 17962003142833714+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Description',
  p_source=>'DESCRIPTION',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>41803824214344200 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 53,
  p_name=>'P53_CREATEUPDATE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 32,
  p_item_plug_id => 17962003142833714+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default => 'CREATE',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 17963507850833715 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 53,
  p_validation_name => 'P53_CODE',
  p_validation_sequence=> 10,
  p_validation => 'P53_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Drawings code must be specified.',
  p_associated_item=> 17963003163833714 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'F|#OWNER#:DRAWINGS:P53_CODE:CODE';

wwv_flow_api.create_page_process(
  p_id     => 17964019125833717 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 53,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'DML_FETCH_ROW',
  p_process_name=> 'Fetch Row from DRAWINGS',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to fetch row.',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'#OWNER#:DRAWINGS:P53_CODE:CODE|IUD';

wwv_flow_api.create_page_process(
  p_id     => 17963606510833715 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 53,
  p_process_sequence=> 30,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'DML_PROCESS_ROW',
  p_process_name=> 'Process Row of DRAWINGS',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to process row of table DRAWINGS.',
  p_process_success_message=> 'Action Processed.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'13';

wwv_flow_api.create_page_process(
  p_id     => 17963821464833717 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 53,
  p_process_sequence=> 40,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_PAGES',
  p_process_name=> 'reset page',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>17962211912833714 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||':p53_code := upper(:p53_code);';

wwv_flow_api.create_page_process(
  p_id     => 38668003375008384 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 53,
  p_process_sequence=> 20,
  p_process_point=> 'ON_SUBMIT_BEFORE_COMPUTATION',
  p_process_type=> 'PLSQL',
  p_process_name=> 'SetCase',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 53
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00054
prompt  ...PAGE 54: Housings
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph := null;
wwv_flow_api.create_page(
  p_id     => 54,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Housings',
  p_step_title=> 'Housings',
  p_step_sub_title => 'Housings',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> '',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => ' ',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'DHARSHANIK',
  p_last_upd_yyyymmddhh24miss => '20080305132134',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>54,p_text=>h);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select HOU.CODE, '||chr(10)||
'HOU.DRWG_CODE,'||chr(10)||
'HOU.HOTY_CODE,'||chr(10)||
'PRTY.NAME,'||chr(10)||
'HOU.DESCRIPTION,'||chr(10)||
'HOU.DIM_L,'||chr(10)||
'HOU.DIM_W,'||chr(10)||
'HOU.DIM_H,'||chr(10)||
'HOU.WEIGHT'||chr(10)||
'from HOUSINGS HOU, PARTIES PRTY'||chr(10)||
'where PRTY.ID = HOU.PRTY_ID'||chr(10)||
'and PRTY.PRTY_TYPE = ''MANU'''||chr(10)||
''||chr(10)||
'  '||chr(10)||
'';

wwv_flow_api.create_report_region (
  p_id=> 17972813117973911 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 54,
  p_name=> 'Housings',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 10,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 28041136573354435+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'no data found',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_query_row_count_max=> '500',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17973809769973912 + wwv_flow_api.g_id_offset,
  p_region_id=> 17972813117973911 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'CODE',
  p_column_display_sequence=> 1,
  p_column_heading=> 'Housing Code',
  p_column_link=>'f?p=&APP_ID.:55:&SESSION.::&DEBUG.::P55_CODE,P55_CREATEUPDATE:#CODE#,UPDATE',
  p_column_linktext=>'#CODE#',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'HOUSINGS',
  p_ref_column_name=> 'CODE',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17973104483973912 + wwv_flow_api.g_id_offset,
  p_region_id=> 17972813117973911 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'DRWG_CODE',
  p_column_display_sequence=> 8,
  p_column_heading=> 'Drawing Code',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'HOUSINGS',
  p_ref_column_name=> 'DRWG_CODE',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17973226323973912 + wwv_flow_api.g_id_offset,
  p_region_id=> 17972813117973911 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'HOTY_CODE',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Housing Type',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'TEXT_FROM_LOV',
  p_named_lov=>12804820935407180 + wwv_flow_api.g_id_offset,
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'NO',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'HOUSINGS',
  p_ref_column_name=> 'HOTY_CODE',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17973004533973912 + wwv_flow_api.g_id_offset,
  p_region_id=> 17972813117973911 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'NAME',
  p_column_display_sequence=> 9,
  p_column_heading=> 'Manufacturer',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17973327369973912 + wwv_flow_api.g_id_offset,
  p_region_id=> 17972813117973911 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'DESCRIPTION',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Housing Description',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'HOUSINGS',
  p_ref_column_name=> 'DESCRIPTION',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17973424354973912 + wwv_flow_api.g_id_offset,
  p_region_id=> 17972813117973911 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 6,
  p_form_element_id=> null,
  p_column_alias=> 'DIM_L',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Dim L (mm)',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'HOUSINGS',
  p_ref_column_name=> 'DIM_L',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17973506338973912 + wwv_flow_api.g_id_offset,
  p_region_id=> 17972813117973911 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 7,
  p_form_element_id=> null,
  p_column_alias=> 'DIM_W',
  p_column_display_sequence=> 5,
  p_column_heading=> 'Dim W (mm)',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'HOUSINGS',
  p_ref_column_name=> 'DIM_W',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17973604000973912 + wwv_flow_api.g_id_offset,
  p_region_id=> 17972813117973911 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 8,
  p_form_element_id=> null,
  p_column_alias=> 'DIM_H',
  p_column_display_sequence=> 6,
  p_column_heading=> 'Dim H (mm)',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'HOUSINGS',
  p_ref_column_name=> 'DIM_H',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17973723055973912 + wwv_flow_api.g_id_offset,
  p_region_id=> 17972813117973911 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 9,
  p_form_element_id=> null,
  p_column_alias=> 'WEIGHT',
  p_column_display_sequence=> 7,
  p_column_heading=> 'Weight (kg)',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'HOUSINGS',
  p_ref_column_name=> 'WEIGHT',
  p_column_comment=>'');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 17973915725973912 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 54,
  p_button_sequence=> 30,
  p_button_plug_id => 17972813117973911+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image_alt=> 'Create',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:55:&SESSION.::&DEBUG.:55:P55_CREATEUPDATE:CREATE',
  p_button_cattributes=>'id="create"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 54
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00055
prompt  ...PAGE 55: Create/Edit Housings
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph:=ph||'<script language="JavaScript" type="text/javascript">'||chr(10)||
'<!--'||chr(10)||
''||chr(10)||
' htmldb_delete_message=''"DELETE_CONFIRM_MSG"'';'||chr(10)||
''||chr(10)||
'//-->'||chr(10)||
'</script>';

wwv_flow_api.create_page(
  p_id     => 55,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Create/Edit Housings',
  p_step_title=> 'Create/Edit Housings',
  p_step_sub_title => 'Create/Edit Housings',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> '',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => ' ',
  p_html_page_header => ' ',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'HARDYA',
  p_last_upd_yyyymmddhh24miss => '20080222151028',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>55,p_text=>h);
wwv_flow_api.set_html_page_header(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>55,p_text=>ph);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 17977723777989714 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 55,
  p_plug_name=> 'Create/Edit Housings',
  p_region_name=>'',
  p_plug_template=> 28035733013354425+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 17977914499989722 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 55,
  p_button_sequence=> 10,
  p_button_plug_id => 17977723777989714+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:54:&SESSION.::&DEBUG.:::',
  p_button_cattributes=>'id="cancel"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 17978102712989725 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 55,
  p_button_sequence=> 20,
  p_button_plug_id => 17977723777989714+wwv_flow_api.g_id_offset,
  p_button_name    => 'DELETE',
  p_button_image_alt=> 'Delete',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'javascript:confirmDelete(htmldb_delete_message,''DELETE'');',
  p_button_condition=> 'P55_CREATEUPDATE',
  p_button_condition2=> 'UPDATE',
  p_button_condition_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_button_cattributes=>'id="delete"',
  p_database_action=>'DELETE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 17978330049989725 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 55,
  p_button_sequence=> 30,
  p_button_plug_id => 17977723777989714+wwv_flow_api.g_id_offset,
  p_button_name    => 'SAVE',
  p_button_image_alt=> 'Apply Changes',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P55_CREATEUPDATE',
  p_button_condition2=> 'UPDATE',
  p_button_condition_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_button_cattributes=>'id="apply_changes"',
  p_database_action=>'UPDATE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 17978511715989725 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 55,
  p_button_sequence=> 40,
  p_button_plug_id => 17977723777989714+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image_alt=> 'Create',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P55_CREATEUPDATE',
  p_button_condition2=> 'CREATE',
  p_button_condition_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_button_cattributes=>'id="create"',
  p_database_action=>'INSERT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>17982617981989753 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 55,
  p_branch_action=> 'f?p=&APP_ID.:&WEBMIP_PREV_PAGE_ID.:&SESSION.::&DEBUG.:::&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 1,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>17978727350989725 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 55,
  p_name=>'P55_DIM_W',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 50,
  p_item_plug_id => 17977723777989714+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Dim W (mm)',
  p_source=>'DIM_W',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>17978929946989731 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 55,
  p_name=>'P55_DIM_H',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 60,
  p_item_plug_id => 17977723777989714+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Dim H (mm)',
  p_source=>'DIM_H',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>17979118104989731 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 55,
  p_name=>'P55_WEIGHT',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 70,
  p_item_plug_id => 17977723777989714+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Weight (kg)',
  p_source=>'WEIGHT',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>17979301220989731 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 55,
  p_name=>'P55_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 17977723777989714+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Housing Code',
  p_source=>'CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'P55_CREATEUPDATE',
  p_read_only_when2=>'UPDATE',
  p_read_only_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>17979502608989733 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 55,
  p_name=>'P55_DRWG_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 80,
  p_item_plug_id => 17977723777989714+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Drawing Code',
  p_source=>'DRWG_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'DRAWINGS',
  p_lov => 'select code as display_value, code as return_value'||chr(10)||
'from drawings'||chr(10)||
'order by code',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'- Not Assigned -',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>17979716417989733 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 55,
  p_name=>'P55_HOTY_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 17977723777989714+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Housing Type',
  p_source=>'HOTY_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'HOUSING TYPE',
  p_lov => 'select description as display_value, code as return_value'||chr(10)||
'from housing_types'||chr(10)||
'order by code asc',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'- Not Assigned -',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>17979928856989733 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 55,
  p_name=>'P55_PRTY_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 90,
  p_item_plug_id => 17977723777989714+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Manufacturer',
  p_source=>'PRTY_ID',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'MANUFACTURER',
  p_lov => 'select name as display_value, id as return_value'||chr(10)||
'from parties prty'||chr(10)||
'where prty.prty_type = ''MANU'''||chr(10)||
'order by name asc',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'- Not Assigned -',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>17980108319989734 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 55,
  p_name=>'P55_DESCRIPTION',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 30,
  p_item_plug_id => 17977723777989714+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Housing Description',
  p_source=>'DESCRIPTION',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>17980312337989734 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 55,
  p_name=>'P55_DIM_L',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 40,
  p_item_plug_id => 17977723777989714+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Dim L (mm)',
  p_source=>'DIM_L',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 240,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>41656432002958555 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 55,
  p_name=>'P55_CREATEUPDATE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 100,
  p_item_plug_id => 17977723777989714+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default => 'CREATE',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 33928008909927084 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 55,
  p_validation_name => 'P55_CODE',
  p_validation_sequence=> 10,
  p_validation => 'P55_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Housing Code must have some value.',
  p_associated_item=> 17979301220989731 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 17981801228989745 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 55,
  p_validation_name => 'P55_DRWG_CODE not null',
  p_validation_sequence=> 20,
  p_validation => 'P55_DRWG_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Drawing Code must have some value.',
  p_associated_item=> 17979502608989733 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 17980625735989736 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 55,
  p_validation_name => 'P55_HOTY_CODE not null',
  p_validation_sequence=> 30,
  p_validation => 'P55_HOTY_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Housing Type must have some value.',
  p_associated_item=> 17979716417989733 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 17980810090989745 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 55,
  p_validation_name => 'P55_PRTY_ID not null',
  p_validation_sequence=> 40,
  p_validation => 'P55_PRTY_ID',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Manufacturer must have some value.',
  p_associated_item=> 17979928856989733 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 17981002628989745 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 55,
  p_validation_name => 'P55_DIM_L not null',
  p_validation_sequence=> 60,
  p_validation => 'P55_DIM_L',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Dimension L must have some value.',
  p_associated_item=> 17980312337989734 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 17981228303989745 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 55,
  p_validation_name => 'P55_DIM_W not null',
  p_validation_sequence=> 70,
  p_validation => 'P55_DIM_W',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Dimension W must have some value.',
  p_associated_item=> 17978727350989725 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 17981403214989745 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 55,
  p_validation_name => 'P55_DIM_H not null',
  p_validation_sequence=> 80,
  p_validation => 'P55_DIM_H',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Dimension H must have some value.',
  p_associated_item=> 17978929946989731 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 17981626936989745 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 55,
  p_validation_name => 'P55_WEIGHT not null',
  p_validation_sequence=> 90,
  p_validation => 'P55_WEIGHT',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Weight must have some value.',
  p_associated_item=> 17979118104989731 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 24128517769242961 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 55,
  p_validation_name => 'P55_DIM_L',
  p_validation_sequence=> 100,
  p_validation => 'P55_DIM_L',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'The value must be a number',
  p_associated_item=> 17980312337989734 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 24129528158245877 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 55,
  p_validation_name => 'P55_DIM_W',
  p_validation_sequence=> 110,
  p_validation => 'P55_DIM_W',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'The value must be a number',
  p_associated_item=> 17978727350989725 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 24131006126249016 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 55,
  p_validation_name => 'P55_DIM_H',
  p_validation_sequence=> 120,
  p_validation => 'P55_DIM_H',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'The value must be a number',
  p_associated_item=> 17978929946989731 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 24132515822251794 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 55,
  p_validation_name => 'P55_WEIGHT',
  p_validation_sequence=> 130,
  p_validation => 'P55_WEIGHT',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'The value must be a number',
  p_associated_item=> 17979118104989731 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'F|#OWNER#:HOUSINGS:P55_CODE:CODE';

wwv_flow_api.create_page_process(
  p_id     => 17982316504989753 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 55,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'DML_FETCH_ROW',
  p_process_name=> 'Fetch Row from HOUSINGS',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to fetch row.',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'#OWNER#:HOUSINGS:P55_CODE:CODE|IUD';

wwv_flow_api.create_page_process(
  p_id     => 17981901050989745 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 55,
  p_process_sequence=> 30,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'DML_PROCESS_ROW',
  p_process_name=> 'Process Row of HOUSINGS',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to process row of table HOUSINGS.',
  p_process_success_message=> 'Action Processed.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'3';

wwv_flow_api.create_page_process(
  p_id     => 17982129018989753 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 55,
  p_process_sequence=> 40,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_PAGES',
  p_process_name=> 'reset page',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>17978102712989725 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||':p55_code := upper(:p55_code);';

wwv_flow_api.create_page_process(
  p_id     => 38623802103866073 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 55,
  p_process_sequence=> 20,
  p_process_point=> 'ON_SUBMIT_BEFORE_COMPUTATION',
  p_process_type=> 'PLSQL',
  p_process_name=> 'SetCase',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 55
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00056
prompt  ...PAGE 56: Modules
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph := null;
wwv_flow_api.create_page(
  p_id     => 56,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Modules',
  p_step_title=> 'Modules',
  p_step_sub_title => 'Modules',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> '',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => ' ',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'HARDYA',
  p_last_upd_yyyymmddhh24miss => '20080222150147',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>56,p_text=>h);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select "CODE", '||chr(10)||
'"METR_CODE",'||chr(10)||
'"REVA_CODE",'||chr(10)||
'"SLVA_CODE",'||chr(10)||
'"SVCP_CODE",'||chr(10)||
'"REGU_CODE",'||chr(10)||
'"FLTR_CODE"'||chr(10)||
'from "#OWNER#"."MODULES" '||chr(10)||
'  '||chr(10)||
'';

wwv_flow_api.create_report_region (
  p_id=> 17998728065014523 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 56,
  p_name=> 'Modules',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 10,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_query_row_template=> 28041136573354435+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'no data found',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_query_row_count_max=> '500',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17998918943014525 + wwv_flow_api.g_id_offset,
  p_region_id=> 17998728065014523 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'CODE',
  p_column_display_sequence=> 1,
  p_column_heading=> 'Module Code',
  p_column_link=>'f?p=&APP_ID.:57:&SESSION.::&DEBUG.::P57_CODE,P57_CREATEUPDATE:#CODE#,UPDATE',
  p_column_linktext=>'#CODE#',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'MODULES',
  p_ref_column_name=> 'CODE',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17999001592014525 + wwv_flow_api.g_id_offset,
  p_region_id=> 17998728065014523 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'METR_CODE',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Meter ',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'MODULES',
  p_ref_column_name=> 'METR_CODE',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17999118477014525 + wwv_flow_api.g_id_offset,
  p_region_id=> 17998728065014523 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'REVA_CODE',
  p_column_display_sequence=> 6,
  p_column_heading=> 'Relief Valve ',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'MODULES',
  p_ref_column_name=> 'REVA_CODE',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17999221572014528 + wwv_flow_api.g_id_offset,
  p_region_id=> 17998728065014523 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'SLVA_CODE',
  p_column_display_sequence=> 7,
  p_column_heading=> 'Slamshut Valve',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'MODULES',
  p_ref_column_name=> 'SLVA_CODE',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17999307165014528 + wwv_flow_api.g_id_offset,
  p_region_id=> 17998728065014523 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'SVCP_CODE',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Service Pressure',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'TEXT_FROM_LOV',
  p_named_lov=>12910606677330773 + wwv_flow_api.g_id_offset,
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'MODULES',
  p_ref_column_name=> 'SVCP_CODE',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17999401465014528 + wwv_flow_api.g_id_offset,
  p_region_id=> 17998728065014523 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 6,
  p_form_element_id=> null,
  p_column_alias=> 'REGU_CODE',
  p_column_display_sequence=> 5,
  p_column_heading=> 'Regulator',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'MODULES',
  p_ref_column_name=> 'REGU_CODE',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 17999514525014528 + wwv_flow_api.g_id_offset,
  p_region_id=> 17998728065014523 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 7,
  p_form_element_id=> null,
  p_column_alias=> 'FLTR_CODE',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Filter',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'MODULES',
  p_ref_column_name=> 'FLTR_CODE',
  p_column_comment=>'');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 17999620040014528 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 56,
  p_button_sequence=> 30,
  p_button_plug_id => 17998728065014523+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image_alt=> 'Create',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:57:&SESSION.::&DEBUG.:57:P57_CREATEUPDATE:CREATE',
  p_button_cattributes=>'id="create"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 56
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00057
prompt  ...PAGE 57: Create/Edit Module
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph:=ph||'<script language="JavaScript" type="text/javascript">'||chr(10)||
'<!--'||chr(10)||
''||chr(10)||
' htmldb_delete_message=''"DELETE_CONFIRM_MSG"'';'||chr(10)||
''||chr(10)||
'//-->'||chr(10)||
'</script>';

wwv_flow_api.create_page(
  p_id     => 57,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Create/Edit Module',
  p_step_title=> 'Create/Edit Module',
  p_step_sub_title => 'Create/Edit Module',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'AUTO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => ' ',
  p_html_page_header => ' ',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'HARDYA',
  p_last_upd_yyyymmddhh24miss => '20080310173238',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>57,p_text=>h);
wwv_flow_api.set_html_page_header(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>57,p_text=>ph);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 18003319995025886 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 57,
  p_plug_name=> 'Description',
  p_region_name=>'',
  p_plug_template=> 28035733013354425+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 38769632174820972 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 57,
  p_plug_name=> 'Module Components',
  p_region_name=>'',
  p_plug_template=> 28035733013354425+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 20,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 38771525725828616 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 57,
  p_plug_name=> 'Inlet Details',
  p_region_name=>'',
  p_plug_template=> 28035733013354425+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 30,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 38772202307831298 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 57,
  p_plug_name=> 'Outlet Details',
  p_region_name=>'',
  p_plug_template=> 28035733013354425+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 40,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 18003505395025886 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 57,
  p_button_sequence=> 10,
  p_button_plug_id => 38772202307831298+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:56:&SESSION.::&DEBUG.:::',
  p_button_cattributes=>'id="cancel"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 18003726446025886 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 57,
  p_button_sequence=> 20,
  p_button_plug_id => 38772202307831298+wwv_flow_api.g_id_offset,
  p_button_name    => 'DELETE',
  p_button_image_alt=> 'Delete',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'javascript:confirmDelete(htmldb_delete_message,''DELETE'');',
  p_button_condition=> 'P57_CREATEUPDATE',
  p_button_condition2=> 'UPDATE',
  p_button_condition_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_button_cattributes=>'id="delete"',
  p_database_action=>'DELETE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 18003925314025887 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 57,
  p_button_sequence=> 30,
  p_button_plug_id => 38772202307831298+wwv_flow_api.g_id_offset,
  p_button_name    => 'SAVE',
  p_button_image_alt=> 'Apply Changes',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P57_CREATEUPDATE',
  p_button_condition2=> 'UPDATE',
  p_button_condition_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_button_cattributes=>'id="apply_changes"',
  p_database_action=>'UPDATE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 18004103641025887 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 57,
  p_button_sequence=> 40,
  p_button_plug_id => 38772202307831298+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image_alt=> 'Create',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P57_CREATEUPDATE',
  p_button_condition2=> 'CREATE',
  p_button_condition_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_button_cattributes=>'id="create"',
  p_database_action=>'INSERT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>18016527047025903 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_branch_action=> 'f?p=&APP_ID.:56:&SESSION.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 1,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18004310571025887 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 330,
  p_item_plug_id => 18003319995025886+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Module Reference',
  p_source=>'CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'P57_CREATEUPDATE',
  p_read_only_when2=>'UPDATE',
  p_read_only_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18004518499025889 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_OUTLET_CNTY_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 207,
  p_item_plug_id => 38772202307831298+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Outlet Connection Type',
  p_source=>'OUTLET_CNTY_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'CONNECTIONTYPES',
  p_lov => 'select description d, code r'||chr(10)||
'from   connection_types'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not Assigned',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18004729264025889 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_INLET_CNTY_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 302,
  p_item_plug_id => 38771525725828616+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Inlet Connection Type',
  p_source=>'INLET_CNTY_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'CONNECTIONTYPES',
  p_lov => 'select description d, code r'||chr(10)||
'from   connection_types'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not Assigned',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18004921291025890 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_DRWG_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 333,
  p_item_plug_id => 18003319995025886+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Drawing',
  p_source=>'DRWG_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'DRAWINGS',
  p_lov => 'select code as display_value, code as return_value'||chr(10)||
'from drawings'||chr(10)||
'order by code',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not Assigned',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18005114406025890 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_METR_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 280,
  p_item_plug_id => 38769632174820972+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Meter',
  p_source=>'METR_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'METERS',
  p_lov => 'select code display_value, code return_value '||chr(10)||
'from meters'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not Assigned',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18005303899025890 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_REVA_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 285,
  p_item_plug_id => 38769632174820972+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Relief Valve',
  p_source=>'REVA_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'RELIEFVALVES',
  p_lov => 'select code display_value, code return_value '||chr(10)||
'from relief_valves'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not Assigned',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18005506136025890 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_SLVA_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 286,
  p_item_plug_id => 38769632174820972+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Slamshut Valve',
  p_source=>'SLVA_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'SLAMSHUTVALVES',
  p_lov => 'select code display_value, code return_value '||chr(10)||
'from slamshut_valves'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not Assigned',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18005725721025890 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_SVCP_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 331,
  p_item_plug_id => 18003319995025886+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Service Pressure',
  p_source=>'SVCP_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'SERVICEPRESSURES',
  p_lov => 'select description d, code r'||chr(10)||
'from   service_pressures',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not Assigned',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18005903862025892 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_WEIGHT',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 344,
  p_item_plug_id => 18003319995025886+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Weight (kg)',
  p_source=>'WEIGHT',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 22,
  p_cMaxlength=> 22,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18006323310025892 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_INLET_HEIGHT',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 303,
  p_item_plug_id => 38771525725828616+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Inlet Height (mm)',
  p_source=>'INLET_HEIGHT',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 22,
  p_cMaxlength=> 22,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18006501372025892 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_INLET_SIZE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 304,
  p_item_plug_id => 38771525725828616+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Inlet Size (mm)',
  p_source=>'INLET_SIZE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 22,
  p_cMaxlength=> 22,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18006713417025892 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_OUTLET_PRESSURE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 213,
  p_item_plug_id => 38772202307831298+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Outlet Pressure (mm)',
  p_source=>'OUTLET_PRESSURE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 22,
  p_cMaxlength=> 22,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18006932495025892 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_OUTLET_HEIGHT',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 209,
  p_item_plug_id => 38772202307831298+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Outlet Height (mm)',
  p_source=>'OUTLET_HEIGHT',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 22,
  p_cMaxlength=> 22,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18007118750025892 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_OUTLET_SIZE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 211,
  p_item_plug_id => 38772202307831298+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Outlet Size (mm)',
  p_source=>'OUTLET_SIZE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 22,
  p_cMaxlength=> 22,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18007304060025892 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_BAS_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 281,
  p_item_plug_id => 38769632174820972+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Base',
  p_source=>'BAS_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'BASES',
  p_lov => 'select code as display_value, code as return_value'||chr(10)||
'from bases'||chr(10)||
'order by code',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not Assigned',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18007503415025892 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_HOU_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 282,
  p_item_plug_id => 38769632174820972+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Housing',
  p_source=>'HOU_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'HOUSINGS',
  p_lov => 'select code as display_value, code as return_value'||chr(10)||
'from housings'||chr(10)||
'order by code',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not Assigned',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18007707139025892 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_DIM_A',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 337,
  p_item_plug_id => 18003319995025886+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Dim A (mm)',
  p_source=>'DIM_A',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 22,
  p_cMaxlength=> 22,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18007918717025892 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_DIM_B',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 338,
  p_item_plug_id => 18003319995025886+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Dim B (mm)',
  p_source=>'DIM_B',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 22,
  p_cMaxlength=> 22,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18008127949025894 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_DIM_C',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 339,
  p_item_plug_id => 18003319995025886+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Dim C (mm)',
  p_source=>'DIM_C',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 22,
  p_cMaxlength=> 22,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18008320587025894 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_DIM_D',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 340,
  p_item_plug_id => 18003319995025886+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Dim D (mm)',
  p_source=>'DIM_D',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 22,
  p_cMaxlength=> 22,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18008518179025894 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_DIM_E',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 341,
  p_item_plug_id => 18003319995025886+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Dim E (mm)',
  p_source=>'DIM_E',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 22,
  p_cMaxlength=> 22,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18008702256025894 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_DIM_H',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 343,
  p_item_plug_id => 18003319995025886+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Dim H (mm)',
  p_source=>'DIM_H',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 22,
  p_cMaxlength=> 22,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18008926442025894 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_VALID_FROM',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 334,
  p_item_plug_id => 18003319995025886+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Valid From',
  p_source=>'VALID_FROM',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'PICK_DATE_DD_MM_YYYY',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18009129424025894 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_VALID_TO',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 335,
  p_item_plug_id => 18003319995025886+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Valid To',
  p_source=>'VALID_TO',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'PICK_DATE_DD_MM_YYYY',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18009315315025894 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_REGU_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 284,
  p_item_plug_id => 38769632174820972+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Regulator',
  p_source=>'REGU_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'REGULATORS',
  p_lov => 'select description display_value, code return_value '||chr(10)||
'from regulators'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not Assigned',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18009521755025894 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_FLTR_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 283,
  p_item_plug_id => 38769632174820972+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Filter',
  p_source=>'FLTR_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'FILTERS',
  p_lov => 'select code x, code y'||chr(10)||
'from filters'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not Assigned',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18009704051025894 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_INLET_CNOR_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 301,
  p_item_plug_id => 38771525725828616+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Inlet Connection Orientation',
  p_source=>'INLET_CNOR_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'CONNECTIONORIENTATIONS',
  p_lov => 'select description d, code r'||chr(10)||
'from   connection_orientations'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not assigned',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>18009931869025895 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_OUTLET_CNOR_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 204,
  p_item_plug_id => 38772202307831298+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Outlet Connection Orientation',
  p_source=>'OUTLET_CNOR_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'CONNECTIONORIENTATIONS',
  p_lov => 'select description d, code r'||chr(10)||
'from   connection_orientations'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not Assigned',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Manufacturer of the module';

wwv_flow_api.create_page_item(
  p_id=>18010115140025895 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_PRTY_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 332,
  p_item_plug_id => 18003319995025886+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Manufacturer',
  p_source=>'PRTY_ID',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'MANUFACTURER',
  p_lov => 'select name as display_value, id as return_value'||chr(10)||
'from parties prty'||chr(10)||
'where prty.prty_type = ''MANU'''||chr(10)||
'order by name asc',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not Assigned',
  p_lov_null_value=> '',
  p_cSize=> 22,
  p_cMaxlength=> 22,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>24499330699749277 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_LEAD_TIME',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 336,
  p_item_plug_id => 18003319995025886+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Lead Time',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>39046709046137600 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_QMAX',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 345,
  p_item_plug_id => 18003319995025886+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'QMAX',
  p_source=>'QMAX',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>40043231653195661 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_DIM_F',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 342,
  p_item_plug_id => 18003319995025886+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Dim F (mm)',
  p_source=>'DIM_F',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 22,
  p_cMaxlength=> 22,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>41713900254157506 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 57,
  p_name=>'P57_CREATEUPDATE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 355,
  p_item_plug_id => 18003319995025886+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default => 'CREATE',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18010927843025897 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_OUTLET_CNTY_CODE not null',
  p_validation_sequence=> 2,
  p_validation => 'P57_OUTLET_CNTY_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Outlet Connection Type must have some value.',
  p_associated_item=> 18004518499025889 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18010714372025897 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_INLET_CNTY_CODE not null',
  p_validation_sequence=> 3,
  p_validation => 'P57_INLET_CNTY_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Inlet Connection Type must have some value.',
  p_associated_item=> 18004729264025889 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18011117992025898 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_DRWG_CODE not null',
  p_validation_sequence=> 4,
  p_validation => 'P57_DRWG_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Drawing must have some value.',
  p_associated_item=> 18004921291025890 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18011324841025898 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_METR_CODE not null',
  p_validation_sequence=> 5,
  p_validation => 'P57_METR_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Meter Code must have some value.',
  p_associated_item=> 18005114406025890 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18011932148025900 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_SVCP_CODE not null',
  p_validation_sequence=> 8,
  p_validation => 'P57_SVCP_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Service Pressure must have some value.',
  p_associated_item=> 18005725721025890 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18012117527025900 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_WEIGHT not null',
  p_validation_sequence=> 9,
  p_validation => 'return ('||chr(10)||
'case regexp_like(nvl(:P57_Weight,''NULL''), ''^[[:digit:]]*$'') '||chr(10)||
'when false then ''Weight must contain a numeric value'''||chr(10)||
'else null'||chr(10)||
'end );',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => 'Weight must have some value.',
  p_associated_item=> 18005903862025892 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18012523354025900 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_INLET_HEIGHT not null',
  p_validation_sequence=> 11,
  p_validation => 'return ('||chr(10)||
'case regexp_like(nvl(:P57_Inlet_height,''NULL''), ''^[[:digit:]]*$'') '||chr(10)||
'when false then ''Inlet height must contain a numeric value'''||chr(10)||
'else null'||chr(10)||
'end );',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => 'Inlet Height must have some value.',
  p_associated_item=> 18006323310025892 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18012715900025900 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_INLET_SIZE',
  p_validation_sequence=> 12,
  p_validation => 'P57_INLET_SIZE',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Inlet Size must be a numeric value',
  p_associated_item=> 18006501372025892 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18012917164025900 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_OUTLET_PRESSURE not null',
  p_validation_sequence=> 13,
  p_validation => 'return ('||chr(10)||
'case regexp_like(nvl(:P57_outlet_pressure,''NULL''), ''^[[:digit:]]*$'') '||chr(10)||
'when false then ''Outlet Pressure must contain a numeric value'''||chr(10)||
'else null'||chr(10)||
'end );',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => 'Outlet Pressure must have some value.',
  p_associated_item=> 18006713417025892 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18013101783025900 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_OUTLET_HEIGHT not null',
  p_validation_sequence=> 14,
  p_validation => 'return ('||chr(10)||
'case regexp_like(nvl(:P57_outlet_height,''NULL''), ''^[[:digit:]]*$'') '||chr(10)||
'when false then ''Outlet Height must contain a numeric value'''||chr(10)||
'else null'||chr(10)||
'end );',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => 'Outlet Height must have some value.',
  p_associated_item=> 18006932495025892 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18013329936025900 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_OUTLET_SIZE ',
  p_validation_sequence=> 15,
  p_validation => 'P57_OUTLET_SIZE',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Outlet Size must be a numeric value',
  p_associated_item=> 18007118750025892 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18013523211025901 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_DIM_A not null',
  p_validation_sequence=> 18,
  p_validation => 'return ('||chr(10)||
'case regexp_like(nvl(:P57_DIM_A,''NULL''), ''^[[:digit:]]*$'') '||chr(10)||
'when false then ''Dim A must contain a numeric value'''||chr(10)||
'else null'||chr(10)||
'end );',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => 'Dim A must have some value.',
  p_associated_item=> 18007707139025892 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18013725208025901 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_DIM_B not null',
  p_validation_sequence=> 19,
  p_validation => 'return ('||chr(10)||
'case regexp_like(nvl(:P57_DIM_B,''NULL''), ''^[[:digit:]]*$'') '||chr(10)||
'when false then ''Dim B must contain a numeric value'''||chr(10)||
'else null'||chr(10)||
'end );',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => 'Dim B must have some value.',
  p_associated_item=> 18007918717025892 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18013914553025901 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_DIM_C not null',
  p_validation_sequence=> 20,
  p_validation => 'return ('||chr(10)||
'case regexp_like(nvl(:P57_DIM_C,''NULL''), ''^[[:digit:]]*$'') '||chr(10)||
'when false then ''Dim C must contain a numeric value'''||chr(10)||
'else null'||chr(10)||
'end );',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => 'Dim C must have some value.',
  p_associated_item=> 18008127949025894 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18014532175025901 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_DIM_H not null',
  p_validation_sequence=> 23,
  p_validation => 'return ('||chr(10)||
'case regexp_like(nvl(:P57_DIM_H,''NULL''), ''^[[:digit:]]*$'') '||chr(10)||
'when false then ''Dim H must contain a numeric value'''||chr(10)||
'else null'||chr(10)||
'end );',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => 'Dim H must have some value.',
  p_associated_item=> 18008702256025894 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18014726850025901 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_VALID_FROM not null',
  p_validation_sequence=> 24,
  p_validation => 'P57_VALID_FROM',
  p_validation_type => 'ITEM_IS_DATE',
  p_error_message => 'Valid From must have some value.',
  p_associated_item=> 18008926442025894 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18014931114025901 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_REGU_CODE not null',
  p_validation_sequence=> 26,
  p_validation => 'P57_REGU_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Regulator must have some value.',
  p_associated_item=> 18009315315025894 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18015129776025901 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_FLTR_CODE not null',
  p_validation_sequence=> 27,
  p_validation => 'P57_FLTR_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Filter must have some value.',
  p_associated_item=> 18009521755025894 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18015317817025901 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_INLET_CNOR_CODE not null',
  p_validation_sequence=> 28,
  p_validation => 'P57_INLET_CNOR_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Inlet Connection Orientation must have some value.',
  p_associated_item=> 18009704051025894 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18015503894025901 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_OUTLET_CNOR_CODE not null',
  p_validation_sequence=> 29,
  p_validation => 'P57_OUTLET_CNOR_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Outlet Connection Orientation must have some value.',
  p_associated_item=> 18009931869025895 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 18015702633025901 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_PRTY_ID not null',
  p_validation_sequence=> 30,
  p_validation => 'P57_PRTY_ID',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Manufacturer must have some value.',
  p_associated_item=> 18010115140025895 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39321126705893323 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_CODE',
  p_validation_sequence=> 40,
  p_validation => 'P57_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Module code must be specified.',
  p_associated_item=> 18004310571025887 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39327003418905520 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_QMAX',
  p_validation_sequence=> 50,
  p_validation => 'P57_QMAX',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'QMAX must be specified.',
  p_associated_item=> 39046709046137600 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 40035314207181180 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_DIM_A',
  p_validation_sequence=> 60,
  p_validation => 'P57_DIM_A',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Dim A must be a numeric value',
  p_associated_item=> 18007707139025892 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 40036921825183409 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_DIM_B',
  p_validation_sequence=> 70,
  p_validation => 'P57_DIM_B',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Dim B must be a numeric value',
  p_associated_item=> 18007918717025892 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 40038530483185925 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_DIM_C',
  p_validation_sequence=> 80,
  p_validation => 'P57_DIM_C',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Dim C must be a numeric value',
  p_associated_item=> 18008127949025894 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 40039708104188922 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_DIM_D',
  p_validation_sequence=> 90,
  p_validation => 'P57_DIM_D',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Dim D must be a numeric value',
  p_associated_item=> 18008320587025894 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 40041118147191798 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_DIM_E',
  p_validation_sequence=> 100,
  p_validation => 'P57_DIM_E',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Dim E must be a numeric value',
  p_associated_item=> 18008518179025894 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 40048630745204861 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_DIM_F',
  p_validation_sequence=> 110,
  p_validation => 'P57_DIM_F',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Dim F must be a numeric value',
  p_associated_item=> 40043231653195661 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 40049808712207945 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_DIM_H',
  p_validation_sequence=> 120,
  p_validation => 'P57_DIM_H',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Dim H must be a numeric value',
  p_associated_item=> 18008702256025894 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 40068123950212417 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_WEIGHT',
  p_validation_sequence=> 130,
  p_validation => 'P57_WEIGHT',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Weight must be a numeric value',
  p_associated_item=> 18005903862025892 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 40073003649215977 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_QMAX',
  p_validation_sequence=> 140,
  p_validation => 'P57_QMAX',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Qmax must be a numeric value',
  p_associated_item=> 39046709046137600 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 40081417155219889 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_INLET_HEIGHT',
  p_validation_sequence=> 150,
  p_validation => 'P57_INLET_HEIGHT',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Inlet Height must be a numeric value',
  p_associated_item=> 18006323310025892 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 40086127890222997 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_OUTLET_HEIGHT',
  p_validation_sequence=> 160,
  p_validation => 'P57_OUTLET_HEIGHT',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Outlet Height must be a numeric value',
  p_associated_item=> 18006932495025892 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 40088312437228014 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_OUTLET_PRESSURE',
  p_validation_sequence=> 170,
  p_validation => 'P57_OUTLET_PRESSURE',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Outlet Pressure must be a numeric value',
  p_associated_item=> 18006713417025892 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 2948004579191393 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_VALID_FROM not null',
  p_validation_sequence=> 179,
  p_validation => 'P57_VALID_FROM',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Valid From must have some value.',
  p_associated_item=> 18008926442025894 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 40093714085247331 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_VALID_FROM',
  p_validation_sequence=> 180,
  p_validation => 'P57_VALID_FROM',
  p_validation_type => 'ITEM_IS_DATE',
  p_error_message => 'Valid From must be a valid date',
  p_associated_item=> 18008926442025894 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 40094727937251339 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_VALID_TO',
  p_validation_sequence=> 190,
  p_validation => 'P57_VALID_TO',
  p_validation_type => 'ITEM_IS_DATE',
  p_error_message => 'Valid To must be a valid date',
  p_associated_item=> 18009129424025894 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 40096527722260814 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'VALID_FROM_LTE_VALID_TO',
  p_validation_sequence=> 200,
  p_validation => 'BEGIN'||chr(10)||
'IF :P57_VALID_FROM is NULL and :P57_VALID_TO is not NULL then'||chr(10)||
' RETURN ''Cannot enter Valid To without Valid From'';'||chr(10)||
'ELSIF :P57_VALID_FROM IS NOT NULL AND :P57_VALID_TO IS NOT NULL THEN'||chr(10)||
'  IF to_date(:P57_VALID_FROM,''DD/MM/YYYY'') > to_date(:P57_VALID_TO,''DD/MM/YYYY'') THEN'||chr(10)||
'    RETURN ''Valid From must be before Valid To'';'||chr(10)||
'  END IF;'||chr(10)||
'END IF;'||chr(10)||
'RETURN NULL;'||chr(10)||
'END;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 40097408460264664 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'VALID_TO_GTE_VALID_FROM',
  p_validation_sequence=> 210,
  p_validation => 'BEGIN'||chr(10)||
'IF :P57_VALID_FROM is NULL and :P57_VALID_TO is not NULL then'||chr(10)||
' RETURN ''Cannot enter Valid To without Valid From'';'||chr(10)||
'ELSIF :P57_VALID_FROM IS NOT NULL AND :P57_VALID_TO IS NOT NULL THEN'||chr(10)||
'  IF to_date(:P57_VALID_FROM,''DD/MM/YYYY'') > to_date(:P57_VALID_TO,''DD/MM/YYYY'') THEN'||chr(10)||
'    RETURN ''Valid To must be after Valid From'';'||chr(10)||
'  END IF;'||chr(10)||
'END IF;'||chr(10)||
'RETURN NULL;'||chr(10)||
'END;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 1796408858144798 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_INLET_SIZE',
  p_validation_sequence=> 220,
  p_validation => 'P57_INLET_SIZE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_associated_item=> 18006501372025892 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 1796618554147631 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_OUTLET_SIZE',
  p_validation_sequence=> 230,
  p_validation => 'P57_OUTLET_SIZE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_associated_item=> 18007118750025892 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'F|#OWNER#:MODULES:P57_CODE:CODE';

wwv_flow_api.create_page_process(
  p_id     => 18015820985025901 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'DML_FETCH_ROW',
  p_process_name=> 'Fetch Row from MODULES',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to fetch row.',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||':p57_code := upper(:p57_code);';

wwv_flow_api.create_page_process(
  p_id     => 38707630929555716 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_process_sequence=> 20,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'SetCase',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'#OWNER#:MODULES:P57_CODE:CODE|IUD';

wwv_flow_api.create_page_process(
  p_id     => 18016002557025903 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_process_sequence=> 30,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'DML_PROCESS_ROW',
  p_process_name=> 'Process Row of MODULES',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to process row of table MODULES.',
  p_process_success_message=> 'Action Processed.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'10';

wwv_flow_api.create_page_process(
  p_id     => 18016216254025903 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_process_sequence=> 40,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_PAGES',
  p_process_name=> 'reset page',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>18003726446025886 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 57
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00058
prompt  ...PAGE 58: Caveats
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 58,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Caveats',
  p_step_title=> 'Caveats',
  p_step_sub_title => 'Caveats',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'DHARSHANIK',
  p_last_upd_yyyymmddhh24miss => '20080222135828',
  p_page_is_public_y_n=> 'N',
  p_protection_level=> 'C',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select enty_code, mety_code, svcpt_code, document_position, sort_order, text, id from caveat_texts order by 1,2,3,4,5';

wwv_flow_api.create_report_region (
  p_id=> 24626604720090502 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 58,
  p_name=> 'Caveats',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 21,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_query_row_template=> 28041136573354435+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_show_nulls_as=> ' - ',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'No enquiries matching the search criteria found.',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_query_row_count_max=> '500',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_prn_output=> 'N',
  p_prn_format=> 'PDF',
  p_prn_output_show_link=> 'Y',
  p_prn_output_link_text=> 'Print',
  p_prn_units=> 'MILLIMETERS',
  p_prn_paper_size=> 'A4',
  p_prn_width=> 297,
  p_prn_height=> 210,
  p_prn_orientation=> 'HORIZONTAL',
  p_prn_page_header_font_color=> '#000000',
  p_prn_page_header_font_family=> 'Helvetica',
  p_prn_page_header_font_weight=> 'normal',
  p_prn_page_header_font_size=> '12',
  p_prn_page_footer_font_color=> '#000000',
  p_prn_page_footer_font_family=> 'Helvetica',
  p_prn_page_footer_font_weight=> 'normal',
  p_prn_page_footer_font_size=> '12',
  p_prn_header_bg_color=> '#9bafde',
  p_prn_header_font_color=> '#ffffff',
  p_prn_header_font_family=> 'Helvetica',
  p_prn_header_font_weight=> 'normal',
  p_prn_header_font_size=> '10',
  p_prn_body_bg_color=> '#efefef',
  p_prn_body_font_color=> '#000000',
  p_prn_body_font_family=> 'Helvetica',
  p_prn_body_font_weight=> 'normal',
  p_prn_body_font_size=> '10',
  p_prn_border_width=> .5,
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 24626906761090505 + wwv_flow_api.g_id_offset,
  p_region_id=> 24626604720090502 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'ENTY_CODE',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Enty Code',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 24627007844090505 + wwv_flow_api.g_id_offset,
  p_region_id=> 24626604720090502 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'METY_CODE',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Mety Code',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 24627126658090505 + wwv_flow_api.g_id_offset,
  p_region_id=> 24626604720090502 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'SVCPT_CODE',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Svcpt Code',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 24627203760090505 + wwv_flow_api.g_id_offset,
  p_region_id=> 24626604720090502 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'DOCUMENT_POSITION',
  p_column_display_sequence=> 5,
  p_column_heading=> 'Document Position',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 24627328846090505 + wwv_flow_api.g_id_offset,
  p_region_id=> 24626604720090502 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'SORT_ORDER',
  p_column_display_sequence=> 6,
  p_column_heading=> 'Sort Order',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 24627428581090505 + wwv_flow_api.g_id_offset,
  p_region_id=> 24626604720090502 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 6,
  p_form_element_id=> null,
  p_column_alias=> 'TEXT',
  p_column_display_sequence=> 7,
  p_column_heading=> 'Text',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'ESCAPE_SC',
  p_lov_show_nulls=> 'NO',
  p_column_width=> '70',
  p_column_height=> '1',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 24644306550217120 + wwv_flow_api.g_id_offset,
  p_region_id=> 24626604720090502 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 7,
  p_form_element_id=> null,
  p_column_alias=> 'ID',
  p_column_display_sequence=> 8,
  p_column_heading=> 'Id',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 24626815112090505 + wwv_flow_api.g_id_offset,
  p_region_id=> 24626604720090502 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 8,
  p_form_element_id=> null,
  p_column_alias=> 'LINK$01',
  p_column_display_sequence=> 1,
  p_column_heading=> '',
  p_column_link=>'f?p=&APP_ID.:59:&SESSION.::&DEBUG.::P59_ID:#ID#',
  p_column_linktext=>'Edit',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_derived_column=> 'Y',
  p_lov_display_extra=> 'YES',
  p_ref_column_name=> 'Edit',
  p_column_comment=>'');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 24627718614090505 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 58,
  p_button_sequence=> 20,
  p_button_plug_id => 24626604720090502+wwv_flow_api.g_id_offset,
  p_button_name    => 'NEW',
  p_button_image_alt=> 'Create',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:59:&SESSION.::&DEBUG.:59::',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>24628010758090508 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 58,
  p_branch_action=> 'f?p=&APP_ID.:58:&SESSION.::&DEBUG.::F155_PREVIOUS_PAGE:58&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 20,
  p_branch_comment=> 'Created 20-NOV-2007 14:56 by MULLENM');
 
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 58
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00059
prompt  ...PAGE 59: Caveat
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph:=ph||'<script language="JavaScript" type="text/javascript">'||chr(10)||
'<!--'||chr(10)||
''||chr(10)||
' htmldb_delete_message=''"DELETE_CONFIRM_MSG"'';'||chr(10)||
''||chr(10)||
'//-->'||chr(10)||
'</script>';

wwv_flow_api.create_page(
  p_id     => 59,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Caveat',
  p_step_title=> 'Caveat',
  p_step_sub_title => 'Caveat',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'AUTO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => ' ',
  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 => '20080226085721',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>59,p_text=>h);
wwv_flow_api.set_html_page_header(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>59,p_text=>ph);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 24632416544181783 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 59,
  p_plug_name=> 'Create/Edit Caveat',
  p_region_name=>'',
  p_plug_template=> 28035733013354425+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 24633025229181783 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 59,
  p_button_sequence=> 30,
  p_button_plug_id => 24632416544181783+wwv_flow_api.g_id_offset,
  p_button_name    => 'SAVE',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Apply Changes',
  p_button_position=> 'REGION_TEMPLATE_CHANGE',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P59_ID',
  p_button_condition_type=> 'ITEM_IS_NOT_NULL',
  p_database_action=>'UPDATE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 24632627906181783 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 59,
  p_button_sequence=> 10,
  p_button_plug_id => 24632416544181783+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'REGION_TEMPLATE_CLOSE',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:58:&SESSION.::&DEBUG.:::',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 24633224759181783 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 59,
  p_button_sequence=> 40,
  p_button_plug_id => 24632416544181783+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Create',
  p_button_position=> 'REGION_TEMPLATE_CREATE',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P59_ID',
  p_button_condition_type=> 'ITEM_IS_NULL',
  p_database_action=>'INSERT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 24632819549181783 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 59,
  p_button_sequence=> 20,
  p_button_plug_id => 24632416544181783+wwv_flow_api.g_id_offset,
  p_button_name    => 'DELETE',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Delete',
  p_button_position=> 'REGION_TEMPLATE_DELETE',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'javascript:confirmDelete(htmldb_delete_message,''DELETE'');',
  p_button_condition=> 'P59_ID',
  p_button_condition_type=> 'ITEM_IS_NOT_NULL',
  p_database_action=>'DELETE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>24636902589181792 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 59,
  p_branch_action=> 'f?p=&APP_ID.:58:&SESSION.::&DEBUG.:::&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 1,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>24633419827181783 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 59,
  p_name=>'P59_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1,
  p_item_plug_id => 24632416544181783+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Id',
  p_source=>'ID',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 255,
  p_cHeight=> null,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Select the job type to which this caveat applies.';

wwv_flow_api.create_page_item(
  p_id=>24633617809181786 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 59,
  p_name=>'P59_ENTY_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 24632416544181783+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Enquiry Type',
  p_source=>'ENTY_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'ENQUIRYTYPES',
  p_lov => 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from ENQUIRY_TYPES'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please Select a Value-',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Select the meter type to which this caveat applies.';

wwv_flow_api.create_page_item(
  p_id=>24633823596181786 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 59,
  p_name=>'P59_METY_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 24632416544181783+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Meter Type',
  p_source=>'METY_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'METERTYPES',
  p_lov => 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from METER_TYPES'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please Select a Value-',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Select the service pressure to which this caveat applies.';

wwv_flow_api.create_page_item(
  p_id=>24634012187181786 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 59,
  p_name=>'P59_SVCPT_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 30,
  p_item_plug_id => 24632416544181783+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Service Pressure',
  p_source=>'SVCPT_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'SERVICEPRESSURETYPES',
  p_lov => 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from SERVICE_PRESSURE_TYPES'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please Select a Value-',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Select the position within the quotation document this caveat should appear.';

wwv_flow_api.create_page_item(
  p_id=>24634210624181786 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 59,
  p_name=>'P59_DOCUMENT_POSITION',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 40,
  p_item_plug_id => 24632416544181783+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Document Position',
  p_source=>'DOCUMENT_POSITION',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'CAVEAT_POSITIONS',
  p_lov => '.'||to_char(24637005488181794 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please Select a Value-',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'For the chosen position within the quotation document choose the order in which this caveat should appear.  Caveats will appear in ascending order, so 1 will be printed on the quotation first followed by 2 etc...';

wwv_flow_api.create_page_item(
  p_id=>24634406253181786 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 59,
  p_name=>'P59_SORT_ORDER',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 50,
  p_item_plug_id => 24632416544181783+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Sort Order',
  p_source=>'SORT_ORDER',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Enter the text for the caveat.  The text will appear in plain format.';

wwv_flow_api.create_page_item(
  p_id=>24634629958181786 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 59,
  p_name=>'P59_TEXT',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 60,
  p_item_plug_id => 24632416544181783+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Text',
  p_source=>'TEXT',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXTAREA',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 60,
  p_cMaxlength=> 4000,
  p_cHeight=> 4,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 24635125537181787 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 59,
  p_validation_name => 'P59_ENTY_CODE not null',
  p_validation_sequence=> 10,
  p_validation => 'P59_ENTY_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Enty Code must have some value.',
  p_associated_item=> 24633617809181786 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 24635314867181787 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 59,
  p_validation_name => 'P59_METY_CODE not null',
  p_validation_sequence=> 20,
  p_validation => 'P59_METY_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Mety Code must have some value.',
  p_associated_item=> 24633823596181786 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 24635501799181787 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 59,
  p_validation_name => 'P59_SVCPT_CODE not null',
  p_validation_sequence=> 30,
  p_validation => 'P59_SVCPT_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Svcpt Code must have some value.',
  p_associated_item=> 24634012187181786 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 24635705751181787 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 59,
  p_validation_name => 'P59_DOCUMENT_POSITION not null',
  p_validation_sequence=> 40,
  p_validation => 'P59_DOCUMENT_POSITION',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Document Position must have some value.',
  p_associated_item=> 24634210624181786 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 24634930069181787 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 59,
  p_validation_name => 'P59_SORT ORDER not null and numeric',
  p_validation_sequence=> 50,
  p_validation => 'return ('||chr(10)||
'case regexp_like(nvl(:P59_SORT_ORDER,''NULL''), ''^[[:digit:]]*$'') '||chr(10)||
'when false then ''Sort Order must contain a numeric value'''||chr(10)||
'else null'||chr(10)||
'end );',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_associated_item=> 24634406253181786 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 24635932312181787 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 59,
  p_validation_name => 'P59_TEXT not null',
  p_validation_sequence=> 60,
  p_validation => 'P59_TEXT',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Text must have some value.',
  p_associated_item=> 24634629958181786 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'F|#OWNER#:CAVEAT_TEXTS:P59_ID:ID';

wwv_flow_api.create_page_process(
  p_id     => 24636000036181787 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 59,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'DML_FETCH_ROW',
  p_process_name=> 'Fetch Row from CAVEAT_TEXTS',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to fetch row.',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare '||chr(10)||
'  function get_pk return varchar2 '||chr(10)||
'  is '||chr(10)||
'  begin '||chr(10)||
'    for c1 in (select CATE_SEQ.nextval next_val'||chr(10)||
'               from dual)'||chr(10)||
'    loop'||chr(10)||
'        return c1.next_val;'||chr(10)||
'    end loop;'||chr(10)||
'  end; '||chr(10)||
'begin '||chr(10)||
'  :P59_ID := get_pk; '||chr(10)||
'end; ';

wwv_flow_api.create_page_process(
  p_id     => 24636211250181791 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 59,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Get PK',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to get primary key item value.',
  p_process_when_button_id=>24633224759181783 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'#OWNER#:CAVEAT_TEXTS:P59_ID:ID|IUD';

wwv_flow_api.create_page_process(
  p_id     => 24636404634181791 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 59,
  p_process_sequence=> 30,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'DML_PROCESS_ROW',
  p_process_name=> 'Process Row of CAVEAT_TEXTS',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to process row of table CAVEAT_TEXTS.',
  p_process_success_message=> 'Action Processed.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'16';

wwv_flow_api.create_page_process(
  p_id     => 24636614782181791 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 59,
  p_process_sequence=> 40,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_PAGES',
  p_process_name=> 'reset page',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>24632819549181783 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 59
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00060
prompt  ...PAGE 60: Manage Parties
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 60,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Manage Parties',
  p_step_title=> 'Manage Parties',
  p_step_sub_title => 'Manage Parties',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 28655803265374130+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  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 => '20080402104353',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 20887817372279930 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 60,
  p_plug_name=> 'Manage Parties',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 20888020897279933 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 60,
  p_button_sequence=> 10,
  p_button_plug_id => 20887817372279930+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE_NEW_PARTY',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Create New Party',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:61:&SESSION.::&DEBUG.:61,62,63,64::',
  p_button_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''useradmin'')',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 20888214215279933 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 60,
  p_button_sequence=> 20,
  p_button_plug_id => 20887817372279930+wwv_flow_api.g_id_offset,
  p_button_name    => 'EDIT_PARTIES',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Edit Party',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:65:&SESSION.::&DEBUG.:::',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>20888510094279934 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 60,
  p_branch_action=> 'f?p=&FLOW_ID.:60:&SESSION.',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 99,
  p_branch_comment=> '');
 
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 60
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00061
prompt  ...PAGE 61: Create Party
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph := null;
wwv_flow_api.create_page(
  p_id     => 61,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Create Party',
  p_step_title=> 'Create Party',
  p_step_sub_title => 'Create Party',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 28655803265374130+ wwv_flow_api.g_id_offset,
  p_help_text => ' ',
  p_html_page_header => '',
  p_step_template => '',
  p_required_role => 14572900838700208+ wwv_flow_api.g_id_offset,
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'MULLENM',
  p_last_upd_yyyymmddhh24miss => '20080402093146',
  p_page_is_public_y_n=> 'N',
  p_protection_level=> 'N',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>61,p_text=>h);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 20891614823283544 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 61,
  p_plug_name=> 'Party Details',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 20,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => 'ITEM_IS_NOT_NULL',
  p_plug_display_when_condition => 'P61_PRTY_TYPE',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 20891825241283544 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 61,
  p_plug_name=> 'Party Type',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 20892001368283545 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 61,
  p_button_sequence=> 10,
  p_button_plug_id => 20891614823283544+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'REGION_TEMPLATE_CLOSE',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:60:&SESSION.::&DEBUG.:::',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 20892210528283545 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 61,
  p_button_sequence=> 30,
  p_button_plug_id => 20891614823283544+wwv_flow_api.g_id_offset,
  p_button_name    => 'NEXT',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Next >',
  p_button_position=> 'REGION_TEMPLATE_NEXT',
  p_button_alignment=> 'RIGHT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>20903114046283556 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 61,
  p_branch_action=> 'f?p=&APP_ID.:62:&SESSION.::&DEBUG.:::&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>20892210528283545+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 20,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>20903309344283556 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 61,
  p_branch_action=> 'f?p=&APP_ID.:61:&SESSION.::&DEBUG.:::',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 30,
  p_branch_comment=> 'Created 04-DEC-2007 14:05 by MULLENM');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20892413759283545 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 61,
  p_name=>'P61_TRIPARTITE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 285,
  p_item_plug_id => 20891614823283544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Tripartite Member',
  p_source=>'TRIPARTITE_MEMBER',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'NOORYES',
  p_lov => '.'||to_char(17436531047269251 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 3,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'The name of the organization.';

wwv_flow_api.create_page_item(
  p_id=>20892627344283545 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 61,
  p_name=>'P61_NAME',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 277,
  p_item_plug_id => 20891614823283544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Name',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) in (''MANU'',''MKTP'',''IO'',''EO'',''ORG'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'The unique manufacturer reference.';

wwv_flow_api.create_page_item(
  p_id=>20893109076283547 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 61,
  p_name=>'P61_MANU_REF',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 278,
  p_item_plug_id => 20891614823283544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Manufacturer Reference',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) = ''MANU'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'The description of the manufacturer.';

wwv_flow_api.create_page_item(
  p_id=>20893602433283547 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 61,
  p_name=>'P61_DESCRIPTION',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 279,
  p_item_plug_id => 20891614823283544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Description',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXTAREA_CHAR_COUNT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 60,
  p_cMaxlength=> 255,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 2,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) = ''MANU'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'The unique market participant reference.';

wwv_flow_api.create_page_item(
  p_id=>20894121514283548 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 61,
  p_name=>'P61_MKTP_REF',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 281,
  p_item_plug_id => 20891614823283544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Market Participant Reference',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20894623350283548 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 61,
  p_name=>'P61_LT_7B_CONTRACT_REF',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 282,
  p_item_plug_id => 20891614823283544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'LT 7B Contract Reference',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 25,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20894830437283548 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 61,
  p_name=>'P61_GT_7B_CONTRACT_REF',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 283,
  p_item_plug_id => 20891614823283544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'GT 7B Contract Reference',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 25,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Select the type of party you wish to create from those available in the drop-down list.';

wwv_flow_api.create_page_item(
  p_id=>20895019971283548 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 61,
  p_name=>'P61_PRTY_TYPE',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 20891825241283544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Party Type',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX_WITH_SUBMIT',
  p_named_lov=> 'PRTY_TYPES',
  p_lov => '.'||to_char(19177116607688386 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'- Select Party Type -',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'if not mip_parties.get_user_role(:APP_USER) = ''MIPADMIN'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20895527194283548 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 61,
  p_name=>'P61_REPEAT_PASSWORD',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 292,
  p_item_plug_id => 20891614823283544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Repeat Password',
  p_source_type=> 'STATIC',
  p_display_as=> 'PASSWORD',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 255,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) in (''PERS'',''EMP'',''NEMP'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20895713518283548 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 61,
  p_name=>'P61_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 276,
  p_item_plug_id => 20891614823283544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20895900981283548 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 61,
  p_name=>'P61_PASSWORD',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 291,
  p_item_plug_id => 20891614823283544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Password',
  p_source_type=> 'STATIC',
  p_display_as=> 'PASSWORD',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 255,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) IN (''PERS'',''EMP'',''NEMP'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20896112686283548 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 61,
  p_name=>'P61_EXPIRE_PWORD',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 302,
  p_item_plug_id => 20891614823283544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Change Password on 1st Login',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'YN',
  p_lov => '.'||to_char(12773402618286720 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 3,
  p_cHeight=> 5,
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) IN (''PERS'',''EMP'',''NEMP'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20896318255283550 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 61,
  p_name=>'P61_ADV_CONTRACT_REF',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 284,
  p_item_plug_id => 20891614823283544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Adversarial Contract Reference',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 25,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'The unique username.  This is the username that will be used to logon to the system.';

wwv_flow_api.create_page_item(
  p_id=>20896500041283550 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 61,
  p_name=>'P61_USERNAME',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 286,
  p_item_plug_id => 20891614823283544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Username',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 80,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) IN (''PERS'',''EMP'',''NEMP'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'The first name of the party being created.';

wwv_flow_api.create_page_item(
  p_id=>20897010830283550 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 61,
  p_name=>'P61_FIRST_NAME',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 288,
  p_item_plug_id => 20891614823283544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'First Name',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 80,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) IN (''PERS'',''EMP'',''NEMP'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'The last name of the party being created.';

wwv_flow_api.create_page_item(
  p_id=>20897505847283550 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 61,
  p_name=>'P61_LAST_NAME',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 289,
  p_item_plug_id => 20891614823283544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Last Name',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 80,
  p_cHeight=> 5,
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) IN (''PERS'',''EMP'',''NEMP'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'The title of the party being created. E.g. Mr, Mrs, Miss, Dr. etc.';

wwv_flow_api.create_page_item(
  p_id=>20898001242283550 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 61,
  p_name=>'P61_TITLE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 287,
  p_item_plug_id => 20891614823283544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Title',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 6,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) IN (''PERS'',''EMP'',''NEMP'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'Any other useful comments about the party being created.';

wwv_flow_api.create_page_item(
  p_id=>20898516086283552 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 61,
  p_name=>'P61_COMMENTS',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 290,
  p_item_plug_id => 20891614823283544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Comments',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXTAREA_CHAR_COUNT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 60,
  p_cMaxlength=> 255,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 3,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) IN (''PERS'',''EMP'',''NEMP'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20899008215283552 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 61,
  p_name=>'P61_SHORTCODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 280,
  p_item_plug_id => 20891614823283544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Shortcode',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 3,
  p_cMaxlength=> 3,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20899318488283552 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 61,
  p_validation_name => 'P61_USERNAME Not Null',
  p_validation_sequence=> 1,
  p_validation => 'P61_USERNAME',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20892210528283545 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20896500041283550 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 04-DEC-2007 16:11');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20899523971283552 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 61,
  p_validation_name => 'P61_NAME Not Null',
  p_validation_sequence=> 1,
  p_validation => 'P61_NAME',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) IN (''IO'',''EO'',''MANU'',''MKTP'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20892210528283545 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20892627344283545 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 04-DEC-2007 16:11');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20899704830283552 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 61,
  p_validation_name => 'P61_MKTP_REF Not Null',
  p_validation_sequence=> 1,
  p_validation => 'P61_MKTP_REF',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20892210528283545 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20894121514283548 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 04-DEC-2007 16:11');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20899924910283552 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 61,
  p_validation_name => 'P61_TITLE Not Null',
  p_validation_sequence=> 2,
  p_validation => 'P61_TITLE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20892210528283545 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20898001242283550 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 04-DEC-2007 16:11');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20900100891283553 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 61,
  p_validation_name => 'P61_MANU_REF Not Null',
  p_validation_sequence=> 2,
  p_validation => 'P61_MANU_REF',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) = ''MANU'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20892210528283545 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20893109076283547 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 04-DEC-2007 16:11');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20900314543283553 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 61,
  p_validation_name => 'P61_LT_7B_CONTRACT_REF Not Null',
  p_validation_sequence=> 2,
  p_validation => 'P61_LT_7B_CONTRACT_REF',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20892210528283545 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20894623350283548 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 04-DEC-2007 16:11');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20900524085283553 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 61,
  p_validation_name => 'P61_FIRST_NAME Not Null',
  p_validation_sequence=> 3,
  p_validation => 'P61_FIRST_NAME',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20892210528283545 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20897010830283550 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 04-DEC-2007 16:11');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20900729667283553 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 61,
  p_validation_name => 'P61_DESCRIPTION Not Null',
  p_validation_sequence=> 3,
  p_validation => 'P61_DESCRIPTION',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) = ''MANU'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20892210528283545 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20893602433283547 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 04-DEC-2007 16:11');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20900900579283555 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 61,
  p_validation_name => 'P61_GT_7B_CONTRACT_REF Not Null',
  p_validation_sequence=> 3,
  p_validation => 'P61_GT_7B_CONTRACT_REF',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20892210528283545 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20894830437283548 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 04-DEC-2007 16:11');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20901107136283555 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 61,
  p_validation_name => 'P61_LAST_NAME Not Null',
  p_validation_sequence=> 4,
  p_validation => 'P61_LAST_NAME',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20892210528283545 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20897505847283550 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 04-DEC-2007 16:11');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20901321485283555 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 61,
  p_validation_name => 'P61_ADV_CONTRACT_REF Not Null',
  p_validation_sequence=> 4,
  p_validation => 'P61_ADV_CONTRACT_REF',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20892210528283545 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20896318255283550 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 04-DEC-2007 16:11');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20901501106283555 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 61,
  p_validation_name => 'P61_PASSWORD Not Null',
  p_validation_sequence=> 5,
  p_validation => 'P61_PASSWORD',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20892210528283545 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20895900981283548 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 04-DEC-2007 16:11');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20901706169283555 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 61,
  p_validation_name => 'P61_USERNAME_Unique',
  p_validation_sequence=> 10,
  p_validation => 'select 1'||chr(10)||
'from parties'||chr(10)||
'where upper(username) = upper(:P61_USERNAME)',
  p_validation_type => 'NOT_EXISTS',
  p_error_message => 'Username specified already exists in the system.  Please specify a unique username.',
  p_when_button_pressed=> 20892210528283545 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20896500041283550 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20901924426283555 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 61,
  p_validation_name => 'P61_PASSWORD_length',
  p_validation_sequence=> 20,
  p_validation => 'length(:P61_PASSWORD) >= 8',
  p_validation_type => 'SQL_EXPRESSION',
  p_error_message => 'Password must be at least 8 characters.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20892210528283545 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20895900981283548 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20902113432283555 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 61,
  p_validation_name => 'P61_PASSWORD_UPPER',
  p_validation_sequence=> 30,
  p_validation => 'P61_PASSWORD',
  p_validation2 => 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
  p_validation_type => 'ITEM_IN_VALIDATION_CONTAINS_AT_LEAST_ONE_CHAR_IN_STRING2',
  p_error_message => 'Password must contain at least 1 uppercase character.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) = ''PERS'' then'||chr(10)||
' return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20892210528283545 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20895900981283548 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20902304719283556 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 61,
  p_validation_name => 'P61_PASSWORD_LOWER',
  p_validation_sequence=> 40,
  p_validation => 'P61_PASSWORD',
  p_validation2 => 'abcdefghijklmnopqrstuvwxyz',
  p_validation_type => 'ITEM_IN_VALIDATION_CONTAINS_AT_LEAST_ONE_CHAR_IN_STRING2',
  p_error_message => 'Password must contain at least 1 lowercase character.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20892210528283545 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20895900981283548 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20902521165283556 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 61,
  p_validation_name => 'P61_PASSWORD_num',
  p_validation_sequence=> 50,
  p_validation => 'P61_PASSWORD',
  p_validation2 => '0123456789',
  p_validation_type => 'ITEM_IN_VALIDATION_CONTAINS_AT_LEAST_ONE_CHAR_IN_STRING2',
  p_error_message => 'Password must contain at least 1 number.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20892210528283545 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20895900981283548 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20902703438283556 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 61,
  p_validation_name => 'P61_PASSWORD_Other',
  p_validation_sequence=> 60,
  p_validation => 'P61_PASSWORD',
  p_validation2 => '`¬!"£$%^&*()_+-=[]{};''#:@~,./<>?¦\|',
  p_validation_type => 'ITEM_IN_VALIDATION_CONTAINS_AT_LEAST_ONE_CHAR_IN_STRING2',
  p_error_message => 'Item must contain at least 1 non-alphanumeric character e.g. "!"',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20892210528283545 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20895900981283548 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20902910367283556 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 61,
  p_validation_name => 'P61_PASSWORD_2',
  p_validation_sequence=> 70,
  p_validation => ':P61_PASSWORD = :P61_REPEAT_PASSWORD',
  p_validation_type => 'PLSQL_EXPRESSION',
  p_error_message => 'Passwords entered do not match.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20892210528283545 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20895527194283548 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39815128659078291 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 61,
  p_validation_name => 'P61_SHORTCODE not null',
  p_validation_sequence=> 80,
  p_validation => 'P61_SHORTCODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20892210528283545 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20899008215283552 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39818625458096225 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 61,
  p_validation_name => 'P61_TRIPARTITE not null',
  p_validation_sequence=> 90,
  p_validation => 'P61_TRIPARTITE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20892210528283545 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20892413759283545 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39821123773124094 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 61,
  p_validation_name => 'P61_NAME length',
  p_validation_sequence=> 100,
  p_validation => 'length(:P61_NAME) <= 40',
  p_validation_type => 'SQL_EXPRESSION',
  p_error_message => 'Name must not exceed 40 characters in length.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) in (''MANU'',''MKTP'',''IO'',''EO'',''ORG'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20892210528283545 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20892627344283545 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39920305269658094 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 61,
  p_validation_name => 'P61_ADV_CONTRACT_REF length',
  p_validation_sequence=> 110,
  p_validation => 'length(:P61_ADV_CONTRACT_REF) <= 35',
  p_validation_type => 'SQL_EXPRESSION',
  p_error_message => 'Length must not exceed 35 characters.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20892210528283545 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20896318255283550 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'begin'||chr(10)||
'  if not mip_parties.get_user_role(:APP_USER) = ''MIPADMIN'' then '||chr(10)||
'     :P61_PRTY_TYPE := ''PERS'';'||chr(10)||
'  end if; '||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 8068106781674306 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 61,
  p_process_sequence=> 10,
  p_process_point=> 'BEFORE_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'set_prty_type',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 61
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00062
prompt  ...PAGE 62: Assign Party Role
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph := null;
wwv_flow_api.create_page(
  p_id     => 62,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Assign Party Role',
  p_step_title=> 'Assign Party Role',
  p_step_sub_title => 'Assign Party Role',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 28655803265374130+ wwv_flow_api.g_id_offset,
  p_help_text => ' ',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'MULLENM',
  p_last_upd_yyyymmddhh24miss => '20080402141612',
  p_page_is_public_y_n=> 'N',
  p_protection_level=> 'N',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>62,p_text=>h);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 20973202101316916 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 62,
  p_plug_name=> 'Party Role',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 20973430962316916 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 62,
  p_plug_name=> 'Contact Details',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 20,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 20973624171316917 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 62,
  p_button_sequence=> 10,
  p_button_plug_id => 20973202101316916+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'REGION_TEMPLATE_CLOSE',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:60:&SESSION.::&DEBUG.:::',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 20973801814316917 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 62,
  p_button_sequence=> 30,
  p_button_plug_id => 20973202101316916+wwv_flow_api.g_id_offset,
  p_button_name    => 'NEXT',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Next >',
  p_button_position=> 'REGION_TEMPLATE_NEXT',
  p_button_alignment=> 'RIGHT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 20974007214316917 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 62,
  p_button_sequence=> 20,
  p_button_plug_id => 20973202101316916+wwv_flow_api.g_id_offset,
  p_button_name    => 'PREVIOUS',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> '< Previous',
  p_button_position=> 'REGION_TEMPLATE_PREVIOUS',
  p_button_alignment=> 'RIGHT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>20976728263316922 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 62,
  p_branch_action=> 'f?p=&APP_ID.:63:&SESSION.::&DEBUG.:::&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>20973801814316917+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 20,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>20976905495316922 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 62,
  p_branch_action=> 'f?p=&APP_ID.:62:&SESSION.::&DEBUG.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 30,
  p_branch_comment=> 'Created 12-DEC-2007 10:32 by MULLENM');
 
wwv_flow_api.create_page_branch(
  p_id=>20977117542316922 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 62,
  p_branch_action=> 'f?p=&APP_ID.:61:&SESSION.::&DEBUG.:::&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'BEFORE_VALIDATION',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>20974007214316917+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 10,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'The supplier associated with this user.';

wwv_flow_api.create_page_item(
  p_id=>20974228699316917 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 62,
  p_name=>'P62_USER_SUPPLIER',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 20973202101316916+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Supplier',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX_WITH_SUBMIT',
  p_named_lov=> 'SUPPLIERS',
  p_lov => 'begin'||chr(10)||
'if mip_parties.get_user_role(:APP_USER) = ''MIPADMIN'' then'||chr(10)||
'  return ''SELECT prty.NAME || '''' - '''' || prty.shortcode display, prty.ID return'||chr(10)||
'            FROM parties prty, party_roles parl'||chr(10)||
'           WHERE parl.prty_id = prty.ID'||chr(10)||
'             AND parl.rt_code = ''''SUPP'''' ORDER BY 1'';'||chr(10)||
'else'||chr(10)||
'  return'||chr(10)||
'    ''SELECT supplier || '''' - '''' || shortcode display,'||chr(10)||
'            supplier_id return'||chr(10)||
'       FROM v_supplier_administrators'||chr(10)||
'      WHERE upper(username) = :APP_USER'';'||chr(10)||
'end if;'||chr(10)||
'end;'||chr(10)||
'',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'- Select a Supplier -',
  p_lov_null_value=> '-1',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  if not upper(:P62_PRTY_ROLE) in (''AGENT'',''SUPPADMIN'') then'||chr(10)||
'    return false;'||chr(10)||
'  else'||chr(10)||
'    return true;'||chr(10)||
'  end if;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'if not mip_parties.get_user_role(:APP_USER) =''MIPADMIN'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'The supplier associated with this organisation.';

wwv_flow_api.create_page_item(
  p_id=>20974720639316917 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 62,
  p_name=>'P62_ORG_SUPPLIER',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 34,
  p_item_plug_id => 20973202101316916+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Supplier',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX_WITH_SUBMIT',
  p_named_lov=> 'SUPPLIERS',
  p_lov => 'begin'||chr(10)||
'if mip_parties.get_user_role(:APP_USER) = ''MIPADMIN'' then'||chr(10)||
'  return ''SELECT prty.NAME || '''' - '''' || prty.shortcode display, prty.ID return'||chr(10)||
'            FROM parties prty, party_roles parl'||chr(10)||
'           WHERE parl.prty_id = prty.ID'||chr(10)||
'             AND parl.rt_code = ''''SUPP'''' ORDER BY 1'';'||chr(10)||
'else'||chr(10)||
'  return'||chr(10)||
'    ''SELECT supplier || '''' - '''' || shortcode display,'||chr(10)||
'            supplier_id return'||chr(10)||
'       FROM v_supplier_administrators'||chr(10)||
'      WHERE upper(username) = :APP_USER'';'||chr(10)||
'end if;'||chr(10)||
'end;'||chr(10)||
'',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'- Select a Supplier -',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) IN (''IO'',''EO'',''MANU'',''ORG'') THEN'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20975222552316917 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 62,
  p_name=>'P62_PRTY_ROLE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 20973202101316916+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Party Role',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX_WITH_SUBMIT',
  p_named_lov=> 'PRTY_ROLES',
  p_lov => 'BEGIN'||chr(10)||
'  IF mip_parties.get_user_role(:app_user) = ''MIPADMIN'' THEN'||chr(10)||
'    IF :p61_prty_type = ''MKTP'' THEN'||chr(10)||
'      RETURN ''SELECT ''''Gas supplier'''' display_value, ''''SUPP'''' return_value'||chr(10)||
'          from dual'';'||chr(10)||
'    ELSIF :p61_prty_type = ''MANU'' THEN'||chr(10)||
'      RETURN ''SELECT ''''External organization'''' display_value, ''''EXTORG'''' return_value'||chr(10)||
'          from dual'';'||chr(10)||
'    ELSE'||chr(10)||
'      RETURN ''select DESCRIPTION display_value, CODE return_value '||chr(10)||
'              from ROLE_TYPES'||chr(10)||
'             where upper(rt_type) = ''''PRT'''''||chr(10)||
'             and not upper(code) in (''''EXTORG'''',''''SUPP'''')'||chr(10)||
'             order by 1'';'||chr(10)||
'    END IF;'||chr(10)||
'  ELSE'||chr(10)||
'    RETURN ''SELECT ''''Agent'''' display_value, ''''AGENT'''' return_value'||chr(10)||
'          from dual'';'||chr(10)||
'  END IF;'||chr(10)||
''||chr(10)||
'END;',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'- Select Role -',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20975410091316917 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 62,
  p_name=>'P62_PHONE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 21,
  p_item_plug_id => 20973430962316916+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Phone',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 240,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20975615215316919 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 62,
  p_name=>'P62_FAX',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 22,
  p_item_plug_id => 20973430962316916+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Fax',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 240,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20975828146316919 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 62,
  p_name=>'P62_MOBILE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 23,
  p_item_plug_id => 20973430962316916+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Mobile',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 240,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20976003038316919 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 62,
  p_name=>'P62_EMAIL',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 24,
  p_item_plug_id => 20973430962316916+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Email',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 240,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20976207460316922 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 62,
  p_name=>'P62_SUPP_ADMIN',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 44,
  p_item_plug_id => 20973202101316916+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Supplier Administrator',
  p_source=>'v(''APP_USER'')',
  p_source_type=> 'ITEM',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'P62_SUPP_ADMIN',
  p_lov => 'begin'||chr(10)||
'  if mip_parties.get_user_role(:APP_USER) = ''SUPPADMIN'' then'||chr(10)||
'   return '||chr(10)||
'    ''SELECT first_name ||'''' ''''||last_name display_value, supp_admin_id return_value'||chr(10)||
'       FROM v_supplier_administrators v'||chr(10)||
'      WHERE v.supp_admin_id = mip_parties.get_user_id(:APP_USER)'';'||chr(10)||
'  else return'||chr(10)||
'    ''SELECT first_name ||'''' ''''||last_name display_value, supp_admin_id return_value'||chr(10)||
'       FROM v_supplier_administrators'||chr(10)||
'      WHERE supplier_id = :P62_USER_SUPPLIER'';'||chr(10)||
'end if;'||chr(10)||
'end;',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'- Select a supplier -',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  if upper(:P62_PRTY_ROLE) = ''AGENT'' and not :P62_USER_SUPPLIER = -1 then'||chr(10)||
'    return true;'||chr(10)||
'  else return false;'||chr(10)||
'  end if;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20976526375316922 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 62,
  p_validation_name => 'P62_USER_SUPPLIER Not Null',
  p_validation_sequence=> 1,
  p_validation => 'P62_USER_SUPPLIER',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  if upper(:P62_PRTY_ROLE) in (''AGENT'',''SUPPADMIN'') then'||chr(10)||
'   return true;'||chr(10)||
'  else '||chr(10)||
'   return false;'||chr(10)||
'  end if;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20973801814316917 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20974228699316917 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 06-DEC-2007 14:36');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 21029109692604452 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 62,
  p_validation_name => 'P62_PHONE Not Null',
  p_validation_sequence=> 1,
  p_validation => 'P62_PHONE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20973801814316917 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20975410091316917 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 20-DEC-2007 13:52');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 21029319622604453 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 62,
  p_validation_name => 'P62_EMAIL Not Null',
  p_validation_sequence=> 2,
  p_validation => 'P62_EMAIL',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20973801814316917 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20976003038316919 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 20-DEC-2007 13:52');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 35558025300833925 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 62,
  p_validation_name => 'P62_PRTY_ROLE Not null',
  p_validation_sequence=> 12,
  p_validation => 'P62_PRTY_ROLE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Party role must be specified.',
  p_when_button_pressed=> 20973801814316917 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20975222552316917 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 35669117287153386 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 62,
  p_validation_name => 'P62_SUPP_ADMIN not null',
  p_validation_sequence=> 22,
  p_validation => 'P62_SUPP_ADMIN',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'A supplier administrator must be selected for an agent.',
  p_validation_condition=> 'if upper(:P61_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  if upper(:P62_PRTY_ROLE) = ''AGENT'' then'||chr(10)||
'   return true;'||chr(10)||
'  else'||chr(10)||
'   return false;'||chr(10)||
'  end if;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20973801814316917 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20976207460316922 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 44601700241044970 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 62,
  p_validation_name => 'P62_PHONE is valid',
  p_validation_sequence=> 62,
  p_validation => 'P62_PHONE',
  p_validation2 => '^((\(?0\d{4}\)?\s*\d{3}\s*\d{3})|(\(?0\d{3}\)?\s*\d{3}\s*\d{4})|(\(?0\d{2}\)?\s*\d{4}\s*\d{4}))(\s*\#(\d{4}|\d{3}))?$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Phone number format not recognized.'||chr(10)||
'e.g (01234) 567890',
  p_when_button_pressed=> 20973801814316917 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20975410091316917 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 44603211669048286 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 62,
  p_validation_name => 'P62_FAX is valid',
  p_validation_sequence=> 72,
  p_validation => 'P62_FAX',
  p_validation2 => '^((\(?0\d{4}\)?\s*\d{3}\s*\d{3})|(\(?0\d{3}\)?\s*\d{3}\s*\d{4})|(\(?0\d{2}\)?\s*\d{4}\s*\d{4}))(\s*\#(\d{4}|\d{3}))?$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Phone number format not recognized.'||chr(10)||
'e.g (01234) 567890',
  p_when_button_pressed=> 20973801814316917 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20975615215316919 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 44604120326050770 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 62,
  p_validation_name => 'P62_MOBILE is valid',
  p_validation_sequence=> 82,
  p_validation => 'P62_MOBILE',
  p_validation2 => '^((\(?0\d{4}\)?\s*\d{3}\s*\d{3})|(\(?0\d{3}\)?\s*\d{3}\s*\d{4})|(\(?0\d{2}\)?\s*\d{4}\s*\d{4}))(\s*\#(\d{4}|\d{3}))?$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Phone number format not recognized.'||chr(10)||
'e.g (01234) 567890',
  p_when_button_pressed=> 20973801814316917 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20975828146316919 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 44605730154063030 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 62,
  p_validation_name => 'P62_EMAIL is valid',
  p_validation_sequence=> 92,
  p_validation => 'P62_EMAIL',
  p_validation2 => '^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Invalid email address.',
  p_when_button_pressed=> 20973801814316917 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20976003038316919 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 62
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00063
prompt  ...PAGE 63: Party Contact Details
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph := null;
wwv_flow_api.create_page(
  p_id     => 63,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Party Contact Details',
  p_step_title=> 'Party Contact Details',
  p_step_sub_title => 'Party Contact Details',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 28655803265374130+ wwv_flow_api.g_id_offset,
  p_help_text => ' ',
  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 => '20080229134330',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>63,p_text=>h);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 20908401423287044 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 63,
  p_plug_name=> 'Office Address Details',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 20908606710287044 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 63,
  p_button_sequence=> 10,
  p_button_plug_id => 20908401423287044+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'REGION_TEMPLATE_CLOSE',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:60:&SESSION.::&DEBUG.:::',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 20908810723287045 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 63,
  p_button_sequence=> 40,
  p_button_plug_id => 20908401423287044+wwv_flow_api.g_id_offset,
  p_button_name    => 'NEXT',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Next >',
  p_button_position=> 'REGION_TEMPLATE_NEXT',
  p_button_alignment=> 'RIGHT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 20909015501287045 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 63,
  p_button_sequence=> 20,
  p_button_plug_id => 20908401423287044+wwv_flow_api.g_id_offset,
  p_button_name    => 'PREVIOUS',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> '< Previous',
  p_button_position=> 'REGION_TEMPLATE_PREVIOUS',
  p_button_alignment=> 'RIGHT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>20911308407287048 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 63,
  p_branch_action=> 'f?p=&APP_ID.:64:&SESSION.::&DEBUG.:::&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>20908810723287045+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 1,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>20911512107287048 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 63,
  p_branch_action=> 'f?p=&APP_ID.:63:&SESSION.::&DEBUG.:::&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>20910609179287047+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 11,
  p_branch_comment=> 'Created 10-DEC-2007 10:29 by MULLENM');
 
wwv_flow_api.create_page_branch(
  p_id=>20911723416287048 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 63,
  p_branch_action=> 'f?p=&APP_ID.:62:&SESSION.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'BEFORE_VALIDATION',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>20909015501287045+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 10,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20909220039287045 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 63,
  p_name=>'P63_OFF_CODE',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 268,
  p_item_plug_id => 20908401423287044+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Office Address Code',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20909429252287045 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 63,
  p_name=>'P63_OFF_SUB_BUILD',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 269,
  p_item_plug_id => 20908401423287044+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Sub-Building',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20909607560287045 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 63,
  p_name=>'P63_OFF_BUILDING',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 270,
  p_item_plug_id => 20908401423287044+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Building',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 1,
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20909800379287047 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 63,
  p_name=>'P63_OFF_STREET',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 271,
  p_item_plug_id => 20908401423287044+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Street',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 60,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20910031981287047 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 63,
  p_name=>'P63_OFF_CITY',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 272,
  p_item_plug_id => 20908401423287044+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Town/City',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20910200225287047 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 63,
  p_name=>'P63_OFF_POSTCODE',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 273,
  p_item_plug_id => 20908401423287044+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Postcode',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 8,
  p_cHeight=> 1,
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20910418529287047 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 63,
  p_name=>'P63_SELECT_ADDRESS',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 265,
  p_item_plug_id => 20908401423287044+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Select Address',
  p_source_type=> 'STATIC',
  p_display_as=> 'POPUP',
  p_named_lov=> 'ADDRESSES',
  p_lov => 'SELECT addr.code || '','' || addr.sub_building || '','' || addr.building || '','' ||'||chr(10)||
'       addr.city || '','' || addr.postcode AS address,'||chr(10)||
'       addr.code AS return_value'||chr(10)||
'  FROM addresses addr'||chr(10)||
'',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'- New -',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20910609179287047 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 63,
  p_name=>'P63_COPY_ADDRESS',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 266,
  p_item_plug_id => 20908401423287044+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default => 'Copy Address',
  p_prompt=>'Copy Address',
  p_source=>'Copy Address',
  p_source_type=> 'STATIC',
  p_display_as=> 'BUTTON',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'N',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39929326964730594 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 63,
  p_validation_name => 'P63_OFF_CODE Not Null',
  p_validation_sequence=> 1,
  p_validation => 'P63_OFF_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_when_button_pressed=> 20908810723287045 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20909220039287045 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 20-FEB-2008 13:42');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39929527515730606 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 63,
  p_validation_name => 'P63_OFF_SUB_BUILD Not Null',
  p_validation_sequence=> 2,
  p_validation => 'P63_OFF_SUB_BUILD',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'P63_OFF_BUILDING',
  p_validation_condition_type=> 'ITEM_IS_NULL',
  p_when_button_pressed=> 20908810723287045 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20909429252287045 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 20-FEB-2008 13:42');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39929716700730606 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 63,
  p_validation_name => 'P63_OFF_BUILDING Not Null',
  p_validation_sequence=> 3,
  p_validation => 'P63_OFF_BUILDING',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'P63_OFF_SUB_BUILD',
  p_validation_condition_type=> 'ITEM_IS_NULL',
  p_when_button_pressed=> 20908810723287045 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20909607560287045 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 20-FEB-2008 13:42');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39929903129730606 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 63,
  p_validation_name => 'P63_OFF_STREET Not Null',
  p_validation_sequence=> 4,
  p_validation => 'P63_OFF_STREET',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_when_button_pressed=> 20908810723287045 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20909800379287047 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 20-FEB-2008 13:42');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39930119252730606 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 63,
  p_validation_name => 'P63_OFF_CITY Not Null',
  p_validation_sequence=> 5,
  p_validation => 'P63_OFF_CITY',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_when_button_pressed=> 20908810723287045 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20910031981287047 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 20-FEB-2008 13:42');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 39930306508730606 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 63,
  p_validation_name => 'P63_OFF_POSTCODE Not Null',
  p_validation_sequence=> 6,
  p_validation => 'P63_OFF_POSTCODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_when_button_pressed=> 20908810723287045 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20910200225287047 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 20-FEB-2008 13:42');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20910929252287047 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 63,
  p_validation_name => 'P63_OFF_CODE_UQ',
  p_validation_sequence=> 10,
  p_validation => 'declare'||chr(10)||
'  l_dummy number := 0;'||chr(10)||
'begin'||chr(10)||
'  SELECT count(*) '||chr(10)||
'    into l_dummy'||chr(10)||
'    FROM addresses'||chr(10)||
'   WHERE upper(code) = :P63_OFF_CODE'||chr(10)||
'     AND (NOT upper(sub_building) = upper(:P63_OFF_SUB_BUILDING)'||chr(10)||
'         OR NOT upper(building) = upper(:P63_OFF_BUILDING)'||chr(10)||
'         OR NOT upper(street) = upper(:P63_OFF_STREET)'||chr(10)||
'         OR NOT upper(city) = upper(:P63_OFF_CITY)'||chr(10)||
'         OR NOT replace(upper(postcode),'' '','''') =      '||chr(10)||
'                REPLACE(upper(:P63_OFF_POSTCODE),'' '',''''));'||chr(10)||
'  if l_dummy = 0 then'||chr(10)||
'    return true;'||chr(10)||
'  else return false;'||chr(10)||
'  end if;'||chr(10)||
'exception'||chr(10)||
'  when no_data_found then'||chr(10)||
'    return true;'||chr(10)||
'end;',
  p_validation_type => 'FUNC_BODY_RETURNING_BOOLEAN',
  p_error_message => 'Address code must be unique.',
  p_when_button_pressed=> 20908810723287045 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20909220039287045 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 21298220414750589 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 63,
  p_validation_name => 'P63_OFF_POSTCODE',
  p_validation_sequence=> 20,
  p_validation => 'return mip_regions.valid_postcode_format(p_postcode => :P63_OFF_POSTCODE);',
  p_validation_type => 'FUNC_BODY_RETURNING_BOOLEAN',
  p_error_message => 'Invalid postcode',
  p_when_button_pressed=> 20908810723287045 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20910200225287047 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare '||chr(10)||
'  l_addr addresses%ROWTYPE;'||chr(10)||
'  '||chr(10)||
'begin'||chr(10)||
'  SELECT *'||chr(10)||
'    INTO l_addr'||chr(10)||
'    FROM addresses'||chr(10)||
'   WHERE code = :P63_SELECT_ADDRESS;'||chr(10)||
'   '||chr(10)||
'   :P63_OFF_CODE      := l_addr.code;'||chr(10)||
'   :P63_OFF_SUB_BUILD := l_addr.sub_building;'||chr(10)||
'   :P63_OFF_BUILDING  := l_addr.building;'||chr(10)||
'   :P63_OFF_STREET    := l_addr.street;'||chr(10)||
'   :P63_OFF_CITY      := l_addr.city;'||chr(10)||
'   :P63_OFF_POSTCODE  := l_addr.postcode;'||chr(10)||
'   '||chr(10)||
'EXCEPTION'||chr(10)||
'  WHEN ';

p:=p||'no_data_found THEN'||chr(10)||
'    NULL;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 20911013569287047 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 63,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'retrieve_saved_address',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>20910609179287047 + wwv_flow_api.g_id_offset,
  p_process_when=>'P63_SELECT_ADDRESS',
  p_process_when_type=>'ITEM_IS_NOT_NULL',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 63
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00064
prompt  ...PAGE 64: Home Address Details
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 64,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Home Address Details',
  p_step_title=> 'Home Address Details',
  p_step_sub_title => 'Home Address Details',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 28655803265374130+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'MULLENM',
  p_last_upd_yyyymmddhh24miss => '20080228135441',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 20915609939290381 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 64,
  p_plug_name=> 'Home Address Details',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 20915830838290381 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 64,
  p_button_sequence=> 10,
  p_button_plug_id => 20915609939290381+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'REGION_TEMPLATE_CLOSE',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:60:&SESSION.::&DEBUG.:::',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 20916009513290381 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 64,
  p_button_sequence=> 30,
  p_button_plug_id => 20915609939290381+wwv_flow_api.g_id_offset,
  p_button_name    => 'FINISH',
  p_button_image_alt=> 'Finish',
  p_button_position=> 'REGION_TEMPLATE_CREATE',
  p_button_alignment=> 'RIGHT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 20916225014290381 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 64,
  p_button_sequence=> 20,
  p_button_plug_id => 20915609939290381+wwv_flow_api.g_id_offset,
  p_button_name    => 'PREVIOUS',
  p_button_image_alt=> '< Previous',
  p_button_position=> 'REGION_TEMPLATE_PREVIOUS',
  p_button_alignment=> 'RIGHT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>20919710510290384 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 64,
  p_branch_action=> 'f?p=&APP_ID.:68:&SESSION.::&DEBUG.::P68_RESULT_MESSAGE:Party &P61_ID. created successfully.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>20916009513290381+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 10,
  p_branch_comment=> 'Created 07-DEC-2007 16:21 by MULLENM');
 
wwv_flow_api.create_page_branch(
  p_id=>20919928391290384 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 64,
  p_branch_action=> 'f?p=&APP_ID.:64:&SESSION.::&DEBUG.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>20917016272290381+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 20,
  p_branch_comment=> 'Created 10-DEC-2007 10:46 by MULLENM');
 
wwv_flow_api.create_page_branch(
  p_id=>20920109177290384 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 64,
  p_branch_action=> 'f?p=&APP_ID.:63:&SESSION.::&DEBUG.:::&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'BEFORE_VALIDATION',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>20916225014290381+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 10,
  p_branch_comment=> 'Created 07-DEC-2007 16:21 by MULLENM');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20916415840290381 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 64,
  p_name=>'P64_HOME_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 101,
  p_item_plug_id => 20915609939290381+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Home Address Code',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20916609572290381 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 64,
  p_name=>'P64_HOME_SUB_BUILD',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 102,
  p_item_plug_id => 20915609939290381+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Sub-building',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20916812640290381 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 64,
  p_name=>'P64_SELECT_ADDRESS',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1,
  p_item_plug_id => 20915609939290381+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Select Address',
  p_source_type=> 'STATIC',
  p_display_as=> 'POPUP',
  p_named_lov=> 'ADDRESSES',
  p_lov => 'SELECT addr.code || '','' || addr.sub_building || '','' || addr.building || '','' ||'||chr(10)||
'       addr.city || '','' || addr.postcode AS address,'||chr(10)||
'       addr.code AS return_value'||chr(10)||
'  FROM addresses addr'||chr(10)||
'',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'- New -',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20917016272290381 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 64,
  p_name=>'P64_COPY_ADDRESS',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 2,
  p_item_plug_id => 20915609939290381+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default => 'Copy Address',
  p_prompt=>'Copy Address',
  p_source=>'Copy Address',
  p_source_type=> 'STATIC',
  p_display_as=> 'BUTTON',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20917200736290383 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 64,
  p_name=>'P64_HOME_BUILDING',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 103,
  p_item_plug_id => 20915609939290381+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Building',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20917425230290383 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 64,
  p_name=>'P64_HOME_STREET',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 104,
  p_item_plug_id => 20915609939290381+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Street',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 60,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20917605404290383 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 64,
  p_name=>'P64_HOME_CITY',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 105,
  p_item_plug_id => 20915609939290381+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Town/City',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20917810304290383 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 64,
  p_name=>'P64_HOME_POSTCODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 106,
  p_item_plug_id => 20915609939290381+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Postcode',
  p_format_mask=>'AA99 9AA',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 8,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 41746830476223044 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 64,
  p_validation_name => 'P64_HOME_SUB_BUILD Not Null',
  p_validation_sequence=> 1,
  p_validation => 'P64_HOME_SUB_BUILD',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'begin'||chr(10)||
'  if :P64_HOME_CODE is not null then'||chr(10)||
'    if :P64_HOME_BUILDING is null then'||chr(10)||
'      return true;'||chr(10)||
'    else return false;'||chr(10)||
'    end if;'||chr(10)||
'  else'||chr(10)||
'   return false;'||chr(10)||
'  end if;'||chr(10)||
'end;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20916009513290381 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20916609572290381 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 22-FEB-2008 14:17');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 41747019272223045 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 64,
  p_validation_name => 'P64_HOME_BUILDING Not Null',
  p_validation_sequence=> 2,
  p_validation => 'P64_HOME_BUILDING',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'begin'||chr(10)||
'  if :P64_HOME_CODE is not null then'||chr(10)||
'    if :P64_HOME_SUB_BUILD is null then'||chr(10)||
'      return true;'||chr(10)||
'    else return false;'||chr(10)||
'    end if;'||chr(10)||
'  else'||chr(10)||
'   return false;'||chr(10)||
'  end if;'||chr(10)||
'end;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 20916009513290381 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20917200736290383 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 22-FEB-2008 14:17');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 41747227408223045 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 64,
  p_validation_name => 'P64_HOME_STREET Not Null',
  p_validation_sequence=> 3,
  p_validation => 'P64_HOME_STREET',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'P64_HOME_CODE',
  p_validation_condition_type=> 'ITEM_IS_NOT_NULL',
  p_when_button_pressed=> 20916009513290381 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20917425230290383 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 22-FEB-2008 14:17');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 41747400928223047 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 64,
  p_validation_name => 'P64_HOME_CITY Not Null',
  p_validation_sequence=> 4,
  p_validation => 'P64_HOME_CITY',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'P64_HOME_CODE',
  p_validation_condition_type=> 'ITEM_IS_NOT_NULL',
  p_when_button_pressed=> 20916009513290381 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20917605404290383 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 22-FEB-2008 14:17');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 41747612077223047 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 64,
  p_validation_name => 'P64_HOME_POSTCODE Not Null',
  p_validation_sequence=> 5,
  p_validation => 'P64_HOME_POSTCODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'P64_HOME_CODE',
  p_validation_condition_type=> 'ITEM_IS_NOT_NULL',
  p_when_button_pressed=> 20916009513290381 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20917810304290383 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 22-FEB-2008 14:17');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20918111153290383 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 64,
  p_validation_name => 'P64_HOME_CODE_UQ',
  p_validation_sequence=> 10,
  p_validation => 'declare'||chr(10)||
'  l_dummy number := 0;'||chr(10)||
'begin'||chr(10)||
'  SELECT count(*) '||chr(10)||
'    into l_dummy'||chr(10)||
'    FROM addresses'||chr(10)||
'   WHERE upper(code) = :P64_HOME_CODE'||chr(10)||
'     AND (NOT upper(sub_building) = upper(:P64_HOME_SUB_BUILDING)'||chr(10)||
'         OR NOT upper(building) = upper(:P64_HOME_BUILDING)'||chr(10)||
'         OR NOT upper(street) = upper(:P64_HOME_STREET)'||chr(10)||
'         OR NOT upper(city) = upper(:P64_HOME_CITY)'||chr(10)||
'         OR NOT replace(upper(postcode),'' '','''') =      '||chr(10)||
'                REPLACE(upper(:P64_HOME_POSTCODE),'' '',''''));'||chr(10)||
'  if l_dummy = 0 then'||chr(10)||
'    return true;'||chr(10)||
'  else return false;'||chr(10)||
'  end if;'||chr(10)||
'exception'||chr(10)||
'  when no_data_found then'||chr(10)||
'    return true;'||chr(10)||
'end;',
  p_validation_type => 'FUNC_BODY_RETURNING_BOOLEAN',
  p_error_message => 'Address code must be unique.',
  p_validation_condition=> 'P64_HOME_CODE',
  p_validation_condition_type=> 'ITEM_IS_NOT_NULL',
  p_when_button_pressed=> 20916009513290381 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20916415840290381 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 21307732328839181 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 64,
  p_validation_name => 'P64_HOME_POSTCODE',
  p_validation_sequence=> 20,
  p_validation => 'return mip_regions.valid_postcode_format(p_postcode => :P64_HOME_POSTCODE);',
  p_validation_type => 'FUNC_BODY_RETURNING_BOOLEAN',
  p_error_message => 'Invalid postcode',
  p_validation_condition=> 'P64_HOME_CODE',
  p_validation_condition_type=> 'ITEM_IS_NOT_NULL',
  p_when_button_pressed=> 20916009513290381 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20917810304290383 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare '||chr(10)||
'  l_addr addresses%ROWTYPE;'||chr(10)||
'  '||chr(10)||
'begin'||chr(10)||
'  SELECT *'||chr(10)||
'    INTO l_addr'||chr(10)||
'    FROM addresses'||chr(10)||
'   WHERE code = :P64_SELECT_ADDRESS;'||chr(10)||
'   '||chr(10)||
'   :P64_HOME_CODE      := l_addr.code;'||chr(10)||
'   :P64_HOME_SUB_BUILD := l_addr.sub_building;'||chr(10)||
'   :P64_HOME_BUILDING  := l_addr.building;'||chr(10)||
'   :P64_HOME_STREET    := l_addr.street;'||chr(10)||
'   :P64_HOME_CITY      := l_addr.city;'||chr(10)||
'   :P64_HOME_POSTCODE  := l_addr.postcode;'||chr(10)||
'';

p:=p||'   '||chr(10)||
'EXCEPTION'||chr(10)||
'  WHEN no_data_found THEN'||chr(10)||
'    NULL;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 20918220920290383 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 64,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'copy_address',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>20917016272290381 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'DECLARE'||chr(10)||
'  l_addr_office addresses%ROWTYPE;'||chr(10)||
'  l_addr        addresses%ROWTYPE;'||chr(10)||
''||chr(10)||
'BEGIN'||chr(10)||
'  /******************'||chr(10)||
'  *  CREATE PARTY  *'||chr(10)||
'  ******************/'||chr(10)||
'  -- get the unique party id'||chr(10)||
'  SELECT prty_seq.NEXTVAL INTO :P61_ID FROM dual;'||chr(10)||
''||chr(10)||
'  mip_parties.create_party(p_manu_ref                 => :P61_MANU_REF,'||chr(10)||
'                           p_created_by               => :APP_USER,'||chr(10)||
'                 ';

p:=p||'          p_shortcode                => :P61_SHORTCODE,'||chr(10)||
'                           p_name                     => :P61_NAME,'||chr(10)||
'                           p_description              => :P61_DESCRIPTION,'||chr(10)||
'                           p_mktp_ref                 => :P61_MKTP_REF,'||chr(10)||
'                           p_lt_7b_contract_ref       => :P61_LT_7B_CONTRACT_REF,'||chr(10)||
'                           p_gt_7b_contrac';

p:=p||'t_ref       => :P61_GT_7B_CONTRACT_REF,'||chr(10)||
'                           p_adversarial_contract_ref => :P61_ADV_CONTRACT_REF,'||chr(10)||
'                           p_username                 => :P61_USERNAME,'||chr(10)||
'                           p_first_name               => :P61_FIRST_NAME,'||chr(10)||
'                           p_last_name                => :P61_LAST_NAME,'||chr(10)||
'                           p_personal_title           =>';

p:=p||' :P61_TITLE,'||chr(10)||
'                           p_comments                 => :P61_COMMENTS,'||chr(10)||
'                           p_id                       => :P61_ID,'||chr(10)||
'                           p_prty_type                => :P61_PRTY_TYPE,'||chr(10)||
'                           p_tripartite_member        => :P61_TRIPARTITE,'||chr(10)||
'                           p_password                 => :P61_PASSWORD,'||chr(10)||
'                        ';

p:=p||'   p_expire_pword             => :P61_EXPIRE_PWORD);'||chr(10)||
''||chr(10)||
'  /**********************'||chr(10)||
'  *  CREATE PARTY ROLE  *'||chr(10)||
'  ***********************/'||chr(10)||
'  mip_parties.add_party_role(p_role_code => :P62_PRTY_ROLE,'||chr(10)||
'                             p_prty_id   => :P61_ID);'||chr(10)||
''||chr(10)||
'  /*******************************'||chr(10)||
'  *  CREATE PARTY RELATIONSHIP  *'||chr(10)||
'  *******************************/'||chr(10)||
'  IF upper(:P62_PRTY_ROLE) IN (''AGENT';

p:=p||''', ''SUPPADMIN'') THEN'||chr(10)||
'    -- associate them with a supplier'||chr(10)||
'    mip_parties.create_relationship(p_from_prty_id   => :P61_ID,'||chr(10)||
'                                    p_from_prty_role => :P62_PRTY_ROLE,'||chr(10)||
'                                    p_to_prty_id     => :P62_USER_SUPPLIER,'||chr(10)||
'                                    p_to_prty_role   => ''SUPP'');'||chr(10)||
'  END IF;'||chr(10)||
''||chr(10)||
'  -- if they''re an agent, associate them wit';

p:=p||'h a supp_admin too'||chr(10)||
'  IF upper(:P62_PRTY_ROLE) = ''AGENT'' THEN'||chr(10)||
'    mip_parties.create_relationship(p_from_prty_id   => :P61_ID,'||chr(10)||
'                                    p_from_prty_role => :P62_PRTY_ROLE,'||chr(10)||
'                                    p_to_prty_id     => :P62_SUPP_ADMIN,'||chr(10)||
'                                    p_to_prty_role   => ''SUPPADMIN'');'||chr(10)||
'  END IF;'||chr(10)||
''||chr(10)||
'  /***************************'||chr(10)||
'  *  CRE';

p:=p||'ATE OFFICE ADDRESS  *'||chr(10)||
'  ***************************/'||chr(10)||
'  l_addr_office.code         := :P63_OFF_CODE;'||chr(10)||
'  l_addr_office.sub_building := :P63_OFF_SUB_BUILD;'||chr(10)||
'  l_addr_office.building     := :P63_OFF_BUILDING;'||chr(10)||
'  l_addr_office.street       := :P63_OFF_STREET;'||chr(10)||
'  l_addr_office.city         := :P63_OFF_CITY;'||chr(10)||
'  l_addr_office.postcode     := :P63_OFF_POSTCODE;'||chr(10)||
''||chr(10)||
'  mip_parties.add_address(l_addr_office)';

p:=p||';'||chr(10)||
''||chr(10)||
'  mip_parties.create_party_address(p_addr_code => :P63_OFF_CODE,'||chr(10)||
'                                   p_prty_id   => :P61_ID,'||chr(10)||
'                                   p_addr_type => ''OFFICE'');'||chr(10)||
''||chr(10)||
'  /*************************'||chr(10)||
'  *  CREATE HOME ADDRESS  *'||chr(10)||
'  *************************/'||chr(10)||
''||chr(10)||
'  IF NOT :P63_OFF_CODE = :P64_HOME_CODE  and :P64_HOME_CODE is not null THEN'||chr(10)||
'    l_addr.code         := :P64_HOME';

p:=p||'_CODE;'||chr(10)||
'    l_addr.sub_building := :P64_HOME_SUB_BUILD;'||chr(10)||
'    l_addr.building     := :P64_HOME_BUILDING;'||chr(10)||
'    l_addr.street       := :P64_HOME_STREET;'||chr(10)||
'    l_addr.city         := :P64_HOME_CITY;'||chr(10)||
'    l_addr.postcode     := :P64_HOME_POSTCODE;'||chr(10)||
'  '||chr(10)||
'    mip_parties.add_address(l_addr);'||chr(10)||
'  '||chr(10)||
'    mip_parties.create_party_address(p_addr_code => :P64_HOME_CODE,'||chr(10)||
'                                     p_prt';

p:=p||'y_id   => :P61_ID,'||chr(10)||
'                                     p_addr_type => ''HOME'');'||chr(10)||
'  END IF;'||chr(10)||
'  /***************************'||chr(10)||
'  *  STORE CONTACT DETAILS  *'||chr(10)||
'  ***************************/'||chr(10)||
''||chr(10)||
'  IF :P62_PHONE IS NOT NULL THEN'||chr(10)||
'    mip_parties.create_party_contact_details(p_prty_id           => :P61_ID,'||chr(10)||
'                                             p_contact_mech_type => ''PHONE'','||chr(10)||
'                    ';

p:=p||'                         p_contact_value     => :P62_PHONE);'||chr(10)||
'  END IF;'||chr(10)||
''||chr(10)||
'  IF :P62_FAX IS NOT NULL THEN'||chr(10)||
'    mip_parties.create_party_contact_details(p_prty_id           => :P61_ID,'||chr(10)||
'                                             p_contact_mech_type => ''FAX'','||chr(10)||
'                                             p_contact_value     => :P62_FAX);'||chr(10)||
'  END IF;'||chr(10)||
''||chr(10)||
'  IF :P62_MOBILE IS NOT NULL THEN'||chr(10)||
'    mip_par';

p:=p||'ties.create_party_contact_details(p_prty_id           => :P61_ID,'||chr(10)||
'                                             p_contact_mech_type => ''MOBILE'','||chr(10)||
'                                             p_contact_value     => :P62_MOBILE);'||chr(10)||
'  END IF;'||chr(10)||
''||chr(10)||
'  IF :P62_EMAIL IS NOT NULL THEN'||chr(10)||
'    mip_parties.create_party_contact_details(p_prty_id           => :P61_ID,'||chr(10)||
'                                             p';

p:=p||'_contact_mech_type => ''EMAIL'','||chr(10)||
'                                             p_contact_value     => :P62_EMAIL);'||chr(10)||
'  END IF;'||chr(10)||
'END;';

wwv_flow_api.create_page_process(
  p_id     => 39260519732512820 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 64,
  p_process_sequence=> 70,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Create Party',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to create party.',
  p_process_when_button_id=>20916009513290381 + wwv_flow_api.g_id_offset,
  p_process_success_message=> 'Party created successfully.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 64
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00065
prompt  ...PAGE 65: Edit Parties
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 65,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Edit Parties',
  p_step_title=> 'Edit Parties',
  p_step_sub_title => 'Edit Parties',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 28655803265374130+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'MULLENM',
  p_last_upd_yyyymmddhh24miss => '20080310133147',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 20923729731293311 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 65,
  p_plug_name=> 'Search',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 5,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select PARTIES.ID, '||chr(10)||
'MANU_REF,'||chr(10)||
'CREATED_BY,'||chr(10)||
'SHORTCODE,'||chr(10)||
'NAME,'||chr(10)||
'PARTIES.DESCRIPTION,'||chr(10)||
'CREATED_ON,'||chr(10)||
'UPDATED_ON,'||chr(10)||
'UPDATED_BY,'||chr(10)||
'MKTP_REF,'||chr(10)||
'LT_7B_CONTRACT_REF,'||chr(10)||
'GT_7B_CONTRACT_REF,'||chr(10)||
'ADVERSARIAL_CONTRACT_REF,'||chr(10)||
'USERNAME,'||chr(10)||
'STATUS,'||chr(10)||
'FIRST_NAME,'||chr(10)||
'LAST_NAME,'||chr(10)||
'PERSONAL_TITLE,'||chr(10)||
'COMMENTS,'||chr(10)||
'PRTY_TYPE,'||chr(10)||
'ROLE_TYPES.DESCRIPTION as "User Role",'||chr(10)||
'NAME||USERNAME||MANU_REF||MKTP_REF as General_Info,'||chr(10)||
'''Reset Password'''||chr(10)||
'from PARTIES, PARTY_RO';

s:=s||'LES, ROLE_TYPES'||chr(10)||
'where PARTIES.ID = PARTY_ROLES.PRTY_ID'||chr(10)||
'and PARTY_ROLES.RT_CODE = ROLE_TYPES.CODE'||chr(10)||
'and prty_type LIKE :P65_PRTY_TYPE ';

wwv_flow_api.create_report_region (
  p_id=> 20923906121293312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 65,
  p_name=> 'Parties',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 20,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_display_when_condition=> 'if mip_parties.get_user_role(:APP_USER) = ''MIPADMIN'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_condition_type=> 'FUNCTION_BODY',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 28041136573354435+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'no data found',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_query_row_count_max=> '500',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20924121009293312 + wwv_flow_api.g_id_offset,
  p_region_id=> 20923906121293312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'ID',
  p_column_display_sequence=> 22,
  p_column_heading=> '',
  p_column_link=>'f?p=&APP_ID.:66:&SESSION.::&DEBUG.::P66_ID:#ID#',
  p_column_linktext=>'Edit',
  p_column_link_attr=>'name="Edit #USERNAME##NAME# #SHORTCODE#"',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'N',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'PARTIES',
  p_ref_column_name=> 'ID',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20924224453293312 + wwv_flow_api.g_id_offset,
  p_region_id=> 20923906121293312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'MANU_REF',
  p_column_display_sequence=> 1,
  p_column_heading=> 'Manufacturer Ref',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'FUNCTION_BODY',
  p_display_when_condition=> 'if upper(:P65_PRTY_TYPE) = ''MANU'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'PARTIES',
  p_ref_column_name=> 'MANU_REF',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20924324789293312 + wwv_flow_api.g_id_offset,
  p_region_id=> 20923906121293312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'CREATED_BY',
  p_column_display_sequence=> 6,
  p_column_heading=> 'Created By',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'PARTIES',
  p_ref_column_name=> 'CREATED_BY',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20924413025293312 + wwv_flow_api.g_id_offset,
  p_region_id=> 20923906121293312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'SHORTCODE',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Shortcode',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'FUNCTION_BODY',
  p_display_when_condition=> 'if upper(:P65_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'PARTIES',
  p_ref_column_name=> 'SHORTCODE',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20924500589293312 + wwv_flow_api.g_id_offset,
  p_region_id=> 20923906121293312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'NAME',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Name',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'FUNCTION_BODY',
  p_display_when_condition=> 'if upper(:P65_PRTY_TYPE) IN (''IO'',''EO'',''MANU'',''MKTP'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'PARTIES',
  p_ref_column_name=> 'NAME',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20924624045293312 + wwv_flow_api.g_id_offset,
  p_region_id=> 20923906121293312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 6,
  p_form_element_id=> null,
  p_column_alias=> 'DESCRIPTION',
  p_column_display_sequence=> 12,
  p_column_heading=> 'Description',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'FUNCTION_BODY',
  p_display_when_condition=> 'if upper(:P65_PRTY_TYPE) = ''MANU'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'PARTIES',
  p_ref_column_name=> 'DESCRIPTION',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20924714564293312 + wwv_flow_api.g_id_offset,
  p_region_id=> 20923906121293312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 7,
  p_form_element_id=> null,
  p_column_alias=> 'CREATED_ON',
  p_column_display_sequence=> 5,
  p_column_heading=> 'Created On',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'PARTIES',
  p_ref_column_name=> 'CREATED_ON',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20924822464293312 + wwv_flow_api.g_id_offset,
  p_region_id=> 20923906121293312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 8,
  p_form_element_id=> null,
  p_column_alias=> 'UPDATED_ON',
  p_column_display_sequence=> 7,
  p_column_heading=> 'Updated On',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'PARTIES',
  p_ref_column_name=> 'UPDATED_ON',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20924914449293312 + wwv_flow_api.g_id_offset,
  p_region_id=> 20923906121293312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 9,
  p_form_element_id=> null,
  p_column_alias=> 'UPDATED_BY',
  p_column_display_sequence=> 8,
  p_column_heading=> 'Updated By',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'PARTIES',
  p_ref_column_name=> 'UPDATED_BY',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20925013190293312 + wwv_flow_api.g_id_offset,
  p_region_id=> 20923906121293312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 10,
  p_form_element_id=> null,
  p_column_alias=> 'MKTP_REF',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Market Participant Ref',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'FUNCTION_BODY',
  p_display_when_condition=> 'if upper(:P65_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'PARTIES',
  p_ref_column_name=> 'MKTP_REF',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20925114991293312 + wwv_flow_api.g_id_offset,
  p_region_id=> 20923906121293312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 11,
  p_form_element_id=> null,
  p_column_alias=> 'LT_7B_CONTRACT_REF',
  p_column_display_sequence=> 9,
  p_column_heading=> 'LT 7B Contract Ref',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'FUNCTION_BODY',
  p_display_when_condition=> 'if upper(:P65_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'PARTIES',
  p_ref_column_name=> 'LT_7B_CONTRACT_REF',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20925215624293312 + wwv_flow_api.g_id_offset,
  p_region_id=> 20923906121293312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 12,
  p_form_element_id=> null,
  p_column_alias=> 'GT_7B_CONTRACT_REF',
  p_column_display_sequence=> 10,
  p_column_heading=> 'GT 7B Contract Ref',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'FUNCTION_BODY',
  p_display_when_condition=> 'if upper(:P65_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'PARTIES',
  p_ref_column_name=> 'GT_7B_CONTRACT_REF',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20925301523293312 + wwv_flow_api.g_id_offset,
  p_region_id=> 20923906121293312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 13,
  p_form_element_id=> null,
  p_column_alias=> 'ADVERSARIAL_CONTRACT_REF',
  p_column_display_sequence=> 11,
  p_column_heading=> 'Adversarial Contract Ref',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'FUNCTION_BODY',
  p_display_when_condition=> 'if upper(:P65_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'PARTIES',
  p_ref_column_name=> 'ADVERSARIAL_CONTRACT_REF',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20925411058293312 + wwv_flow_api.g_id_offset,
  p_region_id=> 20923906121293312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 14,
  p_form_element_id=> null,
  p_column_alias=> 'USERNAME',
  p_column_display_sequence=> 13,
  p_column_heading=> 'Username',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'FUNCTION_BODY',
  p_display_when_condition=> 'if upper(:P65_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'PARTIES',
  p_ref_column_name=> 'USERNAME',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20925517314293312 + wwv_flow_api.g_id_offset,
  p_region_id=> 20923906121293312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 15,
  p_form_element_id=> null,
  p_column_alias=> 'STATUS',
  p_column_display_sequence=> 14,
  p_column_heading=> 'Status',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'FUNCTION_BODY',
  p_display_when_condition=> 'if upper(:P65_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'PARTIES',
  p_ref_column_name=> 'STATUS',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20925618276293312 + wwv_flow_api.g_id_offset,
  p_region_id=> 20923906121293312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 16,
  p_form_element_id=> null,
  p_column_alias=> 'FIRST_NAME',
  p_column_display_sequence=> 15,
  p_column_heading=> 'First Name',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'FUNCTION_BODY',
  p_display_when_condition=> 'if upper(:P65_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'PARTIES',
  p_ref_column_name=> 'FIRST_NAME',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20925719997293312 + wwv_flow_api.g_id_offset,
  p_region_id=> 20923906121293312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 17,
  p_form_element_id=> null,
  p_column_alias=> 'LAST_NAME',
  p_column_display_sequence=> 16,
  p_column_heading=> 'Last Name',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'FUNCTION_BODY',
  p_display_when_condition=> 'if upper(:P65_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'PARTIES',
  p_ref_column_name=> 'LAST_NAME',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20925831352293312 + wwv_flow_api.g_id_offset,
  p_region_id=> 20923906121293312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 18,
  p_form_element_id=> null,
  p_column_alias=> 'PERSONAL_TITLE',
  p_column_display_sequence=> 17,
  p_column_heading=> 'Personal Title',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_when_cond_type=> 'FUNCTION_BODY',
  p_display_when_condition=> 'if upper(:P65_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'PARTIES',
  p_ref_column_name=> 'PERSONAL_TITLE',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20925928117293312 + wwv_flow_api.g_id_offset,
  p_region_id=> 20923906121293312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 19,
  p_form_element_id=> null,
  p_column_alias=> 'COMMENTS',
  p_column_display_sequence=> 18,
  p_column_heading=> 'Comments',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_when_cond_type=> 'FUNCTION_BODY',
  p_display_when_condition=> 'if upper(:P65_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'PARTIES',
  p_ref_column_name=> 'COMMENTS',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20926028852293312 + wwv_flow_api.g_id_offset,
  p_region_id=> 20923906121293312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 20,
  p_form_element_id=> null,
  p_column_alias=> 'PRTY_TYPE',
  p_column_display_sequence=> 19,
  p_column_heading=> 'Party Type',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'FUNCTION_BODY',
  p_display_when_condition=> 'if upper(:P65_PRTY_TYPE) IN(''MKTP'',''IO'',''EO'',''PERS'',''MANU'',''ORG'') then'||chr(10)||
'  return false;'||chr(10)||
'else return true;'||chr(10)||
'end if;',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'PARTIES',
  p_ref_column_name=> 'PRTY_TYPE',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 40530214317507514 + wwv_flow_api.g_id_offset,
  p_region_id=> 20923906121293312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 21,
  p_form_element_id=> null,
  p_column_alias=> 'User Role',
  p_column_display_sequence=> 21,
  p_column_heading=> 'User Role',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20926117291293314 + wwv_flow_api.g_id_offset,
  p_region_id=> 20923906121293312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 22,
  p_form_element_id=> null,
  p_column_alias=> 'GENERAL_INFO',
  p_column_display_sequence=> 20,
  p_column_heading=> 'General Info',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'FUNCTION_BODY',
  p_display_when_condition=> 'if upper(:P65_PRTY_TYPE) IN(''MKTP'',''IO'',''EO'',''PERS'',''MANU'',''ORG'') then'||chr(10)||
'  return false;'||chr(10)||
'else return true;'||chr(10)||
'end if;',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20926201073293314 + wwv_flow_api.g_id_offset,
  p_region_id=> 20923906121293312 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 23,
  p_form_element_id=> null,
  p_column_alias=> '''RESETPASSWORD''',
  p_column_display_sequence=> 23,
  p_column_heading=> '',
  p_column_link=>'f?p=&APP_ID.:67:&SESSION.::&DEBUG.::P67_USER_ID,P67_USERNAME,P67_USER_STATUS:#ID#,#USERNAME#,#STATUS#',
  p_column_linktext=>'Reset Password',
  p_column_link_attr=>'name="Reset #USERNAME##NAME# #SHORTCODE#"',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'FUNCTION_BODY',
  p_display_when_condition=> 'if upper(:P65_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select "ID", '||chr(10)||
'"CREATED_BY",'||chr(10)||
'"CREATED_ON",'||chr(10)||
'"UPDATED_ON",'||chr(10)||
'"UPDATED_BY",'||chr(10)||
'"USERNAME",'||chr(10)||
'"STATUS",'||chr(10)||
'"FIRST_NAME",'||chr(10)||
'"LAST_NAME",'||chr(10)||
'"PERSONAL_TITLE",'||chr(10)||
'"COMMENTS",'||chr(10)||
'"PRTY_TYPE",'||chr(10)||
'''Reset Password'''||chr(10)||
'from "#OWNER#"."PARTIES" '||chr(10)||
' where prty_type LIKE ''PERS'''||chr(10)||
'   and parties.id in (SELECT vparl.from_parl_prty_id FROM v_party_relationships vparl'||chr(10)||
'                      WHERE vparl.to_parl_prty_id = mip_parties.get_user_id(:APP';

s:=s||'_USER)'||chr(10)||
'                        AND vparl.to_rt_code = ''SUPPADMIN'')';

wwv_flow_api.create_report_region (
  p_id=> 20926317511293314 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 65,
  p_name=> 'Supplier Parties',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 30,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_display_when_condition=> 'if mip_parties.check_user_role(p_username => :APP_USER, p_role => ''SUPPADMIN'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_condition_type=> 'FUNCTION_BODY',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 28041136573354435+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_show_nulls_as=> ' - ',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'No agents associated with this Supplier Administrator.',
  p_query_num_rows_type=> 'NEXT_PREVIOUS_LINKS',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20926526967293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20926317511293314 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'ID',
  p_column_display_sequence=> 12,
  p_column_heading=> '',
  p_column_link=>'f?p=&APP_ID.:66:&SESSION.::&DEBUG.::P66_ID:#ID#',
  p_column_linktext=>'Edit',
  p_column_link_attr=>'name="Edit #USERNAME##NAME# #SHORTCODE#"',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'N',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20926629927293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20926317511293314 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'CREATED_BY',
  p_column_display_sequence=> 1,
  p_column_heading=> 'Created By',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20926717271293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20926317511293314 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'CREATED_ON',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Created On',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20926820219293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20926317511293314 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'UPDATED_ON',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Updated On',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20926924504293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20926317511293314 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'UPDATED_BY',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Updated By',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20927017636293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20926317511293314 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 6,
  p_form_element_id=> null,
  p_column_alias=> 'USERNAME',
  p_column_display_sequence=> 5,
  p_column_heading=> 'Username',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20927127338293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20926317511293314 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 7,
  p_form_element_id=> null,
  p_column_alias=> 'STATUS',
  p_column_display_sequence=> 6,
  p_column_heading=> 'Status',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20927228082293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20926317511293314 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 8,
  p_form_element_id=> null,
  p_column_alias=> 'FIRST_NAME',
  p_column_display_sequence=> 7,
  p_column_heading=> 'First Name',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20927306683293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20926317511293314 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 9,
  p_form_element_id=> null,
  p_column_alias=> 'LAST_NAME',
  p_column_display_sequence=> 8,
  p_column_heading=> 'Last Name',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20927427001293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20926317511293314 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 10,
  p_form_element_id=> null,
  p_column_alias=> 'PERSONAL_TITLE',
  p_column_display_sequence=> 9,
  p_column_heading=> 'Personal Title',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20927500901293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20926317511293314 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 11,
  p_form_element_id=> null,
  p_column_alias=> 'COMMENTS',
  p_column_display_sequence=> 10,
  p_column_heading=> 'Comments',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20927617034293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20926317511293314 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 12,
  p_form_element_id=> null,
  p_column_alias=> 'PRTY_TYPE',
  p_column_display_sequence=> 11,
  p_column_heading=> 'Party Type',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20927720138293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20926317511293314 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 13,
  p_form_element_id=> null,
  p_column_alias=> '''RESETPASSWORD''',
  p_column_display_sequence=> 13,
  p_column_heading=> '',
  p_column_link=>'f?p=&APP_ID.:67:&SESSION.::&DEBUG.::P67_USER_ID,P67_USER_STATUS,P67_USERNAME:#ID#,#STATUS#,#USERNAME#',
  p_column_linktext=>'Reset Password',
  p_column_link_attr=>'name="Reset #USERNAME#"',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select "ID", '||chr(10)||
'"CREATED_BY",'||chr(10)||
'"CREATED_ON",'||chr(10)||
'"UPDATED_ON",'||chr(10)||
'"UPDATED_BY",'||chr(10)||
'"USERNAME",'||chr(10)||
'"STATUS",'||chr(10)||
'"FIRST_NAME",'||chr(10)||
'"LAST_NAME",'||chr(10)||
'"PERSONAL_TITLE",'||chr(10)||
'"COMMENTS",'||chr(10)||
'"PRTY_TYPE",'||chr(10)||
'''Reset Password'''||chr(10)||
'from "#OWNER#"."PARTIES" '||chr(10)||
' where prty_type LIKE ''PERS'''||chr(10)||
'   and parties.id = mip_parties.get_user_id(:APP_USER)';

wwv_flow_api.create_report_region (
  p_id=> 20927820063293317 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 65,
  p_name=> 'Current User',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 10,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_query_row_template=> 28041136573354435+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_show_nulls_as=> ' - ',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'no data found',
  p_query_num_rows_type=> '0',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20928006528293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20927820063293317 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'ID',
  p_column_display_sequence=> 12,
  p_column_heading=> '',
  p_column_link=>'f?p=&APP_ID.:66:&SESSION.::&DEBUG.::P66_ID:#ID#',
  p_column_linktext=>'Edit',
  p_column_link_attr=>'name="Edit Current User"',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20928109207293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20927820063293317 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'CREATED_BY',
  p_column_display_sequence=> 1,
  p_column_heading=> 'Created By',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20928226043293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20927820063293317 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'CREATED_ON',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Created On',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20928330414293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20927820063293317 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'UPDATED_ON',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Updated On',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20928416135293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20927820063293317 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'UPDATED_BY',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Updated By',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20928521696293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20927820063293317 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 6,
  p_form_element_id=> null,
  p_column_alias=> 'USERNAME',
  p_column_display_sequence=> 5,
  p_column_heading=> 'Username',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20928604708293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20927820063293317 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 7,
  p_form_element_id=> null,
  p_column_alias=> 'STATUS',
  p_column_display_sequence=> 6,
  p_column_heading=> 'Status',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20928714963293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20927820063293317 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 8,
  p_form_element_id=> null,
  p_column_alias=> 'FIRST_NAME',
  p_column_display_sequence=> 7,
  p_column_heading=> 'First Name',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20928829947293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20927820063293317 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 9,
  p_form_element_id=> null,
  p_column_alias=> 'LAST_NAME',
  p_column_display_sequence=> 8,
  p_column_heading=> 'Last Name',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20928932028293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20927820063293317 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 10,
  p_form_element_id=> null,
  p_column_alias=> 'PERSONAL_TITLE',
  p_column_display_sequence=> 9,
  p_column_heading=> 'Personal Title',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20929027969293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20927820063293317 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 11,
  p_form_element_id=> null,
  p_column_alias=> 'COMMENTS',
  p_column_display_sequence=> 10,
  p_column_heading=> 'Comments',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20929131157293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20927820063293317 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 12,
  p_form_element_id=> null,
  p_column_alias=> 'PRTY_TYPE',
  p_column_display_sequence=> 11,
  p_column_heading=> 'Party Type',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20929217223293317 + wwv_flow_api.g_id_offset,
  p_region_id=> 20927820063293317 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 13,
  p_form_element_id=> null,
  p_column_alias=> '''RESETPASSWORD''',
  p_column_display_sequence=> 13,
  p_column_heading=> '',
  p_column_link=>'f?p=&APP_ID.:67:&SESSION.::&DEBUG.::P67_USER_ID,P67_USERNAME,P67_USER_STATUS:#ID#,#USERNAME#,#STATUS#',
  p_column_linktext=>'Reset Password',
  p_column_link_attr=>'name="Reset Current User Password"',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_column_comment=>'');
end;
/
 
begin
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>20929809514293319 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 65,
  p_branch_action=> 'f?p=&APP_ID.:65:&SESSION.::&DEBUG.:RP::',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 10,
  p_branch_comment=> 'Created 05-DEC-2007 10:19 by MULLENM');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20929308460293317 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 65,
  p_name=>'P65_PRTY_TYPE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 20923729731293311+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Party Type',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX_WITH_SUBMIT',
  p_named_lov=> 'PRTY_TYPES',
  p_lov => '.'||to_char(19177116607688386 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'- Select a party type -',
  p_lov_null_value=> '%',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'if not mip_parties.get_user_role(:APP_USER) = ''MIPADMIN'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'begin'||chr(10)||
'  if not mip_parties.get_user_role(:APP_USER) = ''MIPADMIN'' then '||chr(10)||
'     :P65_PRTY_TYPE := ''PERS'';'||chr(10)||
'  end if; '||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 20929532132293319 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 65,
  p_process_sequence=> 10,
  p_process_point=> 'BEFORE_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'set_prty_type',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 65
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00066
prompt  ...PAGE 66: Edit Party
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph:=ph||'<script language="JavaScript" type="text/javascript">'||chr(10)||
'<!--'||chr(10)||
''||chr(10)||
' htmldb_delete_message=''"DELETE_CONFIRM_MSG"'';'||chr(10)||
''||chr(10)||
'//-->'||chr(10)||
'</script>';

wwv_flow_api.create_page(
  p_id     => 66,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Edit Party',
  p_step_title=> 'Edit Party',
  p_step_sub_title => 'Edit Party',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'AUTO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 28655803265374130+ wwv_flow_api.g_id_offset,
  p_help_text => ' ',
  p_html_page_header => ' ',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'MULLENM',
  p_last_upd_yyyymmddhh24miss => '20080306165152',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>66,p_text=>h);
wwv_flow_api.set_html_page_header(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>66,p_text=>ph);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 20933427182296931 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 66,
  p_plug_name=> 'Other Information',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 40,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 20933610466296942 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 66,
  p_plug_name=> 'Edit Party &P66_NAME.',
  p_region_name=>'',
  p_plug_template=> 28035733013354425+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'SELECT prty.id party,'||chr(10)||
'       addr.code code,'||chr(10)||
'       addr.sub_building sub_building,'||chr(10)||
'       addr.building building,'||chr(10)||
'       addr.street street,'||chr(10)||
'       addr.city city,'||chr(10)||
'       addr.postcode postcode,'||chr(10)||
'       paddr.start_date start_date,'||chr(10)||
'       paddr.end_date end_date,'||chr(10)||
'       prty_addr_ro.rt_code address_code,'||chr(10)||
'       ''Edit'','||chr(10)||
'       ''Remove'''||chr(10)||
'  FROM parties             prty,'||chr(10)||
'       addresses           add';

s:=s||'r,'||chr(10)||
'       party_addresses     paddr,'||chr(10)||
'       party_address_roles prty_addr_ro'||chr(10)||
' WHERE paddr.addr_code = addr.code'||chr(10)||
'   AND prty_addr_ro.paddr_addr_code = addr.code'||chr(10)||
'   AND paddr.prty_id = prty.id'||chr(10)||
'   AND prty_addr_ro.paddr_prty_id = prty.id'||chr(10)||
'   AND paddr.end_date IS NULL'||chr(10)||
'   and prty_addr_ro.end_date is null'||chr(10)||
'   AND prty.id = :P66_ID';

wwv_flow_api.create_report_region (
  p_id=> 20933808162296942 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 66,
  p_name=> 'Addresses (&P66_ADDRESS_COUNT.)',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 20,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 28041136573354435+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_show_nulls_as=> ' - ',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'No addresses assigned to the current user.',
  p_query_num_rows_type=> 'NEXT_PREVIOUS_LINKS',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20935116313296942 + wwv_flow_api.g_id_offset,
  p_region_id=> 20933808162296942 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'PARTY',
  p_column_display_sequence=> 8,
  p_column_heading=> 'Party',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20934203753296942 + wwv_flow_api.g_id_offset,
  p_region_id=> 20933808162296942 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'CODE',
  p_column_display_sequence=> 1,
  p_column_heading=> 'Code',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20934305968296942 + wwv_flow_api.g_id_offset,
  p_region_id=> 20933808162296942 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'SUB_BUILDING',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Sub Building',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20934423526296942 + wwv_flow_api.g_id_offset,
  p_region_id=> 20933808162296942 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'BUILDING',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Building',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20934504612296942 + wwv_flow_api.g_id_offset,
  p_region_id=> 20933808162296942 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'STREET',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Street',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20934625810296942 + wwv_flow_api.g_id_offset,
  p_region_id=> 20933808162296942 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 6,
  p_form_element_id=> null,
  p_column_alias=> 'CITY',
  p_column_display_sequence=> 5,
  p_column_heading=> 'City',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20934712118296942 + wwv_flow_api.g_id_offset,
  p_region_id=> 20933808162296942 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 7,
  p_form_element_id=> null,
  p_column_alias=> 'POSTCODE',
  p_column_display_sequence=> 6,
  p_column_heading=> 'Postcode',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20934108778296942 + wwv_flow_api.g_id_offset,
  p_region_id=> 20933808162296942 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 8,
  p_form_element_id=> null,
  p_column_alias=> 'START_DATE',
  p_column_display_sequence=> 9,
  p_column_heading=> 'Start Date',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20934024888296942 + wwv_flow_api.g_id_offset,
  p_region_id=> 20933808162296942 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 9,
  p_form_element_id=> null,
  p_column_alias=> 'END_DATE',
  p_column_display_sequence=> 10,
  p_column_heading=> 'End Date',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20934820164296942 + wwv_flow_api.g_id_offset,
  p_region_id=> 20933808162296942 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 10,
  p_form_element_id=> null,
  p_column_alias=> 'ADDRESS_CODE',
  p_column_display_sequence=> 7,
  p_column_heading=> 'Address Code',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20934920885296942 + wwv_flow_api.g_id_offset,
  p_region_id=> 20933808162296942 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 11,
  p_form_element_id=> null,
  p_column_alias=> '''EDIT''',
  p_column_display_sequence=> 11,
  p_column_heading=> '',
  p_column_link=>'f?p=&APP_ID.:69:&SESSION.::&DEBUG.::P69_ADDR_CODE,P69_PRTY_ID,P69_ACTION:#CODE#,#PARTY#,EDIT',
  p_column_linktext=>'Edit',
  p_column_link_attr=>'name="Edit #CODE#"',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 20935021480296942 + wwv_flow_api.g_id_offset,
  p_region_id=> 20933808162296942 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 12,
  p_form_element_id=> null,
  p_column_alias=> '''REMOVE''',
  p_column_display_sequence=> 12,
  p_column_heading=> '',
  p_column_link=>'f?p=&APP_ID.:70:&SESSION.::&DEBUG.::P70_ADDR_CODE,P70_PRTY_ID:#CODE#,#PARTY#',
  p_column_linktext=>'Remove',
  p_column_link_attr=>'name="Remove #CODE#"',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 20935224502296942 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 66,
  p_plug_name=> 'Contact Details',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 30,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 20936023115296944 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 66,
  p_button_sequence=> 10,
  p_button_plug_id => 20933610466296942+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'REGION_TEMPLATE_CLOSE',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:65:&SESSION.::&DEBUG.:::',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 20935829064296944 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 66,
  p_button_sequence=> 30,
  p_button_plug_id => 20933610466296942+wwv_flow_api.g_id_offset,
  p_button_name    => 'SAVE',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Apply Changes',
  p_button_position=> 'REGION_TEMPLATE_CREATE',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P66_ID',
  p_button_condition_type=> 'ITEM_IS_NOT_NULL',
  p_database_action=>'UPDATE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 20935427870296942 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 66,
  p_button_sequence=> 40,
  p_button_plug_id => 20933808162296942+wwv_flow_api.g_id_offset,
  p_button_name    => 'ADD_ADDRESS',
  p_button_image_alt=> 'Add Address',
  p_button_position=> 'REGION_TEMPLATE_CREATE',
  p_button_alignment=> 'LEFT',
  p_button_redirect_url=> 'f?p=&APP_ID.:69:&SESSION.::&DEBUG.:69:P69_ACTION,P69_PRTY_ID:NEW,&P66_ID.',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 20935612994296944 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 66,
  p_button_sequence=> 20,
  p_button_plug_id => 20933610466296942+wwv_flow_api.g_id_offset,
  p_button_name    => 'DELETE',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Delete',
  p_button_position=> 'REGION_TEMPLATE_DELETE',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'javascript:confirmDelete(htmldb_delete_message,''DELETE'');',
  p_button_condition=> 'if upper(:P66_USERNAME) = upper(:APP_USER) then '||chr(10)||
'  return false;'||chr(10)||
'else '||chr(10)||
'  return true;'||chr(10)||
'end if;',
  p_button_condition_type=> 'FUNCTION_BODY',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>20943530438296950 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_branch_action=> 'f?p=&APP_ID.:65:&SESSION.::&DEBUG.:::&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 1,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>1179105122586153 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_SUPPLIER',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 210,
  p_item_plug_id => 20933610466296942+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Supplier',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P66_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when_type=>'ALWAYS',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20936207036296944 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_TRIPARTITE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 130,
  p_item_plug_id => 20933610466296942+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Tripartite Member',
  p_source=>'TRIPARTITE_MEMBER',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'NOORYES',
  p_lov => '.'||to_char(17436531047269251 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P66_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20936411346296944 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_ADDRESS_COUNT',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 218,
  p_item_plug_id => 20933808162296942+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20936614934296944 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_TELEPHONE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 205,
  p_item_plug_id => 20935224502296942+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> '',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Telephone',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20936831527296944 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_MOBILE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 206,
  p_item_plug_id => 20935224502296942+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> '',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Mobile',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20937017959296944 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_FAX',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 207,
  p_item_plug_id => 20935224502296942+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> '',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Fax',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20937225514296944 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_EMAIL',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 208,
  p_item_plug_id => 20935224502296942+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> '',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Email',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20937431417296945 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_COMMENTS',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 200,
  p_item_plug_id => 20933610466296942+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Comments',
  p_source=>'COMMENTS',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P66_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20937601968296945 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_PRTY_TYPE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 228,
  p_item_plug_id => 20933610466296942+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Party Type',
  p_source=>'PRTY_TYPE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 10,
  p_cMaxlength=> 10,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when_type=>'ALWAYS',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20937821840296945 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_LT_7B_CONTRACT_REF',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 100,
  p_item_plug_id => 20933610466296942+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'LT 7B Contract Reference',
  p_source=>'LT_7B_CONTRACT_REF',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 25,
  p_cMaxlength=> 25,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P66_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20938016975296945 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1,
  p_item_plug_id => 20933610466296942+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Party ID',
  p_source=>'ID',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20938223555296945 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_MANU_REF',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 20933610466296942+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Manufacturer Reference',
  p_source=>'MANU_REF',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P66_PRTY_TYPE) = ''MANU'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20938432253296945 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_CREATED_BY',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 201,
  p_item_plug_id => 20933427182296931+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Created By',
  p_source=>'CREATED_BY',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when_type=>'ALWAYS',
  p_field_template => 28046532275354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20938601275296945 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_SHORTCODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 30,
  p_item_plug_id => 20933610466296942+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Shortcode',
  p_source=>'SHORTCODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 3,
  p_cMaxlength=> 3,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P66_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20938823747296945 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_NAME',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 40,
  p_item_plug_id => 20933610466296942+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Name',
  p_source=>'NAME',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P66_PRTY_TYPE) IN (''IO'',''EO'',''MANU'',''MKTP'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20939018752296945 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_DESCRIPTION',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 50,
  p_item_plug_id => 20933610466296942+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Description',
  p_source=>'DESCRIPTION',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P66_PRTY_TYPE) = ''MANU'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20939226875296945 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_CREATED_ON',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 202,
  p_item_plug_id => 20933427182296931+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Created On',
  p_source=>'CREATED_ON',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when_type=>'ALWAYS',
  p_field_template => 28046532275354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20939414810296945 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_UPDATED_ON',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 204,
  p_item_plug_id => 20933427182296931+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Updated On',
  p_source=>'UPDATED_ON',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 255,
  p_cHeight=> 1,
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when_type=>'ALWAYS',
  p_field_template => 28046532275354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20939606477296947 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_UPDATED_BY',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 203,
  p_item_plug_id => 20933427182296931+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Updated By',
  p_source=>'UPDATED_BY',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when_type=>'ALWAYS',
  p_field_template => 28046532275354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20939808048296947 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_MKTP_REF',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 90,
  p_item_plug_id => 20933610466296942+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Market Participant Reference',
  p_source=>'MKTP_REF',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P66_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20940009441296947 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_GT_7B_CONTRACT_REF',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 110,
  p_item_plug_id => 20933610466296942+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'GT 7B Contract Reference',
  p_source=>'GT_7B_CONTRACT_REF',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 25,
  p_cMaxlength=> 25,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P66_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20940205035296947 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_ADVERSARIAL_CONTRACT_REF',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 120,
  p_item_plug_id => 20933610466296942+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Adversarial Contract Reference',
  p_source=>'ADVERSARIAL_CONTRACT_REF',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 25,
  p_cMaxlength=> 25,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P66_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20940401291296947 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_USERNAME',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 140,
  p_item_plug_id => 20933610466296942+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Username',
  p_source=>'USERNAME',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P66_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when_type=>'ALWAYS',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20940628934296947 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_STATUS',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 150,
  p_item_plug_id => 20933610466296942+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Status',
  p_source=>'STATUS',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'USER_STATUS',
  p_lov => '.'||to_char(19220916817722365 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 7,
  p_cMaxlength=> 7,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P66_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when_type=>'ALWAYS',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20940808151296947 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_FIRST_NAME',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 160,
  p_item_plug_id => 20933610466296942+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'First Name',
  p_source=>'FIRST_NAME',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P66_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20941014547296947 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_LAST_NAME',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 170,
  p_item_plug_id => 20933610466296942+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Last Name',
  p_source=>'LAST_NAME',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P66_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20941200827296947 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_PERSONAL_TITLE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 180,
  p_item_plug_id => 20933610466296942+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Personal Title',
  p_source=>'PERSONAL_TITLE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 6,
  p_cMaxlength=> 6,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P66_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20941530880296948 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_validation_name => 'P66_CREATED_BY not null',
  p_validation_sequence=> 20,
  p_validation => 'P66_CREATED_BY',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Created By must have some value.',
  p_associated_item=> 20938432253296945 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20941725314296948 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_validation_name => 'P66_CREATED_ON not null',
  p_validation_sequence=> 60,
  p_validation => 'P66_CREATED_ON',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Created On must have some value.',
  p_associated_item=> 20939226875296945 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20941905948296948 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_validation_name => 'P66_PRTY_TYPE not null',
  p_validation_sequence=> 200,
  p_validation => 'P66_PRTY_TYPE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Prty Type must have some value.',
  p_associated_item=> 20937601968296945 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 34231912024396244 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_validation_name => 'NAME set for organizations',
  p_validation_sequence=> 210,
  p_validation => 'declare'||chr(10)||
'l_msg varchar2(80) := ''Name must not be null for '';'||chr(10)||
'begin'||chr(10)||
'if :P66_prty_type in (''IO'',''EO'',''MANU'',''MKTP'',''ORG'') and :P66_name is null then'||chr(10)||
'return (case :P66_prty_type '||chr(10)||
'when ''IO'' then l_msg||''Internal Organization'''||chr(10)||
'when ''EO'' then l_msg||''External Organization'''||chr(10)||
'when ''MANU'' then l_msg||''Manufacturer'''||chr(10)||
'when ''MKTP'' then l_msg||''Market Participant'''||chr(10)||
'when ''ORG'' then l_msg||''Organization'''||chr(10)||
'end);'||chr(10)||
'end if;'||chr(10)||
'end;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_validation_condition=> 'P66_NAME',
  p_validation_condition_type=> 'ITEM_IS_NULL',
  p_when_button_pressed=> 20935829064296944 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20938823747296945 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 34241214373491542 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_validation_name => 'P66_MANU_REF',
  p_validation_sequence=> 220,
  p_validation => 'P66_MANU_REF',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Manufacturer reference must not be null',
  p_validation_condition=> 'P66_prty_type',
  p_validation_condition2=> 'MANU',
  p_validation_condition_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_associated_item=> 20938223555296945 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 44609308515094672 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_validation_name => 'P66_EMAIL is valid',
  p_validation_sequence=> 230,
  p_validation => 'P66_EMAIL',
  p_validation2 => '^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Invalid email address.',
  p_when_button_pressed=> 20935829064296944 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20937225514296944 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 44610223752099050 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_validation_name => 'P66_TELEPHONE is valid',
  p_validation_sequence=> 240,
  p_validation => 'P66_TELEPHONE',
  p_validation2 => '^((\(?0\d{4}\)?\s*\d{3}\s*\d{3})|(\(?0\d{3}\)?\s*\d{3}\s*\d{4})|(\(?0\d{2}\)?\s*\d{4}\s*\d{4}))(\s*\#(\d{4}|\d{3}))?$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Phone number format not recognized.'||chr(10)||
'e.g. (01234) 567890',
  p_when_button_pressed=> 20935829064296944 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20936614934296944 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 44611100681101850 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_validation_name => 'P66_MOBILE is valid',
  p_validation_sequence=> 250,
  p_validation => 'P66_MOBILE',
  p_validation2 => '^((\(?0\d{4}\)?\s*\d{3}\s*\d{3})|(\(?0\d{3}\)?\s*\d{3}\s*\d{4})|(\(?0\d{2}\)?\s*\d{4}\s*\d{4}))(\s*\#(\d{4}|\d{3}))?$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Phone number format not recognized.'||chr(10)||
'e.g. (01234) 567890',
  p_when_button_pressed=> 20935829064296944 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20936831527296944 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 44612012455105283 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_validation_name => 'P66_FAX is valid',
  p_validation_sequence=> 260,
  p_validation => 'P66_FAX',
  p_validation2 => '^((\(?0\d{4}\)?\s*\d{3}\s*\d{3})|(\(?0\d{3}\)?\s*\d{3}\s*\d{4})|(\(?0\d{2}\)?\s*\d{4}\s*\d{4}))(\s*\#(\d{4}|\d{3}))?$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Phone number format not recognized.'||chr(10)||
'e.g. (01234) 567890',
  p_when_button_pressed=> 20935829064296944 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20937017959296944 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'F|#OWNER#:PARTIES:P66_ID:ID';

wwv_flow_api.create_page_process(
  p_id     => 20942809742296948 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'DML_FETCH_ROW',
  p_process_name=> 'Fetch Row from PARTIES',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to fetch row.',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'begin'||chr(10)||
''||chr(10)||
'  if upper(:P66_PRTY_TYPE) = ''PERS'' then '||chr(10)||
'    SELECT p.NAME'||chr(10)||
'      INTO :P66_SUPPLIER'||chr(10)||
'      FROM v_party_relationships v, parties p'||chr(10)||
'     WHERE v.to_parl_prty_id = p.ID'||chr(10)||
'       AND v.from_parl_prty_id = :P66_ID'||chr(10)||
'       AND v.to_rt_code = ''SUPP'';'||chr(10)||
'  end if;'||chr(10)||
'exception'||chr(10)||
'  when no_data_found then'||chr(10)||
'    :P66_SUPPLIER := ''N/A'';'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 1182815052730943 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_process_sequence=> 50,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'get_supplier',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'if upper(:P66_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_process_when_type=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'begin'||chr(10)||
'  :P66_UPDATED_BY := :APP_USER;'||chr(10)||
''||chr(10)||
'  :P66_UPDATED_ON := SYSDATE;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 20942605740296948 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'set_updated_fields',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>20935829064296944 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'#OWNER#.mip_parties.remove_party(p_prty_id => :P66_ID);';

wwv_flow_api.create_page_process(
  p_id     => 33267206473805609 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_process_sequence=> 20,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'delete_party',
  p_process_sql_clob => p, 
  p_process_error_message=> 'There was an error whilst attempting to remove the party.',
  p_process_when_button_id=>20935612994296944 + wwv_flow_api.g_id_offset,
  p_process_success_message=> 'Party removed successfully.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'#OWNER#:PARTIES:P66_ID:ID|U';

wwv_flow_api.create_page_process(
  p_id     => 20943030829296948 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_process_sequence=> 30,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'DML_PROCESS_ROW',
  p_process_name=> 'Process Row of PARTIES',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to process row of table PARTIES.',
  p_process_when=>'DELETE',
  p_process_when_type=>'REQUEST_NOT_EQUAL_CONDITION',
  p_process_success_message=> 'Action Processed.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'begin'||chr(10)||
'  if not :P66_TELEPHONE is null then'||chr(10)||
'    mip_parties.update_contact_details(p_prty_id => :P66_ID,'||chr(10)||
'                                 p_contact_value => :P66_TELEPHONE,'||chr(10)||
'                                 p_contact_mech_type => ''PHONE'');'||chr(10)||
'  end if;'||chr(10)||
''||chr(10)||
'  if not :P66_FAX is null then'||chr(10)||
'    mip_parties.update_contact_details(p_prty_id => :P66_ID,'||chr(10)||
'                                 p_contact_value =';

p:=p||'> :P66_FAX,'||chr(10)||
'                                 p_contact_mech_type => ''FAX'');'||chr(10)||
'  end if;'||chr(10)||
''||chr(10)||
'  if not :P66_MOBILE is null then'||chr(10)||
'    mip_parties.update_contact_details(p_prty_id => :P66_ID,'||chr(10)||
'                                 p_contact_value => :P66_MOBILE,'||chr(10)||
'                                 p_contact_mech_type => ''MOBILE'');'||chr(10)||
'  end if;'||chr(10)||
''||chr(10)||
'  if not :P66_EMAIL is null then'||chr(10)||
'    mip_parties.update_contact_';

p:=p||'details(p_prty_id => :P66_ID,'||chr(10)||
'                                 p_contact_value => :P66_EMAIL,'||chr(10)||
'                                 p_contact_mech_type => ''EMAIL'');'||chr(10)||
'  end if;'||chr(10)||
'END;';

wwv_flow_api.create_page_process(
  p_id     => 20942428435296948 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_process_sequence=> 35,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'store_contact_details',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>20935829064296944 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'19';

wwv_flow_api.create_page_process(
  p_id     => 20943215088296948 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_process_sequence=> 40,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_PAGES',
  p_process_name=> 'reset page',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>20935612994296944 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'begin'||chr(10)||
'  :P66_TELEPHONE := mip_contact_details.get_party_contact_detail(p_prty_id => :P66_ID,'||chr(10)||
'                                        p_come_type => ''PHONE'');'||chr(10)||
''||chr(10)||
'  :P66_MOBILE    := mip_contact_details.get_party_contact_detail(p_prty_id => :P66_ID,'||chr(10)||
'                                        p_come_type => ''MOBILE'');'||chr(10)||
''||chr(10)||
'  :P66_FAX       := mip_contact_details.get_party_contact_detail(p_prty_id => :P';

p:=p||'66_ID,'||chr(10)||
'                                        p_come_type => ''FAX'');'||chr(10)||
''||chr(10)||
'  :P66_EMAIL     := mip_contact_details.get_party_contact_detail(p_prty_id => :P66_ID,'||chr(10)||
'                                        p_come_type => ''EMAIL'');'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 20942017094296948 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_process_sequence=> 50,
  p_process_point=> 'BEFORE_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'get_contact_details',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'SELECT COUNT(*)'||chr(10)||
'into :P66_ADDRESS_COUNT'||chr(10)||
'FROM parties prty, party_addresses paddr'||chr(10)||
'WHERE paddr.prty_id = prty.ID'||chr(10)||
'AND prty.ID = :P66_ID'||chr(10)||
'AND  paddr.end_date IS NULL;';

wwv_flow_api.create_page_process(
  p_id     => 20942205897296948 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_process_sequence=> 50,
  p_process_point=> 'BEFORE_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'count_addresses',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 66
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00067
prompt  ...PAGE 67: Reset User Password
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 67,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Reset User Password',
  p_step_title=> 'Reset User Password',
  p_step_sub_title => 'Reset User Password',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 28655803265374130+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'MULLENM',
  p_last_upd_yyyymmddhh24miss => '20080328141416',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 20949314419299567 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 67,
  p_plug_name=> 'Reset Password for user &P62_USERNAME.',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 20949515424299567 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 67,
  p_button_sequence=> 10,
  p_button_plug_id => 20949314419299567+wwv_flow_api.g_id_offset,
  p_button_name    => 'reset_password',
  p_button_image_alt=> 'Reset Password',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 20949720729299567 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 67,
  p_button_sequence=> 20,
  p_button_plug_id => 20949314419299567+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:65:&SESSION.::&DEBUG.:::',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>20952814641299570 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 67,
  p_branch_action=> 'f?p=&FLOW_ID.:60:&SESSION.::&DEBUG.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>20949515424299567+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 10,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20949905176299569 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 67,
  p_name=>'P67_REPEAT_PASSWORD',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 30,
  p_item_plug_id => 20949314419299567+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Repeat Password',
  p_source_type=> 'STATIC',
  p_display_as=> 'PASSWORD',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20950119061299569 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 67,
  p_name=>'P67_USER_STATUS',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 40,
  p_item_plug_id => 20949314419299567+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'User Status',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'USER_STATUS',
  p_lov => '.'||to_char(19220916817722365 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20950307979299569 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 67,
  p_name=>'P67_USERNAME',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 50,
  p_item_plug_id => 20949314419299567+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20950509853299569 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 67,
  p_name=>'P67_USER_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 20949314419299567+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20950706767299569 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 67,
  p_name=>'P67_PASSWORD',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 20949314419299567+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Password',
  p_source_type=> 'STATIC',
  p_display_as=> 'PASSWORD',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20951019269299569 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 67,
  p_validation_name => 'P67_PASSWORD Not Null',
  p_validation_sequence=> 1,
  p_validation => 'P67_PASSWORD',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_associated_item=> 20950706767299569 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 11-DEC-2007 11:56');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20951206381299569 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 67,
  p_validation_name => 'P67_REPEAT_PASSWORD Not Null',
  p_validation_sequence=> 2,
  p_validation => 'P67_REPEAT_PASSWORD',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_associated_item=> 20949905176299569 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 11-DEC-2007 11:56');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20951421357299569 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 67,
  p_validation_name => 'P67_PASSWORD_length',
  p_validation_sequence=> 12,
  p_validation => 'length(:P67_PASSWORD) >= 8',
  p_validation_type => 'SQL_EXPRESSION',
  p_error_message => 'Password must be at least 8 characters in length.',
  p_when_button_pressed=> 20949515424299567 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20950706767299569 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20951630662299569 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 67,
  p_validation_name => 'P67_PASSWORD_UPPER',
  p_validation_sequence=> 22,
  p_validation => 'P67_PASSWORD',
  p_validation2 => 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
  p_validation_type => 'ITEM_IN_VALIDATION_CONTAINS_AT_LEAST_ONE_CHAR_IN_STRING2',
  p_error_message => 'Password must contain at least 1 uppercase character.',
  p_when_button_pressed=> 20949515424299567 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20950706767299569 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20951805118299570 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 67,
  p_validation_name => 'P67_PASSWORD_lower',
  p_validation_sequence=> 32,
  p_validation => 'P67_PASSWORD',
  p_validation2 => 'abcdefghijklmnopqrstuvwxyz',
  p_validation_type => 'ITEM_IN_VALIDATION_CONTAINS_AT_LEAST_ONE_CHAR_IN_STRING2',
  p_error_message => 'Password must contain at least 1 lowercase character.',
  p_when_button_pressed=> 20949515424299567 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20950706767299569 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20952002043299570 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 67,
  p_validation_name => 'P67_PASSWORD_num',
  p_validation_sequence=> 42,
  p_validation => 'P67_PASSWORD',
  p_validation2 => '0123456789',
  p_validation_type => 'ITEM_IN_VALIDATION_CONTAINS_AT_LEAST_ONE_CHAR_IN_STRING2',
  p_error_message => 'Password must contain at least 1 numerical character.',
  p_when_button_pressed=> 20949515424299567 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20950706767299569 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20952421469299570 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 67,
  p_validation_name => 'P67_PASSWORD_other',
  p_validation_sequence=> 52,
  p_validation => 'P67_PASSWORD',
  p_validation2 => '`¬!"£$%^&*()_+-=[]{};''#:@~,./<>?\|¦',
  p_validation_type => 'ITEM_IN_VALIDATION_CONTAINS_AT_LEAST_ONE_CHAR_IN_STRING2',
  p_error_message => 'Password must contain at least 1 non-alphanumeric character.  e.g. !',
  p_when_button_pressed=> 20949515424299567 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20950706767299569 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20952223354299570 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 67,
  p_validation_name => 'P67_REPEAT_PASSWORD_match',
  p_validation_sequence=> 62,
  p_validation => ':P67_PASSWORD = :P67_REPEAT_PASSWORD',
  p_validation_type => 'SQL_EXPRESSION',
  p_error_message => 'Passwords entered do not match.',
  p_when_button_pressed=> 20949515424299567 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20949905176299569 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'begin'||chr(10)||
'  mip_security.other_user_password(p_prty_id => :P67_USER_ID,'||chr(10)||
'                                p_username => :P67_USERNAME,'||chr(10)||
'                                p_password => :P67_PASSWORD);'||chr(10)||
''||chr(10)||
'  mip_security.set_user_status(p_username => :P67_USERNAME,'||chr(10)||
'                               p_status => :P67_USER_STATUS);'||chr(10)||
''||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 20952515469299570 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 67,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'reset_password',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to reset the user''s password.',
  p_process_when_button_id=>20949515424299567 + wwv_flow_api.g_id_offset,
  p_process_success_message=> 'Password reset successfully.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 67
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00068
prompt  ...PAGE 68: Party Creation Results
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 68,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Party Creation Results',
  p_step_title=> 'Party Creation Results',
  p_step_sub_title => 'Party Creation Results',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 28655803265374130+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'MULLENM',
  p_last_upd_yyyymmddhh24miss => '20080306111145',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 20955623997301470 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 68,
  p_plug_name=> 'Create Party Results',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 20955824089301470 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 68,
  p_button_sequence=> 5,
  p_button_plug_id => 20955623997301470+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE_ANOTHER',
  p_button_image_alt=> 'Create Another',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:61:&SESSION.::&DEBUG.:RP,61,62,63,64::',
  p_button_cattributes=>'ID="CreateAnother" name="CreateAnother"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 20956024871301472 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 68,
  p_button_sequence=> 10,
  p_button_plug_id => 20955623997301470+wwv_flow_api.g_id_offset,
  p_button_name    => 'FINISH',
  p_button_image_alt=> 'Finish',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:60:&SESSION.::&DEBUG.:::',
  p_button_cattributes=>'ID="Finish"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
null;
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20956217239301472 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 68,
  p_name=>'P68_RESULT_MESSAGE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 20955623997301470+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Result Message',
  p_source_type=> 'STATIC',
  p_display_as=> 'DISPLAY_ONLY_ESCAPE_SC',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046449440354444+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 68
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00069
prompt  ...PAGE 69: Edit Party Address
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 69,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Edit Party Address',
  p_step_title=> 'Edit Party Address',
  p_step_sub_title => 'Edit Party Address',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 28655803265374130+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'MULLENM',
  p_last_upd_yyyymmddhh24miss => '20080312160127',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 20959232725304544 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 69,
  p_plug_name=> 'Address Details',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_header=> '<b>NOTE:</b>Updating this data may change the address for a number of users.',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 20959412356304544 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 69,
  p_button_sequence=> 10,
  p_button_plug_id => 20959232725304544+wwv_flow_api.g_id_offset,
  p_button_name    => 'SAVE',
  p_button_image_alt=> 'Save',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>20962922720304547 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 69,
  p_branch_action=> 'f?p=&FLOW_ID.:66:&SESSION.::&DEBUG.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>20959412356304544+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 10,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>20962712766304547 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 69,
  p_branch_action=> 'f?p=&FLOW_ID.:69:&SESSION.',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 99,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20959624731304545 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 69,
  p_name=>'P69_ACTION',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1,
  p_item_plug_id => 20959232725304544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20959807600304545 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 69,
  p_name=>'P69_SELECT_ADDRESS',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 20959232725304544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Select Address',
  p_source_type=> 'STATIC',
  p_display_as=> 'POPUP',
  p_named_lov=> 'ADDRESSES',
  p_lov => 'SELECT addr.code || '','' || addr.sub_building || '','' || addr.building || '','' ||'||chr(10)||
'       addr.city || '','' || addr.postcode AS address,'||chr(10)||
'       addr.code AS return_value'||chr(10)||
'  FROM addresses addr'||chr(10)||
'',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'- New -',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P69_ACTION',
  p_display_when2=>'NEW',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20960018670304545 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 69,
  p_name=>'P69_COPY_ADDRESS',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 11,
  p_item_plug_id => 20959232725304544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default => 'Copy Address',
  p_prompt=>'Copy Address',
  p_source=>'Copy Address',
  p_source_type=> 'STATIC',
  p_display_as=> 'BUTTON',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P69_ACTION',
  p_display_when2=>'NEW',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_is_persistent=> 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20960206024304545 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 69,
  p_name=>'P69_ADDR_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 22,
  p_item_plug_id => 20959232725304544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Address Code',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 80,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'P69_ACTION',
  p_read_only_when2=>'NEW',
  p_read_only_when_type=>'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20960417324304545 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 69,
  p_name=>'P69_ADDR_TYPE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 23,
  p_item_plug_id => 20959232725304544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Address Type',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'ADDRESS_TYPES',
  p_lov => '.'||to_char(20512626684169344 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_read_only_when=>'P69_ACTION',
  p_read_only_when2=>'NEW',
  p_read_only_when_type=>'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20960622429304545 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 69,
  p_name=>'P69_ADDR_SUB_BUILDING',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 24,
  p_item_plug_id => 20959232725304544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Sub-Building',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov => 'STATIC2:1,2,3,4,5,6,7,8,9,10',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20960827291304545 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 69,
  p_name=>'P69_PRTY_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 21,
  p_item_plug_id => 20959232725304544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20961021950304545 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 69,
  p_name=>'P69_ADDR_BUILDING',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 25,
  p_item_plug_id => 20959232725304544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Building',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov => 'STATIC2:1,2,3,4,5,6,7,8,9,10',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20961229042304545 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 69,
  p_name=>'P69_ADDR_STREET',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 26,
  p_item_plug_id => 20959232725304544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Street',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov => 'STATIC2:1,2,3,4,5,6,7,8,9,10',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 60,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20961413040304545 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 69,
  p_name=>'P69_ADDR_CITY',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 27,
  p_item_plug_id => 20959232725304544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'City',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov => 'STATIC2:1,2,3,4,5,6,7,8,9,10',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20961615125304547 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 69,
  p_name=>'P69_ADDR_POSTCODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 28,
  p_item_plug_id => 20959232725304544+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Postcode',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov => 'STATIC2:1,2,3,4,5,6,7,8,9,10',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 8,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 20961930201304547 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 69,
  p_validation_name => 'P69_ADDR_CODE_UQ',
  p_validation_sequence=> 10,
  p_validation => 'declare'||chr(10)||
'  l_dummy number := 0;'||chr(10)||
'begin'||chr(10)||
''||chr(10)||
'  SELECT count(*) '||chr(10)||
'    into l_dummy'||chr(10)||
'    FROM addresses'||chr(10)||
'   WHERE upper(code) = :P69_ADDR_CODE'||chr(10)||
'     AND (NOT upper(sub_building) = upper(:P69_ADDR_SUB_BUILDING)'||chr(10)||
'         OR NOT upper(building) = upper(:P69_ADDR_BUILDING)'||chr(10)||
'         OR NOT upper(street) = upper(:P69_ADDR_STREET)'||chr(10)||
'         OR NOT upper(city) = upper(:P69_ADDR_CITY)'||chr(10)||
'         OR NOT replace(upper(postcode),'' '','''') =      '||chr(10)||
'                REPLACE(upper(:P69_ADDR_POSTCODE),'' '',''''));'||chr(10)||
'  if l_dummy = 0 then'||chr(10)||
'    return true;'||chr(10)||
'  else return false;'||chr(10)||
'  end if;'||chr(10)||
''||chr(10)||
'exception'||chr(10)||
'  when no_data_found then'||chr(10)||
'    return true;'||chr(10)||
'end;',
  p_validation_type => 'FUNC_BODY_RETURNING_BOOLEAN',
  p_error_message => 'Address code must be unique.',
  p_validation_condition=> 'P69_ACTION',
  p_validation_condition2=> 'NEW',
  p_validation_condition_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_when_button_pressed=> 20959412356304544 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20960206024304545 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 21299807039756198 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 69,
  p_validation_name => 'P69_ADDR_POSTCODE',
  p_validation_sequence=> 20,
  p_validation => 'return mip_regions.valid_postcode_format(p_postcode => :P69_ADDR_POSTCODE);',
  p_validation_type => 'FUNC_BODY_RETURNING_BOOLEAN',
  p_error_message => 'Invalid postcode',
  p_when_button_pressed=> 20959412356304544 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20961615125304547 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 44181107636930506 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 69,
  p_validation_name => 'address not assigned',
  p_validation_sequence=> 30,
  p_validation => 'declare'||chr(10)||
'  l_count number;'||chr(10)||
'begin'||chr(10)||
'  select count(*)'||chr(10)||
'    into l_count'||chr(10)||
'    from party_addresses paddr'||chr(10)||
'   WHERE paddr.prty_id = :P69_PRTY_ID'||chr(10)||
'     AND upper(paddr.addr_code) = upper(:P69_ADDR_CODE)'||chr(10)||
'     and paddr.end_date is null;'||chr(10)||
''||chr(10)||
'   if not l_count = 0 then'||chr(10)||
'      return false;'||chr(10)||
'  else'||chr(10)||
'      return true;'||chr(10)||
'  end if;'||chr(10)||
'end;',
  p_validation_type => 'FUNC_BODY_RETURNING_BOOLEAN',
  p_error_message => 'Selected address is already assigned to this user.',
  p_validation_condition=> 'P69_ACTION',
  p_validation_condition2=> 'NEW',
  p_validation_condition_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_when_button_pressed=> 20959412356304544 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20960206024304545 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 1440215929013189 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 69,
  p_validation_name => 'P69_ADDR_CODE not null',
  p_validation_sequence=> 40,
  p_validation => 'P69_ADDR_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Address code must be specified.',
  p_when_button_pressed=> 20959412356304544 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20960206024304545 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 3764506135916684 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 69,
  p_validation_name => 'P69_ADDR_STREET not null',
  p_validation_sequence=> 50,
  p_validation => 'P69_ADDR_STREET',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Street must be specified',
  p_when_button_pressed=> 20959412356304544 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20961229042304545 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 3764716178919617 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 69,
  p_validation_name => 'P69_ADDR_CITY not null',
  p_validation_sequence=> 60,
  p_validation => 'P69_ADDR_CITY',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'City must be specified.',
  p_when_button_pressed=> 20959412356304544 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20961413040304545 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 3765224835922082 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 69,
  p_validation_name => 'P69_ADDR_SUB_BUILDING Not Null',
  p_validation_sequence=> 70,
  p_validation => 'P69_ADDR_SUB_BUILDING',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Either sub-building or building must be specified.',
  p_validation_condition=> 'P69_ADDR_BUILDING',
  p_validation_condition_type=> 'ITEM_IS_NULL',
  p_when_button_pressed=> 20959412356304544 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20960622429304545 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 12-MAR-2008 16:00');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 3765415825922082 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 69,
  p_validation_name => 'P69_ADDR_BUILDING Not Null',
  p_validation_sequence=> 80,
  p_validation => 'P69_ADDR_BUILDING',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Either sub-building or building must be specified.',
  p_validation_condition=> 'P69_ADDR_SUB_BUILDING',
  p_validation_condition_type=> 'ITEM_IS_NULL',
  p_when_button_pressed=> 20959412356304544 + wwv_flow_api.g_id_offset,
  p_associated_item=> 20961021950304545 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 12-MAR-2008 16:00');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare'||chr(10)||
'  l_addr addresses%rowtype;'||chr(10)||
'  l_addr_type varchar2(10);'||chr(10)||
'begin'||chr(10)||
'  select addr.*'||chr(10)||
'    into l_addr'||chr(10)||
'    from addresses addr, parties prty, party_addresses paddr'||chr(10)||
'   where paddr.addr_code = addr.code'||chr(10)||
'     and paddr.prty_id = prty.id'||chr(10)||
'     AND paddr.prty_id = :P69_PRTY_ID'||chr(10)||
'     and addr.code = :P69_ADDR_CODE'||chr(10)||
'     and paddr.end_date is null;'||chr(10)||
''||chr(10)||
'  select rt_code'||chr(10)||
'    into l_addr_type'||chr(10)||
'    fr';

p:=p||'om party_address_roles paddr_ro'||chr(10)||
'   where paddr_ro.paddr_addr_code = :P69_ADDR_CODE'||chr(10)||
'     and paddr_ro.paddr_prty_id = :P69_PRTY_ID'||chr(10)||
'     and paddr_ro.end_date is null;'||chr(10)||
''||chr(10)||
'  -- set the page values'||chr(10)||
'  :P69_ADDR_TYPE := l_addr_type;'||chr(10)||
'  :P69_ADDR_SUB_BUILDING := l_addr.sub_building;'||chr(10)||
'  :P69_ADDR_BUILDING := l_addr.building;'||chr(10)||
'  :P69_ADDR_STREET := l_addr.street;'||chr(10)||
'  :P69_ADDR_CITY := l_addr.city;'||chr(10)||
'  :P';

p:=p||'69_ADDR_POSTCODE := l_addr.postcode;'||chr(10)||
''||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 20962029333304547 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 69,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'populate_details',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P69_ACTION',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'EDIT',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare '||chr(10)||
'  l_addr addresses%ROWTYPE;'||chr(10)||
'  '||chr(10)||
'begin'||chr(10)||
'  SELECT *'||chr(10)||
'    INTO l_addr'||chr(10)||
'    FROM addresses'||chr(10)||
'   WHERE code = :P69_SELECT_ADDRESS;'||chr(10)||
'   '||chr(10)||
'   :P69_ADDR_CODE      := l_addr.code;'||chr(10)||
'   :P69_ADDR_SUB_BUILDING := l_addr.sub_building;'||chr(10)||
'   :P69_ADDR_BUILDING  := l_addr.building;'||chr(10)||
'   :P69_ADDR_STREET    := l_addr.street;'||chr(10)||
'   :P69_ADDR_CITY      := l_addr.city;'||chr(10)||
'   :P69_ADDR_POSTCODE  := l_addr.postcode';

p:=p||';'||chr(10)||
'   '||chr(10)||
'EXCEPTION'||chr(10)||
'  WHEN no_data_found THEN'||chr(10)||
'    NULL;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 20962205553304547 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 69,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'retrieve_saved_address',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>20960018670304545 + wwv_flow_api.g_id_offset,
  p_process_when=>'P69_ACTION',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'NEW',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare'||chr(10)||
'  l_addr addresses%rowtype;'||chr(10)||
'begin'||chr(10)||
'  l_addr.code := :P69_ADDR_CODE;'||chr(10)||
'  l_addr.sub_building := :P69_ADDR_SUB_BUILDING;'||chr(10)||
'  l_addr.building := :P69_ADDR_BUILDING;'||chr(10)||
'  l_addr.street := :P69_ADDR_STREET;'||chr(10)||
'  l_addr.city := :P69_ADDR_CITY;'||chr(10)||
'  l_addr.postcode := :P69_ADDR_POSTCODE;'||chr(10)||
''||chr(10)||
'  '||chr(10)||
''||chr(10)||
'  -- if we''re adding a new address then make the assignments.'||chr(10)||
'  if :P69_ACTION = ''NEW'' then'||chr(10)||
'    -- create';

p:=p||' the address'||chr(10)||
'    mip_parties.add_address(l_addr);'||chr(10)||
''||chr(10)||
'    -- assign the address to the party'||chr(10)||
'    mip_parties.create_party_address(p_addr_code => :P69_ADDR_CODE,'||chr(10)||
'                                     p_prty_id   => :P69_PRTY_ID,'||chr(10)||
'                                     p_addr_type => :P69_ADDR_TYPE);'||chr(10)||
''||chr(10)||
'    -- set the end date of the old addresses'||chr(10)||
'    mip_parties.expire_old_addresses(p_prty_id => :P';

p:=p||'69_PRTY_ID, '||chr(10)||
'                                     p_addr_code => :P69_ADDR_CODE,'||chr(10)||
'                                     p_paddr_type => :P69_ADDR_TYPE);'||chr(10)||
'  else'||chr(10)||
'    mip_parties.update_address(l_addr);'||chr(10)||
'  end if;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 20962431952304547 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 69,
  p_process_sequence=> 20,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'add_address',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>20959412356304544 + wwv_flow_api.g_id_offset,
  p_process_success_message=> 'Address added successfully.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 69
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00070
prompt  ...PAGE 70: Confirm Address Delete
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 70,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Confirm Address Delete',
  p_step_title=> 'Confirm Address Delete',
  p_step_sub_title => 'Confirm Address Delete',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 28655803265374130+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'MULLENM',
  p_last_upd_yyyymmddhh24miss => '20080124092322',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'Please confirm that you wish to remove this address from the current user.';

wwv_flow_api.create_page_plug (
  p_id=> 20966531238306611 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 70,
  p_plug_name=> 'Confirm Delete',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 20966917237306611 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 70,
  p_button_sequence=> 10,
  p_button_plug_id => 20966531238306611+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:66:&SESSION.::&DEBUG.:::',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 20966701237306611 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 70,
  p_button_sequence=> 20,
  p_button_plug_id => 20966531238306611+wwv_flow_api.g_id_offset,
  p_button_name    => 'REMOVE',
  p_button_image_alt=> 'Remove',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>20969230886306614 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 70,
  p_branch_action=> 'f?p=&FLOW_ID.:66:&SESSION.::&DEBUG.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>20966701237306611+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 10,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20967110584306612 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 70,
  p_name=>'P70_PRTY_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 11,
  p_item_plug_id => 20966531238306611+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20967309330306612 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 70,
  p_name=>'P70_ADDR_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 12,
  p_item_plug_id => 20966531238306611+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> '',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Address Code',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20967500615306612 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 70,
  p_name=>'P70_ADDR_TYPE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 13,
  p_item_plug_id => 20966531238306611+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> '',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Address Type',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20967704078306612 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 70,
  p_name=>'P70_ADDR_SUB_BUILDING',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 14,
  p_item_plug_id => 20966531238306611+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Sub-Building',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20967930318306612 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 70,
  p_name=>'P70_ADDR_BUILDING',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 15,
  p_item_plug_id => 20966531238306611+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> '',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Building',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20968121486306612 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 70,
  p_name=>'P70_ADDR_STREET',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 16,
  p_item_plug_id => 20966531238306611+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> '',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Street',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20968307518306612 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 70,
  p_name=>'P70_ADDR_CITY',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 17,
  p_item_plug_id => 20966531238306611+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> '',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'City',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>20968527683306612 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 70,
  p_name=>'P70_ADDR_POSTCODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 18,
  p_item_plug_id => 20966531238306611+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> '',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Postcode',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'-- remove the address from the user'||chr(10)||
'-- this does NOT remove the address from the system'||chr(10)||
'begin'||chr(10)||
'  -- remove the roles first'||chr(10)||
'  delete from party_address_roles'||chr(10)||
'   where paddr_addr_code = :P70_ADDR_CODE'||chr(10)||
'     and paddr_prty_id = :P70_PRTY_ID;'||chr(10)||
''||chr(10)||
''||chr(10)||
'  -- then remove the address'||chr(10)||
'  delete from party_addresses'||chr(10)||
'   where addr_code = :P70_ADDR_CODE'||chr(10)||
'     and prty_id = :P70_PRTY_ID;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 20968921294306614 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 70,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'remove_address',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to remove the address from the user.',
  p_process_when_button_id=>20966701237306611 + wwv_flow_api.g_id_offset,
  p_process_success_message=> 'Address removed from user successfully.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare'||chr(10)||
'  l_addr addresses%rowtype;'||chr(10)||
'  l_addr_type varchar2(10);'||chr(10)||
'begin'||chr(10)||
'  select addr.*'||chr(10)||
'    into l_addr'||chr(10)||
'    from addresses addr, parties prty, party_addresses paddr'||chr(10)||
'   where paddr.addr_code = addr.code'||chr(10)||
'     and paddr.prty_id = prty.id'||chr(10)||
'     AND paddr.prty_id = :P70_PRTY_ID'||chr(10)||
'     and addr.code = :P70_ADDR_CODE;'||chr(10)||
''||chr(10)||
'  select rt_code'||chr(10)||
'    into l_addr_type'||chr(10)||
'    from party_address_roles paddr_ro'||chr(10)||
'';

p:=p||'   where paddr_ro.paddr_addr_code = :P70_ADDR_CODE'||chr(10)||
'     and paddr_ro.paddr_prty_id = :P70_PRTY_ID;'||chr(10)||
''||chr(10)||
'  -- set the page values'||chr(10)||
'  :P70_ADDR_TYPE := l_addr_type;'||chr(10)||
'  :P70_ADDR_SUB_BUILDING := l_addr.sub_building;'||chr(10)||
'  :P70_ADDR_BUILDING := l_addr.building;'||chr(10)||
'  :P70_ADDR_STREET := l_addr.street;'||chr(10)||
'  :P70_ADDR_CITY := l_addr.city;'||chr(10)||
'  :P70_ADDR_POSTCODE := l_addr.postcode;'||chr(10)||
''||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 20968725300306614 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 70,
  p_process_sequence=> 10,
  p_process_point=> 'BEFORE_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'populate_details',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 70
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00080
prompt  ...PAGE 80: View Available Quotes
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 80,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'View Available Quotes',
  p_step_title=> 'View Available Quotes',
  p_step_sub_title => 'View Available Quotes',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 28661628162428559+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'MULLENM',
  p_last_upd_yyyymmddhh24miss => '20080403164533',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'SELECT enqu.install_sub_building || '' '' || enqu.install_building || '' '' ||'||chr(10)||
'       enqu.install_street || '', '' || enqu.install_city as Address,'||chr(10)||
'       enqu.install_postcode as Postcode,'||chr(10)||
'       enqu.mprn as MPRN,'||chr(10)||
'       enqu.transaction_reference as Transaction_Reference,'||chr(10)||
'       enty.description as Description,'||chr(10)||
'       enqu.qmin as qmin,'||chr(10)||
'       enqu.qmax as qmax'||chr(10)||
'  FROM enquiries enqu, enquiry';

s:=s||'_types enty'||chr(10)||
' where enqu.enty_code = enty.code'||chr(10)||
'   and enqu.id = :P80_ENQU_ID';

wwv_flow_api.create_report_region (
  p_id=> 26071509589872637 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 80,
  p_name=> 'Enquiry Summary Details',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 10,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_query_row_template=> 28041136573354435+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_show_nulls_as=> ' - ',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'no data found',
  p_query_num_rows_type=> '0',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26071909589872644 + wwv_flow_api.g_id_offset,
  p_region_id=> 26071509589872637 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'ADDRESS',
  p_column_display_sequence=> 1,
  p_column_heading=> 'Address',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26072029149872644 + wwv_flow_api.g_id_offset,
  p_region_id=> 26071509589872637 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'POSTCODE',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Postcode',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26072118724872644 + wwv_flow_api.g_id_offset,
  p_region_id=> 26071509589872637 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'MPRN',
  p_column_display_sequence=> 3,
  p_column_heading=> 'MPRN',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26072208142872644 + wwv_flow_api.g_id_offset,
  p_region_id=> 26071509589872637 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'TRANSACTION_REFERENCE',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Transaction Reference',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26072324449872644 + wwv_flow_api.g_id_offset,
  p_region_id=> 26071509589872637 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'DESCRIPTION',
  p_column_display_sequence=> 5,
  p_column_heading=> 'Description',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26071731432872642 + wwv_flow_api.g_id_offset,
  p_region_id=> 26071509589872637 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 6,
  p_form_element_id=> null,
  p_column_alias=> 'QMIN',
  p_column_display_sequence=> 6,
  p_column_heading=> 'Q min',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26071826927872644 + wwv_flow_api.g_id_offset,
  p_region_id=> 26071509589872637 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 7,
  p_form_element_id=> null,
  p_column_alias=> 'QMAX',
  p_column_display_sequence=> 7,
  p_column_heading=> 'Q max',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'SELECT v.enquiry_id AS "Enquiry ID",'||chr(10)||
'       v.quote_id AS "Quote ID",'||chr(10)||
'       v.enty_code AS "Enquiry Type Code",'||chr(10)||
'       v.module_code AS "Module Code",'||chr(10)||
'       v.lead_time AS "Lead Time",'||chr(10)||
'       v.additional_items AS "Additional Items",'||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.';

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)||
'       ''Select'' AS "Select"'||chr(10)||
' FROM v_quote_details v, v_current_quote_status quote_status'||chr(10)||
'WHERE quote_status.qute_id = v.quote_id'||chr(10)||
'  AND v.enquiry_id = :P80_ENQU_ID'||chr(10)||
'  AND quote_status.qust_code = ''AV'''||chr(10)||
'   '||chr(10)||
'  ';

wwv_flow_api.create_report_region (
  p_id=> 26072632711872644 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 80,
  p_name=> 'Available Quotes for Enquiry &P80_ENQU_ID.',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 20,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_footer=> 'Once a quote has been selected for an enquiry, all remaining quotes will no longer be available in the system.',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 28041755229354435+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_show_nulls_as=> ' - ',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'Thank you for requesting a quotation using the National Grid Metering Online I&C Quotations System. There are no automatic quotations available for this request, and a manual quotation will be prepared and uploaded to the website within the agreed time-scales for the work type involved. We will notify you when this quotation is ready for your consideration.',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26073006352872644 + wwv_flow_api.g_id_offset,
  p_region_id=> 26072632711872644 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'Enquiry ID',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Enquiry ID',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26073102177872644 + wwv_flow_api.g_id_offset,
  p_region_id=> 26072632711872644 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'Quote ID',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Quote ID',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26073229341872644 + wwv_flow_api.g_id_offset,
  p_region_id=> 26072632711872644 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'Enquiry Type Code',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Enquiry Type Code',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26073301406872644 + wwv_flow_api.g_id_offset,
  p_region_id=> 26072632711872644 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'Module Code',
  p_column_display_sequence=> 5,
  p_column_heading=> 'Module Code',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26073409574872644 + wwv_flow_api.g_id_offset,
  p_region_id=> 26072632711872644 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'Lead Time',
  p_column_display_sequence=> 6,
  p_column_heading=> 'Lead Time',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26073531169872644 + wwv_flow_api.g_id_offset,
  p_region_id=> 26072632711872644 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 6,
  p_form_element_id=> null,
  p_column_alias=> 'Additional Items',
  p_column_display_sequence=> 7,
  p_column_heading=> 'Additional Items',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26073622713872644 + wwv_flow_api.g_id_offset,
  p_region_id=> 26072632711872644 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 7,
  p_form_element_id=> null,
  p_column_alias=> 'Base Code',
  p_column_display_sequence=> 8,
  p_column_heading=> 'Base Code',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26073713981872644 + wwv_flow_api.g_id_offset,
  p_region_id=> 26072632711872644 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 8,
  p_form_element_id=> null,
  p_column_alias=> 'Q max',
  p_column_display_sequence=> 9,
  p_column_heading=> 'QMAX',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26072917887872644 + wwv_flow_api.g_id_offset,
  p_region_id=> 26072632711872644 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 9,
  p_form_element_id=> null,
  p_column_alias=> 'Extra Information',
  p_column_display_sequence=> 14,
  p_column_heading=> 'Extra Information',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26073808568872644 + wwv_flow_api.g_id_offset,
  p_region_id=> 26072632711872644 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 10,
  p_form_element_id=> null,
  p_column_alias=> 'Inlet Orientation',
  p_column_display_sequence=> 10,
  p_column_heading=> 'Inlet Orientation',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26073916518872645 + wwv_flow_api.g_id_offset,
  p_region_id=> 26072632711872644 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 11,
  p_form_element_id=> null,
  p_column_alias=> 'Outlet Orientation',
  p_column_display_sequence=> 11,
  p_column_heading=> 'Outlet Orientation',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26074020207872645 + wwv_flow_api.g_id_offset,
  p_region_id=> 26072632711872644 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 12,
  p_form_element_id=> null,
  p_column_alias=> 'Total Cost',
  p_column_display_sequence=> 12,
  p_column_heading=> 'Total Cost',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26074127476872645 + wwv_flow_api.g_id_offset,
  p_region_id=> 26072632711872644 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 13,
  p_form_element_id=> null,
  p_column_alias=> 'Row Number',
  p_column_display_sequence=> 13,
  p_column_heading=> 'Row Number',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26072807716872644 + wwv_flow_api.g_id_offset,
  p_region_id=> 26072632711872644 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 14,
  p_form_element_id=> null,
  p_column_alias=> 'Select',
  p_column_display_sequence=> 1,
  p_column_heading=> '',
  p_column_link=>'f?p=&APP_ID.:81:&SESSION.:SUBMIT:&DEBUG.::P81_ENQU_ID,P81_QUOTE_ID,P81_QMIN_GT_ENQU_QMIN:#Enquiry ID#,#Quote ID#,#Extra Information#',
  p_column_linktext=>'#Select#',
  p_column_link_attr=>'name="Select_Quote_#Quote ID#"',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_column_comment=>'');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 26074420107872645 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 80,
  p_button_sequence=> 10,
  p_button_plug_id => 26072632711872644+wwv_flow_api.g_id_offset,
  p_button_name    => 'REJECT_ALL',
  p_button_image_alt=> 'Reject All',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:82:&SESSION.::&DEBUG.:80:P82_ENQU_ID:&P80_ENQU_ID.',
  p_button_condition=> 'SELECT 1 FROM v_current_quote_status vcqs, quotes q'||chr(10)||
'WHERE vcqs.qute_id = q.ID'||chr(10)||
'AND q.enqu_id = :P80_ENQU_ID'||chr(10)||
'AND vcqs.qust_code IN (''AV'',''SELECTED'');',
  p_button_condition_type=> 'EXISTS',
  p_button_cattributes=>'name = "REJECT_ALL"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>27190908723532102 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 80,
  p_branch_action=> 'f?p=&APP_ID.:81:&SESSION.::&DEBUG.:81:P81_ENQU_ID:&P80_ENQU_ID.',
  p_branch_point=> 'BEFORE_HEADER',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 10,
  p_branch_condition_type=> 'EXISTS',
  p_branch_condition=> 'select 1 from v_current_quote_status t, quotes q'||chr(10)||
'WHERE q.ID = t.qute_id'||chr(10)||
'AND q.enqu_id = :P80_ENQU_ID'||chr(10)||
'AND t.qust_code IN (''SELECTED'',''ACCEPTED'')',
  p_branch_comment=> 'Created 18-JAN-2008 14:53 by MULLENM');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26074603524872647 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 80,
  p_name=>'P80_ENQU_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 26071509589872637+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Enquiry ID',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26074824681872648 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 80,
  p_name=>'P80_QMIN',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 26071509589872637+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'begin'||chr(10)||
'  select qmin'||chr(10)||
'  into :P80_QMIN'||chr(10)||
'  from enquiries enqu'||chr(10)||
'  where enqu.id = :P80_ENQU_ID;'||chr(10)||
'exception'||chr(10)||
'  when no_data_found then'||chr(10)||
'   null;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 26075024597872650 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 80,
  p_process_sequence=> 10,
  p_process_point=> 'BEFORE_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'get_qmin',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P80_ENQU_ID',
  p_process_when_type=>'ITEM_IS_NOT_NULL',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 80
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00081
prompt  ...PAGE 81: View Selected Quote
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 81,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'View Selected Quote',
  p_step_title=> 'View Selected Quote',
  p_step_sub_title => 'View Selected Quote',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 28661628162428559+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'MULLENM',
  p_last_upd_yyyymmddhh24miss => '20080403170744',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select v.*, v_files.id as View_PDF '||chr(10)||
'  from v_quote_details v, document_roles docro, documents docs, wwv_flow_files v_files'||chr(10)||
' where enquiry_id = :P81_ENQU_ID'||chr(10)||
'   and quote_id = :P81_QUOTE_ID'||chr(10)||
'   and docro.qute_id = v.quote_id'||chr(10)||
'   and docs.id = docro.docu_id'||chr(10)||
'   and v_files.name = docs.uri';

wwv_flow_api.create_report_region (
  p_id=> 26078608102874706 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 81,
  p_name=> 'Selected Quote (&P81_QUOTE_ID.) for enquiry &P81_ENQU_ID.',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 20,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 28041136573354435+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_show_nulls_as=> ' - ',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'No quote document found for selected quote.',
  p_query_num_rows_type=> 'NEXT_PREVIOUS_LINKS',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26078820313874708 + wwv_flow_api.g_id_offset,
  p_region_id=> 26078608102874706 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'ENQUIRY_ID',
  p_column_display_sequence=> 1,
  p_column_heading=> 'Enquiry ID',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26078919433874708 + wwv_flow_api.g_id_offset,
  p_region_id=> 26078608102874706 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'QUOTE_ID',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Quote ID',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26079012573874708 + wwv_flow_api.g_id_offset,
  p_region_id=> 26078608102874706 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'ENTY_CODE',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Enty Code',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26079119810874708 + wwv_flow_api.g_id_offset,
  p_region_id=> 26078608102874706 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'MODULE_CODE',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Module Code',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26079213315874708 + wwv_flow_api.g_id_offset,
  p_region_id=> 26078608102874706 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'LEAD_TIME',
  p_column_display_sequence=> 5,
  p_column_heading=> 'Lead Time',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26079327664874708 + wwv_flow_api.g_id_offset,
  p_region_id=> 26078608102874706 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 6,
  p_form_element_id=> null,
  p_column_alias=> 'ADDITIONAL_ITEMS',
  p_column_display_sequence=> 6,
  p_column_heading=> 'Additional Items',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26079432338874708 + wwv_flow_api.g_id_offset,
  p_region_id=> 26078608102874706 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 7,
  p_form_element_id=> null,
  p_column_alias=> 'BAS_CODE',
  p_column_display_sequence=> 7,
  p_column_heading=> 'Base Code',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 27200404876578309 + wwv_flow_api.g_id_offset,
  p_region_id=> 26078608102874706 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 8,
  p_form_element_id=> null,
  p_column_alias=> 'HOU_CODE',
  p_column_display_sequence=> 14,
  p_column_heading=> 'House Code',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26079525393874708 + wwv_flow_api.g_id_offset,
  p_region_id=> 26078608102874706 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 9,
  p_form_element_id=> null,
  p_column_alias=> 'QMAX',
  p_column_display_sequence=> 8,
  p_column_heading=> 'QMAX',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26080002862874708 + wwv_flow_api.g_id_offset,
  p_region_id=> 26078608102874706 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 10,
  p_form_element_id=> null,
  p_column_alias=> 'QMIN',
  p_column_display_sequence=> 13,
  p_column_heading=> 'QMIN',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26079618279874708 + wwv_flow_api.g_id_offset,
  p_region_id=> 26078608102874706 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 11,
  p_form_element_id=> null,
  p_column_alias=> 'INLET_ORIENTATION',
  p_column_display_sequence=> 9,
  p_column_heading=> 'Inlet Orientation',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26079706357874708 + wwv_flow_api.g_id_offset,
  p_region_id=> 26078608102874706 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 12,
  p_form_element_id=> null,
  p_column_alias=> 'OUTLET_ORIENTATION',
  p_column_display_sequence=> 10,
  p_column_heading=> 'Outlet Orientation',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26079830147874708 + wwv_flow_api.g_id_offset,
  p_region_id=> 26078608102874706 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 13,
  p_form_element_id=> null,
  p_column_alias=> 'TOTAL_COST',
  p_column_display_sequence=> 11,
  p_column_heading=> 'Total Cost',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 26079912521874708 + wwv_flow_api.g_id_offset,
  p_region_id=> 26078608102874706 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 14,
  p_form_element_id=> null,
  p_column_alias=> 'ROW_NUMBER',
  p_column_display_sequence=> 12,
  p_column_heading=> 'Row Number',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 27223815658609805 + wwv_flow_api.g_id_offset,
  p_region_id=> 26078608102874706 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 15,
  p_form_element_id=> null,
  p_column_alias=> 'VIEW_PDF',
  p_column_display_sequence=> 15,
  p_column_heading=> '',
  p_column_link=>'p?n=#VIEW_PDF#',
  p_column_linktext=>'View PDF',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select v_files.id as View_PDF '||chr(10)||
'  from document_roles docro, documents docs, wwv_flow_files v_files'||chr(10)||
' where docro.qute_id = :P81_QUOTE_ID'||chr(10)||
'   and docs.id = docro.docu_id'||chr(10)||
'   and v_files.name = docs.uri';

wwv_flow_api.create_report_region (
  p_id=> 31764115879314756 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 81,
  p_name=> 'Manual Quote',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 30,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_display_when_condition=> 'declare'||chr(10)||
'l_quote_rec quotes%ROWTYPE;'||chr(10)||
' CURSOR c_get_quote(cp_enqu_id number) IS'||chr(10)||
'   select * '||chr(10)||
'   from quotes q'||chr(10)||
'   where q.enqu_id = cp_enqu_id'||chr(10)||
'   and upper(q.qute_type) = ''MQ'';'||chr(10)||
'begin'||chr(10)||
'  IF NOT c_get_quote%ISOPEN THEN'||chr(10)||
'    OPEN c_get_quote(:P81_ENQU_ID);'||chr(10)||
'  END IF;'||chr(10)||
'  FETCH c_get_quote'||chr(10)||
'    INTO l_quote_rec;'||chr(10)||
'  CLOSE c_get_quote;'||chr(10)||
'if not l_quote_rec.id is null then'||chr(10)||
'  return true;'||chr(10)||
'else'||chr(10)||
'  return false;'||chr(10)||
'end if;'||chr(10)||
'end;',
  p_display_condition_type=> 'FUNCTION_BODY',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_query_row_template=> 28041136573354435+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'QUERY_COLUMNS',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_show_nulls_as=> ' - ',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'no data found',
  p_query_num_rows_type=> 'NEXT_PREVIOUS_LINKS',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 31764432152314789 + wwv_flow_api.g_id_offset,
  p_region_id=> 31764115879314756 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'VIEW_PDF',
  p_column_display_sequence=> 1,
  p_column_heading=> 'View Pdf',
  p_column_link=>'p?n=#VIEW_PDF#',
  p_column_linktext=>'View PDF',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_column_comment=>'');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 26080222902874708 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 81,
  p_button_sequence=> 10,
  p_button_plug_id => 26078608102874706+wwv_flow_api.g_id_offset,
  p_button_name    => 'ACCEPT',
  p_button_image_alt=> 'Accept',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'SELECT 1'||chr(10)||
'FROM v_current_quote_status'||chr(10)||
'WHERE qute_id = :P81_QUOTE_ID'||chr(10)||
'AND qust_code = ''SELECTED''',
  p_button_condition_type=> 'EXISTS',
  p_button_cattributes=>'name="Accept"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 26080418463874708 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 81,
  p_button_sequence=> 20,
  p_button_plug_id => 26078608102874706+wwv_flow_api.g_id_offset,
  p_button_name    => 'REJECT',
  p_button_image_alt=> 'Reject',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'SELECT 1'||chr(10)||
'FROM v_current_quote_status'||chr(10)||
'WHERE qute_id = :P81_QUOTE_ID'||chr(10)||
'AND qust_code = ''SELECTED''',
  p_button_condition_type=> 'EXISTS',
  p_button_cattributes=>'name="Reject"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>26081323577874709 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 81,
  p_branch_action=> 'f?p=&APP_ID.:30:&SESSION.::&DEBUG.:::&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>26080222902874708+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 10,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>26081528152874709 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 81,
  p_branch_action=> 'f?p=&APP_ID.:82:&SESSION.::&DEBUG.::P82_QUTE_ID:&P81_QUOTE_ID.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>26080418463874708+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 10,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>989709785723434 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 81,
  p_name=>'P81_TC_ACCEPTED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 50,
  p_item_plug_id => 26078608102874706+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Terms and Conditions',
  p_format_mask=>'style="display: inline;"',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX',
  p_lov => 'STATIC2:I accept the Terms and Conditions described within the quotation document;YES,I <b>do not</b> accept the Terms and Conditions described within the quotation document;NO',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-- Select one of the following statements --',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'SELECT 1'||chr(10)||
'FROM v_current_quote_status'||chr(10)||
'WHERE qute_id = :P81_QUOTE_ID'||chr(10)||
'AND qust_code = ''SELECTED''',
  p_display_when_type=>'EXISTS',
  p_field_template => 28046741903354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26080619895874709 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 81,
  p_name=>'P81_ENQU_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 26078608102874706+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26080800696874709 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 81,
  p_name=>'P81_QUOTE_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 26078608102874706+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'If accepting the quote on behalf of someone else, specify the agent the quote has been accepted for.';

wwv_flow_api.create_page_item(
  p_id=>28839530480397384 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 81,
  p_name=>'P81_ACCEPT_FOR',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 40,
  p_item_plug_id => 26078608102874706+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Accept on behalf of',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'AGENTS',
  p_lov => 'BEGIN'||chr(10)||
'  IF mip_parties.get_user_role(:APP_USER) IN (''MIPADMIN'', ''ICU'', ''CS'') THEN'||chr(10)||
'    RETURN (q''<SELECT prty.first_name ||'' '' ||prty.last_name display, prty.ID RETURN'||chr(10)||
'                 FROM parties prty, party_roles parl'||chr(10)||
'                WHERE parl.prty_id = prty.ID'||chr(10)||
'                  AND parl.rt_code = ''AGENT''>'');'||chr(10)||
'  ELSIF mip_parties.get_user_role(:APP_USER) = ''SUPPADMIN'' THEN'||chr(10)||
'    RETURN (q''<SELECT prty.first_name || '' '' || prty.last_name || '' - '' || vsuad.supplier || '' '' ||'||chr(10)||
'                     vsuad.shortcode display_value,'||chr(10)||
'                     prty.id return_value'||chr(10)||
'                FROM parties                   prty,'||chr(10)||
'                     party_relationships       parl,'||chr(10)||
'                     v_supplier_administrators vsuad'||chr(10)||
'               WHERE prty.id = parl.from_parl_prty_id'||chr(10)||
'                 AND parl.from_prtp_rt_code = ''AGENT'''||chr(10)||
'                 AND parl.to_prtp_rt_code = ''SUPP'''||chr(10)||
'                 AND parl.to_parl_prty_id = vsuad.supplier_id'||chr(10)||
'                 AND vsuad.supp_admin_id = mip_parties.get_user_id(:APP_USER)'||chr(10)||
'               ORDER BY 1>'');'||chr(10)||
'  ELSE'||chr(10)||
'    RETURN NULL;'||chr(10)||
'  END IF;'||chr(10)||
'END;'||chr(10)||
'',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'DECLARE'||chr(10)||
'  cur_status VARCHAR2(250);'||chr(10)||
'BEGIN'||chr(10)||
'  IF #OWNER#.mip_parties.get_user_role(:app_user) IN'||chr(10)||
'     (''MIPADMIN'', ''SUPPADMIN'', ''ICU'', ''CS'') THEN'||chr(10)||
'  '||chr(10)||
'    SELECT qust_code'||chr(10)||
'      INTO cur_status'||chr(10)||
'      FROM v_current_quote_status'||chr(10)||
'     WHERE qute_id = :P81_QUOTE_ID;'||chr(10)||
'  '||chr(10)||
'    IF NOT cur_status = ''ACCEPTED'' THEN'||chr(10)||
'      RETURN TRUE;'||chr(10)||
'    ELSE'||chr(10)||
'      RETURN FALSE;'||chr(10)||
'    END IF;'||chr(10)||
'  ELSE'||chr(10)||
'    RETURN FALSE;'||chr(10)||
'  END IF;'||chr(10)||
'END;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>39355518253155822 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 81,
  p_name=>'P81_QMIN_GT_ENQU_QMIN',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 40,
  p_item_plug_id => 26078608102874706+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>39358416999164919 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 81,
  p_name=>'P81_QMIN_MSG',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 26078608102874706+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default => 'Please note!  The module you have selected has a minimum flow rate that is greater than the requirement input on the enquiry screen. '||chr(10)||
''||chr(10)||
'Please check that the Qmin entered on the enquiry screen is correct, or &ldquo;copy new&rdquo; and select a module that has a minimum flow rate lower than the Qmin request.',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'DISPLAY_ONLY_HTML',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P81_QMIN_GT_ENQU_QMIN',
  p_display_when2=>'YES',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_field_template => 28046449440354444+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 1028900068969626 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 81,
  p_validation_name => 'TC_ACCEPTED',
  p_validation_sequence=> 10,
  p_validation => 'P81_TC_ACCEPTED',
  p_validation2 => 'YES',
  p_validation_type => 'ITEM_IN_VALIDATION_EQ_STRING2',
  p_error_message => 'Terms and Conditions Must Be Accepted Before You Accept A Quote',
  p_when_button_pressed=> 26080222902874708 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'#OWNER#.mip_quotation.accept_quote(p_qute_id => :P81_QUOTE_ID'||chr(10)||
'                          ,p_prty_id => #OWNER#.mip_parties.get_user_id(:APP_USER)'||chr(10)||
'                          ,p_owner_prty_id => :P81_ACCEPT_FOR'||chr(10)||
'                          ,p_description => ''Quote accepted by ''||:APP_USER);';

wwv_flow_api.create_page_process(
  p_id     => 28012906774872628 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 81,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'accept_quote',
  p_process_sql_clob => p, 
  p_process_error_message=> 'An error occurred whilst accepting the quote.',
  p_process_when_button_id=>26080222902874708 + wwv_flow_api.g_id_offset,
  p_process_success_message=> 'Quote accepted.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare'||chr(10)||
'  num_processed number;'||chr(10)||
'  cur_quote number;'||chr(10)||
'begin'||chr(10)||
'      SELECT COUNT(*)'||chr(10)||
'        INTO num_processed '||chr(10)||
'        FROM v_current_quote_status v, quotes q'||chr(10)||
'       WHERE v.qute_id = q.id'||chr(10)||
'         AND v.qust_code IN (''SELECTED'', ''SELREJ'', ''REJECTED'', ''ACCEPTED'')'||chr(10)||
'         AND q.enqu_id = :P81_ENQU_ID;'||chr(10)||
'    '||chr(10)||
'      SELECT COUNT(*)'||chr(10)||
'        INTO cur_quote'||chr(10)||
'        FROM v_current_quote_status v';

p:=p||''||chr(10)||
'       WHERE v.qute_id = :P81_QUOTE_ID'||chr(10)||
'         AND v.qust_code IN (''SELECTED'', ''ACCEPTED'');'||chr(10)||
''||chr(10)||
'      if cur_quote = 0 then'||chr(10)||
'        IF num_processed > 0 THEN -- Quote has already been processed'||chr(10)||
'          raise_application_error(-20001, ''Unable to select quote.  A quote has already been selected or accepted for this enquiry.'');'||chr(10)||
'        ELSE'||chr(10)||
'          mip_quotation.select_quote(p_qute_id => :';

p:=p||'P81_QUOTE_ID'||chr(10)||
'                        ,p_prty_id => #OWNER#.mip_parties.get_user_id(:APP_USER)'||chr(10)||
'                        ,p_description => ''Selected by user '' ||:APP_USER);'||chr(10)||
'        END IF;'||chr(10)||
'      end if;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 26081006445874709 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 81,
  p_process_sequence=> 10,
  p_process_point=> 'BEFORE_BOX_BODY',
  p_process_type=> 'PLSQL',
  p_process_name=> 'select_quote',
  p_process_sql_clob => p, 
  p_process_error_message=> 'An error occurred whilst selecting this quote.'||chr(10)||
'#SQLERRM#',
  p_process_when=>'SELECT 1'||chr(10)||
'  FROM v_current_quote_status v'||chr(10)||
' WHERE v.qute_id = :P81_QUOTE_ID'||chr(10)||
'   AND v.qust_code IN (''AV'');',
  p_process_when_type=>'',
  p_process_success_message=> 'Quote selected successfully.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'SELECT v.qute_id'||chr(10)||
'  into :P81_QUOTE_ID'||chr(10)||
'  FROM v_current_quote_status v, quotes q'||chr(10)||
' WHERE v.qute_id = q.id'||chr(10)||
'   AND v.qust_code IN (''SELECTED'', ''ACCEPTED'')'||chr(10)||
'   AND q.enqu_id = :P81_ENQU_ID;';

wwv_flow_api.create_page_process(
  p_id     => 30956114921232991 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 81,
  p_process_sequence=> 5,
  p_process_point=> 'BEFORE_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'get_quote_id',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P81_QUOTE_ID',
  p_process_when_type=>'ITEM_IS_NULL',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 81
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00082
prompt  ...PAGE 82: Quote Rejection Reasons
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 82,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Quote Rejection Reasons',
  p_step_title=> 'Quote Rejection Reasons',
  p_step_sub_title => 'Quote Rejection Reasons',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 28661628162428559+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  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 => '20080317135136',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'Please select a reason for rejecting the quote(s).';

wwv_flow_api.create_page_plug (
  p_id=> 26084417042877486 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 82,
  p_plug_name=> 'Quote Rejection Details',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 26084605487877486 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 82,
  p_button_sequence=> 10,
  p_button_plug_id => 26084417042877486+wwv_flow_api.g_id_offset,
  p_button_name    => 'REJECT',
  p_button_image_alt=> 'Reject',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_cattributes=>'name="Reject"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>26086526389877491 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 82,
  p_branch_action=> 'f?p=&APP_ID.:30:&SESSION.::&DEBUG.:::&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>26084605487877486+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 10,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>26674926734368836 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 82,
  p_branch_action=> 'f?p=&APP_ID.:82:&SESSION.::&DEBUG.:::',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 20,
  p_branch_comment=> 'Created 17-JAN-2008 16:13 by MULLENM');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26084820364877487 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 82,
  p_name=>'P82_ENQU_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 26084417042877486+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26085016552877487 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 82,
  p_name=>'P82_QUTE_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 26084417042877486+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26085218280877487 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 82,
  p_name=>'P82_REJECTION_REASON',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 30,
  p_item_plug_id => 26084417042877486+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Reason for Rejection',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX_WITH_SUBMIT',
  p_named_lov=> 'QUOTE_REJECTION',
  p_lov => '.'||to_char(26086613726877492 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please Select a Value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>26085427949877489 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 82,
  p_name=>'P82_REJ_REASON_DETAIL',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 40,
  p_item_plug_id => 26084417042877486+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Reason for Rejection',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXTAREA_CHAR_COUNT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 80,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'begin'||chr(10)||
'  if upper(:P82_REJECTION_REASON) = ''OTHER'' then '||chr(10)||
'    return true;'||chr(10)||
'  else '||chr(10)||
'    return false;'||chr(10)||
'  end if;'||chr(10)||
'end;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
h := null;
h:=h||'If rejecting the quote on behalf of another agent then select that agent here.';

wwv_flow_api.create_page_item(
  p_id=>28767502654105434 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 82,
  p_name=>'P82_REJ_FOR',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 50,
  p_item_plug_id => 26084417042877486+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Rejected on behalf of',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'AGENTS',
  p_lov => 'BEGIN'||chr(10)||
'  IF mip_parties.get_user_role(:APP_USER) IN (''MIPADMIN'', ''ICU'', ''CS'') THEN'||chr(10)||
'    RETURN (q''<SELECT prty.first_name ||'' '' ||prty.last_name display, prty.ID RETURN'||chr(10)||
'                 FROM parties prty, party_roles parl'||chr(10)||
'                WHERE parl.prty_id = prty.ID'||chr(10)||
'                  AND parl.rt_code = ''AGENT''>'');'||chr(10)||
'  ELSIF mip_parties.get_user_role(:APP_USER) = ''SUPPADMIN'' THEN'||chr(10)||
'    RETURN (q''<SELECT prty.first_name || '' '' || prty.last_name || '' - '' || vsuad.supplier || '' '' ||'||chr(10)||
'                     vsuad.shortcode display_value,'||chr(10)||
'                     prty.id return_value'||chr(10)||
'                FROM parties                   prty,'||chr(10)||
'                     party_relationships       parl,'||chr(10)||
'                     v_supplier_administrators vsuad'||chr(10)||
'               WHERE prty.id = parl.from_parl_prty_id'||chr(10)||
'                 AND parl.from_prtp_rt_code = ''AGENT'''||chr(10)||
'                 AND parl.to_prtp_rt_code = ''SUPP'''||chr(10)||
'                 AND parl.to_parl_prty_id = vsuad.supplier_id'||chr(10)||
'                 AND vsuad.supp_admin_id = mip_parties.get_user_id(:APP_USER)'||chr(10)||
'               ORDER BY 1>'');'||chr(10)||
'  ELSE'||chr(10)||
'    RETURN NULL;'||chr(10)||
'  END IF;'||chr(10)||
'END;'||chr(10)||
'',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if mip_parties.get_user_role(:APP_USER) in (''MIPADMIN'',''SUPPADMIN'',''ICU'',''CS'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 26085731848877489 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 82,
  p_validation_name => 'P82_REJ_REASON_DETAIL',
  p_validation_sequence=> 10,
  p_validation => 'P82_REJ_REASON_DETAIL',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'If rejection reason is other, please provide more detail.',
  p_validation_condition=> 'begin'||chr(10)||
'  if upper(:P82_REJECTION_REASON) = ''OTHER'' then '||chr(10)||
'    return true;'||chr(10)||
'  else '||chr(10)||
'    return false;'||chr(10)||
'  end if;'||chr(10)||
'end;',
  p_validation_condition_type=> 'FUNCTION_BODY',
  p_when_button_pressed=> 26084605487877486 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26085427949877489 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 6386505837339185 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 82,
  p_validation_name => 'P82_REJ_REASON',
  p_validation_sequence=> 20,
  p_validation => 'P82_REJECTION_REASON',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Please select a reason',
  p_when_button_pressed=> 26084605487877486 + wwv_flow_api.g_id_offset,
  p_associated_item=> 26085218280877487 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'mip_quotation.reject_quote(p_qute_id => :P82_QUTE_ID'||chr(10)||
'                          ,p_prty_id  => mip_parties.get_user_id(:APP_USER)'||chr(10)||
'                          ,p_owner_prty_id => :P82_REJ_FOR'||chr(10)||
'                          ,p_description => CASE UPPER(:P82_REJECTION_REASON) WHEN ''OTHER'' THEN substr(:P82_REJ_REASON_DETAIL,1,2000) ELSE :P82_REJECTION_REASON END);';

wwv_flow_api.create_page_process(
  p_id     => 26085831934877489 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 82,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'reject_quote',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>26084605487877486 + wwv_flow_api.g_id_offset,
  p_process_when=>'P82_QUTE_ID',
  p_process_when_type=>'ITEM_IS_NOT_NULL',
  p_process_success_message=> 'Quote(s) successfully rejected.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'mip_quotation.reject_all_quotes(p_enqu_id => :P82_ENQU_ID'||chr(10)||
'                              ,p_prty_id  => mip_parties.get_user_id(:APP_USER)'||chr(10)||
'                              ,p_owner_prty_id => :P82_REJ_FOR'||chr(10)||
'                              ,p_description => CASE UPPER(:P82_REJECTION_REASON) WHEN ''OTHER'' THEN substr(:P82_REJ_REASON_DETAIL,1,2000) ELSE :P82_REJECTION_REASON END);';

wwv_flow_api.create_page_process(
  p_id     => 26086028575877489 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 82,
  p_process_sequence=> 20,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'reject_all_quotes',
  p_process_sql_clob => p, 
  p_process_error_message=> 'There was a problem when trying to mark the quotes as rejected.',
  p_process_when_button_id=>26084605487877486 + wwv_flow_api.g_id_offset,
  p_process_when=>'P82_ENQU_ID',
  p_process_when_type=>'ITEM_IS_NOT_NULL',
  p_process_success_message=> 'All quotes rejected successfully.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P82_REJECTION_REASON,P82_REJ_REASON_DETAIL,P82_REJ_FOR';

wwv_flow_api.create_page_process(
  p_id     => 4608018848550679 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 82,
  p_process_sequence=> 30,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'ResetRejection',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>26084605487877486 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 82
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00090
prompt  ...PAGE 90: Non-Tripartite Exclusion
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph:=ph||'<script language="JavaScript" type="text/javascript">'||chr(10)||
'<!--'||chr(10)||
''||chr(10)||
' htmldb_delete_message=''"DELETE_CONFIRM_MSG"'';'||chr(10)||
''||chr(10)||
'//-->'||chr(10)||
'</script>';

wwv_flow_api.create_page(
  p_id     => 90,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Non-Tripartite Exclusion',
  p_alias  => 'NONTRIPARTITEREPORT',
  p_step_title=> 'Non-Tripartite Exclusion',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => '',
  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 => '20080317175900',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
wwv_flow_api.set_html_page_header(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>90,p_text=>ph);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 35179413359400052 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 90,
  p_plug_name=> 'Non-Tripartite Exclusion',
  p_region_name=>'',
  p_plug_template=> 28035733013354425+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 35179711263400077 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 90,
  p_button_sequence=> 30,
  p_button_plug_id => 35179413359400052+wwv_flow_api.g_id_offset,
  p_button_name    => 'SAVE',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Apply Changes',
  p_button_position=> 'REGION_TEMPLATE_CHANGE',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P90_ID',
  p_button_condition_type=> 'ITEM_IS_NOT_NULL',
  p_database_action=>'UPDATE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 35180021488400078 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 90,
  p_button_sequence=> 10,
  p_button_plug_id => 35179413359400052+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'REGION_TEMPLATE_CLOSE',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:91:&SESSION.::&DEBUG.:::',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 35179632707400077 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 90,
  p_button_sequence=> 40,
  p_button_plug_id => 35179413359400052+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Create',
  p_button_position=> 'REGION_TEMPLATE_CREATE',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P90_ID',
  p_button_condition_type=> 'ITEM_IS_NULL',
  p_database_action=>'INSERT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 35179830722400077 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 90,
  p_button_sequence=> 20,
  p_button_plug_id => 35179413359400052+wwv_flow_api.g_id_offset,
  p_button_name    => 'DELETE',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Delete',
  p_button_position=> 'REGION_TEMPLATE_DELETE',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'javascript:confirmDelete(htmldb_delete_message,''DELETE'');',
  p_button_condition=> 'P90_ID',
  p_button_condition_type=> 'ITEM_IS_NOT_NULL',
  p_database_action=>'DELETE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>35180624807400084 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 90,
  p_branch_action=> 'f?p=&APP_ID.:91:&SESSION.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 1,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>35180830072400086 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 90,
  p_name=>'P90_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1,
  p_item_plug_id => 35179413359400052+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Id',
  p_source=>'ID',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 255,
  p_cHeight=> null,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>35181006939400098 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 90,
  p_name=>'P90_ENTY_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 35179413359400052+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Enquiry Type',
  p_source=>'ENTY_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'ENQUIRYTYPES',
  p_lov => 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from ENQUIRY_TYPES'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not Applicable',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>35181218486400098 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 90,
  p_name=>'P90_REGI_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 35179413359400052+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Region',
  p_source=>'REGI_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'REGIONS',
  p_lov => 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from REGIONS'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please Select a Value-',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>35181629536400103 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 90,
  p_name=>'P90_ADIT_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 40,
  p_item_plug_id => 35179413359400052+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Add-On',
  p_source=>'ADIT_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'ADDITIONALITEMS',
  p_lov => 'select description d, code r'||chr(10)||
'from  additional_items'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not Applicable',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 240,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 35181503900400102 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 90,
  p_validation_name => 'P90_REGI_CODE not null',
  p_validation_sequence=> 20,
  p_validation => 'P90_REGI_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Region must have some value.',
  p_associated_item=> 35181218486400098 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 40540830949588002 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 90,
  p_validation_name => 'ENTY_ADIT_MUTEX',
  p_validation_sequence=> 30,
  p_validation => 'IF NOT ((:P90_enty_code is null'||chr(10)||
'and :P90_adit_code is not null) OR (:P90_enty_code is not null'||chr(10)||
'and :P90_adit_code is null)) THEN'||chr(10)||
'  RETURN ''Must enter EITHER enquiry type OR additional item'';'||chr(10)||
'ELSE'||chr(10)||
'  RETURN NULL;'||chr(10)||
'END IF;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_associated_item=> 35181006939400098 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 40541816189593203 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 90,
  p_validation_name => 'ADIT_ENTY_MUTEX',
  p_validation_sequence=> 40,
  p_validation => 'IF NOT ((:P90_enty_code is null'||chr(10)||
'and :P90_adit_code is not null) OR (:P90_enty_code is not null'||chr(10)||
'and :P90_adit_code is null)) THEN'||chr(10)||
'  RETURN ''Must enter EITHER additional item OR enquiry type'';'||chr(10)||
'ELSE'||chr(10)||
'  RETURN NULL;'||chr(10)||
'END IF;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_associated_item=> 35181629536400103 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'F|#OWNER#:REGI_ENQU_EXCLUSIONS:P90_ID:ID';

wwv_flow_api.create_page_process(
  p_id     => 35181905070400105 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 90,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'DML_FETCH_ROW',
  p_process_name=> 'Fetch Row from REGI_ENQU_EXCLUSIONS',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to fetch row.',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare '||chr(10)||
'  function get_pk return varchar2 '||chr(10)||
'  is '||chr(10)||
'  begin '||chr(10)||
'    for c1 in (select REEX_SEQ.nextval next_val'||chr(10)||
'               from dual)'||chr(10)||
'    loop'||chr(10)||
'        return c1.next_val;'||chr(10)||
'    end loop;'||chr(10)||
'  end; '||chr(10)||
'begin '||chr(10)||
'  :P90_ID := get_pk; '||chr(10)||
'end; ';

wwv_flow_api.create_page_process(
  p_id     => 35182125158400108 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 90,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Get PK',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to get primary key item value.',
  p_process_when_button_id=>35179632707400077 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'#OWNER#:REGI_ENQU_EXCLUSIONS:P90_ID:ID|IUD';

wwv_flow_api.create_page_process(
  p_id     => 35182331444400108 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 90,
  p_process_sequence=> 30,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'DML_PROCESS_ROW',
  p_process_name=> 'Process Row of REGI_ENQU_EXCLUSIONS',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to process Exclusion.',
  p_process_success_message=> 'Exclusion saved.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'90';

wwv_flow_api.create_page_process(
  p_id     => 35182515990400108 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 90,
  p_process_sequence=> 40,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_PAGES',
  p_process_name=> 'reset page',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>35179830722400077 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 90
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00091
prompt  ...PAGE 91: Non-Tripartite Exclusions
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph := null;
wwv_flow_api.create_page(
  p_id     => 91,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Non-Tripartite Exclusions',
  p_alias  => 'NONTRIPARTITEEDIT',
  p_step_title=> 'Non-Tripartite Exclusions',
  p_step_sub_title => 'Tripartite Exclusions',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'AUTO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => ' ',
  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 => '20080229171339',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>91,p_text=>h);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select id, enty_code, regi_code, adit_code from #OWNER#.regi_enqu_exclusions reex, enquiry_types enty, regions regi'||chr(10)||
'where enty.code (+) = reex.enty_code'||chr(10)||
'and regi.code = reex.regi_code'||chr(10)||
'order by enty.description, regi.description';

wwv_flow_api.create_report_region (
  p_id=> 35199303103504211 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 91,
  p_name=> 'Non-Tripartite Exclusions',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 10,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_query_row_template=> 28041755229354435+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'No data found.',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_query_row_count_max=> '500',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 40499309328420897 + wwv_flow_api.g_id_offset,
  p_region_id=> 35199303103504211 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'ID',
  p_column_display_sequence=> 5,
  p_column_heading=> 'Id',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 35199622555504225 + wwv_flow_api.g_id_offset,
  p_region_id=> 35199303103504211 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'ENTY_CODE',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Enquiry Type',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'TEXT_FROM_LOV',
  p_named_lov=>15310215906546350 + wwv_flow_api.g_id_offset,
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'NO',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 35199710443504227 + wwv_flow_api.g_id_offset,
  p_region_id=> 35199303103504211 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'REGI_CODE',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Region',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'TEXT_FROM_LOV',
  p_named_lov=>15309304132542973 + wwv_flow_api.g_id_offset,
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'NO',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 35199925861504227 + wwv_flow_api.g_id_offset,
  p_region_id=> 35199303103504211 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'ADIT_CODE',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Add-On',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'TEXT_FROM_LOV',
  p_named_lov=>41943506692705728 + wwv_flow_api.g_id_offset,
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'NO',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 35205324759526353 + wwv_flow_api.g_id_offset,
  p_region_id=> 35199303103504211 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'LINK$01',
  p_column_display_sequence=> 1,
  p_column_heading=> '',
  p_column_link=>'f?p=&APP_ID.:90:&SESSION.::&DEBUG.:90:P90_ID:#ID#',
  p_column_linktext=>'Edit',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_derived_column=> 'Y',
  p_lov_display_extra=> 'YES',
  p_column_comment=>'');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 35201417355514798 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 91,
  p_button_sequence=> 10,
  p_button_plug_id => 35199303103504211+wwv_flow_api.g_id_offset,
  p_button_name    => 'NEW',
  p_button_image_alt=> 'New',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:90:&SESSION.::&DEBUG.:90::',
  p_button_cattributes=>'id="new" name="new"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>35201714721514819 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 91,
  p_branch_action=> 'f?p=&FLOW_ID.:90:&SESSION.::&DEBUG.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>35201417355514798+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 10,
  p_branch_comment=> '');
 
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 91
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00095
prompt  ...PAGE 95: Postcode
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph:=ph||'<script language="JavaScript" type="text/javascript">'||chr(10)||
'<!--'||chr(10)||
''||chr(10)||
' htmldb_delete_message=''"DELETE_CONFIRM_MSG"'';'||chr(10)||
''||chr(10)||
'//-->'||chr(10)||
'</script>';

wwv_flow_api.create_page(
  p_id     => 95,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Postcode',
  p_step_title=> 'Postcode',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => '',
  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 => '20080222141708',
  p_page_comment  => '');
 
wwv_flow_api.set_html_page_header(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>95,p_text=>ph);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 35223420182619658 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 95,
  p_plug_name=> 'Postcode',
  p_region_name=>'',
  p_plug_template=> 28035733013354425+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 35223719641619683 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 95,
  p_button_sequence=> 30,
  p_button_plug_id => 35223420182619658+wwv_flow_api.g_id_offset,
  p_button_name    => 'SAVE',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Apply Changes',
  p_button_position=> 'REGION_TEMPLATE_CHANGE',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P95_ID',
  p_button_condition_type=> 'ITEM_IS_NOT_NULL',
  p_database_action=>'UPDATE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 35224024252619684 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 95,
  p_button_sequence=> 10,
  p_button_plug_id => 35223420182619658+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'REGION_TEMPLATE_CLOSE',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:96:&SESSION.::&DEBUG.:::',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 35223617869619683 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 95,
  p_button_sequence=> 40,
  p_button_plug_id => 35223420182619658+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Create',
  p_button_position=> 'REGION_TEMPLATE_CREATE',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P95_ID',
  p_button_condition_type=> 'ITEM_IS_NULL',
  p_database_action=>'INSERT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 35223800839619683 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 95,
  p_button_sequence=> 20,
  p_button_plug_id => 35223420182619658+wwv_flow_api.g_id_offset,
  p_button_name    => 'DELETE',
  p_button_image   => 'template:'||to_char(28046959836354450+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Delete',
  p_button_position=> 'REGION_TEMPLATE_DELETE',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'javascript:confirmDelete(htmldb_delete_message,''DELETE'');',
  p_button_condition=> 'P95_ID',
  p_button_condition_type=> 'ITEM_IS_NOT_NULL',
  p_database_action=>'DELETE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>35224618529619686 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 95,
  p_branch_action=> 'f?p=&APP_ID.:96:&SESSION.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 1,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>35224803719619688 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 95,
  p_name=>'P95_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1,
  p_item_plug_id => 35223420182619658+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Id',
  p_source=>'ID',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 255,
  p_cHeight=> null,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>35225031156619698 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 95,
  p_name=>'P95_REGI_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 35223420182619658+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Regi Code',
  p_source=>'REGI_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'REGIONS',
  p_lov => 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from REGIONS'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please Select a Value-',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>35225404975619702 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 95,
  p_name=>'P95_OUTCODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 35223420182619658+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Outcode',
  p_source=>'OUTCODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 4,
  p_cMaxlength=> 4,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>35225812555619703 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 95,
  p_name=>'P95_INCODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 30,
  p_item_plug_id => 35223420182619658+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_prompt=>'Incode',
  p_source=>'INCODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 3,
  p_cMaxlength=> 3,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 35225318928619700 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 95,
  p_validation_name => 'P95_REGI_CODE not null',
  p_validation_sequence=> 10,
  p_validation => 'P95_REGI_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Regi Code must have some value.',
  p_associated_item=> 35225031156619698 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 35225712258619703 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 95,
  p_validation_name => 'P95_OUTCODE not null',
  p_validation_sequence=> 20,
  p_validation => 'P95_OUTCODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Outcode must have some value.',
  p_associated_item=> 35225404975619702 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 40459823256330336 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 95,
  p_validation_name => 'Valid_PostCode_Format',
  p_validation_sequence=> 30,
  p_validation => 'declare'||chr(10)||
'l_valid_format boolean;'||chr(10)||
'l_outcode varchar2(80) := trim(:P95_outcode);'||chr(10)||
'l_incode varchar2(80) := trim(:P95_incode);'||chr(10)||
'l_postcode varchar2(80) := l_outcode||'' ''||l_incode;'||chr(10)||
'begin'||chr(10)||
'l_valid_format := mip_regions.valid_postcode_format(l_postcode);'||chr(10)||
'if not l_valid_format then return l_postcode||'' is not a valid postcode format'';'||chr(10)||
'else return null;'||chr(10)||
'end if;'||chr(10)||
'end;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'F|#OWNER#:POSTCODES:P95_ID:ID';

wwv_flow_api.create_page_process(
  p_id     => 35226114036619705 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 95,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'DML_FETCH_ROW',
  p_process_name=> 'Fetch Row from POSTCODES',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to fetch row.',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare '||chr(10)||
'  function get_pk return varchar2 '||chr(10)||
'  is '||chr(10)||
'  begin '||chr(10)||
'    for c1 in (select POCO_SEQ.nextval next_val'||chr(10)||
'               from dual)'||chr(10)||
'    loop'||chr(10)||
'        return c1.next_val;'||chr(10)||
'    end loop;'||chr(10)||
'  end; '||chr(10)||
'begin '||chr(10)||
'  :P95_ID := get_pk; '||chr(10)||
'end; ';

wwv_flow_api.create_page_process(
  p_id     => 35226330844619706 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 95,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Get PK',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to get primary key item value.',
  p_process_when_button_id=>35223617869619683 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'#OWNER#:POSTCODES:P95_ID:ID|IUD';

wwv_flow_api.create_page_process(
  p_id     => 35226515105619706 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 95,
  p_process_sequence=> 30,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'DML_PROCESS_ROW',
  p_process_name=> 'Process Row of POSTCODES',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to process row of table POSTCODES.',
  p_process_success_message=> 'Action Processed.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'95';

wwv_flow_api.create_page_process(
  p_id     => 35226709188619706 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 95,
  p_process_sequence=> 40,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_PAGES',
  p_process_name=> 'reset page',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>35223800839619683 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||':p95_outcode := upper(:p95_outcode);'||chr(10)||
':p95_incode := upper(:p95_incode);';

wwv_flow_api.create_page_process(
  p_id     => 40460410227336034 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 95,
  p_process_sequence=> 50,
  p_process_point=> 'ON_SUBMIT_BEFORE_COMPUTATION',
  p_process_type=> 'PLSQL',
  p_process_name=> 'SetCase',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 95
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00096
prompt  ...PAGE 96: Postcodes
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph := null;
wwv_flow_api.create_page(
  p_id     => 96,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Postcodes',
  p_step_title=> 'Postcodes',
  p_step_sub_title => 'Postcodes',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> '',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => ' ',
  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 => '20080310131404',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>96,p_text=>h);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select * from postcodes order by 1,2,3';

wwv_flow_api.create_report_region (
  p_id=> 35230620511633920 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 96,
  p_name=> 'Postcodes',
  p_region_name=>'',
  p_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 10,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_query_row_template=> 28041755229354435+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '200',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'No data found.',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_query_row_count_max=> '10000000',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 35230905234633931 + wwv_flow_api.g_id_offset,
  p_region_id=> 35230620511633920 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'REGI_CODE',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Region',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 35231017269633931 + wwv_flow_api.g_id_offset,
  p_region_id=> 35230620511633920 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'OUTCODE',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Out Code',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 35231129344633931 + wwv_flow_api.g_id_offset,
  p_region_id=> 35230620511633920 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'INCODE',
  p_column_display_sequence=> 4,
  p_column_heading=> 'In Code',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 35231217026633931 + wwv_flow_api.g_id_offset,
  p_region_id=> 35230620511633920 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'ID',
  p_column_display_sequence=> 5,
  p_column_heading=> 'Id',
  p_column_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 35233302567642977 + wwv_flow_api.g_id_offset,
  p_region_id=> 35230620511633920 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'LINK$01',
  p_column_display_sequence=> 1,
  p_column_heading=> '',
  p_column_link=>'f?p=&APP_ID.:95:&SESSION.::&DEBUG.:95:P95_ID:#ID#',
  p_column_linktext=>'Edit',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_derived_column=> 'Y',
  p_lov_display_extra=> 'YES',
  p_column_comment=>'');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 35232116288637516 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 96,
  p_button_sequence=> 10,
  p_button_plug_id => 35230620511633920+wwv_flow_api.g_id_offset,
  p_button_name    => 'NEW',
  p_button_image_alt=> 'New',
  p_button_position=> 'TOP',
  p_button_alignment=> 'LEFT',
  p_button_redirect_url=> 'f?p=&APP_ID.:95:&SESSION.::&DEBUG.:95::',
  p_button_cattributes=>'id="new" name="new"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>35232412250637534 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 96,
  p_branch_action=> 'f?p=&FLOW_ID.:95:&SESSION.::&DEBUG.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>35232116288637516+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 10,
  p_branch_comment=> '');
 
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 96
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00101
prompt  ...PAGE 101: login
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 101,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'login',
  p_alias  => 'LOGIN',
  p_step_title=> 'Login',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'AUTO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 28663418596435255+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => 28031530009354416+ 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 => '20080314145908',
  p_page_is_public_y_n=> 'Y',
  p_protection_level=> 'C',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 11076809493541525 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 101,
  p_plug_name=> 'Login',
  p_region_name=>'',
  p_plug_template=> 0,
  p_plug_display_sequence=> 20,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 17649720542858853 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 101,
  p_button_sequence=> 10,
  p_button_plug_id => 11076809493541525+wwv_flow_api.g_id_offset,
  p_button_name    => 'NEW_PASSWORD',
  p_button_image_alt=> 'New Password',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 17655729115880312 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 101,
  p_button_sequence=> 20,
  p_button_plug_id => 11076809493541525+wwv_flow_api.g_id_offset,
  p_button_name    => 'FORGOTTEN_PASSWORD',
  p_button_image_alt=> 'Forgotten Password',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:103:&SESSION.::&DEBUG.:::',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
null;
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>1181431450669473 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 101,
  p_name=>'P101_TC_ACCEPTED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 49,
  p_item_plug_id => 11076809493541525+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'The Terms and Conditions for using this site are defined <a href="&T_AND_C_URL." target="_blank">here</a>',
  p_source_type=> 'STATIC',
  p_display_as=> 'RADIOGROUP',
  p_lov => 'STATIC2:I accept the Terms and Conditions of using this site;YES',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 2,
  p_rowspan => 1,
  p_label_alignment  => 'ABOVE',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046741903354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>11076900282541526 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 101,
  p_name=>'P101_USERNAME',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 51,
  p_item_plug_id => 11076809493541525+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'User Name',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 40,
  p_cMaxlength=> 100,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 2,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>11077026616541526 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 101,
  p_name=>'P101_PASSWORD',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 52,
  p_item_plug_id => 11076809493541525+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Password',
  p_source_type=> 'STATIC',
  p_display_as=> 'PASSWORD_WITH_ENTER_SUBMIT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 40,
  p_cMaxlength=> 100,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046837496354450+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>11077124657541526 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 101,
  p_name=>'P101_LOGIN',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 53,
  p_item_plug_id => 11076809493541525+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> '',
  p_item_default => 'LOGIN',
  p_prompt=>'Login',
  p_source=>'LOGIN',
  p_source_type=> 'STATIC',
  p_display_as=> 'BUTTON',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> null,
  p_cHeight=> null,
  p_tag_attributes  => 'id="login"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_protection_level => 'S',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 1181729634687871 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 101,
  p_validation_name => 'TC_ACCEPTED',
  p_validation_sequence=> 1,
  p_validation => 'P101_TC_ACCEPTED',
  p_validation2 => 'YES',
  p_validation_type => 'ITEM_IN_VALIDATION_EQ_STRING2',
  p_error_message => 'Terms and Conditions must be accepted before entering this site',
  p_associated_item=> 1181431450669473 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_IN_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 19500903282335548 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 101,
  p_validation_name => 'P101_USERNAME Not Null',
  p_validation_sequence=> 10,
  p_validation => 'P101_USERNAME',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition_type=> 'NOT_DISPLAYING_INLINE_VALIDATION_ERRORS',
  p_associated_item=> 11076900282541526 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 12-DEC-2007 14:51');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 19521609169687353 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 101,
  p_validation_name => 'P101_VALID_LOGIN',
  p_validation_sequence=> 12,
  p_validation => 'declare'||chr(10)||
' l_users number;'||chr(10)||
' l_pword boolean;'||chr(10)||
'begin'||chr(10)||
'  select count(*)'||chr(10)||
'    into l_users'||chr(10)||
'    from parties'||chr(10)||
'   where upper(username) = upper(:P101_USERNAME);'||chr(10)||
''||chr(10)||
'  l_pword := mip_security.authenticate_user(p_username => :P101_USERNAME,p_password => :P101_PASSWORD);'||chr(10)||
''||chr(10)||
'  if not l_pword or l_users = 0 then'||chr(10)||
'   return false;'||chr(10)||
'  else'||chr(10)||
'   return true;'||chr(10)||
'  end if;'||chr(10)||
'end;',
  p_validation_type => 'FUNC_BODY_RETURNING_BOOLEAN',
  p_error_message => 'Invalid username/password specified.',
  p_validation_condition_type=> 'NOT_DISPLAYING_INLINE_VALIDATION_ERRORS',
  p_associated_item=> 11076900282541526 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_IN_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 19501112167335550 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 101,
  p_validation_name => 'P101_PASSWORD Not Null',
  p_validation_sequence=> 20,
  p_validation => 'P101_PASSWORD',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition_type=> 'NOT_DISPLAYING_INLINE_VALIDATION_ERRORS',
  p_associated_item=> 11077026616541526 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 12-DEC-2007 14:51');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'begin'||chr(10)||
'owa_util.mime_header(''text/html'', FALSE);'||chr(10)||
'owa_cookie.send('||chr(10)||
'    name=>''LOGIN_USERNAME_COOKIE'','||chr(10)||
'    value=>lower(:P101_USERNAME));'||chr(10)||
'exception when others then null;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 11077303702541529 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 101,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Set Username Cookie',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'if #OWNER#.mip_parties.get_user_role(:P101_USERNAME)=''SUPPADMIN'' then'||chr(10)||
'  mip_security.login('||chr(10)||
'    P_UNAME       => :P101_USERNAME,'||chr(10)||
'    P_PASSWORD    => :P101_PASSWORD,'||chr(10)||
'    P_SESSION_ID  => v(''APP_SESSION''),'||chr(10)||
'    P_FLOW_PAGE   => :APP_ID ||'':60'''||chr(10)||
'    );'||chr(10)||
'else'||chr(10)||
'  mip_security.login('||chr(10)||
'    P_UNAME       => :P101_USERNAME,'||chr(10)||
'    P_PASSWORD    => :P101_PASSWORD,'||chr(10)||
'    P_SESSION_ID  => v(''APP_SESSION''),';

p:=p||''||chr(10)||
'    P_FLOW_PAGE   => :APP_ID ||'':30'''||chr(10)||
'    );'||chr(10)||
'end if;';

wwv_flow_api.create_page_process(
  p_id     => 11077221742541528 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 101,
  p_process_sequence=> 20,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Login',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'NEW_PASSWORD',
  p_process_when_type=>'REQUEST_NOT_EQUAL_CONDITION',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'mip_security.login('||chr(10)||
'    P_UNAME       => :P101_USERNAME,'||chr(10)||
'    P_PASSWORD    => :P101_PASSWORD,'||chr(10)||
'    P_SESSION_ID  => v(''APP_SESSION''),'||chr(10)||
'    P_FLOW_PAGE   => :APP_ID ||'':102'''||chr(10)||
'    );';

wwv_flow_api.create_page_process(
  p_id     => 17651106474864308 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 101,
  p_process_sequence=> 25,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'New_Password',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>17649720542858853 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'101';

wwv_flow_api.create_page_process(
  p_id     => 11077530152541529 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 101,
  p_process_sequence=> 30,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_PAGES',
  p_process_name=> 'Clear Page(s) Cache',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare'||chr(10)||
'    v varchar2(255) := null;'||chr(10)||
'    c owa_cookie.cookie;'||chr(10)||
'begin'||chr(10)||
'   c := owa_cookie.get(''LOGIN_USERNAME_COOKIE'');'||chr(10)||
'   :P101_USERNAME := c.vals(1);'||chr(10)||
'exception when others then null;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 11077421677541529 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 101,
  p_process_sequence=> 10,
  p_process_point=> 'BEFORE_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Get Username Cookie',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 101
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00102
prompt  ...PAGE 102: New Password
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 102,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'New Password',
  p_alias  => 'CHANGEPASSWORD',
  p_step_title=> 'New Password',
  p_step_sub_title => 'New Password',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'AUTO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 28655803265374130+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'MULLENM',
  p_last_upd_yyyymmddhh24miss => '20080124093105',
  p_page_is_public_y_n=> 'N',
  p_protection_level=> 'C',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 14230714666813715 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 102,
  p_plug_name=> 'Change Password',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 14230906426813739 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 102,
  p_button_sequence=> 10,
  p_button_plug_id => 14230714666813715+wwv_flow_api.g_id_offset,
  p_button_name    => 'CHANGE_PASSWORD',
  p_button_image_alt=> 'Change Password',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>14233413431813798 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 102,
  p_branch_action=> 'f?p=&APP_ID.:500:&SESSION.::&DEBUG.:::&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>14230906426813739+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 10,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>14231113399813751 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 102,
  p_name=>'P102_PREVIOUS_PAGE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 30,
  p_item_plug_id => 14230714666813715+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_protection_level => 'S',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>14231305151813775 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 102,
  p_name=>'P102_NEW_PASSWORD',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 14230714666813715+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Enter New Password',
  p_source_type=> 'STATIC',
  p_display_as=> 'PASSWORD',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'S',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>14231523360813775 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 102,
  p_name=>'P102_REPEAT_PASSWORD',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 14230714666813715+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Repeat Password',
  p_source_type=> 'STATIC',
  p_display_as=> 'PASSWORD',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 28046657494354449+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'S',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 14231825344813778 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 102,
  p_validation_name => 'P102_NEW_PASSWORD_not_null',
  p_validation_sequence=> 10,
  p_validation => 'P102_NEW_PASSWORD',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Please enter a password.',
  p_when_button_pressed=> 14230906426813739 + wwv_flow_api.g_id_offset,
  p_associated_item=> 14231305151813775 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 14232800281813786 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 102,
  p_validation_name => 'P102_PASSWORD_length',
  p_validation_sequence=> 20,
  p_validation => 'length(:P102_NEW_PASSWORD) >= 8',
  p_validation_type => 'SQL_EXPRESSION',
  p_error_message => 'Password must be at least 8 characters.',
  p_when_button_pressed=> 14230906426813739 + wwv_flow_api.g_id_offset,
  p_associated_item=> 14231305151813775 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 14232414737813781 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 102,
  p_validation_name => 'P102_PASSWORD_upper',
  p_validation_sequence=> 30,
  p_validation => 'P102_NEW_PASSWORD',
  p_validation2 => 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
  p_validation_type => 'ITEM_IN_VALIDATION_CONTAINS_AT_LEAST_ONE_CHAR_IN_STRING2',
  p_error_message => 'The password must contain both uppercase and lowercase characters.',
  p_when_button_pressed=> 14230906426813739 + wwv_flow_api.g_id_offset,
  p_associated_item=> 14231305151813775 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 14232014933813781 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 102,
  p_validation_name => 'P102_PASSWORD_lower',
  p_validation_sequence=> 40,
  p_validation => 'P102_NEW_PASSWORD',
  p_validation2 => 'abcdefghijklmnopqrstuvwxyz',
  p_validation_type => 'ITEM_IN_VALIDATION_CONTAINS_AT_LEAST_ONE_CHAR_IN_STRING2',
  p_error_message => 'The password must contain both uppercase and lowercase characters.',
  p_when_button_pressed=> 14230906426813739 + wwv_flow_api.g_id_offset,
  p_associated_item=> 14231305151813775 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 14233012756813786 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 102,
  p_validation_name => 'P102_PASSWORD_NUM',
  p_validation_sequence=> 50,
  p_validation => 'P102_NEW_PASSWORD',
  p_validation2 => '1234567890',
  p_validation_type => 'ITEM_IN_VALIDATION_CONTAINS_AT_LEAST_ONE_CHAR_IN_STRING2',
  p_error_message => 'Password must contain both alpha and numeric characters.',
  p_when_button_pressed=> 14230906426813739 + wwv_flow_api.g_id_offset,
  p_associated_item=> 14231305151813775 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 14232631849813786 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 102,
  p_validation_name => 'P102_PASSWORD_OTHER',
  p_validation_sequence=> 60,
  p_validation => 'P102_NEW_PASSWORD',
  p_validation2 => '`¬¦!"£$%^&*()_+-=[]{};''#:@~,./<>?\|€',
  p_validation_type => 'ITEM_IN_VALIDATION_CONTAINS_AT_LEAST_ONE_CHAR_IN_STRING2',
  p_error_message => 'Password must contain at least 1 non-alphanumeric character.',
  p_when_button_pressed=> 14230906426813739 + wwv_flow_api.g_id_offset,
  p_associated_item=> 14231305151813775 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 14232203043813781 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 102,
  p_validation_name => 'P102_REPEAT_PASSWORD',
  p_validation_sequence=> 70,
  p_validation => ':P102_NEW_PASSWORD = :P102_REPEAT_PASSWORD',
  p_validation_type => 'SQL_EXPRESSION',
  p_error_message => 'Passwords entered do not match.',
  p_when_button_pressed=> 14230906426813739 + wwv_flow_api.g_id_offset,
  p_associated_item=> 14231523360813775 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare'||chr(10)||
' l_party_id number;'||chr(10)||
'begin'||chr(10)||
'  /*select id'||chr(10)||
'    into l_party_id'||chr(10)||
'    from parties'||chr(10)||
'   where upper(username) = upper(v(''APP_USER''));*/'||chr(10)||
''||chr(10)||
'  -- do the insert'||chr(10)||
'  --insert into passwords(prty_id,password_hash, created_on, created_by)'||chr(10)||
'  --      values (l_party_id, :P102_NEW_PASSWORD, SYSDATE, NULL);'||chr(10)||
''||chr(10)||
'  mip_security.new_password(:APP_USER, :P102_NEW_PASSWORD);'||chr(10)||
'exception'||chr(10)||
'  when others then'||chr(10)||
'';

p:=p||'  null;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 14233104018813787 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 102,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Change_Password',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Failed to update password.',
  p_process_when_button_id=>14230906426813739 + wwv_flow_api.g_id_offset,
  p_process_success_message=> 'Password updated.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 102
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00103
prompt  ...PAGE 103: Forgotten Password
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 103,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Forgotten Password',
  p_alias  => 'FORGOTTEN_PWORD',
  p_step_title=> 'Forgotten Password',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 28663418596435255+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'MULLENM',
  p_last_upd_yyyymmddhh24miss => '20080124093114',
  p_page_is_public_y_n=> 'Y',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'Please contact your system administrator to reset your password.';

wwv_flow_api.create_page_plug (
  p_id=> 17654618033877037 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 103,
  p_plug_name=> 'Forgotten Password',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 17659421412897000 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 103,
  p_button_sequence=> 10,
  p_button_plug_id => 17654618033877037+wwv_flow_api.g_id_offset,
  p_button_name    => 'OK',
  p_button_image_alt=> 'OK',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>17659716517897000 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 103,
  p_branch_action=> 'f?p=&FLOW_ID.:101:&SESSION.::&DEBUG.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>17659421412897000+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 10,
  p_branch_comment=> '');
 
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 103
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00500
prompt  ...PAGE 500: Logout
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 500,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Logout',
  p_step_title=> 'Logout',
  p_step_sub_title => 'Logout',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 28663418596435255+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'MULLENM',
  p_last_upd_yyyymmddhh24miss => '20080306111043',
  p_page_is_public_y_n=> 'Y',
  p_protection_level=> 'C',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'You have successfully logged out.'||chr(10)||
'';

wwv_flow_api.create_page_plug (
  p_id=> 14236201691816508 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 500,
  p_plug_name=> 'Logout',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>14236724896816509 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 500,
  p_branch_action=> 'f?p=&APP_ID.:101:&SESSION.::&DEBUG.:::',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 99,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>14236414477816509 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 500,
  p_name=>'P500_LOG_BACK_IN',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 14236201691816508+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default => 'Login',
  p_prompt=>'Login',
  p_source=>'Login',
  p_source_type=> 'STATIC',
  p_display_as=> 'BUTTON',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_tag_attributes  => 'id="login" name = "login"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'N',
  p_protection_level => 'S',
  p_item_comment => '');
 
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 500
--
 
begin
 
null;
end;
null;
 
end;
/

 
--application/pages/page_00501
prompt  ...PAGE 501: Account Locked
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 501,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Account Locked',
  p_step_title=> 'Account Locked',
  p_step_sub_title => 'Account Locked',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'HARDYA',
  p_last_upd_yyyymmddhh24miss => '20071128124854',
  p_page_is_public_y_n=> 'Y',
  p_protection_level=> 'C',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'The user account specified is locked.'||chr(10)||
''||chr(10)||
'Please contact the system administrator.'||chr(10)||
'';

wwv_flow_api.create_page_plug (
  p_id=> 14330607683043253 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 501,
  p_plug_name=> 'Logout',
  p_region_name=>'',
  p_plug_template=> 28038130488354430+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>14331114916043262 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 501,
  p_branch_action=> 'f?p=&APP_ID.:101:&SESSION.::&DEBUG.:::',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 99,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>14330806117043259 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 501,
  p_name=>'P501_LOG_BACK_IN',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 14330607683043253+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default => 'Login',
  p_prompt=>'Login',
  p_source=>'Login',
  p_source_type=> 'STATIC',
  p_display_as=> 'BUTTON',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'N',
  p_protection_level => 'S',
  p_item_comment => '');
 
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 501
--
 
begin
 
null;
end;
null;
 
end;
/

prompt  ...lists
--
--application/shared_components/navigation/lists/treelist
 
begin
 
wwv_flow_api.create_list (
  p_id=> 17079628035001319 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'TreeList',
  p_list_status=> 'PUBLIC',
  p_list_displayed=> 'BY_DEFAULT',
  p_display_row_template_id=> 28044339573354443 + wwv_flow_api.g_id_offset);
 
null;
 
end;
/

--application/shared_components/navigation/lists/webmip_menu
 
begin
 
wwv_flow_api.create_list (
  p_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'webmip_menu',
  p_list_status=> 'PUBLIC',
  p_list_displayed=> 'BY_DEFAULT',
  p_display_row_template_id=> 28044339573354443 + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_list_item (
  p_id=> 17184406243748992 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>100,
  p_list_item_link_text=> 'Home',
  p_list_item_link_target=> 'f?p=&APP_ID.:1:&SESSION.::&DEBUG.::::',
  p_list_item_disp_cond_type=> 'CURRENT_PAGE_NOT_IN_CONDITION',
  p_list_item_disp_condition=> '102',
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '1',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 17183506934748992 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>200,
  p_list_item_link_text=> 'Administration',
  p_list_item_link_target=> 'f?p=&APP_ID.:40:&SESSION.::&DEBUG.::::',
  p_list_item_disp_cond_type=> 'CURRENT_PAGE_IN_CONDITION',
  p_list_item_disp_condition=> '5,18,19,23,24,40,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,90,91,95,96',
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '5:7:18:19:23:24:40:50:56:51:52:53:54:55:57:58:59:60:61:62:63:64:65:90:91:95:96',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 17185605094748994 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>210,
  p_list_item_link_text=> 'Housings',
  p_list_item_link_target=> 'f?p=&APP_ID.:54:&SESSION.::&DEBUG.::::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'')',
  p_parent_list_item_id=> 17183506934748992 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '54',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 36108717077107173 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>220,
  p_list_item_link_text=> 'Additional Items',
  p_list_item_link_target=> 'f?p=&APP_ID.:23:&SESSION.::&DEBUG.::::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'')',
  p_parent_list_item_id=> 17183506934748992 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '23:24',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 17184112268748992 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>230,
  p_list_item_link_text=> 'Data Export',
  p_list_item_link_target=> 'f?p=&APP_ID.:5:&SESSION.::&DEBUG.::::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'')',
  p_parent_list_item_id=> 17183506934748992 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '5',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 17183814449748992 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>240,
  p_list_item_link_text=> 'Bases',
  p_list_item_link_target=> 'f?p=&APP_ID.:50:&SESSION.::&DEBUG.::::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'')',
  p_parent_list_item_id=> 17183506934748992 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '50',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 23908601637454725 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>245,
  p_list_item_link_text=> 'Drawings',
  p_list_item_link_target=> 'f?p=&APP_ID.:52:&SESSION.::&DEBUG.::::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'')',
  p_parent_list_item_id=> 17183506934748992 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '52:53',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 17185916358748994 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>250,
  p_list_item_link_text=> 'Modules',
  p_list_item_link_target=> 'f?p=&APP_ID.:56:&SESSION.::&DEBUG.::::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'')',
  p_parent_list_item_id=> 17183506934748992 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '56',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 24651822321335222 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>255,
  p_list_item_link_text=> 'Caveats',
  p_list_item_link_target=> 'f?p=&APP_ID.:58:&SESSION.::&DEBUG.::::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'')',
  p_parent_list_item_id=> 17183506934748992 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '58:59',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 24652509985341086 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>256,
  p_list_item_link_text=> 'Create Caveat',
  p_list_item_link_target=> 'f?p=&APP_ID.:59:&SESSION.::&DEBUG.:59:::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'')',
  p_parent_list_item_id=> 24651822321335222 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '59',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 19236704960763690 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>260,
  p_list_item_link_text=> 'User Management',
  p_list_item_link_target=> 'f?p=&APP_ID.:60:&SESSION.::&DEBUG.::::',
  p_parent_list_item_id=> 17183506934748992 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '60:61:62:63:64:65:66:67:68:69:70',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 21098121400478281 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>261,
  p_list_item_link_text=> 'Create Party',
  p_list_item_link_target=> 'f?p=&APP_ID.:61:&SESSION.::&DEBUG.:61, 62, 63, 64:::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''useradmin'')',
  p_parent_list_item_id=> 19236704960763690 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '60:61:62:63:64:68',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 21098430750481048 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>262,
  p_list_item_link_text=> 'Edit Parties',
  p_list_item_link_target=> 'f?p=&APP_ID.:65:&SESSION.::&DEBUG.::::',
  p_parent_list_item_id=> 19236704960763690 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '65:66:67:69:70',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 19145420310626219 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>270,
  p_list_item_link_text=> 'Costs',
  p_list_item_link_target=> '',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'')',
  p_parent_list_item_id=> 17183506934748992 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '18:19',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 17182307413748990 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>272,
  p_list_item_link_text=> 'Labour Costs',
  p_list_item_link_target=> 'f?p=&APP_ID.:18:&SESSION.::&DEBUG.:RP:P18_REQUIRED_COST_TYPE:LACO:',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'')',
  p_parent_list_item_id=> 19145420310626219 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'PLSQL_EXPRESSION',
  p_list_item_current_for_pages=> ':APP_PAGE_ID=18 and :P18_REQUIRED_COST_TYPE=''LACO'' or :APP_PAGE_ID=19 and :P19_REQUIRED_COST_TYPE=''LACO''',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 18431828720835130 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>274,
  p_list_item_link_text=> 'Module Costs',
  p_list_item_link_target=> 'f?p=&APP_ID.:18:&SESSION.::&DEBUG.:RP:P18_REQUIRED_COST_TYPE:MOCO:',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'')',
  p_parent_list_item_id=> 19145420310626219 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'PLSQL_EXPRESSION',
  p_list_item_current_for_pages=> ':APP_PAGE_ID=18 and :P18_REQUIRED_COST_TYPE=''MOCO'' or :APP_PAGE_ID=19 and :P19_REQUIRED_COST_TYPE=''MOCO''',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 17182625071748990 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>276,
  p_list_item_link_text=> 'Base Costs',
  p_list_item_link_target=> 'f?p=&APP_ID.:18:&SESSION.::&DEBUG.:RP:P18_REQUIRED_COST_TYPE:BACO:',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'')',
  p_parent_list_item_id=> 19145420310626219 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'PLSQL_EXPRESSION',
  p_list_item_current_for_pages=> ':APP_PAGE_ID=18 and :P18_REQUIRED_COST_TYPE=''BACO'' or :APP_PAGE_ID=19 and :P19_REQUIRED_COST_TYPE=''BACO''',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 17182909576748990 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>278,
  p_list_item_link_text=> 'Housing Costs',
  p_list_item_link_target=> 'f?p=&APP_ID.:18:&SESSION.::&DEBUG.:RP:P18_REQUIRED_COST_TYPE:HOCO:',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'')',
  p_parent_list_item_id=> 19145420310626219 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'PLSQL_EXPRESSION',
  p_list_item_current_for_pages=> ':APP_PAGE_ID=18 and :P18_REQUIRED_COST_TYPE=''HOCO'' or :APP_PAGE_ID=19 and :P19_REQUIRED_COST_TYPE=''HOCO''',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 17183209541748992 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>279,
  p_list_item_link_text=> 'Additional Item Costs',
  p_list_item_link_target=> 'f?p=&APP_ID.:18:&SESSION.::&DEBUG.:RP:P18_REQUIRED_COST_TYPE:AICO:',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'')',
  p_parent_list_item_id=> 19145420310626219 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'PLSQL_EXPRESSION',
  p_list_item_current_for_pages=> ':APP_PAGE_ID=18 and :P18_REQUIRED_COST_TYPE=''AICO'' or :APP_PAGE_ID=19 and :P19_REQUIRED_COST_TYPE=''AICO''',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 32705122119927380 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>280,
  p_list_item_link_text=> 'Postcodes',
  p_list_item_link_target=> 'f?p=&APP_ID.:96:&SESSION.::&DEBUG.:95:::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'')',
  p_parent_list_item_id=> 17183506934748992 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '95:96',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 35247127164725755 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>282,
  p_list_item_link_text=> 'Create Postcode',
  p_list_item_link_target=> 'f?p=&APP_ID.:95:&SESSION.::&DEBUG.:95:::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'')',
  p_parent_list_item_id=> 32705122119927380 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '95',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 35216703381577017 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>290,
  p_list_item_link_text=> 'Non-Tripartite Exclusions',
  p_list_item_link_target=> 'f?p=&APP_ID.:91:&SESSION.::&DEBUG.::::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'')',
  p_parent_list_item_id=> 17183506934748992 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '91:90',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 35217822774582633 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>292,
  p_list_item_link_text=> 'Create Exclusion',
  p_list_item_link_target=> 'f?p=&APP_ID.:90:&SESSION.::&DEBUG.:90:::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'')',
  p_parent_list_item_id=> 35216703381577017 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '90',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 17186214869748994 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>201,
  p_list_item_link_text=> 'Administration',
  p_list_item_link_target=> 'f?p=&APP_ID.:40:&SESSION.::&DEBUG.::::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''adminmenu'') and (:APP_PAGE_ID = 14 or :APP_PAGE_ID = 30 or :APP_PAGE_ID = 31 or :APP_PAGE_ID = 32 or :APP_PAGE_ID = 41 or :APP_PAGE_ID = 80 or :APP_PAGE_ID = 81 or :APP_PAGE_ID = 82 or :APP_PAGE_ID = 3 or :APP_PAGE_ID = 6 or :APP_PAGE_ID = 1 or :APP_PAGE_ID = 101 or :APP_PAGE_ID = 103 or :APP_PAGE_ID = 500 or :APP_PAGE_ID = 501)',
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 17184720394748992 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>300,
  p_list_item_link_text=> 'Enquiries',
  p_list_item_link_target=> 'f?p=&APP_ID.:30:&SESSION.::&DEBUG.:32:::',
  p_list_item_disp_cond_type=> 'CURRENT_PAGE_IN_CONDITION',
  p_list_item_disp_condition=> '30,31,32',
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '30,31,32',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 32282424154030933 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>310,
  p_list_item_link_text=> 'Create Enquiry',
  p_list_item_link_target=> 'f?p=&APP_ID.:32:&SESSION.::&DEBUG.:32:::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '(:P32_ID is null or #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') and #OWNER#.mip_security.page_authorization(v(''APP_USER''),32,''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),32,''R'')',
  p_parent_list_item_id=> 17184720394748992 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '32',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 17187123386748995 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>320,
  p_list_item_link_text=> 'Search for Enquiry',
  p_list_item_link_target=> 'f?p=&APP_ID.:30:&SESSION.::&DEBUG.:RP,30,32:::',
  p_parent_list_item_id=> 17184720394748992 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '30',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 32284526625060019 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>330,
  p_list_item_link_text=> 'Edit Enquiry',
  p_list_item_link_target=> 'f?p=&APP_ID.:32:&SESSION.::&DEBUG.::::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> 'not :P32_ID is null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP'' and #OWNER#.mip_security.page_authorization(v(''APP_USER''),32,''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),32,''R'')'||chr(10)||
''||chr(10)||
'',
  p_parent_list_item_id=> 17184720394748992 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '32',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 24649625391307659 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>301,
  p_list_item_link_text=> 'Enquiries',
  p_list_item_link_target=> 'f?p=&APP_ID.:30:&SESSION.::&DEBUG.::::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''enqumenu'') and (:APP_PAGE_ID <> 30 and :APP_PAGE_ID <> 31 and :APP_PAGE_ID <> 32 and :APP_PAGE_ID <> 102)',
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 17185000287748994 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>400,
  p_list_item_link_text=> 'Quotes',
  p_list_item_link_target=> 'f?p=&APP_ID.:14:&SESSION.::&DEBUG.:14:::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''quotemenu'') and (:APP_PAGE_ID <> 14 and :APP_PAGE_ID <> 80 and :APP_PAGE_ID <> 81 and :APP_PAGE_ID <> 82 and :APP_PAGE_ID <> 102)',
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 30540406557958066 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>401,
  p_list_item_link_text=> 'Quotes',
  p_list_item_link_target=> 'f?p=&APP_ID.:14:&SESSION.::&DEBUG.::::',
  p_list_item_disp_cond_type=> 'CURRENT_PAGE_IN_CONDITION',
  p_list_item_disp_condition=> '14,80,81,82',
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '14:80:81:82',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 30542204395976291 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>420,
  p_list_item_link_text=> 'Search for Quote',
  p_list_item_link_target=> 'f?p=&APP_ID.:14:&SESSION.::&DEBUG.:14:::',
  p_parent_list_item_id=> 30540406557958066 + wwv_flow_api.g_id_offset,
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '14',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 47911226514342195 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>430,
  p_list_item_link_text=> 'Design Selection Tool',
  p_list_item_link_target=> 'f?p=&APP_ID.:4:&SESSION.::&DEBUG.::::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''icadmin'') and (:APP_PAGE_ID <> 102)',
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 17185331917748994 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>500,
  p_list_item_link_text=> 'Logout',
  p_list_item_link_target=> '&LOGOUT_URL.',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> 'APEX_CUSTOM_AUTH.IS_SESSION_VALID',
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 29857330523875620 + wwv_flow_api.g_id_offset,
  p_list_id=> 17182006546748989 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>510,
  p_list_item_link_text=> 'Login',
  p_list_item_link_target=> 'f?p=&APP_ID.:101:&SESSION.::&DEBUG.:101:::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> 'not(APEX_CUSTOM_AUTH.IS_SESSION_VALID) and (:APP_PAGE_ID <> 102)',
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_owner=> '');
 
null;
 
end;
/

--application/shared_components/navigation/breadcrumbs
prompt  ...breadcrumbs
--
 
begin
 
wwv_flow_api.create_menu (
  p_id=> 11077629635541529 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> ' Breadcrumb');
 
wwv_flow_api.create_menu_option (
  p_id=>11077908938541536 + wwv_flow_api.g_id_offset,
  p_menu_id=>11077629635541529 + wwv_flow_api.g_id_offset,
  p_parent_id=>0,
  p_option_sequence=>10,
  p_short_name=>'login',
  p_long_name=>'',
  p_link=>'f?p=&APP_ID.:101:&SESSION.::&DEBUG.:::',
  p_page_id=>1,
  p_also_current_for_pages=> '');
 
null;
 
end;
/

prompt  ...page templates for application: 155
--
--application/shared_components/user_interface/templates/page/no_tabs
prompt  ......Page template 28031530009354416
 
begin
 
declare
  c1 varchar2(32767) := null;
  c2 varchar2(32767) := null;
  c3 varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
c1:=c1||'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"'||chr(10)||
'"http://www.w3.org/TR/html4/loose.dtd">'||chr(10)||
''||chr(10)||
'<html lang="&BROWSER_LANGUAGE."'||chr(10)||
'      xmlns:htmldb="http://htmldb.oracle.com">'||chr(10)||
'<head>'||chr(10)||
'  <title>#TITLE#</title>'||chr(10)||
'  <link rel="stylesheet"'||chr(10)||
'        href="#IMAGE_PREFIX#ng_common.css"'||chr(10)||
'        type="text/css">'||chr(10)||
'</head>'||chr(10)||
''||chr(10)||
'<body>'||chr(10)||
'  #HEAD# #FORM_OPEN#'||chr(10)||
''||chr(10)||
'  <div id="rowHd">'||chr(10)||
'    <div id="logo"';

c1:=c1||''||chr(10)||
'         class="hskpcol1">'||chr(10)||
'      <a href="http://www.nationalgrid.com/"><img src='||chr(10)||
'      "#IMAGE_PREFIX#ng_logo_group_medium.gif"'||chr(10)||
'           alt="National Grid Metering"'||chr(10)||
'           width="200"'||chr(10)||
'           height="43"></a>'||chr(10)||
'    </div>'||chr(10)||
''||chr(10)||
'    <div id="navHousekeep"'||chr(10)||
'         class="hskpcol2">'||chr(10)||
'      <div class="margin5">'||chr(10)||
'        <a href="holdingpagefortheICOQsystem"'||chr(10)||
'             class="hskpnav';

c1:=c1||'"'||chr(10)||
'             title='||chr(10)||
'             "Return to the Metering Online Quotations Home Page"'||chr(10)||
'             accesskey="1">Home</a> | <a href="&LOGOUT_URL."'||chr(10)||
'             class="hskpnav"'||chr(10)||
'             title="Log out of the system"'||chr(10)||
'             accesskey="2">Logout</a> | '||chr(10)||
'             <!--a href="/group/help" class="hskpnav">Help</a>&nbsp;|&nbsp;--><span>'||chr(10)||
'        You are logged in as:&APP_USER.</span';

c1:=c1||'>'||chr(10)||
'      </div>'||chr(10)||
'    </div>'||chr(10)||
'  </div>'||chr(10)||
''||chr(10)||
'  <div id="rowSiteNav">'||chr(10)||
'    <p>I &amp; C Online Quotation System'||chr(10)||
'    &SYSTEM_ENVIRONMENT.</p>'||chr(10)||
'  </div>';

c2:=c2||'<div id="rowFooter"><!-- bottom strip of info -->'||chr(10)||
'	'||chr(10)||
'	<div class="clear"></div>'||chr(10)||
'	<div class="access"><hr></div>'||chr(10)||
''||chr(10)||
'	'||chr(10)||
'	<div class="hskpcol1"><!-- copyright box -->'||chr(10)||
'		<div id="copyright">Copyright &copy; <!--2006--><span id="Pagefooter_lblYear">2008</span> National Grid, Copyright &copy; 2008 Advantica Ltd.</div>'||chr(10)||
'	</div>'||chr(10)||
'	'||chr(10)||
'	<div class="hskpcol2">'||chr(10)||
'		<div id="navFooter">'||chr(10)||
'                     ';

c2:=c2||'   <a href="&HELP_URL.">Help</a> | '||chr(10)||
'			<a href="&T_AND_C_URL." target="blank">Terms &amp; conditions</a>'||chr(10)||
''||chr(10)||
'			| <a href="&PRIVACY_URL.">Privacy policy</a>'||chr(10)||
'                        | <span style="color:#0067c6; text-decoration:none" id="app_version">#APP_VERSION#</span>'||chr(10)||
'		</div>'||chr(10)||
'	</div>'||chr(10)||
'	'||chr(10)||
'</div>'||chr(10)||
'#REGION_POSITION_05#'||chr(10)||
'#FORM_CLOSE# '||chr(10)||
'</body>'||chr(10)||
'</html>';

c3:=c3||'  <div id="UKSubNav"'||chr(10)||
'       class="reg">'||chr(10)||
'    #REGION_POSITION_01#'||chr(10)||
'  </div>'||chr(10)||
''||chr(10)||
'  <div id="rowContent">'||chr(10)||
'    <div id="colLeft">'||chr(10)||
'      <div id="navTier"'||chr(10)||
'           class="w180">'||chr(10)||
'        #REGION_POSITION_08#'||chr(10)||
'      </div>'||chr(10)||
'    </div>'||chr(10)||
''||chr(10)||
'    <div id="colMid">'||chr(10)||
'      #BOX_BODY# #REGION_POSITION_02# #REGION_POSITION_03#'||chr(10)||
'      #REGION_POSITION_04#'||chr(10)||
'    </div>'||chr(10)||
''||chr(10)||
'    <div id="colRight">'||chr(10)||
'      <h1 c';

c3:=c3||'lass="podTitle"><img src='||chr(10)||
'      "#IMAGE_PREFIX#ng_exclaim.gif"'||chr(10)||
'           alt=""'||chr(10)||
'           width="23"'||chr(10)||
'           height="23">Important Messages</h1>'||chr(10)||
''||chr(10)||
'      <div class="t4messages">'||chr(10)||
'        #GLOBAL_NOTIFICATION##SUCCESS_MESSAGE##NOTIFICATION_MESSAGE#'||chr(10)||
'      </div>'||chr(10)||
'    </div>'||chr(10)||
'  </div>';

wwv_flow_api.create_template(
  p_id=> 28031530009354416 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'No Tabs',
  p_body_title=> '',
  p_header_template=> c1,
  p_box=> c3,
  p_footer_template=> c2,
  p_success_message=> '<div class="t4success">#SUCCESS_MESSAGE#</div>',
  p_current_tab=> '',
  p_current_tab_font_attr=> '',
  p_non_current_tab=> '',
  p_non_current_tab_font_attr => '',
  p_top_current_tab=> '',
  p_top_current_tab_font_attr => '',
  p_top_non_curr_tab=> '',
  p_top_non_curr_tab_font_attr=> '',
  p_current_image_tab=> '',
  p_non_current_image_tab=> '',
  p_notification_message=> '<div class="t4notification">#MESSAGE#</div>',
  p_navigation_bar=> '',
  p_navbar_entry=> '<li><img src="#IMAGE_PREFIX#ng_black.gif" alt=""><a href="#LINK#">#TEXT#</a></li>',
  p_app_tab_before_tabs=>'',
  p_app_tab_current_tab=>'',
  p_app_tab_non_current_tab=>'',
  p_app_tab_after_tabs=>'',
  p_region_table_cattributes=> ' summary="" cellpadding="0" border="0" cellspacing="0" width="100%"',
  p_sidebar_def_reg_pos => 'REGION_POSITION_02',
  p_breadcrumb_def_reg_pos => 'REGION_POSITION_01',
  p_theme_id  => 101,
  p_theme_class_id => 3,
  p_template_comment => '');
end;
 
null;
 
end;
/

--application/shared_components/user_interface/templates/page/popup
prompt  ......Page template 28032741339354418
 
begin
 
declare
  c1 varchar2(32767) := null;
  c2 varchar2(32767) := null;
  c3 varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
c1:=c1||'<html lang="&BROWSER_LANGUAGE." xmlns:htmldb="http://htmldb.oracle.com">'||chr(10)||
'<head>'||chr(10)||
'<title>#TITLE#</title>'||chr(10)||
'<link rel="stylesheet" href="#IMAGE_PREFIX#themes/theme_4/theme_V3.css" type="text/css" />'||chr(10)||
'#HEAD#'||chr(10)||
'</head>'||chr(10)||
'<body #ONLOAD#>#FORM_OPEN#';

c2:=c2||'#FORM_CLOSE#</body>'||chr(10)||
'</html>';

c3:=c3||'<table summary="" cellpadding="0" width="100%" cellspacing="0" border="0">'||chr(10)||
'<tr>'||chr(10)||
'<td width="100%" valign="top"><div class="t4messages">#SUCCESS_MESSAGE##NOTIFICATION_MESSAGE#</div>#BOX_BODY##REGION_POSITION_01##REGION_POSITION_02##REGION_POSITION_04##REGION_POSITION_05##REGION_POSITION_06##REGION_POSITION_07##REGION_POSITION_08#</td>'||chr(10)||
'<td valign="top">#REGION_POSITION_03#<br /></td>'||chr(10)||
'</tr>'||chr(10)||
'</table>';

wwv_flow_api.create_template(
  p_id=> 28032741339354418 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'Popup',
  p_body_title=> '',
  p_header_template=> c1,
  p_box=> c3,
  p_footer_template=> c2,
  p_success_message=> '<div class="t4success">#SUCCESS_MESSAGE#</div>',
  p_current_tab=> '',
  p_current_tab_font_attr=> '',
  p_non_current_tab=> '',
  p_non_current_tab_font_attr => '',
  p_top_current_tab=> '',
  p_top_current_tab_font_attr => '',
  p_top_non_curr_tab=> '',
  p_top_non_curr_tab_font_attr=> '',
  p_current_image_tab=> '',
  p_non_current_image_tab=> '',
  p_notification_message=> '<div class="t4notification">#MESSAGE#</div>',
  p_navigation_bar=> '<div class="t4NavigationBar">#BAR_BODY#</div>',
  p_navbar_entry=> '<a href="#LINK#" class="t4NavigationBar">#TEXT#</a>',
  p_app_tab_before_tabs=>'',
  p_app_tab_current_tab=>'',
  p_app_tab_non_current_tab=>'',
  p_app_tab_after_tabs=>'',
  p_region_table_cattributes=> ' summary="" cellpadding="0" border="0" cellspacing="0" width="100%"',
  p_theme_id  => 101,
  p_theme_class_id => 4,
  p_translate_this_template => 'N',
  p_template_comment => '');
end;
 
null;
 
end;
/

--application/shared_components/user_interface/templates/page/printer_friendly
prompt  ......Page template 28033049158354418
 
begin
 
declare
  c1 varchar2(32767) := null;
  c2 varchar2(32767) := null;
  c3 varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
c1:=c1||'<html lang="&BROWSER_LANGUAGE." xmlns:htmldb="http://htmldb.oracle.com">'||chr(10)||
'<head>'||chr(10)||
'<title>#TITLE#</title>'||chr(10)||
'<link rel="stylesheet" href="#IMAGE_PREFIX#themes/theme_4/theme_V3.css" type="text/css" />'||chr(10)||
'#HEAD#'||chr(10)||
'</head>'||chr(10)||
'<body #ONLOAD#>#FORM_OPEN#';

c2:=c2||'#FORM_CLOSE#</body>'||chr(10)||
'</html>';

c3:=c3||'<table summary="" cellpadding="0" width="100%" cellspacing="0" border="0">'||chr(10)||
'<tr>'||chr(10)||
'<td valign="top">#LOGO##REGION_POSITION_06#</td>'||chr(10)||
'<td width="100%" valign="top">#REGION_POSITION_07#</td>'||chr(10)||
'<td valign="top">#REGION_POSITION_08#</td>'||chr(10)||
'</table>'||chr(10)||
'<table summary="" cellpadding="0" width="100%" cellspacing="0" border="0">'||chr(10)||
'<tr>'||chr(10)||
'<td width="100%" valign="top">'||chr(10)||
'<div style="border:1px solid black;">#SUCCESS_MESSAG';

c3:=c3||'E##NOTIFICATION_MESSAGE#</div>'||chr(10)||
'#BOX_BODY##REGION_POSITION_04#</td>'||chr(10)||
'<td valign="top">#REGION_POSITION_03#<br /></td>'||chr(10)||
'</tr>'||chr(10)||
'</table>'||chr(10)||
'#REGION_POSITION_05#'||chr(10)||
''||chr(10)||
'';

wwv_flow_api.create_template(
  p_id=> 28033049158354418 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'Printer Friendly',
  p_body_title=> '',
  p_header_template=> c1,
  p_box=> c3,
  p_footer_template=> c2,
  p_success_message=> '<div class="t4success">#SUCCESS_MESSAGE#</div>',
  p_current_tab=> '',
  p_current_tab_font_attr=> '',
  p_non_current_tab=> '',
  p_non_current_tab_font_attr => '',
  p_top_current_tab=> '',
  p_top_current_tab_font_attr => '',
  p_top_non_curr_tab=> '',
  p_top_non_curr_tab_font_attr=> '',
  p_current_image_tab=> '',
  p_non_current_image_tab=> '',
  p_notification_message=> '<div class="t4notification">#MESSAGE#</div>',
  p_navigation_bar=> '<div class="t4NavigationBar">#BAR_BODY#</div>',
  p_navbar_entry=> '<a href="#LINK#" class="t4NavigationBar">#TEXT#</a>',
  p_app_tab_before_tabs=>'',
  p_app_tab_current_tab=>'',
  p_app_tab_non_current_tab=>'',
  p_app_tab_after_tabs=>'',
  p_region_table_cattributes=> ' summary="" cellpadding="0" border="0" cellspacing="0" width="100%"',
  p_theme_id  => 101,
  p_theme_class_id => 5,
  p_translate_this_template => 'N',
  p_template_comment => '3');
end;
 
null;
 
end;
/

--application/shared_components/user_interface/templates/page/errorpage
prompt  ......Page template 42209241448421762
 
begin
 
declare
  c1 varchar2(32767) := null;
  c2 varchar2(32767) := null;
  c3 varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
c1:=c1||'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml1-transitional.dtd">'||chr(10)||
'<html lang="&BROWSER_LANGUAGE." xmlns:htmldb="http://htmldb.oracle.com">'||chr(10)||
'<head>'||chr(10)||
'<title>#TITLE#</title>'||chr(10)||
'<link rel="stylesheet" href="#IMAGE_PREFIX#ng_common.css" type="text/css" />'||chr(10)||
'#HEAD#'||chr(10)||
'</head>'||chr(10)||
'<body #ONLOAD#>#FORM_OPEN#'||chr(10)||
'<div id="rowHd">'||chr(10)||
'<div id="logo" class="hskpcol';

c1:=c1||'1">'||chr(10)||
'<a href="http://www.nationalgrid.com/"><img src="#IMAGE_PREFIX#ng_logo_group_medium.gif" alt="National Grid Metering"/></a>'||chr(10)||
'</div>'||chr(10)||
'<div id="navHousekeep" class="hskpcol2">'||chr(10)||
'<div class="margin5">'||chr(10)||
'<a href="holdingpagefortheICOQsystem" class="hskpnav" title="Return to the Metering Online Quotations Home Page" accesskey="1">Home</a>&nbsp;|&nbsp;<a href="&LOGOUT_URL." class="hskpnav" title="Log';

c1:=c1||' out of the system" accesskey="2">Logout</a>&nbsp;|&nbsp;<!--a href="/group/help" class="hskpnav">Help</a>&nbsp;|&nbsp;--><span>You are logged in as:&APP_USER.</span>'||chr(10)||
'</div>'||chr(10)||
'</div>'||chr(10)||
'</div>'||chr(10)||
'<div id="rowSiteNav">'||chr(10)||
'<p>I &amp; C Online Quotation System &SYSTEM_ENVIRONMENT.</p> '||chr(10)||
'</div>'||chr(10)||
''||chr(10)||
'<script type="text/javascript">'||chr(10)||
''||chr(10)||
'function MyErrorPage(p_err_item,p_err_process)'||chr(10)||
'{'||chr(10)||
''||chr(10)||
' var vElementList = nul';

c1:=c1||'l;'||chr(10)||
' var vElement     = null;'||chr(10)||
' var vErrorStack  = null;'||chr(10)||
' var vOraErrorStack = null;'||chr(10)||
' var vOraError    = null;'||chr(10)||
' var vOraCode     = null;'||chr(10)||
' var vAjaxRequest = null;'||chr(10)||
' var vAjaxResult  = null;'||chr(10)||
' var vMyMsg       = '''';'||chr(10)||
''||chr(10)||
'if (!document.getElementById)'||chr(10)||
' return;'||chr(10)||
''||chr(10)||
'if (!document.createElement)'||chr(10)||
' return;'||chr(10)||
''||chr(10)||
' vElementList = window.document.getElementsByTagName("div");'||chr(10)||
' for (i=0; i < vElementList.len';

c1:=c1||'gth; i++)'||chr(10)||
' {'||chr(10)||
'  vElement = vElementList[i];'||chr(10)||
' '||chr(10)||
'  if (vElement.className == "ErrorPageMessage")'||chr(10)||
'  {'||chr(10)||
'    vErrorStack = (vErrorStack ==null?"":vErrorStack)+vElement.innerHTML;'||chr(10)||
'    vOraErrorStack = vErrorStack.split("ORA-");'||chr(10)||
'   if (vOraErrorStack.length > 1 ) {'||chr(10)||
'      vElement.innerHTML = ''''; '||chr(10)||
'      for(var j=1; j < vOraErrorStack.length; j++) {'||chr(10)||
'        vOraError = vOraErrorStack[j];'||chr(10)||
'        ';

c1:=c1||'vAjaxRequest = new htmldb_Get(null,&APP_ID.,''APPLICATION_PROCESS=''+p_err_process,0);'||chr(10)||
'        vAjaxRequest.add(p_err_item,vOraError);'||chr(10)||
'        vAjaxResult = vAjaxRequest.get();'||chr(10)||
'        if (vAjaxResult) {'||chr(10)||
'          vMyMsg = vMyMsg + vAjaxResult;'||chr(10)||
'        } else {'||chr(10)||
'          vMyMsg = vMyMsg + vOraError.substring(0);'||chr(10)||
'        }'||chr(10)||
'      }'||chr(10)||
'    }'||chr(10)||
'if (document.getElementById && document.createElement ';

c1:=c1||'&& vMyMsg.length > 0) {'||chr(10)||
'   var divA = document.getElementById(''ErrorOutputDiv'');'||chr(10)||
'   var oH = document.createElement(''h1'');'||chr(10)||
'   oH.appendChild(document.createTextNode(''Validation failed because:''));'||chr(10)||
'   var oP = document.createElement(''p'');'||chr(10)||
'   oP.id = ''FriendlyError'';'||chr(10)||
'   oP.appendChild(document.createTextNode(vMyMsg));'||chr(10)||
'   // Insert the heading as the first child of the element'||chr(10)||
'   divA.insertB';

c1:=c1||'efore(oP, divA.firstChild);'||chr(10)||
'   divA.insertBefore(oH, divA.firstChild);'||chr(10)||
'   }'||chr(10)||
'  }'||chr(10)||
' }'||chr(10)||
'}'||chr(10)||
'</script>'||chr(10)||
''||chr(10)||
'<body onload="MyErrorPage(''ORA_ERR_CODE'',''getErrorMsg'')" #ONLOAD#>#FORM_OPEN#'||chr(10)||
''||chr(10)||
'';

c2:=c2||'<div id="rowFooter"><!-- bottom strip of info -->'||chr(10)||
'	'||chr(10)||
'	<div class="clear"></div>'||chr(10)||
'	<div class="access"><hr></div>'||chr(10)||
''||chr(10)||
'	'||chr(10)||
'	<div class="hskpcol1"><!-- copyright box -->'||chr(10)||
'		<div id="copyright">Copyright &copy; <!--2006--><span id="Pagefooter_lblYear">2008</span> National Grid</div>'||chr(10)||
'	</div>'||chr(10)||
'	'||chr(10)||
'	<div class="hskpcol2">'||chr(10)||
'		<div id="navFooter">'||chr(10)||
'                        <a href="&HELP_URL.">Help</a> | '||chr(10)||
'	';

c2:=c2||'		<a href="&T_AND_C_URL." target="blank">Terms &amp; conditions</a>'||chr(10)||
''||chr(10)||
'			| <a href="&PRIVACY_URL.">Privacy policy</a>'||chr(10)||
'                        | <span style="color:#0067c6; text-decoration:none" id="app_version">#APP_VERSION#</span>'||chr(10)||
'		</div>'||chr(10)||
'	</div>'||chr(10)||
'	'||chr(10)||
'</div>'||chr(10)||
'#REGION_POSITION_05#'||chr(10)||
'#FORM_CLOSE# '||chr(10)||
'</body>'||chr(10)||
'</html>';

c3:=c3||'<div id="UKSubNav" class="reg">'||chr(10)||
'#REGION_POSITION_01#'||chr(10)||
'</div>'||chr(10)||
'<div id="rowContent">'||chr(10)||
'<div id="colLeft">'||chr(10)||
'<div id="navTier" class="w180">#REGION_POSITION_08#</div>'||chr(10)||
'</div>'||chr(10)||
' <div id="colMid">'||chr(10)||
'<div id="ErrorOutputDiv">'||chr(10)||
'#BOX_BODY#'||chr(10)||
'</div>'||chr(10)||
'</div>'||chr(10)||
''||chr(10)||
'<div id="colRight">'||chr(10)||
'<h1 class="podTitle"><img src="#IMAGE_PREFIX#ng_exclaim.gif" alt=""/>Important Messages</h1>'||chr(10)||
'<div class="t4messages">#GLOBAL_NOT';

c3:=c3||'IFICATION##SUCCESS_MESSAGE##NOTIFICATION_MESSAGE#</div>'||chr(10)||
'</div>'||chr(10)||
'</div>'||chr(10)||
''||chr(10)||
'';

wwv_flow_api.create_template(
  p_id=> 42209241448421762 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'ErrorPage',
  p_body_title=> '',
  p_header_template=> c1,
  p_box=> c3,
  p_footer_template=> c2,
  p_success_message=> '<div class="t4success">#SUCCESS_MESSAGE#</div>',
  p_current_tab=> '',
  p_current_tab_font_attr=> '',
  p_non_current_tab=> '',
  p_non_current_tab_font_attr => '',
  p_top_current_tab=> '',
  p_top_current_tab_font_attr => '',
  p_top_non_curr_tab=> '',
  p_top_non_curr_tab_font_attr=> '',
  p_current_image_tab=> '',
  p_non_current_image_tab=> '',
  p_notification_message=> '<div class="t4notification">#MESSAGE#</div>',
  p_navigation_bar=> '',
  p_navbar_entry=> '<li><img src="/i/ng_black.gif" alt=""><a href="#LINK#">#TEXT#</a></li>',
  p_app_tab_before_tabs=>'',
  p_app_tab_current_tab=>'',
  p_app_tab_non_current_tab=>'',
  p_app_tab_after_tabs=>'',
  p_region_table_cattributes=> ' summary="" cellpadding="0" border="0" cellspacing="0" width="100%"',
  p_sidebar_def_reg_pos => 'REGION_POSITION_02',
  p_breadcrumb_def_reg_pos => 'REGION_POSITION_01',
  p_theme_id  => 101,
  p_theme_class_id => 3,
  p_error_page_template => '<table summary=""><tr><td><img src="/i/error.gif" border="0" /></td>'||chr(10)||
'</tr>'||chr(10)||
'<b id=''ORA''>Error</b>'||chr(10)||
'<tr><td><a href=#BACK_LINK#>#OK#</a></td>'||chr(10)||
'<td><br /></td></tr></table> ',
  p_template_comment => '');
end;
 
null;
 
end;
/

prompt  ...button templates
--
--application/shared_components/user_interface/templates/button/button
prompt  ......Button Template 28046959836354450
declare
  t varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
t:=t||'<input type="button" name="#LABEL#" value="#LABEL#" onclick="#LINK#"/>';

wwv_flow_api.create_button_templates (
  p_id=>28046959836354450 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_template=>t,
  p_template_name=> 'Button',
  p_translate_this_template => 'N',
  p_theme_id  => 101,
  p_theme_class_id => 1,
  p_template_comment       => 'Standard Button');
end;
/
--application/shared_components/user_interface/templates/button/button_alternative_1
prompt  ......Button Template 28047144196354455
declare
  t varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
t:=t||'<a href="#LINK#" class="t4ButtonAlternative1">#LABEL#</a>';

wwv_flow_api.create_button_templates (
  p_id=>28047144196354455 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_template=>t,
  p_template_name=> 'Button, Alternative 1',
  p_translate_this_template => 'N',
  p_theme_id  => 101,
  p_theme_class_id => 4,
  p_template_comment       => 'XP Square FFFFFF');
end;
/
--application/shared_components/user_interface/templates/button/button_alternative_2
prompt  ......Button Template 28047344672354455
declare
  t varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
t:=t||'<a href="#LINK#" class="t4ButtonAlternative2">#LABEL#</a>';

wwv_flow_api.create_button_templates (
  p_id=>28047344672354455 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_template=>t,
  p_template_name=> 'Button, Alternative 2',
  p_translate_this_template => 'N',
  p_theme_id  => 101,
  p_theme_class_id => 5,
  p_template_comment       => 'Standard Button');
end;
/
--application/shared_components/user_interface/templates/button/button_alternative_3
prompt  ......Button Template 28047560720354455
declare
  t varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
t:=t||'<a href="#LINK#" class="t4ButtonAlternative3">#LABEL#</a>';

wwv_flow_api.create_button_templates (
  p_id=>28047560720354455 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_template=>t,
  p_template_name=> 'Button, Alternative 3',
  p_translate_this_template => 'N',
  p_theme_id  => 101,
  p_theme_class_id => 2,
  p_template_comment       => 'Standard Button');
end;
/
---------------------------------------
prompt  ...region templates
--
--application/shared_components/user_interface/templates/region/borderless_region
prompt  ......region template 28033952657354419
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_length number := 1;
begin
t:=t||'<table class="t4BorderlessRegion" id="#REGION_ID#" border="0" cellpadding="0" cellspacing="0" summary="">'||chr(10)||
'<tr><td class="t4RegionHeader">#TITLE#</td></tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4ButtonHolder">#CLOSE#&nbsp;#EXPAND##HELP##DELETE##EDIT##CHANGE##COPY##PREVIOUS##NEXT##CREATE##CREATE2#</td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4RegionBody">#BODY#</td>'||chr(10)||
'</tr>'||chr(10)||
'</table>';

t2 := null;
wwv_flow_api.create_plug_template (
  p_id       => 28033952657354419 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_template => t,
  p_page_plug_template_name=> 'Borderless Region',
  p_plug_table_bgcolor     => '#f7f7e7',
  p_theme_id  => 101,
  p_theme_class_id => 7,
  p_plug_heading_bgcolor => '#f7f7e7',
  p_plug_font_size => '-1',
  p_translate_this_template => 'N',
  p_template_comment       => 'Red Theme');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 28033952657354419 + wwv_flow_api.g_id_offset,
  p_form_table_attr=> t2 );
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/region/bracketed_region
prompt  ......region template 28034243797354425
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_length number := 1;
begin
t:=t||'<table cellpadding="0" cellspacing="0" border="0" summary="" class="t4BracketedRegion" id="#REGION_ID#">'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4RegionHeader">#TITLE#</td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td><table cellpadding="0" cellspacing="0" border="0" summary="" width="100%">'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4bracket"><img src="#IMAGE_PREFIX#themes/theme_1/1px_trans.gif" height="5" width="1" alt="" /></td>'||chr(10)||
'<td rowspan="3" class="t4RegionBody"><div c';

t:=t||'lass="t4ButtonHolder">#CLOSE#&nbsp;#EXPAND##HELP##DELETE##EDIT##CHANGE##COPY##PREVIOUS##NEXT##CREATE##CREATE2#</div>#BODY#</td>'||chr(10)||
'<td class="t4bracket"><img src="#IMAGE_PREFIX#themes/theme_1/1px_trans.gif" height="5" width="1" alt="" /></td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td><img src="#IMAGE_PREFIX#themes/theme_1/1px_trans.gif" height="1" width="1" alt="" /></td>'||chr(10)||
'<td><img src="#IMAGE_PREFIX#themes/theme_1/1px_trans.gi';

t:=t||'f" height="1" width="1" alt="" /></td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4bracket"><img src="#IMAGE_PREFIX#themes/theme_1/1px_trans.gif" height="5" width="1" alt="" /></td>'||chr(10)||
'<td class="t4bracket"><img src="#IMAGE_PREFIX#themes/theme_1/1px_trans.gif" height="5" width="1" alt="" /></td>'||chr(10)||
'</tr>'||chr(10)||
'</table></td>'||chr(10)||
'</tr>'||chr(10)||
'</table>';

t2 := null;
wwv_flow_api.create_plug_template (
  p_id       => 28034243797354425 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_template => t,
  p_page_plug_template_name=> 'Bracketed Region',
  p_plug_table_bgcolor     => '#ffffff',
  p_theme_id  => 101,
  p_theme_class_id => 18,
  p_plug_heading_bgcolor => '#ffffff',
  p_plug_font_size => '-1',
  p_translate_this_template => 'N',
  p_template_comment       => 'Red Theme');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 28034243797354425 + wwv_flow_api.g_id_offset,
  p_form_table_attr=> t2 );
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/region/breadcrumb_region
prompt  ......region template 28034529370354425
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_length number := 1;
begin
t:=t||'<div id="#REGION_ID#">#BODY#</div>';

t2 := null;
wwv_flow_api.create_plug_template (
  p_id       => 28034529370354425 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_template => t,
  p_page_plug_template_name=> 'Breadcrumb Region',
  p_plug_table_bgcolor     => '',
  p_theme_id  => 101,
  p_theme_class_id => 6,
  p_plug_heading_bgcolor => '',
  p_plug_font_size => '',
  p_translate_this_template => 'N',
  p_template_comment       => '');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 28034529370354425 + wwv_flow_api.g_id_offset,
  p_form_table_attr=> t2 );
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/region/button_region_with_title
prompt  ......region template 28034849290354425
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_length number := 1;
begin
t:=t||'<table class="t4ButtonRegionwithTitle" id="#REGION_ID#" border="0" cellpadding="0" cellspacing="0" summary="">'||chr(10)||
'<tr><td class="t4RegionHeader">#TITLE#</td></tr>'||chr(10)||
'<tr><td class="t4ButtonHolder">#CLOSE#&nbsp;#EXPAND##HELP##DELETE##EDIT##CHANGE##COPY##PREVIOUS##NEXT##CREATE##CREATE2#<img alt="" src="#IMAGE_PREFIX#themes/theme_4/1px_trans.gif" style="display:block;" width="600" height="1" /></td></tr>'||chr(10)||
'<';

t:=t||'/table>#BODY#';

t2 := null;
wwv_flow_api.create_plug_template (
  p_id       => 28034849290354425 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_template => t,
  p_page_plug_template_name=> 'Button Region with Title',
  p_plug_table_bgcolor     => '',
  p_theme_id  => 101,
  p_theme_class_id => 4,
  p_plug_heading_bgcolor => '',
  p_plug_font_size => '',
  p_translate_this_template => 'N',
  p_template_comment       => '');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 28034849290354425 + wwv_flow_api.g_id_offset,
  p_form_table_attr=> t2 );
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/region/button_region_without_title
prompt  ......region template 28035141805354425
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_length number := 1;
begin
t:=t||'<table class="t4ButtonRegionwithoutTitle" id="#REGION_ID#" border="0" cellpadding="0" cellspacing="0" summary="">'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4ButtonHolder">#CLOSE#&nbsp;#EXPAND##HELP##DELETE##EDIT##CHANGE##COPY##PREVIOUS##NEXT##CREATE##CREATE2#<img alt="" src="#IMAGE_PREFIX#themes/theme_4/1px_trans.gif" style="display:block;" width="600" height="1" /></td>'||chr(10)||
'</tr>'||chr(10)||
'</table>#BODY#';

t2 := null;
wwv_flow_api.create_plug_template (
  p_id       => 28035141805354425 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_template => t,
  p_page_plug_template_name=> 'Button Region without Title',
  p_plug_table_bgcolor     => '#ffffff',
  p_theme_id  => 101,
  p_theme_class_id => 17,
  p_plug_heading_bgcolor => '#ffffff',
  p_plug_font_size => '-1',
  p_translate_this_template => 'N',
  p_template_comment       => 'Red Theme');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 28035141805354425 + wwv_flow_api.g_id_offset,
  p_form_table_attr=> t2 );
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/region/chart_region
prompt  ......region template 28035460347354425
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_length number := 1;
begin
t:=t||'<table class="t4ChartRegion" id="#REGION_ID#" border="0" cellpadding="0" cellspacing="0" summary="">'||chr(10)||
'<tr><td class="t4RegionHeader">#TITLE#</td></tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4ButtonHolder">#CLOSE#&nbsp;#EXPAND##HELP##DELETE##EDIT##CHANGE##COPY##PREVIOUS##NEXT##CREATE##CREATE2#</td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4RegionBody">#BODY#</td>'||chr(10)||
'</tr>'||chr(10)||
'</table>';

t2 := null;
wwv_flow_api.create_plug_template (
  p_id       => 28035460347354425 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_template => t,
  p_page_plug_template_name=> 'Chart Region',
  p_plug_table_bgcolor     => '#ffffff',
  p_theme_id  => 101,
  p_theme_class_id => 30,
  p_plug_heading_bgcolor => '#ffffff',
  p_plug_font_size => '-1',
  p_translate_this_template => 'N',
  p_template_comment       => '');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 28035460347354425 + wwv_flow_api.g_id_offset,
  p_form_table_attr=> t2 );
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/region/form_region
prompt  ......region template 28035733013354425
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_length number := 1;
begin
t:=t||'<h1 class="regionheader">#TITLE#<a name="#REGION_STATIC_ID#"> </a></h1>'||chr(10)||
'<table class="t4FormRegion" id="#REGION_ID#" border="0" cellpadding="0" cellspacing="0" summary="">'||chr(10)||
'<tr><td class="t4RegionHeader"></td></tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4ButtonHolder">#CLOSE#&nbsp;#EXPAND##HELP##DELETE##EDIT##CHANGE##COPY##PREVIOUS##NEXT##CREATE##CREATE2#</td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4RegionBody">#BODY#<img alt="" src="#';

t:=t||'IMAGE_PREFIX#themes/theme_4/1px_trans.gif" style="display:block;" width="600" height="1" /></td>'||chr(10)||
'</tr>'||chr(10)||
'</table>';

t2 := null;
wwv_flow_api.create_plug_template (
  p_id       => 28035733013354425 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_template => t,
  p_page_plug_template_name=> 'Form Region',
  p_plug_table_bgcolor     => '#f7f7e7',
  p_theme_id  => 101,
  p_theme_class_id => 8,
  p_plug_heading_bgcolor => '#f7f7e7',
  p_plug_font_size => '-1',
  p_translate_this_template => 'N',
  p_template_comment       => '');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 28035733013354425 + wwv_flow_api.g_id_offset,
  p_form_table_attr=> t2 );
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/region/hide_and_show_region
prompt  ......region template 28036037852354427
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_length number := 1;
begin
t:=t||'<table class="t4HideandShowRegion" id="#REGION_ID#" border="0" cellpadding="0" cellspacing="0" summary="">'||chr(10)||
'  <tr><td class="t4RegionHeader">#TITLE#<a style="margin-left:5px;" href="javascript:hideShow(''region#REGION_SEQUENCE_ID#'',''shIMG#REGION_SEQUENCE_ID#'',''#IMAGE_PREFIX#themes/theme_4/rollup_plus_dgray.gif'',''#IMAGE_PREFIX#themes/theme_4/rollup_minus_dgray.gif'');" class="t4HideShowMinLink"><img s';

t:=t||'rc="#IMAGE_PREFIX#themes/theme_4/rollup_plus_dgray.gif" '||chr(10)||
'  id="shIMG#REGION_SEQUENCE_ID#" alt="" /></a></td></tr>'||chr(10)||
'<tr><td><div class="t4Hide" id="region#REGION_SEQUENCE_ID#"><div class="t4ButtonHolder">#CLOSE#&nbsp;#EXPAND##HELP##DELETE##EDIT##CHANGE##COPY##PREVIOUS##NEXT##CREATE##CREATE2#</div><div class="t4RegionBody">#BODY#</div></div></td></tr>'||chr(10)||
'</table>';

t2 := null;
wwv_flow_api.create_plug_template (
  p_id       => 28036037852354427 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_template => t,
  p_page_plug_template_name=> 'Hide and Show Region',
  p_plug_table_bgcolor     => '#ffffff',
  p_theme_id  => 101,
  p_theme_class_id => 1,
  p_plug_heading_bgcolor => '#ffffff',
  p_plug_font_size => '-1',
  p_translate_this_template => 'N',
  p_template_comment       => '');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 28036037852354427 + wwv_flow_api.g_id_offset,
  p_form_table_attr=> t2 );
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/region/list_region_with_icon_chart
prompt  ......region template 28036353606354427
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_length number := 1;
begin
t:=t||'<table class="t4ListRegionwithIcon" id="#REGION_ID#" border="0" cellpadding="0" cellspacing="0" summary="">'||chr(10)||
'<tr><td class="t4RegionHeader">#TITLE#</td></tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4ButtonHolder">#CLOSE#&nbsp;#EXPAND##HELP##DELETE##EDIT##CHANGE##COPY##PREVIOUS##NEXT##CREATE##CREATE2#</td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4RegionBody"><table summary="" cellpadding="0" cellspacing="0" border="0">'||chr(10)||
'<tr>'||chr(10)||
'<td valign="to';

t:=t||'p"><img src="#IMAGE_PREFIX#themes/theme_4/chart.gif" alt="" /></td>'||chr(10)||
'<td valign="top">#BODY#</td>'||chr(10)||
'</tr>'||chr(10)||
'</table></td>'||chr(10)||
'</tr>'||chr(10)||
'</table>';

t2 := null;
wwv_flow_api.create_plug_template (
  p_id       => 28036353606354427 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_template => t,
  p_page_plug_template_name=> 'List Region with Icon (Chart)',
  p_plug_table_bgcolor     => '#ffffff',
  p_theme_id  => 101,
  p_theme_class_id => 29,
  p_plug_heading_bgcolor => '#ffffff',
  p_plug_font_size => '-1',
  p_translate_this_template => 'N',
  p_template_comment       => 'Red Theme');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 28036353606354427 + wwv_flow_api.g_id_offset,
  p_form_table_attr=> t2 );
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/region/list_region_with_icon_report_	
prompt  ......region template 28036642624354429
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_length number := 1;
begin
t:=t||'<table class="t4ListRegionwithIcon" id="#REGION_ID#" border="0" cellpadding="0" cellspacing="0" summary="">'||chr(10)||
'<tr><td class="t4RegionHeader">#TITLE#</td></tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4ButtonHolder">#CLOSE#&nbsp;#EXPAND##HELP##DELETE##EDIT##CHANGE##COPY##PREVIOUS##NEXT##CREATE##CREATE2#</td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4RegionBody"><table summary="" cellpadding="0" cellspacing="0" border="0">'||chr(10)||
'<tr>'||chr(10)||
'<td valign="to';

t:=t||'p"><img src="#IMAGE_PREFIX#themes/theme_4/report.gif"" alt="" /></td>'||chr(10)||
'<td valign="top">#BODY#</td>'||chr(10)||
'</tr>'||chr(10)||
'</table></td>'||chr(10)||
'</tr>'||chr(10)||
'</table>';

t2 := null;
wwv_flow_api.create_plug_template (
  p_id       => 28036642624354429 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_template => t,
  p_page_plug_template_name=> 'List Region with Icon (Report)	',
  p_plug_table_bgcolor     => '#ffffff',
  p_theme_id  => 101,
  p_theme_class_id => 29,
  p_plug_heading_bgcolor => '#ffffff',
  p_plug_font_size => '-1',
  p_translate_this_template => 'N',
  p_template_comment       => 'Red Theme');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 28036642624354429 + wwv_flow_api.g_id_offset,
  p_form_table_attr=> t2 );
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/region/navigation_region
prompt  ......region template 28036952464354429
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_length number := 1;
begin
t:=t||'<table class="t4NavigationRegion" id="#REGION_ID#" border="0" cellpadding="0" cellspacing="0" summary="">'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4RegionBody">#BODY#</td>'||chr(10)||
'</tr>'||chr(10)||
'</table>';

t2 := null;
wwv_flow_api.create_plug_template (
  p_id       => 28036952464354429 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_template => t,
  p_page_plug_template_name=> 'Navigation Region',
  p_plug_table_bgcolor     => '',
  p_theme_id  => 101,
  p_theme_class_id => 5,
  p_plug_heading_bgcolor => '',
  p_plug_font_size => '',
  p_translate_this_template => 'N',
  p_template_comment       => '');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 28036952464354429 + wwv_flow_api.g_id_offset,
  p_form_table_attr=> t2 );
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/region/navigation_region_alternative_1
prompt  ......region template 28037252858354429
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_length number := 1;
begin
t:=t||'<table class="t4NavigationRegionAlternative1" id="#REGION_ID#" border="0" cellpadding="0" cellspacing="0" summary="">'||chr(10)||
'<tr><td class="t4RegionHeader">#TITLE#</td></tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4ButtonHolder">#CLOSE#&nbsp;#EXPAND##HELP##DELETE##EDIT##CHANGE##COPY##PREVIOUS##NEXT##CREATE##CREATE2#</td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4RegionBody">#BODY#</td>'||chr(10)||
'</tr>'||chr(10)||
'</table>';

t2 := null;
wwv_flow_api.create_plug_template (
  p_id       => 28037252858354429 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_template => t,
  p_page_plug_template_name=> 'Navigation Region, Alternative 1',
  p_plug_table_bgcolor     => '',
  p_theme_id  => 101,
  p_theme_class_id => 16,
  p_plug_heading_bgcolor => '',
  p_plug_font_size => '',
  p_translate_this_template => 'N',
  p_template_comment       => '');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 28037252858354429 + wwv_flow_api.g_id_offset,
  p_form_table_attr=> t2 );
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/region/region_without_buttons_and_title
prompt  ......region template 28037557189354429
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_length number := 1;
begin
t:=t||'<table class="t4RegionwithoutButtonsandTitle" id="#REGION_ID#" border="0" cellpadding="0" cellspacing="0" summary="">'||chr(10)||
'<tr><td class="t4RegionHeader"><br /></td></tr>'||chr(10)||
'<tr><td class="t4RegionBody">#BODY#</td></tr>'||chr(10)||
'</table>'||chr(10)||
'';

t2 := null;
wwv_flow_api.create_plug_template (
  p_id       => 28037557189354429 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_template => t,
  p_page_plug_template_name=> 'Region without Buttons and Title',
  p_plug_table_bgcolor     => '',
  p_theme_id  => 101,
  p_theme_class_id => 19,
  p_plug_heading_bgcolor => '',
  p_plug_font_size => '',
  p_translate_this_template => 'N',
  p_template_comment       => '');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 28037557189354429 + wwv_flow_api.g_id_offset,
  p_form_table_attr=> t2 );
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/region/region_without_title
prompt  ......region template 28037855412354430
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_length number := 1;
begin
t:=t||'<table class="t4RegionwithoutTitle" id="#REGION_ID#" border="0" cellpadding="0" cellspacing="0" summary="">'||chr(10)||
'<tr><td class="t4RegionHeader"><br /></td></tr>'||chr(10)||
'<tr><td class="t4ButtonHolder">#CLOSE#&nbsp;#EXPAND##HELP##DELETE##EDIT##CHANGE##COPY##PREVIOUS##NEXT##CREATE##CREATE2#</td></tr>'||chr(10)||
'<tr><td class="t4RegionBody">#BODY#</td></tr>'||chr(10)||
'</table>'||chr(10)||
'';

t2 := null;
wwv_flow_api.create_plug_template (
  p_id       => 28037855412354430 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_template => t,
  p_page_plug_template_name=> 'Region without Title',
  p_plug_table_bgcolor     => '',
  p_theme_id  => 101,
  p_theme_class_id => 11,
  p_plug_heading_bgcolor => '',
  p_plug_font_size => '',
  p_translate_this_template => 'N',
  p_template_comment       => '');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 28037855412354430 + wwv_flow_api.g_id_offset,
  p_form_table_attr=> t2 );
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/region/reports_region
prompt  ......region template 28038130488354430
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_length number := 1;
begin
t:=t||'<h1>#TITLE#</h1>'||chr(10)||
'<table class="t4ReportsRegion" id="#REGION_ID#" border="0" cellpadding="0" cellspacing="10" summary="">'||chr(10)||
'<tr><td class="t4RegionHeader"></td></tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4ButtonHolder">#CLOSE#&nbsp;#EXPAND##HELP##DELETE##EDIT##CHANGE##COPY##PREVIOUS##NEXT##CREATE##CREATE2#</td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4RegionBody">#BODY#</td>'||chr(10)||
'</tr>'||chr(10)||
'</table>';

t2 := null;
wwv_flow_api.create_plug_template (
  p_id       => 28038130488354430 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_template => t,
  p_page_plug_template_name=> 'Reports Region',
  p_plug_table_bgcolor     => '#ffffff',
  p_theme_id  => 101,
  p_theme_class_id => 9,
  p_plug_heading_bgcolor => '#ffffff',
  p_plug_font_size => '-1',
  p_translate_this_template => 'N',
  p_template_comment       => 'Red Theme');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 28038130488354430 + wwv_flow_api.g_id_offset,
  p_form_table_attr=> t2 );
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/region/reports_region_100_width
prompt  ......region template 28038437469354430
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_length number := 1;
begin
t:=t||'<table class="t4GReportsRegion100Width" id="#REGION_ID#" border="0" cellpadding="0" cellspacing="0" summary="">'||chr(10)||
'<tr><td class="t4RegionHeader">#TITLE#</td></tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4ButtonHolder">#CLOSE#&nbsp;#EXPAND##HELP##DELETE##EDIT##CHANGE##COPY##PREVIOUS##NEXT##CREATE##CREATE2#</td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4RegionBody">#BODY#</td>'||chr(10)||
'</tr>'||chr(10)||
'</table>'||chr(10)||
'';

t2 := null;
wwv_flow_api.create_plug_template (
  p_id       => 28038437469354430 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_template => t,
  p_page_plug_template_name=> 'Reports Region 100% Width',
  p_plug_table_bgcolor     => '#ffffff',
  p_theme_id  => 101,
  p_theme_class_id => 13,
  p_plug_heading_bgcolor => '#ffffff',
  p_plug_font_size => '-1',
  p_translate_this_template => 'N',
  p_template_comment       => 'Red Theme');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 28038437469354430 + wwv_flow_api.g_id_offset,
  p_form_table_attr=> t2 );
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/region/reports_region_alternative_1
prompt  ......region template 28038742996354430
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_length number := 1;
begin
t:=t||'<table class="t4ReportsRegionAlternative1" id="#REGION_ID#" border="0" cellpadding="0" cellspacing="0" summary="">'||chr(10)||
'<tr><td class="t4RegionHeader">#TITLE#</td></tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4ButtonHolder">#CLOSE#&nbsp;#EXPAND##HELP##DELETE##EDIT##CHANGE##COPY##PREVIOUS##NEXT##CREATE##CREATE2#</td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4RegionBody">#BODY#</td>'||chr(10)||
'</tr>'||chr(10)||
'</table>';

t2 := null;
wwv_flow_api.create_plug_template (
  p_id       => 28038742996354430 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_template => t,
  p_page_plug_template_name=> 'Reports Region, Alternative 1',
  p_plug_table_bgcolor     => '#ffffff',
  p_theme_id  => 101,
  p_theme_class_id => 10,
  p_plug_heading_bgcolor => '#ffffff',
  p_plug_font_size => '-1',
  p_translate_this_template => 'N',
  p_template_comment       => '');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 28038742996354430 + wwv_flow_api.g_id_offset,
  p_form_table_attr=> t2 );
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/region/sidebar_region
prompt  ......region template 28039045576354430
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_length number := 1;
begin
t:=t||'<table class="t4SidebarRegion" id="#REGION_ID#" border="0" cellpadding="0" cellspacing="0" summary="">'||chr(10)||
'<tr><td class="t4RegionHeader">#TITLE#</td></tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4ButtonHolder">#CLOSE#&nbsp;#EXPAND##HELP##DELETE##EDIT##CHANGE##COPY##PREVIOUS##NEXT##CREATE##CREATE2#</td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4RegionBody">#BODY#</td>'||chr(10)||
'</tr>'||chr(10)||
'</table>';

t2 := null;
wwv_flow_api.create_plug_template (
  p_id       => 28039045576354430 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_template => t,
  p_page_plug_template_name=> 'Sidebar Region',
  p_plug_table_bgcolor     => '#f7f7e7',
  p_theme_id  => 101,
  p_theme_class_id => 2,
  p_plug_heading_bgcolor => '#f7f7e7',
  p_plug_font_size => '-1',
  p_translate_this_template => 'N',
  p_template_comment       => '');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 28039045576354430 + wwv_flow_api.g_id_offset,
  p_form_table_attr=> t2 );
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/region/sidebar_region_alternative_1
prompt  ......region template 28039333002354430
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_length number := 1;
begin
t:=t||'<table class="t4SidebarRegionAlternative1" id="#REGION_ID#" border="0" cellpadding="0" cellspacing="0" summary="">'||chr(10)||
'<tr><td class="t4RegionHeader">#TITLE#</td></tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4ButtonHolder">#CLOSE#&nbsp;#EXPAND##HELP##DELETE##EDIT##CHANGE##COPY##PREVIOUS##NEXT##CREATE##CREATE2#</td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4RegionBody">#BODY#</td>'||chr(10)||
'</tr>'||chr(10)||
'</table>';

t2 := null;
wwv_flow_api.create_plug_template (
  p_id       => 28039333002354430 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_template => t,
  p_page_plug_template_name=> 'Sidebar Region, Alternative 1',
  p_plug_table_bgcolor     => '#f7f7e7',
  p_theme_id  => 101,
  p_theme_class_id => 3,
  p_plug_heading_bgcolor => '#f7f7e7',
  p_plug_font_size => '-1',
  p_translate_this_template => 'N',
  p_template_comment       => '');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 28039333002354430 + wwv_flow_api.g_id_offset,
  p_form_table_attr=> t2 );
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/region/wizard_region
prompt  ......region template 28039654408354430
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_length number := 1;
begin
t:=t||'<table class="t4WizardRegion" id="#REGION_ID#" border="0" cellpadding="0" cellspacing="0" summary="">'||chr(10)||
'<tr><td class="t4RegionHeader">#TITLE#</td></tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4ButtonHolder">#CLOSE#&nbsp;#EXPAND##HELP##DELETE##EDIT##CHANGE##COPY##PREVIOUS##NEXT##CREATE##CREATE2#</td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4RegionBody">#BODY#</td>'||chr(10)||
'</tr>'||chr(10)||
'</table>';

t2 := null;
wwv_flow_api.create_plug_template (
  p_id       => 28039654408354430 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_template => t,
  p_page_plug_template_name=> 'Wizard Region',
  p_plug_table_bgcolor     => '',
  p_theme_id  => 101,
  p_theme_class_id => 12,
  p_plug_heading_bgcolor => '',
  p_plug_font_size => '',
  p_translate_this_template => 'N',
  p_template_comment       => '');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 28039654408354430 + wwv_flow_api.g_id_offset,
  p_form_table_attr=> t2 );
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/region/wizard_region_with_icon
prompt  ......region template 28039934851354430
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_length number := 1;
begin
t:=t||'<table class="t4WizardRegionwithIcon" id="#REGION_ID#" border="0" cellpadding="0" cellspacing="0" summary="">'||chr(10)||
'<tr><td class="t4RegionHeader">#TITLE#</td></tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4ButtonHolder">#CLOSE#&nbsp;#EXPAND##HELP##DELETE##EDIT##CHANGE##COPY##PREVIOUS##NEXT##CREATE##CREATE2#</td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4RegionBody"><table summary="" cellpadding="0" cellspacing="0" border="0">'||chr(10)||
'<tr>'||chr(10)||
'<td valign="';

t:=t||'top"><img src="#IMAGE_PREFIX#themes/theme_4/iconwizard.gif" alt=""/></td>'||chr(10)||
'<td width="100%" valign="top">#BODY#</td>'||chr(10)||
'</tr>'||chr(10)||
'</table></td>'||chr(10)||
'</tr>'||chr(10)||
'</table>';

t2 := null;
wwv_flow_api.create_plug_template (
  p_id       => 28039934851354430 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_template => t,
  p_page_plug_template_name=> 'Wizard Region with Icon',
  p_plug_table_bgcolor     => '',
  p_theme_id  => 101,
  p_theme_class_id => 20,
  p_plug_heading_bgcolor => '',
  p_plug_font_size => '',
  p_translate_this_template => 'N',
  p_template_comment       => '');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 28039934851354430 + wwv_flow_api.g_id_offset,
  p_form_table_attr=> t2 );
exception when others then null;
end;
null;
 
end;
/

prompt  ...List Templates
--
--application/shared_components/user_interface/templates/list/button_list
prompt  ......list template 28042347243354436
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  t4 varchar2(32767) := null;
  t5 varchar2(32767) := null;
  t6 varchar2(32767) := null;
  t7 varchar2(32767) := null;
  t8 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_clob4 clob;
  l_clob5 clob;
  l_clob6 clob;
  l_clob7 clob;
  l_clob8 clob;
  l_length number := 1;
begin
t:=t||'<a href="#LINK#" class="t4Button" style="background-color:#CCCCCC;">#TEXT#</a>';

t2:=t2||'<a href="#LINK#" class="t4Button">#TEXT#</a>';

t3 := null;
t4 := null;
t5 := null;
t6 := null;
t7 := null;
t8 := null;
wwv_flow_api.create_list_template (
  p_id=>28042347243354436 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_list_template_current=>t,
  p_list_template_noncurrent=> t2,
  p_list_template_name=>'Button List',
  p_theme_id  => 101,
  p_theme_class_id => 6,
  p_list_template_before_rows=>'<div class="t4ButtonList">',
  p_list_template_after_rows=>'</div>',
  p_translate_this_template => 'N',
  p_list_template_comment=>'');
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/list/dhtml_list_image_with_sublist
prompt  ......list template 28042635551354441
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  t4 varchar2(32767) := null;
  t5 varchar2(32767) := null;
  t6 varchar2(32767) := null;
  t7 varchar2(32767) := null;
  t8 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_clob4 clob;
  l_clob5 clob;
  l_clob6 clob;
  l_clob7 clob;
  l_clob8 clob;
  l_length number := 1;
begin
t:=t||'<div class="dhtmlMenuItem"><a href="#LINK#"><img src="#IMAGE_PREFIX#themes/generic_list.gif" alt="" #IMAGE_ATTR# /></a><img src="#IMAGE_PREFIX#themes/generic_nochild.gif" width="22" height="75" alt=""  /><a href="#LINK#" class="dhtmlBottom">#TEXT#</a></div>';

t2:=t2||'<div class="dhtmlMenuItem"><a href="#LINK#"><img src="#IMAGE_PREFIX#themes/generic_list.gif" alt="" #IMAGE_ATTR# /></a><img src="#IMAGE_PREFIX#themes/generic_nochild.gif" width="22" height="75" alt="" /><a href="#LINK#" class="dhtmlBottom">#TEXT#</a></div>';

t3:=t3||'<li class="dhtmlMenuSep"><img src="#IMAGE_PREFIX#themes/theme_13/1px_trans.gif"  width="1" height="1" alt=""  class="dhtmlMenuSep" /></li>';

t4:=t4||'<li><a href="#LINK#" class="dhtmlSubMenuN" onmouseover="dhtml_CloseAllSubMenusL(this)">#TEXT#</a></li>';

t5:=t5||'<div class="dhtmlMenuItem"><a href="#LINK#"><img src="#IMAGE_PREFIX#themes/generic_list.gif" alt="" #IMAGE_ATTR# /></a><img src="#IMAGE_PREFIX#themes/generic_open.gif" width="22" height="75" class="dhtmlMenu" onclick="app_AppMenuMultiOpenBottom(this,''#LIST_ITEM_ID#'',false)" alt="" /><a href="#LINK#" class="dhtmlBottom">#TEXT#</a></div>';

t6:=t6||'<div class="dhtmlMenuItem"><a href="#LINK#"><img src="#IMAGE_PREFIX#themes/generic_list.gif" alt="" #IMAGE_ATTR# /></a><img src="#IMAGE_PREFIX#themes/generic_open.gif" width="22" height="75" class="dhtmlMenu" onclick="app_AppMenuMultiOpenBottom(this,''#LIST_ITEM_ID#'',false)" alt="" /><a href="#LINK#" class="dhtmlBottom">#TEXT#</a></div>';

t7:=t7||'<li class="dhtmlSubMenuS"><a href="#LINK#" class="dhtmlSubMenuS" onmouseover="dhtml_MenuOpen(this,''#LIST_ITEM_ID#'',true,''Left'')"><span style="float:left;">#TEXT#</span><img class="t13MIMG" src="#IMAGE_PREFIX#menu_open_right2.gif" alt="" /></a></li>';

t8:=t8||'<li class="dhtmlSubMenuS"><a href="#LINK#" class="dhtmlSubMenuS" onmouseover="dhtml_MenuOpen(this,''#LIST_ITEM_ID#'',true,''Left'')"><span style="float:left;">#TEXT#</span><img class="t13MIMG" src="#IMAGE_PREFIX#menu_open_right2.gif" alt="" /></a></li>';

wwv_flow_api.create_list_template (
  p_id=>28042635551354441 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_list_template_current=>t,
  p_list_template_noncurrent=> t2,
  p_list_template_name=>'DHTML List (Image) with Sublist',
  p_theme_id  => 101,
  p_theme_class_id => 21,
  p_list_template_before_rows=>'<div class="dhtmlMenuLG">',
  p_list_template_after_rows=>'</div><br style="clear:both;"/><br style="clear:both;"/>',
  p_before_sub_list=>'<ul id="#PARENT_LIST_ITEM_ID#" htmldb:listlevel="#LEVEL#" class="dhtmlSubMenu2" style="display:none;"><li class="dhtmlSubMenuP" onmouseover="dhtml_CloseAllSubMenusL(this)">#PARENT_TEXT#</li>',
  p_after_sub_list=>'</ul>',
  p_sub_list_item_current=> t3,
  p_sub_list_item_noncurrent=> t4,
  p_item_templ_curr_w_child=> t5,
  p_item_templ_noncurr_w_child=> t6,
  p_sub_templ_curr_w_child=> t7,
  p_sub_templ_noncurr_w_child=> t8,
  p_translate_this_template => 'N',
  p_list_template_comment=>'');
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/list/dhtml_menu_with_sublist
prompt  ......list template 28042859488354441
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  t4 varchar2(32767) := null;
  t5 varchar2(32767) := null;
  t6 varchar2(32767) := null;
  t7 varchar2(32767) := null;
  t8 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_clob4 clob;
  l_clob5 clob;
  l_clob6 clob;
  l_clob7 clob;
  l_clob8 clob;
  l_length number := 1;
begin
t:=t||'<li class="dhtmlMenuItem"><a href="#LINK#">#TEXT#</a></li>';

t2:=t2||'<li class="dhtmlMenuItem"><a href="#LINK#">#TEXT#</a></li>';

t3:=t3||'<li class="dhtmlMenuSep2"><img src="#IMAGE_PREFIX#themes/theme_13/1px_trans.gif"  width="1" height="1" alt="" class="dhtmlMenuSep2" /></li>';

t4:=t4||'<li><a href="#LINK#" class="dhtmlSubMenuN" onmouseover="dhtml_CloseAllSubMenusL(this)">#TEXT#</a></li>';

t5:=t5||'<li class="dhtmlMenuItem1"><a href="#LINK#">#TEXT#</a><img src="#IMAGE_PREFIX#themes/theme_13/menu_small.gif" alt="Expand" onclick="app_AppMenuMultiOpenBottom2(this,''#LIST_ITEM_ID#'',false)" /></li>';

t6:=t6||'<li class="dhtmlMenuItem1"><a href="#LINK#">#TEXT#</a><img src="#IMAGE_PREFIX#themes/theme_13/menu_small.gif" alt="Expand" onclick="app_AppMenuMultiOpenBottom2(this,''#LIST_ITEM_ID#'',false)" /></li>';

t7:=t7||'<li class="dhtmlSubMenuS"><a href="#LINK#" class="dhtmlSubMenuS" onmouseover="dhtml_MenuOpen(this,''#LIST_ITEM_ID#'',true,''Left'')"><span style="float:left;">#TEXT#</span><img class="t13MIMG" src="#IMAGE_PREFIX#menu_open_right2.gif" alt="" /></a></li>';

t8:=t8||'<li class="dhtmlSubMenuS"><a href="#LINK#" class="dhtmlSubMenuS" onmouseover="dhtml_MenuOpen(this,''#LIST_ITEM_ID#'',true,''Left'')"><span style="float:left;">#TEXT#</span><img class="t13MIMG" src="#IMAGE_PREFIX#menu_open_right2.gif" alt="" /></a></li>';

wwv_flow_api.create_list_template (
  p_id=>28042859488354441 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_list_template_current=>t,
  p_list_template_noncurrent=> t2,
  p_list_template_name=>'DHTML Menu with Sublist',
  p_theme_id  => 101,
  p_theme_class_id => 20,
  p_list_template_before_rows=>'<ul class="dhtmlMenuLG2">',
  p_list_template_after_rows=>'</ul><br style="clear:both;"/><br style="clear:both;"/>',
  p_before_sub_list=>'<ul id="#PARENT_LIST_ITEM_ID#" htmldb:listlevel="#LEVEL#" class="dhtmlSubMenu2" style="display:none;">',
  p_after_sub_list=>'</ul>',
  p_sub_list_item_current=> t3,
  p_sub_list_item_noncurrent=> t4,
  p_item_templ_curr_w_child=> t5,
  p_item_templ_noncurr_w_child=> t6,
  p_sub_templ_curr_w_child=> t7,
  p_sub_templ_noncurr_w_child=> t8,
  p_translate_this_template => 'N',
  p_list_template_comment=>'');
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/list/dhtml_tree
prompt  ......list template 28043154021354441
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  t4 varchar2(32767) := null;
  t5 varchar2(32767) := null;
  t6 varchar2(32767) := null;
  t7 varchar2(32767) := null;
  t8 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_clob4 clob;
  l_clob5 clob;
  l_clob6 clob;
  l_clob7 clob;
  l_clob8 clob;
  l_length number := 1;
begin
t:=t||'<li><img src="#IMAGE_PREFIX#themes/theme_13/node.gif" align="middle" alt="" /><a href="#LINK#">#TEXT#</a></li>';

t2:=t2||'<li><img src="#IMAGE_PREFIX#themes/theme_13/node.gif" align="middle"  alt="" /><a href="#LINK#">#TEXT#</a></li>';

t3:=t3||'<li><img src="#IMAGE_PREFIX#themes/theme_13/node.gif" align="middle"  alt="" /><a href="#LINK#">#TEXT#</a></li>';

t4:=t4||'<li><img src="#IMAGE_PREFIX#themes/theme_13/node.gif"  align="middle" alt="" /><a href="#LINK#">#TEXT#</a></li>';

t5:=t5||'<li><img src="#IMAGE_PREFIX#themes/theme_13/plus.gif" align="middle"  onclick="htmldb_ToggleWithImage(this,''#LIST_ITEM_ID#'')" class="pseudoButtonInactive" alt="" /><a href="#LINK#">#TEXT#</a></li>';

t6:=t6||'<li><img src="#IMAGE_PREFIX#themes/theme_13/plus.gif" align="middle"  onclick="htmldb_ToggleWithImage(this,''#LIST_ITEM_ID#'')" class="pseudoButtonInactive" alt="" /><a href="#LINK#">#TEXT#</a></li>';

t7:=t7||'<li><img src="#IMAGE_PREFIX#themes/theme_13/plus.gif" onclick="htmldb_ToggleWithImage(this,''#LIST_ITEM_ID#'')" align="middle" class="pseudoButtonInactive" alt="" /><a href="#LINK#">#TEXT#</a></li>';

t8:=t8||'<li><img src="#IMAGE_PREFIX#themes/theme_13/plus.gif" onclick="htmldb_ToggleWithImage(this,''#LIST_ITEM_ID#'')" align="middle" class="pseudoButtonInactive" alt="" /><a href="#LINK#">#TEXT#</a></li>';

wwv_flow_api.create_list_template (
  p_id=>28043154021354441 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_list_template_current=>t,
  p_list_template_noncurrent=> t2,
  p_list_template_name=>'DHTML Tree',
  p_theme_id  => 101,
  p_theme_class_id => 22,
  p_list_template_before_rows=>'<ul class="dhtmlTree">',
  p_list_template_after_rows=>'</ul><br style="clear:both;"/><br style="clear:both;"/>',
  p_before_sub_list=>'<ul id="#PARENT_LIST_ITEM_ID#" htmldb:listlevel="#LEVEL#" style="display:none;" class="dhtmlTree">',
  p_after_sub_list=>'</ul>',
  p_sub_list_item_current=> t3,
  p_sub_list_item_noncurrent=> t4,
  p_item_templ_curr_w_child=> t5,
  p_item_templ_noncurr_w_child=> t6,
  p_sub_templ_curr_w_child=> t7,
  p_sub_templ_noncurr_w_child=> t8,
  p_translate_this_template => 'N',
  p_list_template_comment=>'');
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/list/horizontal_images_with_label_list
prompt  ......list template 28043433542354443
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  t4 varchar2(32767) := null;
  t5 varchar2(32767) := null;
  t6 varchar2(32767) := null;
  t7 varchar2(32767) := null;
  t8 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_clob4 clob;
  l_clob5 clob;
  l_clob6 clob;
  l_clob7 clob;
  l_clob8 clob;
  l_length number := 1;
begin
t:=t||'<td class="t4current"><img src="#IMAGE_PREFIX##IMAGE#" border="0" alt="" #IMAGE_ATTR#/><br />#TEXT#</td>';

t2:=t2||'<td><a href="#LINK#"><img src="#IMAGE_PREFIX##IMAGE#" border="0" alt="" #IMAGE_ATTR#/></a><br /><a href="#LINK#">#TEXT#</a></td>';

t3 := null;
t4 := null;
t5 := null;
t6 := null;
t7 := null;
t8 := null;
wwv_flow_api.create_list_template (
  p_id=>28043433542354443 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_list_template_current=>t,
  p_list_template_noncurrent=> t2,
  p_list_template_name=>'Horizontal Images with Label List',
  p_theme_id  => 101,
  p_theme_class_id => 4,
  p_list_template_before_rows=>'<table class="t4HorizontalImageswithLabelList" cellpadding="0" border="0" cellspacing="0" summary=""><tr>',
  p_list_template_after_rows=>'</tr></table>',
  p_translate_this_template => 'N',
  p_list_template_comment=>'');
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/list/horizontal_links_list
prompt  ......list template 28043744356354443
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  t4 varchar2(32767) := null;
  t5 varchar2(32767) := null;
  t6 varchar2(32767) := null;
  t7 varchar2(32767) := null;
  t8 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_clob4 clob;
  l_clob5 clob;
  l_clob6 clob;
  l_clob7 clob;
  l_clob8 clob;
  l_length number := 1;
begin
t:=t||'<a href="#LINK#" class="t4current">#TEXT#</a>';

t2:=t2||'<a href="#LINK#">#TEXT#</a>';

t3 := null;
t4 := null;
t5 := null;
t6 := null;
t7 := null;
t8 := null;
wwv_flow_api.create_list_template (
  p_id=>28043744356354443 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_list_template_current=>t,
  p_list_template_noncurrent=> t2,
  p_list_template_name=>'Horizontal Links List',
  p_theme_id  => 101,
  p_theme_class_id => 3,
  p_list_template_before_rows=>'<div class="t4HorizontalLinksList">',
  p_list_template_after_rows=>'</div>',
  p_translate_this_template => 'N',
  p_list_template_comment=>'');
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/list/tabbed_navigation_list
prompt  ......list template 28044056006354443
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  t4 varchar2(32767) := null;
  t5 varchar2(32767) := null;
  t6 varchar2(32767) := null;
  t7 varchar2(32767) := null;
  t8 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_clob4 clob;
  l_clob5 clob;
  l_clob6 clob;
  l_clob7 clob;
  l_clob8 clob;
  l_length number := 1;
begin
t:=t||'<li><a class="t4current" href="#LINK#">#TEXT#</a></li>';

t2:=t2||'<li><a href="#LINK#">#TEXT#</a></li>';

t3 := null;
t4 := null;
t5 := null;
t6 := null;
t7 := null;
t8 := null;
wwv_flow_api.create_list_template (
  p_id=>28044056006354443 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_list_template_current=>t,
  p_list_template_noncurrent=> t2,
  p_list_template_name=>'Tabbed Navigation List',
  p_theme_id  => 101,
  p_theme_class_id => 7,
  p_list_template_before_rows=>'<ul class="t4TabbedNavigationList">',
  p_list_template_after_rows=>'</ul>',
  p_translate_this_template => 'N',
  p_list_template_comment=>'');
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/list/tree_list
prompt  ......list template 28044339573354443
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  t4 varchar2(32767) := null;
  t5 varchar2(32767) := null;
  t6 varchar2(32767) := null;
  t7 varchar2(32767) := null;
  t8 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_clob4 clob;
  l_clob5 clob;
  l_clob6 clob;
  l_clob7 clob;
  l_clob8 clob;
  l_length number := 1;
begin
t:=t||'<li><a name="#LIST_LABEL#" class="current" href="#LINK#"><img src="/i/ng_black.gif" alt="" width="5" height="11"/>#TEXT#</a></li>';

t2:=t2||'<li><a name="#LIST_LABEL#" href="#LINK#"><img src="/i/ng_black.gif" alt="" width="5" height="11"/>#TEXT#</a></li>';

t3:=t3||'<li><a name="#LIST_LABEL#" class="current" href="#LINK#"><img src="#WORKSPACE_IMAGES#black.gif" alt="" width="5" height="11"/>#TEXT#</a></li>';

t4:=t4||'<li><a name="#LIST_LABEL#" href="#LINK#"><img src="#WORKSPACE_IMAGES#black.gif" alt="" width="5" height="11"/>#TEXT#</a></li>';

t5:=t5||'<li><a name="#LIST_LABEL#" class="current" href="#LINK#"><img src="/i/ng_black.gif" alt="" width="5" height="11" />#TEXT#</a></li>';

t6:=t6||'<li><a name="#LIST_LABEL#" href="#LINK#"><img src="/i/ng_black.gif" alt="" width="5" height="11"/>#TEXT#</a></li>';

t7:=t7||'<li><a name="#LIST_LABEL#" class="current" href="#LINK#"><img src="#WORKSPACE_IMAGES#black.gif" alt="" width="5" height="11"/>#TEXT#</a></li>';

t8:=t8||'<li><a name="#LIST_LABEL#" href="#LINK#"><img src="#WORKSPACE_IMAGES#black.gif" alt="" width="5" height="11"/>#TEXT#</a></li>';

wwv_flow_api.create_list_template (
  p_id=>28044339573354443 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_list_template_current=>t,
  p_list_template_noncurrent=> t2,
  p_list_template_name=>'Tree List',
  p_theme_id  => 101,
  p_theme_class_id => 0,
  p_list_template_before_rows=>'<ul class="tierLink">',
  p_list_template_after_rows=>'</ul><br style="clear:both;"/><br style="clear:both;"/>',
  p_before_sub_list=>'<ul name="#LIST_LABEL#" id="#PARENT_LIST_ITEM_ID#" htmldb:listlevel="#LEVEL#">',
  p_after_sub_list=>'</ul>',
  p_sub_list_item_current=> t3,
  p_sub_list_item_noncurrent=> t4,
  p_item_templ_curr_w_child=> t5,
  p_item_templ_noncurr_w_child=> t6,
  p_sub_templ_curr_w_child=> t7,
  p_sub_templ_noncurr_w_child=> t8,
  p_translate_this_template => 'N',
  p_list_template_comment=>'');
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/list/vertical_images_list
prompt  ......list template 28044658819354443
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  t4 varchar2(32767) := null;
  t5 varchar2(32767) := null;
  t6 varchar2(32767) := null;
  t7 varchar2(32767) := null;
  t8 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_clob4 clob;
  l_clob5 clob;
  l_clob6 clob;
  l_clob7 clob;
  l_clob8 clob;
  l_length number := 1;
begin
t:=t||'<tr><td class="t4current"><a href="#LINK#"><img src="#IMAGE_PREFIX##IMAGE#" #IMAGE_ATTR# alt="" />#TEXT#</a></td></tr>';

t2:=t2||'<tr><td><a href="#LINK#"><img src="#IMAGE_PREFIX##IMAGE#" #IMAGE_ATTR# alt="" />#TEXT#</a></td></tr>';

t3 := null;
t4 := null;
t5 := null;
t6 := null;
t7 := null;
t8 := null;
wwv_flow_api.create_list_template (
  p_id=>28044658819354443 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_list_template_current=>t,
  p_list_template_noncurrent=> t2,
  p_list_template_name=>'Vertical Images List',
  p_theme_id  => 101,
  p_theme_class_id => 5,
  p_list_template_before_rows=>'<table border="0" cellpadding="0" cellspacing="0" summary="" class="t4VerticalImagesList">',
  p_list_template_after_rows=>'</table>',
  p_translate_this_template => 'N',
  p_list_template_comment=>'');
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/list/vertical_ordered_list
prompt  ......list template 28044945035354443
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  t4 varchar2(32767) := null;
  t5 varchar2(32767) := null;
  t6 varchar2(32767) := null;
  t7 varchar2(32767) := null;
  t8 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_clob4 clob;
  l_clob5 clob;
  l_clob6 clob;
  l_clob7 clob;
  l_clob8 clob;
  l_length number := 1;
begin
t:=t||'<li class="t4current"><a href="#LINK#">#TEXT#</a></li>';

t2:=t2||'<li><a href="#LINK#">#TEXT#</a></li>';

t3 := null;
t4 := null;
t5 := null;
t6 := null;
t7 := null;
t8 := null;
wwv_flow_api.create_list_template (
  p_id=>28044945035354443 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_list_template_current=>t,
  p_list_template_noncurrent=> t2,
  p_list_template_name=>'Vertical Ordered List',
  p_theme_id  => 101,
  p_theme_class_id => 2,
  p_list_template_before_rows=>'<ol class="t4VerticalOrderedList">',
  p_list_template_after_rows=>'</ol>',
  p_translate_this_template => 'N',
  p_list_template_comment=>'');
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/list/vertical_sidebar_list
prompt  ......list template 28045231131354443
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  t4 varchar2(32767) := null;
  t5 varchar2(32767) := null;
  t6 varchar2(32767) := null;
  t7 varchar2(32767) := null;
  t8 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_clob4 clob;
  l_clob5 clob;
  l_clob6 clob;
  l_clob7 clob;
  l_clob8 clob;
  l_length number := 1;
begin
t:=t||'<tr><td class="t4current"><a href="#LINK#" class="t4nav">#TEXT#</a></td></tr>';

t2:=t2||'<tr><td><a href="#LINK#" class="t4nav">#TEXT#</a></td></tr>';

t3 := null;
t4 := null;
t5 := null;
t6 := null;
t7 := null;
t8 := null;
wwv_flow_api.create_list_template (
  p_id=>28045231131354443 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_list_template_current=>t,
  p_list_template_noncurrent=> t2,
  p_list_template_name=>'Vertical Sidebar List',
  p_theme_id  => 101,
  p_theme_class_id => 19,
  p_list_template_before_rows=>'<table border="0" cellpadding="0" cellspacing="0" summary="" class="t4VerticalSidebarList">',
  p_list_template_after_rows=>'</table>',
  p_translate_this_template => 'N',
  p_list_template_comment=>'');
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/list/vertical_unordered_links_without_bullets
prompt  ......list template 28045531223354443
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  t4 varchar2(32767) := null;
  t5 varchar2(32767) := null;
  t6 varchar2(32767) := null;
  t7 varchar2(32767) := null;
  t8 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_clob4 clob;
  l_clob5 clob;
  l_clob6 clob;
  l_clob7 clob;
  l_clob8 clob;
  l_length number := 1;
begin
t:=t||'<li class="t4current"><a href="#LINK#">#TEXT#</a></li>';

t2:=t2||'<li><a href="#LINK#">#TEXT#</a></li>';

t3 := null;
t4 := null;
t5 := null;
t6 := null;
t7 := null;
t8 := null;
wwv_flow_api.create_list_template (
  p_id=>28045531223354443 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_list_template_current=>t,
  p_list_template_noncurrent=> t2,
  p_list_template_name=>'Vertical Unordered Links without Bullets',
  p_theme_id  => 101,
  p_theme_class_id => 18,
  p_list_template_before_rows=>'<ul class="t4VerticalUnorderedLinkswithoutBullets">',
  p_list_template_after_rows=>'</ul>',
  p_translate_this_template => 'N',
  p_list_template_comment=>'');
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/list/vertical_unordered_list_with_bullets
prompt  ......list template 28045831289354443
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  t4 varchar2(32767) := null;
  t5 varchar2(32767) := null;
  t6 varchar2(32767) := null;
  t7 varchar2(32767) := null;
  t8 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_clob4 clob;
  l_clob5 clob;
  l_clob6 clob;
  l_clob7 clob;
  l_clob8 clob;
  l_length number := 1;
begin
t:=t||'<li class="t4current"><a href="#LINK#">#TEXT#</a></li>';

t2:=t2||'<li><a href="#LINK#">#TEXT#</a></li>';

t3 := null;
t4 := null;
t5 := null;
t6 := null;
t7 := null;
t8 := null;
wwv_flow_api.create_list_template (
  p_id=>28045831289354443 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_list_template_current=>t,
  p_list_template_noncurrent=> t2,
  p_list_template_name=>'Vertical Unordered List with Bullets',
  p_theme_id  => 101,
  p_theme_class_id => 1,
  p_list_template_before_rows=>'<ul class="t4VerticalUnorderedListwithBullets">',
  p_list_template_after_rows=>'</ul>',
  p_translate_this_template => 'N',
  p_list_template_comment=>'');
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/list/wizard_progress_list
prompt  ......list template 28046139334354444
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  t4 varchar2(32767) := null;
  t5 varchar2(32767) := null;
  t6 varchar2(32767) := null;
  t7 varchar2(32767) := null;
  t8 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_clob4 clob;
  l_clob5 clob;
  l_clob6 clob;
  l_clob7 clob;
  l_clob8 clob;
  l_length number := 1;
begin
t:=t||'<tr><td><div class="t4current">#TEXT#</div></td></tr>';

t2:=t2||'<tr><td><div>#TEXT#</div></td></tr>';

t3 := null;
t4 := null;
t5 := null;
t6 := null;
t7 := null;
t8 := null;
wwv_flow_api.create_list_template (
  p_id=>28046139334354444 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_list_template_current=>t,
  p_list_template_noncurrent=> t2,
  p_list_template_name=>'Wizard Progress List',
  p_theme_id  => 101,
  p_theme_class_id => 17,
  p_list_template_before_rows=>'<table border="0" cellpadding="0" cellspacing="0" summary="" class="t4WizardProgressList">',
  p_list_template_after_rows=>'<tr><td>&DONE.</td></tr>'||chr(10)||
'</table>',
  p_translate_this_template => 'N',
  p_list_template_comment=>'');
end;
null;
 
end;
/

prompt  ...report templates
--
--application/shared_components/user_interface/templates/report/borderless
prompt  ......report template 28040249967354430
 
begin
 
declare
  c1 varchar2(32767) := null;
  c2 varchar2(32767) := null;
  c3 varchar2(32767) := null;
  c4 varchar2(32767) := null;
begin
c1:=c1||'<td headers="#COLUMN_HEADER_NAME#" #ALIGNMENT# class="t4data">#COLUMN_VALUE#</td>';

c2 := null;
c3 := null;
c4 := null;
wwv_flow_api.create_row_template (
  p_id=> 28040249967354430 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_row_template_name=> 'Borderless',
  p_row_template1=> c1,
  p_row_template_condition1=> '',
  p_row_template2=> c2,
  p_row_template_condition2=> '',
  p_row_template3=> c3,
  p_row_template_condition3=> '',
  p_row_template4=> c4,
  p_row_template_condition4=> '',
  p_row_template_before_rows=>'<table cellpadding="0" border="0" cellspacing="0" summary="">#TOP_PAGINATION#'||chr(10)||
'<tr><td><table class="t4Borderless" cellpadding="0" border="0" cellspacing="0" summary="">',
  p_row_template_after_rows =>'</table><div class="t4CVS">#EXTERNAL_LINK##CSV_LINK#</div></td></tr>#PAGINATION#</table>'||chr(10)||
'',
  p_row_template_table_attr =>'OMIT',
  p_row_template_type =>'GENERIC_COLUMNS',
  p_column_heading_template=>'<th class="t4ReportHeader"#ALIGNMENT# id="#COLUMN_HEADER_NAME#">#COLUMN_HEADER#</th>',
  p_row_template_display_cond1=>'0',
  p_row_template_display_cond2=>'0',
  p_row_template_display_cond3=>'0',
  p_row_template_display_cond4=>'0',
  p_next_page_template=>'<a href="#LINK#" class="t4pagination">#PAGINATION_NEXT# &gt;</a>',
  p_previous_page_template=>'<a href="#LINK#" class="t4pagination">&lt;#PAGINATION_PREVIOUS#</a>',
  p_next_set_template=>'<a href="#LINK#" class="t4pagination">#PAGINATION_NEXT_SET#&gt;&gt;</a>',
  p_previous_set_template=>'<a href="#LINK#" class="t4pagination">&lt;&lt;#PAGINATION_PREVIOUS_SET#</a>',
  p_row_style_checked=>'#CCCCCC',
  p_theme_id  => 101,
  p_theme_class_id => 1,
  p_translate_this_template => 'N',
  p_row_template_comment=> '');
end;
null;
 
end;
/

 
begin
 
begin
wwv_flow_api.create_row_template_patch (
  p_id => 28040249967354430 + wwv_flow_api.g_id_offset,
  p_row_template_before_first =>'<tr #HIGHLIGHT_ROW#>',
  p_row_template_after_last =>'</tr>');
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/report/horizontal_border
prompt  ......report template 28040530393354433
 
begin
 
declare
  c1 varchar2(32767) := null;
  c2 varchar2(32767) := null;
  c3 varchar2(32767) := null;
  c4 varchar2(32767) := null;
begin
c1:=c1||'<td headers="#COLUMN_HEADER_NAME#" #ALIGNMENT# class="t4data">#COLUMN_VALUE#</td>';

c2 := null;
c3 := null;
c4 := null;
wwv_flow_api.create_row_template (
  p_id=> 28040530393354433 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_row_template_name=> 'Horizontal Border',
  p_row_template1=> c1,
  p_row_template_condition1=> '',
  p_row_template2=> c2,
  p_row_template_condition2=> '',
  p_row_template3=> c3,
  p_row_template_condition3=> '',
  p_row_template4=> c4,
  p_row_template_condition4=> '',
  p_row_template_before_rows=>'<table cellpadding="0" border="0" cellspacing="0" summary="">#TOP_PAGINATION#'||chr(10)||
'<tr><td><table class="t4HorizontalBorder" border="0" cellpadding="0" cellspacing="0" summary="">',
  p_row_template_after_rows =>'</table><div class="t4CVS">#EXTERNAL_LINK##CSV_LINK#</div></td></tr>#PAGINATION#</table>',
  p_row_template_table_attr =>'OMIT',
  p_row_template_type =>'GENERIC_COLUMNS',
  p_column_heading_template=>'<th class="t4ReportHeader"  id="#COLUMN_HEADER_NAME#" #ALIGNMENT#>#COLUMN_HEADER#</th>',
  p_row_template_display_cond1=>'0',
  p_row_template_display_cond2=>'0',
  p_row_template_display_cond3=>'0',
  p_row_template_display_cond4=>'0',
  p_next_page_template=>'<a href="#LINK#" class="t4pagination">#PAGINATION_NEXT# &gt;</a>',
  p_previous_page_template=>'<a href="#LINK#" class="t4pagination">&lt;#PAGINATION_PREVIOUS#</a>',
  p_next_set_template=>'<a href="#LINK#" class="t4pagination">#PAGINATION_NEXT_SET#&gt;&gt;</a>',
  p_previous_set_template=>'<a href="#LINK#" class="t4pagination">&lt;&lt;#PAGINATION_PREVIOUS_SET#</a>',
  p_row_style_checked=>'#CCCCCC',
  p_theme_id  => 101,
  p_theme_class_id => 2,
  p_translate_this_template => 'N',
  p_row_template_comment=> '');
end;
null;
 
end;
/

 
begin
 
begin
wwv_flow_api.create_row_template_patch (
  p_id => 28040530393354433 + wwv_flow_api.g_id_offset,
  p_row_template_before_first =>'<tr #HIGHLIGHT_ROW#>',
  p_row_template_after_last =>'</tr>');
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/report/one_column_unordered_list
prompt  ......report template 28040844098354433
 
begin
 
declare
  c1 varchar2(32767) := null;
  c2 varchar2(32767) := null;
  c3 varchar2(32767) := null;
  c4 varchar2(32767) := null;
begin
c1:=c1||'#COLUMN_VALUE#';

c2 := null;
c3 := null;
c4 := null;
wwv_flow_api.create_row_template (
  p_id=> 28040844098354433 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_row_template_name=> 'One Column Unordered List',
  p_row_template1=> c1,
  p_row_template_condition1=> '',
  p_row_template2=> c2,
  p_row_template_condition2=> '',
  p_row_template3=> c3,
  p_row_template_condition3=> '',
  p_row_template4=> c4,
  p_row_template_condition4=> '',
  p_row_template_before_rows=>'<table border="0" cellpadding="0" cellspacing="0" summary="">'||chr(10)||
'#TOP_PAGINATION#<tr><td><ul class="t4OneColumnUnorderedList">',
  p_row_template_after_rows =>'</ul><div class="t4CVS">#EXTERNAL_LINK##CSV_LINK#</div></td></tr>#PAGINATION#</table>',
  p_row_template_table_attr =>'OMIT',
  p_row_template_type =>'GENERIC_COLUMNS',
  p_column_heading_template=>'',
  p_row_template_display_cond1=>'0',
  p_row_template_display_cond2=>'0',
  p_row_template_display_cond3=>'0',
  p_row_template_display_cond4=>'0',
  p_next_page_template=>'<a href="#LINK#" class="t4pagination">#PAGINATION_NEXT# &gt;</a>',
  p_previous_page_template=>'<a href="#LINK#" class="t4pagination">&lt;#PAGINATION_PREVIOUS#</a>',
  p_next_set_template=>'<a href="#LINK#" class="t4pagination">#PAGINATION_NEXT_SET#&gt;&gt;</a>',
  p_previous_set_template=>'<a href="#LINK#" class="t4pagination">&lt;&lt;#PAGINATION_PREVIOUS_SET#</a>',
  p_theme_id  => 101,
  p_theme_class_id => 3,
  p_translate_this_template => 'N',
  p_row_template_comment=> '');
end;
null;
 
end;
/

 
begin
 
begin
wwv_flow_api.create_row_template_patch (
  p_id => 28040844098354433 + wwv_flow_api.g_id_offset,
  p_row_template_before_first =>'<li>',
  p_row_template_after_last =>'</li>');
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/report/standard
prompt  ......report template 28041136573354435
 
begin
 
declare
  c1 varchar2(32767) := null;
  c2 varchar2(32767) := null;
  c3 varchar2(32767) := null;
  c4 varchar2(32767) := null;
begin
c1:=c1||'<td #ALIGNMENT# headers="#COLUMN_HEADER#" class="t4data">#COLUMN_VALUE#</td>';

c2 := null;
c3 := null;
c4 := null;
wwv_flow_api.create_row_template (
  p_id=> 28041136573354435 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_row_template_name=> 'Standard',
  p_row_template1=> c1,
  p_row_template_condition1=> '',
  p_row_template2=> c2,
  p_row_template_condition2=> '',
  p_row_template3=> c3,
  p_row_template_condition3=> '',
  p_row_template4=> c4,
  p_row_template_condition4=> '',
  p_row_template_before_rows=>'<table cellpadding="0" border="0" cellspacing="0" summary="">#TOP_PAGINATION#'||chr(10)||
'<tr><td><table cellpadding="0" border="0" cellspacing="0" summary="" class="t4Standard">',
  p_row_template_after_rows =>'</table><div class="t4CVS">#EXTERNAL_LINK##CSV_LINK#</div></td></tr>#PAGINATION#</table>',
  p_row_template_table_attr =>'OMIT',
  p_row_template_type =>'GENERIC_COLUMNS',
  p_column_heading_template=>'<th class="t4ReportHeader"#ALIGNMENT# id="#COLUMN_HEADER_NAME#">#COLUMN_HEADER#</th>',
  p_row_template_display_cond1=>'0',
  p_row_template_display_cond2=>'0',
  p_row_template_display_cond3=>'0',
  p_row_template_display_cond4=>'0',
  p_next_page_template=>'<a href="#LINK#" class="t4pagination">#PAGINATION_NEXT# &gt;</a>',
  p_previous_page_template=>'<a href="#LINK#" class="t4pagination">&lt;#PAGINATION_PREVIOUS#</a>',
  p_next_set_template=>'<a href="#LINK#" class="t4pagination">#PAGINATION_NEXT_SET#&gt;&gt;</a>',
  p_previous_set_template=>'<a href="#LINK#" class="t4pagination">&lt;&lt;#PAGINATION_PREVIOUS_SET#</a>',
  p_row_style_checked=>'#CCCCCC',
  p_theme_id  => 101,
  p_theme_class_id => 4,
  p_translate_this_template => 'N',
  p_row_template_comment=> '');
end;
null;
 
end;
/

 
begin
 
begin
wwv_flow_api.create_row_template_patch (
  p_id => 28041136573354435 + wwv_flow_api.g_id_offset,
  p_row_template_before_first =>'<tr #HIGHLIGHT_ROW#>',
  p_row_template_after_last =>'</tr>');
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/report/standard_ppr
prompt  ......report template 28041446261354435
 
begin
 
declare
  c1 varchar2(32767) := null;
  c2 varchar2(32767) := null;
  c3 varchar2(32767) := null;
  c4 varchar2(32767) := null;
begin
c1:=c1||'<td #ALIGNMENT# headers="#COLUMN_HEADER#" class="t4data">#COLUMN_VALUE#</td>';

c2 := null;
c3 := null;
c4 := null;
wwv_flow_api.create_row_template (
  p_id=> 28041446261354435 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_row_template_name=> 'Standard (PPR)',
  p_row_template1=> c1,
  p_row_template_condition1=> '',
  p_row_template2=> c2,
  p_row_template_condition2=> '',
  p_row_template3=> c3,
  p_row_template_condition3=> '',
  p_row_template4=> c4,
  p_row_template_condition4=> '',
  p_row_template_before_rows=>'<div id="report#REGION_ID#"><htmldb:#REGION_ID#><table cellpadding="0" border="0" cellspacing="0" summary="">#TOP_PAGINATION#'||chr(10)||
'<tr><td><table cellpadding="0" border="0" cellspacing="0" summary="" class="t4Standard">',
  p_row_template_after_rows =>'</table><div class="t4CVS">#EXTERNAL_LINK##CSV_LINK#</div></td></tr>#PAGINATION#</table><script language=JavaScript type=text/javascript>'||chr(10)||
'<!--'||chr(10)||
'init_htmlPPRReport(''#REGION_ID#'');'||chr(10)||
''||chr(10)||
'//-->'||chr(10)||
'</script>'||chr(10)||
'</htmldb:#REGION_ID#>'||chr(10)||
'</div>',
  p_row_template_table_attr =>'OMIT',
  p_row_template_type =>'GENERIC_COLUMNS',
  p_column_heading_template=>'<th class="t4ReportHeader"#ALIGNMENT# id="#COLUMN_HEADER_NAME#">#COLUMN_HEADER#</th>',
  p_row_template_display_cond1=>'0',
  p_row_template_display_cond2=>'0',
  p_row_template_display_cond3=>'0',
  p_row_template_display_cond4=>'0',
  p_next_page_template=>'<a href="javascript:html_PPR_Report_Page(this,''#REGION_ID#'',''#LINK#'')" class="t4pagination">#PAGINATION_NEXT# &gt;</a>',
  p_previous_page_template=>'<a href="javascript:html_PPR_Report_Page(this,''#REGION_ID#'',''#LINK#'')" class="t4pagination">&lt;#PAGINATION_PREVIOUS#</a>',
  p_next_set_template=>'<a href="javascript:html_PPR_Report_Page(this,''#REGION_ID#'',''#LINK#'')" class="t4pagination">#PAGINATION_NEXT_SET#&gt;&gt;</a>',
  p_previous_set_template=>'<a href="javascript:html_PPR_Report_Page(this,''#REGION_ID#'',''#LINK#'')" class="t4pagination">&lt;&lt;#PAGINATION_PREVIOUS_SET#</a>',
  p_row_style_checked=>'#CCCCCC',
  p_theme_id  => 101,
  p_theme_class_id => 7,
  p_translate_this_template => 'N',
  p_row_template_comment=> '');
end;
null;
 
end;
/

 
begin
 
begin
wwv_flow_api.create_row_template_patch (
  p_id => 28041446261354435 + wwv_flow_api.g_id_offset,
  p_row_template_before_first =>'<tr #HIGHLIGHT_ROW#>',
  p_row_template_after_last =>'</tr>');
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/report/standard_alternating_row_colors
prompt  ......report template 28041755229354435
 
begin
 
declare
  c1 varchar2(32767) := null;
  c2 varchar2(32767) := null;
  c3 varchar2(32767) := null;
  c4 varchar2(32767) := null;
begin
c1:=c1||'<td headers="#COLUMN_HEADER_NAME#" #ALIGNMENT# class="t4data">#COLUMN_VALUE#</td>'||chr(10)||
'';

c2:=c2||'<td headers="#COLUMN_HEADER_NAME#" #ALIGNMENT# class="t4dataalt">#COLUMN_VALUE#</td>';

c3 := null;
c4 := null;
wwv_flow_api.create_row_template (
  p_id=> 28041755229354435 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_row_template_name=> 'Standard, Alternating Row Colors',
  p_row_template1=> c1,
  p_row_template_condition1=> '',
  p_row_template2=> c2,
  p_row_template_condition2=> '',
  p_row_template3=> c3,
  p_row_template_condition3=> '',
  p_row_template4=> c4,
  p_row_template_condition4=> '',
  p_row_template_before_rows=>'<table border="0" cellpadding="0" cellspacing="0" summary="">#TOP_PAGINATION#'||chr(10)||
'<tr><td><table border="0" cellpadding="0" cellspacing="0" summary="" class="t4StandardAlternatingRowColors">',
  p_row_template_after_rows =>'</table><div class="t4CVS">#EXTERNAL_LINK##CSV_LINK#</div></td></tr>#PAGINATION#</table>',
  p_row_template_table_attr =>'OMIT',
  p_row_template_type =>'GENERIC_COLUMNS',
  p_column_heading_template=>'<th class="t4ReportHeader"#ALIGNMENT# id="#COLUMN_HEADER_NAME#">#COLUMN_HEADER#</th>',
  p_row_template_display_cond1=>'ODD_ROW_NUMBERS',
  p_row_template_display_cond2=>'NOT_CONDITIONAL',
  p_row_template_display_cond3=>'NOT_CONDITIONAL',
  p_row_template_display_cond4=>'ODD_ROW_NUMBERS',
  p_next_page_template=>'<a href="#LINK#" class="t4pagination">#PAGINATION_NEXT# &gt;</a>',
  p_previous_page_template=>'<a href="#LINK#" class="t4pagination">&lt;#PAGINATION_PREVIOUS#</a>',
  p_next_set_template=>'<a href="#LINK#" class="t4pagination">#PAGINATION_NEXT_SET#&gt;&gt;</a>',
  p_previous_set_template=>'<a href="#LINK#" class="t4pagination">&lt;&lt;#PAGINATION_PREVIOUS_SET#</a>',
  p_row_style_checked=>'#CCCCCC',
  p_theme_id  => 101,
  p_theme_class_id => 5,
  p_translate_this_template => 'N',
  p_row_template_comment=> '');
end;
null;
 
end;
/

 
begin
 
begin
wwv_flow_api.create_row_template_patch (
  p_id => 28041755229354435 + wwv_flow_api.g_id_offset,
  p_row_template_before_first =>'<tr #HIGHLIGHT_ROW#> ',
  p_row_template_after_last =>'</tr>');
exception when others then null;
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/report/value_attribute_pairs
prompt  ......report template 28042034196354435
 
begin
 
declare
  c1 varchar2(32767) := null;
  c2 varchar2(32767) := null;
  c3 varchar2(32767) := null;
  c4 varchar2(32767) := null;
begin
c1:=c1||'<tr>'||chr(10)||
'<th class="t4ReportHeader">#COLUMN_HEADER#</th>'||chr(10)||
'<td class="t4data">#COLUMN_VALUE#</td>'||chr(10)||
'</tr>';

c2 := null;
c3 := null;
c4 := null;
wwv_flow_api.create_row_template (
  p_id=> 28042034196354435 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_row_template_name=> 'Value Attribute Pairs',
  p_row_template1=> c1,
  p_row_template_condition1=> '',
  p_row_template2=> c2,
  p_row_template_condition2=> '',
  p_row_template3=> c3,
  p_row_template_condition3=> '',
  p_row_template4=> c4,
  p_row_template_condition4=> '',
  p_row_template_before_rows=>'<table cellpadding="0" cellspacing="0" border="0" summary="">'||chr(10)||
'#TOP_PAGINATION#'||chr(10)||
'<tr>'||chr(10)||
'<td><table cellpadding="0" cellspacing="0" border="0" summary="" class="t4ValueAttributePairs">',
  p_row_template_after_rows =>'</table><div class="t4CVS">#EXTERNAL_LINK##CSV_LINK#</div></td></tr>#PAGINATION#</table>',
  p_row_template_table_attr =>'OMIT',
  p_row_template_type =>'GENERIC_COLUMNS',
  p_column_heading_template=>'',
  p_row_template_display_cond1=>'0',
  p_row_template_display_cond2=>'0',
  p_row_template_display_cond3=>'0',
  p_row_template_display_cond4=>'0',
  p_next_page_template=>'<a href="#LINK#" class="t4pagination">#PAGINATION_NEXT# &gt;</a>',
  p_previous_page_template=>'<a href="#LINK#" class="t4pagination">&lt;#PAGINATION_PREVIOUS#</a>',
  p_next_set_template=>'<a href="#LINK#" class="t4pagination">#PAGINATION_NEXT_SET#&gt;&gt;</a>',
  p_previous_set_template=>'<a href="#LINK#" class="t4pagination">&lt;&lt;#PAGINATION_PREVIOUS_SET#</a>',
  p_theme_id  => 101,
  p_theme_class_id => 6,
  p_translate_this_template => 'N',
  p_row_template_comment=> '');
end;
null;
 
end;
/

 
begin
 
begin
wwv_flow_api.create_row_template_patch (
  p_id => 28042034196354435 + wwv_flow_api.g_id_offset,
  p_row_template_before_first =>'',
  p_row_template_after_last =>'<tr><td colspan="2" class="t4seperate"><hr /></td></tr>');
exception when others then null;
end;
null;
 
end;
/

prompt  ...label templates
--
--application/shared_components/user_interface/templates/label/no_label
prompt  ......label template 28046449440354444
 
begin
 
begin
wwv_flow_api.create_field_template (
  p_id=> 28046449440354444 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_template_name=>'No Label',
  p_template_body1=>'<span class="t4NoLabel">',
  p_template_body2=>'</span>',
  p_on_error_before_label=>'<div class="t4InlineError">',
  p_on_error_after_label=>'<br/>#ERROR_MESSAGE#</div>',
  p_theme_id  => 101,
  p_theme_class_id => 13,
  p_translate_this_template=> 'N',
  p_template_comment=> '');
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/label/optional_label
prompt  ......label template 28046532275354449
 
begin
 
begin
wwv_flow_api.create_field_template (
  p_id=> 28046532275354449 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_template_name=>'Optional Label',
  p_template_body1=>'<label for="#CURRENT_ITEM_NAME#"><span class="t4OptionalLabel">',
  p_template_body2=>'</span></label>',
  p_on_error_before_label=>'<div class="t4InlineError">',
  p_on_error_after_label=>'<br/>#ERROR_MESSAGE#</div>',
  p_theme_id  => 101,
  p_theme_class_id => 3,
  p_translate_this_template=> 'N',
  p_template_comment=> '');
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/label/optional_label_with_help
prompt  ......label template 28046657494354449
 
begin
 
begin
wwv_flow_api.create_field_template (
  p_id=> 28046657494354449 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_template_name=>'Optional Label with Help',
  p_template_body1=>'<label for="#CURRENT_ITEM_NAME#"><a class="t4OptionalLabelwithHelp" href="javascript:popupFieldHelp(''#CURRENT_ITEM_ID#'',''&SESSION.'')" tabindex="999">',
  p_template_body2=>'</a></label>',
  p_on_error_before_label=>'<div class="t4InlineError">',
  p_on_error_after_label=>'<br/>#ERROR_MESSAGE#</div>',
  p_theme_id  => 101,
  p_theme_class_id => 1,
  p_translate_this_template=> 'N',
  p_template_comment=> '');
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/label/required_label
prompt  ......label template 28046741903354450
 
begin
 
begin
wwv_flow_api.create_field_template (
  p_id=> 28046741903354450 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_template_name=>'Required Label',
  p_template_body1=>'<label for="#CURRENT_ITEM_NAME#"><span class="t4RequiredLabel">',
  p_template_body2=>'</span></label>',
  p_on_error_before_label=>'<div class="t4InlineError">',
  p_on_error_after_label=>'<br/>#ERROR_MESSAGE#</div>',
  p_theme_id  => 101,
  p_theme_class_id => 4,
  p_translate_this_template=> 'N',
  p_template_comment=> '');
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/label/required_label_with_help
prompt  ......label template 28046837496354450
 
begin
 
begin
wwv_flow_api.create_field_template (
  p_id=> 28046837496354450 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_template_name=>'Required Label with Help',
  p_template_body1=>'<label for="#CURRENT_ITEM_NAME#"><a class="t4RequiredLabelwithHelp" href="javascript:popupFieldHelp(''#CURRENT_ITEM_ID#'',''&SESSION.'')" tabindex="999">',
  p_template_body2=>' *</a></label>',
  p_on_error_before_label=>'<div class="t4InlineError">',
  p_on_error_after_label=>'<br/>#ERROR_MESSAGE#</div>',
  p_theme_id  => 101,
  p_theme_class_id => 2,
  p_translate_this_template=> 'N',
  p_template_comment=> '');
end;
null;
 
end;
/

prompt  ...breadcrumb templates
--
--application/shared_components/user_interface/templates/breadcrumb/breadcrumb_menu
prompt  ......template 28047751118354455
 
begin
 
begin
wwv_flow_api.create_menu_template (
  p_id=> 28047751118354455 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=>'Breadcrumb Menu',
  p_before_first=>'',
  p_current_page_option=>'<img src="#WORKSPACE_IMAGES#black.gif" alt=""><a href="#LINK#" class="current">#NAME#</a>',
  p_non_current_page_option=>'<img src="#WORKSPACE_IMAGES#black.gif" alt=""><a href="#LINK#" class="empty">#NAME#</a>',
  p_menu_link_attributes=>'',
  p_between_levels=>'&nbsp;&gt;&nbsp;',
  p_after_last=>'',
  p_max_levels=>12,
  p_start_with_node=>'PARENT_TO_LEAF',
  p_theme_id  => 101,
  p_theme_class_id => 1,
  p_translate_this_template => 'N',
  p_template_comments=>'');
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/breadcrumb/hierarchical_menu
prompt  ......template 28047859126354458
 
begin
 
begin
wwv_flow_api.create_menu_template (
  p_id=> 28047859126354458 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=>'Hierarchical Menu',
  p_before_first=>'<ul class="t4HierarchicalMenu">',
  p_current_page_option=>'<li class="t4current"><a href="#LINK#">#NAME#</a></li>',
  p_non_current_page_option=>'<li><a href="#LINK#">#NAME#</a></li>',
  p_menu_link_attributes=>'',
  p_between_levels=>'',
  p_after_last=>'</ul>',
  p_max_levels=>11,
  p_start_with_node=>'CHILD_MENU',
  p_theme_id  => 101,
  p_theme_class_id => 2,
  p_translate_this_template => 'N',
  p_template_comments=>'');
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/popuplov
prompt  ...popup list of values templates
--
prompt  ......template 28048261015354461
 
begin
 
begin
wwv_flow_api.create_popup_lov_template (
  p_id=> 28048261015354461 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_popup_icon=>'#IMAGE_PREFIX#list_gray.gif',
  p_popup_icon_attr=>'width="13" height="13" alt="Popup Lov"',
  p_popup_icon2=>'',
  p_popup_icon_attr2=>'',
  p_page_name=>'winlov',
  p_page_title=>'Search Dialog',
  p_page_html_head=>'<link rel="stylesheet" href="#IMAGE_PREFIX#themes/theme_4/theme_V2.css" type="text/css">'||chr(10)||
'',
  p_page_body_attr=>'onload="first_field()" style="background-color:#FFFFFF;margin:0;"',
  p_before_field_text=>'<div class="t4PopupHead">',
  p_page_heading_text=>'The % wildcard can be used.',
  p_page_footer_text =>'',
  p_filter_width     =>'20',
  p_filter_max_width =>'100',
  p_filter_text_attr =>'',
  p_find_button_text =>'Search',
  p_find_button_image=>'',
  p_find_button_attr =>'',
  p_close_button_text=>'Close',
  p_close_button_image=>'',
  p_close_button_attr=>'',
  p_next_button_text =>'Next >',
  p_next_button_image=>'',
  p_next_button_attr =>'',
  p_prev_button_text =>'< Previous',
  p_prev_button_image=>'',
  p_prev_button_attr =>'',
  p_after_field_text=>'</div>',
  p_scrollbars=>'1',
  p_resizable=>'1',
  p_width =>'400',
  p_height=>'450',
  p_result_row_x_of_y=>'<br /><div style="padding:2px; font-size:8pt;">Row(s) #FIRST_ROW# - #LAST_ROW#</div>',
  p_result_rows_per_pg=>500,
  p_before_result_set=>'<div class="t4PopupBody">',
  p_theme_id  => 101,
  p_theme_class_id => 1,
  p_after_result_set   =>'</div>');
end;
null;
 
end;
/

prompt  ...calendar templates
--
--application/shared_components/user_interface/templates/calendar/calendar
prompt  ......template 28047959384354460
 
begin
 
begin
wwv_flow_api.create_calendar_template(
  p_id=> 28047959384354460 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_cal_template_name=>'Calendar',
  p_translate_this_template=> 'Y',
  p_day_of_week_format=> '<th class="t4DayOfWeek">#IDAY#</th>',
  p_month_title_format=> '<table cellspacing="0" cellpadding="0" border="0" summary="" class="t4CalendarHolder"> '||chr(10)||
' <tr>'||chr(10)||
'   <td class="t4MonthTitle">#IMONTH# #YYYY#</td>'||chr(10)||
' </tr>'||chr(10)||
' <tr>'||chr(10)||
' <td>',
  p_month_open_format=> '<table border="0" cellpadding="0" cellspacing="0" summary="0" class="t4Calendar">',
  p_month_close_format=> '</table></td>'||chr(10)||
'</tr>'||chr(10)||
'</table>'||chr(10)||
'',
  p_day_title_format=> '<div class="t4DayTitle">#DD#</div>',
  p_day_open_format=> '<td class="t4Day" valign="top">',
  p_day_close_format=> '</td>',
  p_today_open_format=> '<td valign="top" class="t4Today">',
  p_weekend_title_format=> '<div class="t4WeekendDayTitle">#DD#</div>',
  p_weekend_open_format => '<td valign="top" class="t4WeekendDay">',
  p_weekend_close_format => '</td>',
  p_nonday_title_format => '<div class="t4NonDayTitle">#DD#</div>',
  p_nonday_open_format => '<td class="t4NonDay" valign="top">',
  p_nonday_close_format => '</td>',
  p_week_title_format => '',
  p_week_open_format => '<tr>',
  p_week_close_format => '</tr> ',
  p_daily_title_format => '<th width="14%" class="calheader">#IDAY#</th>',
  p_daily_open_format => '<tr>',
  p_daily_close_format => '</tr>',
  p_weekly_title_format => '<table cellspacing="0" cellpadding="0" border="0" summary="" class="t4WeekCalendarHolder">'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4MonthTitle" id="test">#WTITLE#</td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td>',
  p_weekly_day_of_week_format => '<th class="t4DayOfWeek">#IDAY#<br>#MM#/#DD#</th>',
  p_weekly_month_open_format => '<table border="0" cellpadding="0" cellspacing="0" summary="0" class="t4WeekCalendar">',
  p_weekly_month_close_format => '</table></td></tr></table>',
  p_weekly_day_title_format => '',
  p_weekly_day_open_format => '<td class="t4Day" valign="top">',
  p_weekly_day_close_format => '<br /></td>',
  p_weekly_today_open_format => '<td class="t4Today" valign="top">',
  p_weekly_weekend_title_format => '',
  p_weekly_weekend_open_format => '<td valign="top" class="t4NonDay">',
  p_weekly_weekend_close_format => '<br /></td>',
  p_weekly_time_open_format => '<th class="t4Hour">',
  p_weekly_time_close_format => '<br /></th>',
  p_weekly_time_title_format => '#TIME#',
  p_weekly_hour_open_format => '<tr>',
  p_weekly_hour_close_format => '</tr>',
  p_daily_day_of_week_format => '<th class="t4DayOfWeek">#IDAY# #DD#/#MM#</th>',
  p_daily_month_title_format => '<table cellspacing="0" cellpadding="0" border="0" summary="" class="t4DayCalendarHolder"> <tr> <td class="t4MonthTitle">#IMONTH# #DD#, #YYYY#</td> </tr> <tr> <td>'||chr(10)||
'',
  p_daily_month_open_format => '<table border="0" cellpadding="2" cellspacing="0" summary="0" class="t4DayCalendar">',
  p_daily_month_close_format => '</table></td> </tr> </table>',
  p_daily_day_title_format => '',
  p_daily_day_open_format => '<td valign="top" class="t4Day">',
  p_daily_day_close_format => '<br /></td>',
  p_daily_today_open_format => '<td valign="top" class="t4Today">',
  p_daily_time_open_format => '<th class="t4Hour">',
  p_daily_time_close_format => '<br /></th>',
  p_daily_time_title_format => '#TIME#',
  p_daily_hour_open_format => '<tr>',
  p_daily_hour_close_format => '</tr>',
  p_theme_id  => 101,
  p_theme_class_id => 1,
  p_reference_id=> null);
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/calendar/calendar_alternative_1
prompt  ......template 28048056078354461
 
begin
 
begin
wwv_flow_api.create_calendar_template(
  p_id=> 28048056078354461 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_cal_template_name=>'Calendar, Alternative 1',
  p_translate_this_template=> 'Y',
  p_day_of_week_format=> '<th class="t4DayOfWeek">#IDAY#</th>',
  p_month_title_format=> '<table cellspacing="0" cellpadding="0" border="0" summary="" class="t4CalendarAlternative1Holder"> '||chr(10)||
' <tr>'||chr(10)||
'   <td class="t4MonthTitle">#IMONTH# #YYYY#</td>'||chr(10)||
' </tr>'||chr(10)||
' <tr>'||chr(10)||
' <td>',
  p_month_open_format=> '<table border="0" cellpadding="0" cellspacing="0" summary="0" class="t4CalendarAlternative1">',
  p_month_close_format=> '</table></td>'||chr(10)||
'</tr>'||chr(10)||
'</table>'||chr(10)||
'',
  p_day_title_format=> '<div class="t4DayTitle">#DD#</div>',
  p_day_open_format=> '<td class="t4Day" valign="top">',
  p_day_close_format=> '</td>',
  p_today_open_format=> '<td valign="top" class="t4Today">',
  p_weekend_title_format=> '<div class="t4WeekendDayTitle">#DD#</div>',
  p_weekend_open_format => '<td valign="top" class="t4WeekendDay">',
  p_weekend_close_format => '</td>',
  p_nonday_title_format => '<div class="t4NonDayTitle">#DD#</div>',
  p_nonday_open_format => '<td class="t4NonDay" valign="top">',
  p_nonday_close_format => '</td>',
  p_week_title_format => '',
  p_week_open_format => '<tr>',
  p_week_close_format => '</tr> ',
  p_daily_title_format => '<th width="14%" class="calheader">#IDAY#</th>',
  p_daily_open_format => '<tr>',
  p_daily_close_format => '</tr>',
  p_weekly_title_format => '<table cellspacing="0" cellpadding="0" border="0" summary="" class="t4WeekCalendarAlternative1Holder">'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4MonthTitle" id="test">#WTITLE#</td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td>',
  p_weekly_day_of_week_format => '<th class="t4DayOfWeek">#IDAY#<br>#MM#/#DD#</th>',
  p_weekly_month_open_format => '<table border="0" cellpadding="0" cellspacing="0" summary="0" class="t4WeekCalendarAlternative1">',
  p_weekly_month_close_format => '</table></td></tr></table>',
  p_weekly_day_title_format => '',
  p_weekly_day_open_format => '<td class="t4Day" valign="top">',
  p_weekly_day_close_format => '<br /></td>',
  p_weekly_today_open_format => '<td class="t4Today" valign="top">',
  p_weekly_weekend_title_format => '',
  p_weekly_weekend_open_format => '<td valign="top" class="t4NonDay">',
  p_weekly_weekend_close_format => '<br /></td>',
  p_weekly_time_open_format => '<th class="t4Hour">',
  p_weekly_time_close_format => '<br /></th>',
  p_weekly_time_title_format => '#TIME#',
  p_weekly_hour_open_format => '<tr>',
  p_weekly_hour_close_format => '</tr>',
  p_daily_day_of_week_format => '<th class="t4DayOfWeek">#IDAY# #DD#/#MM#</th>',
  p_daily_month_title_format => '<table cellspacing="0" cellpadding="0" border="0" summary="" class="t4DayCalendarAlternative1Holder"> <tr><td class="t4MonthTitle">#IMONTH# #DD#, #YYYY#</td></tr><tr><td>'||chr(10)||
'',
  p_daily_month_open_format => '<table border="0" cellpadding="2" cellspacing="0" summary="0" class="t4DayCalendarAlternative1">',
  p_daily_month_close_format => '</table></td> </tr> </table>',
  p_daily_day_title_format => '',
  p_daily_day_open_format => '<td valign="top" class="t4Day">',
  p_daily_day_close_format => '<br /></td>',
  p_daily_today_open_format => '<td valign="top" class="t4Today">',
  p_daily_time_open_format => '<th class="t4Hour">',
  p_daily_time_close_format => '<br /></th>',
  p_daily_time_title_format => '#TIME#',
  p_daily_hour_open_format => '<tr>',
  p_daily_hour_close_format => '</tr>',
  p_theme_id  => 101,
  p_theme_class_id => 2,
  p_reference_id=> null);
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/calendar/small_calendar
prompt  ......template 28048158316354461
 
begin
 
begin
wwv_flow_api.create_calendar_template(
  p_id=> 28048158316354461 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_cal_template_name=>'Small Calendar',
  p_translate_this_template=> 'Y',
  p_day_of_week_format=> '',
  p_month_title_format=> '<table cellspacing="0" cellpadding="0" border="0" summary="" class="t4SmallCalenderHolder"> '||chr(10)||
' <tr>'||chr(10)||
'   <td class="t4MonthTitle">#IMONTH# #YYYY#</td>'||chr(10)||
' </tr>'||chr(10)||
' <tr>'||chr(10)||
' <td>',
  p_month_open_format=> '<table border="0" cellpadding="0" cellspacing="0" summary="0" class="t4SmallCalender">',
  p_month_close_format=> '</table></td>'||chr(10)||
'</tr>'||chr(10)||
'</table>'||chr(10)||
'',
  p_day_title_format=> '<div class="t4DayTitle">#DD#</div>',
  p_day_open_format=> '<td class="t4Day" valign="top">',
  p_day_close_format=> '</td>',
  p_today_open_format=> '<td valign="top" class="t4Today">',
  p_weekend_title_format=> '<div class="t4WeekendDayTitle">#DD#</div>',
  p_weekend_open_format => '<td valign="top" class="t4WeekendDay">',
  p_weekend_close_format => '</td>',
  p_nonday_title_format => '<div class="t4NonDayTitle">#DD#</div>',
  p_nonday_open_format => '<td class="t4NonDay" valign="top">',
  p_nonday_close_format => '</td>',
  p_week_title_format => '',
  p_week_open_format => '<tr>',
  p_week_close_format => '</tr> ',
  p_daily_title_format => '<th width="14%" class="calheader">#IDAY#</th>',
  p_daily_open_format => '<tr>',
  p_daily_close_format => '</tr>',
  p_weekly_title_format => '<table cellspacing="0" cellpadding="0" border="0" summary="" class="t4SmallWeekCalendarHolder">'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4MonthTitle" id="test">#WTITLE#</td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td>',
  p_weekly_day_of_week_format => '<th class="t4DayOfWeek">#IDAY#<br />#MM#/#DD#</th>',
  p_weekly_month_open_format => '<table border="0" cellpadding="0" cellspacing="0" summary="0" class="t4SmallWeekCalendar">',
  p_weekly_month_close_format => '</table></td></tr></table>',
  p_weekly_day_title_format => '',
  p_weekly_day_open_format => '<td class="t4Day" valign="top">',
  p_weekly_day_close_format => '<br /></td>',
  p_weekly_today_open_format => '<td class="t4Today" valign="top">',
  p_weekly_weekend_title_format => '',
  p_weekly_weekend_open_format => '<td valign="top" class="t4NonDay">',
  p_weekly_weekend_close_format => '<br /></td>',
  p_weekly_time_open_format => '<th class="t4Hour">',
  p_weekly_time_close_format => '<br /></th>',
  p_weekly_time_title_format => '#TIME#',
  p_weekly_hour_open_format => '<tr>',
  p_weekly_hour_close_format => '</tr>',
  p_daily_day_of_week_format => '<th class="t4DayOfWeek">#IDAY# #DD#/#MM#</th>',
  p_daily_month_title_format => '<table cellspacing="0" cellpadding="0" border="0" summary="" class="t4SmallDayCalendarHolder"> <tr> <td class="t4MonthTitle">#IMONTH# #DD#, #YYYY#</td> </tr><tr><td>'||chr(10)||
'',
  p_daily_month_open_format => '<table border="0" cellpadding="2" cellspacing="0" summary="0" class="t4SmallDayCalendar">',
  p_daily_month_close_format => '</table></td></tr></table>',
  p_daily_day_title_format => '',
  p_daily_day_open_format => '<td valign="top" class="t4Day">',
  p_daily_day_close_format => '<br /></td>',
  p_daily_today_open_format => '<td valign="top" class="t4Today">',
  p_daily_time_open_format => '<th class="t4Hour">',
  p_daily_time_close_format => '<br /></th>',
  p_daily_time_title_format => '#TIME#',
  p_daily_hour_open_format => '<tr>',
  p_daily_hour_close_format => '</tr>',
  p_theme_id  => 101,
  p_theme_class_id => 3,
  p_reference_id=> null);
end;
null;
 
end;
/

prompt  ...application themes
--
--application/shared_components/user_interface/themes/national_grid
prompt  ......theme 28048457003354469
begin
wwv_flow_api.create_theme (
  p_id =>28048457003354469 + wwv_flow_api.g_id_offset,
  p_flow_id =>wwv_flow.g_flow_id,
  p_theme_id  => 101,
  p_theme_name=>'National Grid',
  p_default_page_template=>28031530009354416 + wwv_flow_api.g_id_offset,
  p_error_template=>42209241448421762 + wwv_flow_api.g_id_offset,
  p_printer_friendly_template=>28033049158354418 + wwv_flow_api.g_id_offset,
  p_breadcrumb_display_point=>'REGION_POSITION_01',
  p_sidebar_display_point=>'REGION_POSITION_02',
  p_login_template=>28031359192354383 + wwv_flow_api.g_id_offset,
  p_default_button_template=>28046959836354450 + wwv_flow_api.g_id_offset,
  p_default_region_template=>28038130488354430 + wwv_flow_api.g_id_offset,
  p_default_chart_template =>28035460347354425 + wwv_flow_api.g_id_offset,
  p_default_form_template  =>28035733013354425 + wwv_flow_api.g_id_offset,
  p_default_reportr_template   =>28038130488354430 + wwv_flow_api.g_id_offset,
  p_default_tabform_template=>28038130488354430 + wwv_flow_api.g_id_offset,
  p_default_wizard_template=>28039654408354430 + wwv_flow_api.g_id_offset,
  p_default_menur_template=>28034529370354425 + wwv_flow_api.g_id_offset,
  p_default_listr_template=>28038130488354430 + wwv_flow_api.g_id_offset,
  p_default_report_template   =>28041136573354435 + wwv_flow_api.g_id_offset,
  p_default_label_template=>28046657494354449 + wwv_flow_api.g_id_offset,
  p_default_menu_template=>28047751118354455 + wwv_flow_api.g_id_offset,
  p_default_calendar_template=>28047959384354460 + wwv_flow_api.g_id_offset,
  p_default_list_template=>28045831289354443 + wwv_flow_api.g_id_offset,
  p_default_option_label=>28046657494354449 + wwv_flow_api.g_id_offset,
  p_default_required_label=>28046837496354450 + wwv_flow_api.g_id_offset);
end;
/
 
begin
wwv_flow_api.g_varchar2_table := wwv_flow_api.empty_varchar2_table;
wwv_flow_api.g_varchar2_table(1) := '474946383961C8002B00F70000126EAA3D88B9F1F6FA4890BECEE0ED0061A2D9E6F1AECDE2D0E2EEF6F9FC0A6BA8B5D1E48DB9D694BDD8458DBDA1C5DD00589DF8FAFCA5C6DE66A1C8A9CAE0297CB2ACCBE13A86B8B0CEE2FBFCFD0568A60A66A579ACCE';
wwv_flow_api.g_varchar2_table(2) := 'DEEAF38AB7D5A5C8DF257AB10968A6F4F8FAEEF4F87EB0D0CADEECD6E5F09AC1DB1D75AE99BFDAE2ECF4005DA05D9CC5005C9E0465A4C9DDEA287BB2DAE8F1FCFDFEF0F6F9F2F7FA6EA4CAE8F0F7BAD4E672A8CC6AA4CAB8D4E60066A5F6FAFC5498C291';
wwv_flow_api.g_varchar2_table(3) := 'BBD7C4DAE9599AC46DA2C84D8EBDDCE8F2F5F8FB87B5D41A74AD4C91BF69A1C985B4D3004C96005099D4E4EF00549A1672AD0F6EAA2278B03182B55496C2619DC6A8C8DFE0EAF380B2D270A7CB0063A42177AF1170ABBCD6E7428CBC83B3D33683B7B8D3';
wwv_flow_api.g_varchar2_table(4) := 'E5EBF3F8F2F6F980ACCE0366A55898C33F8ABB0060A19FC3DCBED6E85E95C2C1D9E8E5EEF574AACE00569B629FC6EDF3F8EAF1F6FDFEFE0C6AA81570ABC6DCEAF0F5F93685B75094C1A6C8DEE7EFF6E9EFF61973AD0461A20364A45E99C35296C2FAFBFD';
wwv_flow_api.g_varchar2_table(5) := '7BAED0E6EEF474A8CC6FA5CB609EC6458BBB2C7DB30262A30F6CA9267CB3F4F9FC317EB380B0D19FC5DDDCE8F19CC2DB2D7FB4629FC7C2D9E9BFD8E8C0D7E85396C1418CBCFCFCFDECF1F82E80B4DCEAF277ABCD6CA5CACCDFECC2D8E9B2CFE34E94C083';
wwv_flow_api.g_varchar2_table(6) := 'B5D33985B83684B80C6CA80B6CA86DA7CB5193C00266A62B7EB31370AB0E6EA90065A50065A40064A40063A3005B9E005EA0005A9EDFE9F30062A3005FA1FFFFFE74AACD5196C2005B9F0064A3DEE9F3FEFEFFC2DAEAFEFEFE0062A2005EA1005A9D0059';
wwv_flow_api.g_varchar2_table(7) := '9D005A9F005FA0F3F8FAFEFFFE005FA2EBF2F7FFFEFEF7F9FC80B2D10165A50064A5DEE9F2FEFFFFFEFEFD649FC75196C1C0D7E7E4EDF5E5EFF60D6EA90265A480AFD0F4F7FADEE8F11774AE6FA8CB5091BF428BBCF8FBFC458FBD0263A3BAD6E600589B';
wwv_flow_api.g_varchar2_table(8) := 'FFFEFF5B9BC598C1DB2578B0699EC6D3E4EFD3E3EEB8D4E580B1D1ABCCE182B1D183B2D20F63A3609CC685B3D3DFE9F2B3D0E41F77AFE7F0F676A9CC0769A75495C1E3ECF30161A20162A3A5C9DFFFFFFF21F90400000000002C00000000C8002B000008';
wwv_flow_api.g_varchar2_table(9) := 'FF00FF091C48B0A0C18308132A5CC8B0A1C38710234A9C48B1A2C58B18336AAC3828D0C68F20438A1C19F1D6BF086E6CAD2044B2A5CB97302972D2F5EA952D7831731E1BF82BA74F911158C87AD5AA15961545A03D34F933E23163758C456B8A314CD49F';
wwv_flow_api.g_varchar2_table(10) := '3238D8C252B49619481065547946EFD9366D4D7B2AB414EF0E53AA14977989D7836A03335860699010518091100A146CC0909640110F1D0E3A68F30DAEC565202084830B6FC50A061267983203AB962D0A547D34D1B5403163C71597C19835C071BB2413';
wwv_flow_api.g_varchar2_table(11) := '673CA9E5CA55010B5453AC78A5E3205BB7A827AA661D3CF61358AD5C99C1DD54376F83BFA08A985A1CE2F0D6D521CAAED5EAD5F2DCBB7B17FF2C375059F687AA63613FDF5036ACDAB711261BF2088E0C87753A18E83062A184DD745044C43EFB85115104';
wwv_flow_api.g_varchar2_table(12) := '2A1850050D0E1121480C31E4114142E9AD57D0085FF8D00E330DFC90C13F323C13C310107E289000230E61800A3DCD604111D9DC3050072F9460630C6F1124C00D3E30C38C0F9F4CE81E7C1644E0811832FE43811089E493CF13A37890C03F390E444403';
wwv_flow_api.g_varchar2_table(13) := '0ECC918F06F9CC61C8198014F44136CC1C51802B2C58A1E62602DDF281180F9867D00B3540A1800621ECA10F066A15748318A2F40746203084A0810246F89124429F4C60A79372C080C33A541674DD41EEA053CB0AC4CCB2421F01A89001378085B04A15';
wwv_flow_api.g_varchar2_table(14) := '03511002601B04F08F0951D8FFA2CB12390C240D1F1A68C0475D06D503032C9C12B382385E9810C771C9DD56C72B4A5C91C104B3B481572DBA10D3C205311C648217BAB4B10216AF14100B042B5C6203415128D1C42C3BEC304C134B3441D83FC704A0C4';
wwv_flow_api.g_varchar2_table(15) := '285566D0880B100C530016D442604B28E71694831266E8F1033A4DC452CB2BC8CC124B3F1E1C244320E24030CBBFB0D832CC30001C60D0A5051561861944B5B2432BBBB410AA167815900F2D037D604B2D58C872411E30B440540BB80C244F2CB0BCD2C2';
wwv_flow_api.g_varchar2_table(16) := '1D06F9C08F19B525E78AD18710E0C47BB65940C313B1E4D0030428B4034A250B300083AC762C53100259CCE2020B0FDC404D3D0D9421EE00130AD485379644018B3301E4FF32CD34040C3400040E140407172BC48242171850B3400301ACD0020C4C1484';
wwv_flow_api.g_varchar2_table(17) := 'CB307350310704A19C704325149CA28119B6544CD0323D48AE0A035FDFF00121F9ACE00273032D530171049D80086D4575F78A2B3BC8C285164461A100CD027D70662B059481842C3BD4A64BD0024DB1822BADC8924B4114F4C1DDCA4F83AB9C3D0AFC5E';
wwv_flow_api.g_varchar2_table(18) := 'F5D50518E1F21A05DD134031B2F84350065CCCD2C707066520852C2B8056906EBB18C740DE32B8C211A413C390C51112439008E0A01FB308C09406828B5828000566288241CE210E5B68A16002C1C00A64818A64186401729845197A71BAD558C8047258';
wwv_flow_api.g_varchar2_table(19) := '5E2B80D58CD1D9C215B570C6CA8C87BC7F280F7BAF008006FF7E073008E06020D62B8AF608A2823998217AD11B8A06B2078BA215255C569BCD0ABC004282BCC005BA08050B05528266ACA01B08E9C01366C12B8200705104292041A8C08F16D00D2145B0';
wwv_flow_api.g_varchar2_table(20) := '05D008820B9FADC00708C9C10A8031AF7FF4A207B340471D101288583CA18B2413C8045A10BD19CA21106828C103BEC1B4E4CCF078352B40CA6A020C5B28801B00C8061257A0C4ED0D0407B1C01ECBB031817A94E006F048043056D69DDBA0AF0F954048';
wwv_flow_api.g_varchar2_table(21) := '0654B10223886020909016A51072895844A26E03718E780A2247814440132D90C3320F1201629A4205146C81194030418298A404636801664E648A25002121EE28402A5E70BA0AA86720E0004101DAA5FF9C07343000B228CA0E60014A81F8439445B10D';
wwv_flow_api.g_varchar2_table(22) := '0A18C00B1AD020024C4962F65C09A228300D7BC1E88298C4B18B84FAF209B288C27D10C2825898A21A03B1801058004D8384231630309B1B57B08B69C6917003F9C12B5670448550A000B6F0A7402A280B0D2284064E2007330692873F08812F08C18019';
wwv_flow_api.g_varchar2_table(23) := '5A318916DE532004D0C07BB2E7803814840989408E2B7838908312C5363060A04124BA44813C430158C09E19344104834CA018D83B1FD6CCA1101CCC4201BC18885214B28939D822A6FF0BCF41AAF98F73C8AE040BA101378671050ACE22156A48080F22';
wwv_flow_api.g_varchar2_table(24) := '5359818C512124A0A42FEA89BB7F9CE186DD3183500BC282EB8DB5A03E44682B56608584FF24D1156DFD070668539B1598AE20E83CEB4787710A85300302B035880C0460821BA4800D8A304301103BD3E71884B1B880803DCA99102E0CA30C2365C33014';
wwv_flow_api.g_varchar2_table(25) := 'F088847413022C494802D640072A24E10F21A8452A465BBBDBADA70BC4A80D2CF26180833CA09304EDE10FBB33861FD89695B8A5A80F5CBB8B021F440428A00D16AF360C3628C40AE3EDE140D6000924D8C1096330C33096B0020D4C57A6D154EC75712A';
wwv_flow_api.g_varchar2_table(26) := '102040C00E2355081084818EBAFE03177F55AB41225001F40E502080D842238E800E05C022164D68C22B9A31DF16961607BA280A2C56C120835062075C097028B1A76584580F7BB915450BB8AC005419041016ED651621403D845801FFB91A1E0227E6A0';
wwv_flow_api.g_varchar2_table(27) := '8B86356315AA70801BCEC085C9A15820D25C2C8BFF7107080460270B91C4308C50E5CB25B7203CF6313E21318A02B4A10D0550803D2E60894624C105ADA0AF4022898331B7A216DC58C4417C910A22C2D6AC9F0CAC975939D181882296AE80052B4C98BF';
wwv_flow_api.g_varchar2_table(28) := '0BD842CD5763F385333C1013EC2116C3D883242440803A80632047100675536C5D6A0E9A0C10B8408C13C2826140C1C68ED630A47B9C5E49B64018B52883076E9007228C140DB411F53F6C575A2BE8227AB5B8461E0E7200DE76F91F0725B3AC0F92C4E0';
wwv_flow_api.g_varchar2_table(29) := '2998D6BBE0EF4132E0858B0EB7CD0779734165408658B82007E05C2C4CFFFC8F40AFD880FFB80204A0C07183F4C201C3FF08C0481D3DF01D937B2012805F246EF059822C20DEA45DCF097EFD34717CE120ED70EDBF95471482B6BC206CA5A8051E569B5A';
wwv_flow_api.g_varchar2_table(30) := '14922034300277F43A0C881B44E2C85BC71862C1D7EE6E3CB1351534C81BD0020D6C13214440C1306A3554622324D2E9CD801D5AB08A21C073AAF28EA427C640941DACA0EBA753C4995E2B60841AFDC0B5C96D0CF2C195D94AE22037281A91286CF58260';
wwv_flow_api.g_varchar2_table(31) := '5D20783819FE1002072714A3021C07A04D0537684AECD4230A010522560096B63FBA812FFFC70CB4100B3220C4241E58C10EF2EEC28124000A83C74208324B9076A0F693852F3A600FDC4A7C56A0005D49049B2AF58F0438A018E07BF885E12C901304A3';
wwv_flow_api.g_varchar2_table(32) := '00224308FF03645100D027B6DA3705790214B18227D85D98A458413ECAEBFAA3C35ED223B8C62CA4911022A8C2164D563B30705502E106A6E60AC030070D600D34400048000BBBD02EC8174ABF43503A8674D76370045108A6D60AC1E000201414BAC74F';
wwv_flow_api.g_varchar2_table(33) := 'DA971097F70F37170B1676106000052B507E61525D5B207604D10092037806F15FB380832C675EB117752B607E07810F2D000BA91020024880FFA0067D801C2A030C66F0044EA001B2B00B293350B04574B9B67CB3063CC1300D04F105FFA232AD600B20';
wwv_flow_api.g_varchar2_table(34) := '9004EE450A28D33413F60415B67D05F50628200B73400906F1058C100276200B4EF00605F100B6200BBF957E04010896403439E08705E10389E04CFBFF4641E37581F7975EBD2009B1600B9D601060D00D2D90050AC00FAB356FBD47100CC019BD736A38';
wwv_flow_api.g_varchar2_table(35) := 'D30AC0900853348106254A5B687FABD47C0421482A031F2FB802C88080B2D4866F6882DC271045300CB690080C450336500F92D0074DC00090100BBB600839C06BFF4000E102004540050DA0568C2510D50002B1100B9AF0001D808CA0300DB2100B7280';
wwv_flow_api.g_varchar2_table(36) := '8490C885DC147BFFB00E89600B05A00F6820000280000C00026D600F37700D66C00D7E107E91341013B00278758ACEB00228E001F9503C59387887376BB43810221005B3F00AE0F334DDB10201000262751B33900A4B90890911084B000BEFF70F343001';
wwv_flow_api.g_varchar2_table(37) := 'E2227F5AA00005D0042E400232500D7BFFF02EB1606620D209BA100BC2302E8554064B700106A1026E500010200BF9B00AA5A094D7025905D10929B99206C10328B00413607300108EB5A0054F900AD1320AFDC502B300014A4002A3969565A05C14E005';
wwv_flow_api.g_varchar2_table(38) := '05D00223A40BB6C00804A0531AF96F8E0001B1706EB560950541064D20974D301903B1131D4006B6100C385345B2D0022C600D5000012D302E54900048900654A010189006139009056101012007D133060070045525109E800FF2100855261032C0000E';
wwv_flow_api.g_varchar2_table(39) := '700830300A9ED0260C90061E502521840A00C0773BA000A3700236664E54E09970901080C001690055C586047B3044AE100215E00102604D293005E94007269101CCB94E23F3051CFF000496100454C020ECF03458A8569E50038440083530088A781012';
wwv_flow_api.g_varchar2_table(40) := '1004EF19049050733067080000290100093D310FEE099F04C09B111107D5400025A00ED4E81011100198F0636D921099C0042580006B305255F21606DA1075600225E00955F06CD4674E16E17DD8F395339011FA491036C0044CB0065E55A2EC51A31F01';
wwv_flow_api.g_varchar2_table(41) := '0814200154400512501A064106B45600516022365AA446CA10340000E45700C1100208C03D21D0772DC076475AA5564A10BFD06735112EF6C00154A00367C00263E084BB600B3F77A5686AA5EEC007FB941C9B020CAEA0121A293D035072697AA7E7F100';
wwv_flow_api.g_varchar2_table(42) := '2EF02D09B5A540246247709D783AA8367A0086100272890C0500548F2B090B30C001AF49A8925A1C72B20E0C000417500187100052F00E3760631D3AA9A20A1732F0A0336AA40101003B';
end;
/
begin
wwv_flow_api.create_theme_image(
  p_id =>28048457003354469 + wwv_flow_api.g_id_offset,
  p_flow_id =>wwv_flow.g_flow_id,
  p_theme_id  => 101,
  p_varchar2_table=> wwv_flow_api.g_varchar2_table,
  p_mimetype=> '');
end;
/
prompt  ...build options used by application 155
--
 
begin
 
null;
 
end;
/

--application/shared_components/globalization/messages
prompt  ...messages used by application: 155
--
--application/shared_components/globalization/dyntranslations
prompt  ...dynamic translations used by application: 155
--
--application/shared_components/globalization/language
prompt  ...Language Maps for Application 155
--
 
begin
 
null;
 
end;
/

prompt  ...Shortcuts
--
--application/shared_components/user_interface/shortcuts/anvl
 
begin
 
declare
  c1 varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
c1:=c1||'DECLARE'||chr(10)||
'l_value := V(#CURRENT_ITEM_NAME#);'||chr(10)||
'IF  l_value = ''%null'' || ''%'' THEN'||chr(10)||
'  RETURN NULL;'||chr(10)||
'ELSE'||chr(10)||
' RETURN l_value;'||chr(10)||
'END IF;'||chr(10)||
'END;';

wwv_flow_api.create_shortcut (
 p_id=> 6530803458417237 + wwv_flow_api.g_id_offset,
 p_flow_id=> wwv_flow.g_flow_id,
 p_shortcut_name=> 'ANVL',
 p_shortcut_type=> 'FUNCTION_BODY',
 p_shortcut=> c1);
end;
null;
 
end;
/

--application/shared_components/user_interface/shortcuts/delete_confirm_msg
 
begin
 
declare
  c1 varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
c1:=c1||'Would you like to perform this delete action?';

wwv_flow_api.create_shortcut (
 p_id=> 12797308451382208 + wwv_flow_api.g_id_offset,
 p_flow_id=> wwv_flow.g_flow_id,
 p_shortcut_name=> 'DELETE_CONFIRM_MSG',
 p_shortcut_type=> 'TEXT_ESCAPE_JS',
 p_shortcut=> c1);
end;
null;
 
end;
/

prompt  ...web services (9iR2 or better)
--
prompt  ...shared queries
--
prompt  ...report layouts
--
 
begin
 
    wwv_flow_api.g_varchar2_table := wwv_flow_api.empty_varchar2_table;
    wwv_flow_api.g_varchar2_table(1) := '<?xml version="1.0"?>'||chr(10)||
'<!--This is an example for xml/xslt to fop transformation in Oracle Applicatio';
    wwv_flow_api.g_varchar2_table(2) := 'n Express-->'||chr(10)||
'<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo';
    wwv_flow_api.g_varchar2_table(3) := '="http://www.w3.org/1999/XSL/Format" xmlns:htmldb_r="http://htmldb.oracle.com/report" xmlns:svg="htt';
    wwv_flow_api.g_varchar2_table(4) := 'p://www.w3.org/2000/svg">'||chr(10)||
'<xsl:template match="/">'||chr(10)||
'<fo:root xmlns:fo="http://www.w3.org/1999/XSL/For';
    wwv_flow_api.g_varchar2_table(5) := 'mat">'||chr(10)||
'<fo:layout-master-set>'||chr(10)||
'<!--This section controls the main layout of the page extent of the aft';
    wwv_flow_api.g_varchar2_table(6) := 'er region and the bottom margin of the body region.-->'||chr(10)||
'<fo:simple-page-master master-name="page" pag';
    wwv_flow_api.g_varchar2_table(7) := 'e-height="8.5in" page-width="11in" margin-top="0.5in" margin-bottom="0.5in" margin-left="0.5in" marg';
    wwv_flow_api.g_varchar2_table(8) := 'in-right="0.5in">'||chr(10)||
'<fo:region-before extent="3.5cm">'||chr(10)||
'<!--This section prints out static content on th';
    wwv_flow_api.g_varchar2_table(9) := 'e top of each page associated with fo:static-content flow-name="xsl-region-before" in fo:page-sequen';
    wwv_flow_api.g_varchar2_table(10) := 'ce section-->'||chr(10)||
'</fo:region-before>'||chr(10)||
'<fo:region-body margin-top="3.5cm" margin-bottom=".7cm">'||chr(10)||
'<!--This ';
    wwv_flow_api.g_varchar2_table(11) := 'section prints out static content on the top of each page associated with fo:static-content flow-nam';
    wwv_flow_api.g_varchar2_table(12) := 'e="xsl-region-body in fo:page-sequence section"-->'||chr(10)||
'</fo:region-body>'||chr(10)||
'<fo:region-after extent=".5cm">';
    wwv_flow_api.g_varchar2_table(13) := ''||chr(10)||
'<!--This section prints out static content on the bottom of each page associated with fo:static-con';
    wwv_flow_api.g_varchar2_table(14) := 'tent flow-name="xsl-region-after" in fo:page-sequence section-->'||chr(10)||
'</fo:region-after>'||chr(10)||
'</fo:simple-page';
    wwv_flow_api.g_varchar2_table(15) := '-master>'||chr(10)||
'</fo:layout-master-set>'||chr(10)||
'<fo:page-sequence master-reference="page" initial-page-number="1">'||chr(10)||
'';
    wwv_flow_api.g_varchar2_table(16) := '<fo:static-content flow-name="xsl-region-before">'||chr(10)||
'<fo:table border="0.1px solid #000000" background-';
    wwv_flow_api.g_varchar2_table(17) := 'color="#EEEEEE">'||chr(10)||
'<fo:table-column column-width="5cm"/>'||chr(10)||
'<fo:table-column/>'||chr(10)||
'<fo:table-body>'||chr(10)||
'<xsl:call-';
    wwv_flow_api.g_varchar2_table(18) := 'template name="page_level_items">'||chr(10)||
'<xsl:with-param name="title">Date:</xsl:with-param>'||chr(10)||
'<xsl:with-para';
    wwv_flow_api.g_varchar2_table(19) := 'm select="/DOCUMENT/DATE" name="value"/>'||chr(10)||
'</xsl:call-template>'||chr(10)||
'<xsl:call-template name="page_level_it';
    wwv_flow_api.g_varchar2_table(20) := 'ems">'||chr(10)||
'<xsl:with-param name="title">Prepared for : </xsl:with-param>'||chr(10)||
'<xsl:with-param select="/DOCUMEN';
    wwv_flow_api.g_varchar2_table(21) := 'T/USER_NAME" name="value"/>'||chr(10)||
'</xsl:call-template>'||chr(10)||
'<xsl:call-template name="page_level_items">'||chr(10)||
'<xsl:wi';
    wwv_flow_api.g_varchar2_table(22) := 'th-param name="title">Application ID :</xsl:with-param>'||chr(10)||
'<xsl:with-param select="/DOCUMENT/APP_ID" na';
    wwv_flow_api.g_varchar2_table(23) := 'me="value"/>'||chr(10)||
'</xsl:call-template>'||chr(10)||
'<xsl:call-template name="page_level_items">'||chr(10)||
'<xsl:with-param name="';
    wwv_flow_api.g_varchar2_table(24) := 'title">Application Name :</xsl:with-param>'||chr(10)||
'<xsl:with-param select="/DOCUMENT/APP_NAME" name="value"/';
    wwv_flow_api.g_varchar2_table(25) := '>'||chr(10)||
'</xsl:call-template>'||chr(10)||
'<xsl:call-template name="page_level_items">'||chr(10)||
'<xsl:with-param name="title">Page';
    wwv_flow_api.g_varchar2_table(26) := ' ID :</xsl:with-param>'||chr(10)||
'<xsl:with-param select="/DOCUMENT/PAGE_ID" name="value"/>'||chr(10)||
'</xsl:call-template';
    wwv_flow_api.g_varchar2_table(27) := '>'||chr(10)||
'<xsl:call-template name="page_level_items">'||chr(10)||
'<xsl:with-param name="title">Report Name:</xsl:with-pa';
    wwv_flow_api.g_varchar2_table(28) := 'ram>'||chr(10)||
'<xsl:with-param select="/DOCUMENT/TITLE" name="value"/>'||chr(10)||
'</xsl:call-template>'||chr(10)||
'</fo:table-body>'||chr(10)||
'<';
    wwv_flow_api.g_varchar2_table(29) := '/fo:table>'||chr(10)||
'</fo:static-content>'||chr(10)||
'<fo:static-content flow-name="xsl-region-after">'||chr(10)||
'<fo:table border-to';
    wwv_flow_api.g_varchar2_table(30) := 'p="1pt solid #CCCCCC">'||chr(10)||
'<fo:table-column column-width="proportional-column-width(1)"/>'||chr(10)||
'<fo:table-colu';
    wwv_flow_api.g_varchar2_table(31) := 'mn column-width="proportional-column-width(1)"/>'||chr(10)||
'<fo:table-column column-width="proportional-column-';
    wwv_flow_api.g_varchar2_table(32) := 'width(1)"/>'||chr(10)||
'<fo:table-body>'||chr(10)||
'<fo:table-row padding-left="2pt" font-size="9pt">'||chr(10)||
'<fo:table-cell text-al';
    wwv_flow_api.g_varchar2_table(33) := 'ign="left">'||chr(10)||
'<fo:block>Built with Oracle Application Express</fo:block>'||chr(10)||
'</fo:table-cell>'||chr(10)||
'<fo:table-ce';
    wwv_flow_api.g_varchar2_table(34) := 'll text-align="center">'||chr(10)||
'<fo:block>Page <fo:page-number/> of <fo:page-number-citation ref-id="last-pa';
    wwv_flow_api.g_varchar2_table(35) := 'ge"/>'||chr(10)||
'</fo:block>'||chr(10)||
'</fo:table-cell>'||chr(10)||
'<fo:table-cell text-align="right">'||chr(10)||
'<fo:block>'||chr(10)||
'<xsl:value-of selec';
    wwv_flow_api.g_varchar2_table(36) := 't="count(/DOCUMENT/REGION/ROWSET/ROW)"/> Rows Returned</fo:block>'||chr(10)||
'</fo:table-cell>'||chr(10)||
'</fo:table-row>'||chr(10)||
'<';
    wwv_flow_api.g_varchar2_table(37) := '/fo:table-body>'||chr(10)||
'</fo:table>'||chr(10)||
'</fo:static-content>'||chr(10)||
'<fo:flow flow-name="xsl-region-body">'||chr(10)||
'<!--Begin Rep';
    wwv_flow_api.g_varchar2_table(38) := 'ort Section The following section of the xslt outputs the basic report-->'||chr(10)||
'<xsl:for-each select="/DOC';
    wwv_flow_api.g_varchar2_table(39) := 'UMENT/REGION/ROWSET/ROW">'||chr(10)||
'<!--creates a table row for every row value in the xml feed-->'||chr(10)||
'<fo:table b';
    wwv_flow_api.g_varchar2_table(40) := 'order-bottom="1pt solid #CCCCCC" space-before=".25cm">'||chr(10)||
'<xsl:if test="position()!=last()">'||chr(10)||
'<xsl:attri';
    wwv_flow_api.g_varchar2_table(41) := 'bute name="break-after">page</xsl:attribute>'||chr(10)||
'</xsl:if>'||chr(10)||
'<fo:table-column column-width="5cm"/>'||chr(10)||
'<fo:tab';
    wwv_flow_api.g_varchar2_table(42) := 'le-column/>'||chr(10)||
'<fo:table-body>'||chr(10)||
'<xsl:for-each select="./*">'||chr(10)||
'<xsl:call-template name="row"/>'||chr(10)||
'</xsl:for-ea';
    wwv_flow_api.g_varchar2_table(43) := 'ch>'||chr(10)||
'</fo:table-body>'||chr(10)||
'</fo:table>'||chr(10)||
'</xsl:for-each>'||chr(10)||
'<fo:block id="last-page">'||chr(10)||
'<!--This Helps Calculate ';
    wwv_flow_api.g_varchar2_table(44) := 'the 1 of # Text-->'||chr(10)||
'</fo:block>'||chr(10)||
'</fo:flow>'||chr(10)||
'</fo:page-sequence>'||chr(10)||
'</fo:root>'||chr(10)||
'</xsl:template>'||chr(10)||
'<xsl:templa';
    wwv_flow_api.g_varchar2_table(45) := 'te name="page_level_items">'||chr(10)||
'<xsl:param name="title"/>'||chr(10)||
'<xsl:param name="value"/>'||chr(10)||
'<fo:table-row>'||chr(10)||
'<fo:t';
    wwv_flow_api.g_varchar2_table(46) := 'able-cell padding="2pt">'||chr(10)||
'<fo:block xsl:use-attribute-sets="header">'||chr(10)||
'<xsl:value-of select="$title"/>'||chr(10)||
'';
    wwv_flow_api.g_varchar2_table(47) := '</fo:block>'||chr(10)||
'</fo:table-cell>'||chr(10)||
'<fo:table-cell padding="2pt">'||chr(10)||
'<fo:block xsl:use-attribute-sets="column_';
    wwv_flow_api.g_varchar2_table(48) := 'heading">'||chr(10)||
'<xsl:value-of select="$value"/>'||chr(10)||
'</fo:block>'||chr(10)||
'</fo:table-cell>'||chr(10)||
'</fo:table-row>'||chr(10)||
'</xsl:templat';
    wwv_flow_api.g_varchar2_table(49) := 'e>'||chr(10)||
'<xsl:template name="row">'||chr(10)||
'<fo:table-row>'||chr(10)||
'<xsl:call-template name="header"/>'||chr(10)||
'<xsl:call-template na';
    wwv_flow_api.g_varchar2_table(50) := 'me="column"/>'||chr(10)||
'</fo:table-row>'||chr(10)||
'</xsl:template>'||chr(10)||
'<xsl:template name="header">'||chr(10)||
'<!--Some FOP processers r';
    wwv_flow_api.g_varchar2_table(51) := 'equire a block element within a table cell to render correctly-->'||chr(10)||
'<fo:table-cell xsl:use-attribute-s';
    wwv_flow_api.g_varchar2_table(52) := 'ets="header">'||chr(10)||
'<fo:block>'||chr(10)||
'<xsl:value-of select="name(.)"/>'||chr(10)||
'</fo:block>'||chr(10)||
'</fo:table-cell>'||chr(10)||
'</xsl:templat';
    wwv_flow_api.g_varchar2_table(53) := 'e>'||chr(10)||
'<xsl:template name="column">'||chr(10)||
'<!--Some FOP processers require a block element within a table cell ';
    wwv_flow_api.g_varchar2_table(54) := 'to render correctly-->'||chr(10)||
'<fo:table-cell xsl:use-attribute-sets="column">'||chr(10)||
'<fo:block>'||chr(10)||
'<fo:block>'||chr(10)||
'<xsl:ch';
    wwv_flow_api.g_varchar2_table(55) := 'oose>'||chr(10)||
'<!--Left Align Text Right Align Numbers-->'||chr(10)||
'<xsl:when test="string(number(.))=''NaN''">'||chr(10)||
'<xsl:attr';
    wwv_flow_api.g_varchar2_table(56) := 'ibute name="text-align">start</xsl:attribute>'||chr(10)||
'</xsl:when>'||chr(10)||
'<xsl:otherwise>'||chr(10)||
'<xsl:attribute name="text-';
    wwv_flow_api.g_varchar2_table(57) := 'align">end</xsl:attribute>'||chr(10)||
'</xsl:otherwise>'||chr(10)||
'</xsl:choose>'||chr(10)||
'<xsl:value-of select="."/>'||chr(10)||
'</fo:block>'||chr(10)||
'</f';
    wwv_flow_api.g_varchar2_table(58) := 'o:block>'||chr(10)||
'</fo:table-cell>'||chr(10)||
'</xsl:template>'||chr(10)||
'<xsl:attribute-set name="header">'||chr(10)||
'<!--attribute set for he';
    wwv_flow_api.g_varchar2_table(59) := 'aders-->'||chr(10)||
'<xsl:attribute name="font-weight">bold</xsl:attribute>'||chr(10)||
'<xsl:attribute name="font-size">10pt';
    wwv_flow_api.g_varchar2_table(60) := '</xsl:attribute>'||chr(10)||
'</xsl:attribute-set>'||chr(10)||
'<xsl:attribute-set name="column">'||chr(10)||
'<!--attribute set for column';
    wwv_flow_api.g_varchar2_table(61) := 's-->'||chr(10)||
'<xsl:attribute name="font-size">10pt</xsl:attribute>'||chr(10)||
'</xsl:attribute-set>'||chr(10)||
'</xsl:stylesheet>'||chr(10)||
'';
 
end;
/

--application/shared_components/reports/report_layouts/test
begin
wwv_flow_api.create_report_layout(
  p_id => 17484603871216312 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_report_layout_name =>'Test',
  p_report_layout_type =>'XSL_FILE',
  p_varchar2_table => wwv_flow_api.g_varchar2_table,
  p_xslfo_column_heading =>'',
  p_xslfo_column_template =>'',
  p_xslfo_column_template_width =>'',
  p_reference_id =>null,
  p_report_layout_comment =>'');
end;
/
 
begin
 
    wwv_flow_api.g_varchar2_table := wwv_flow_api.empty_varchar2_table;
    wwv_flow_api.g_varchar2_table(1) := '<?xml version="1.0"?>'||chr(10)||
'<!--This is an example for xml/xslt to fop transformation in Oracle Applicatio';
    wwv_flow_api.g_varchar2_table(2) := 'n Express-->'||chr(10)||
'<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo';
    wwv_flow_api.g_varchar2_table(3) := '="http://www.w3.org/1999/XSL/Format" xmlns:htmldb_r="http://htmldb.oracle.com/report" xmlns:svg="htt';
    wwv_flow_api.g_varchar2_table(4) := 'p://www.w3.org/2000/svg">'||chr(10)||
'<xsl:template match="/">'||chr(10)||
'<fo:root xmlns:fo="http://www.w3.org/1999/XSL/For';
    wwv_flow_api.g_varchar2_table(5) := 'mat">'||chr(10)||
'<fo:layout-master-set>'||chr(10)||
'<!--This section controls the main layout of the page extent of the aft';
    wwv_flow_api.g_varchar2_table(6) := 'er region and the bottom margin of the body region.-->'||chr(10)||
'<fo:simple-page-master master-name="page" pag';
    wwv_flow_api.g_varchar2_table(7) := 'e-height="8.5in" page-width="11in" margin-top="0.5in" margin-bottom="0.5in" margin-left="0.5in" marg';
    wwv_flow_api.g_varchar2_table(8) := 'in-right="0.5in">'||chr(10)||
'<fo:region-before extent="3.5cm">'||chr(10)||
'<!--This section prints out static content on th';
    wwv_flow_api.g_varchar2_table(9) := 'e top of each page associated with fo:static-content flow-name="xsl-region-before" in fo:page-sequen';
    wwv_flow_api.g_varchar2_table(10) := 'ce section-->'||chr(10)||
'</fo:region-before>'||chr(10)||
'<fo:region-body margin-top="3.5cm" margin-bottom=".7cm">'||chr(10)||
'<!--This ';
    wwv_flow_api.g_varchar2_table(11) := 'section prints out static content on the top of each page associated with fo:static-content flow-nam';
    wwv_flow_api.g_varchar2_table(12) := 'e="xsl-region-body in fo:page-sequence section"-->'||chr(10)||
'</fo:region-body>'||chr(10)||
'<fo:region-after extent=".5cm">';
    wwv_flow_api.g_varchar2_table(13) := ''||chr(10)||
'<!--This section prints out static content on the bottom of each page associated with fo:static-con';
    wwv_flow_api.g_varchar2_table(14) := 'tent flow-name="xsl-region-after" in fo:page-sequence section-->'||chr(10)||
'</fo:region-after>'||chr(10)||
'</fo:simple-page';
    wwv_flow_api.g_varchar2_table(15) := '-master>'||chr(10)||
'</fo:layout-master-set>'||chr(10)||
'<fo:page-sequence master-reference="page" initial-page-number="1">'||chr(10)||
'';
    wwv_flow_api.g_varchar2_table(16) := '<fo:static-content flow-name="xsl-region-before">'||chr(10)||
'<fo:table border="0.1px solid #000000" background-';
    wwv_flow_api.g_varchar2_table(17) := 'color="#EEEEEE">'||chr(10)||
'<fo:table-column column-width="5cm"/>'||chr(10)||
'<fo:table-column/>'||chr(10)||
'<fo:table-body>'||chr(10)||
'<xsl:call-';
    wwv_flow_api.g_varchar2_table(18) := 'template name="page_level_items">'||chr(10)||
'<xsl:with-param name="title">Date:</xsl:with-param>'||chr(10)||
'<xsl:with-para';
    wwv_flow_api.g_varchar2_table(19) := 'm select="/DOCUMENT/DATE" name="value"/>'||chr(10)||
'</xsl:call-template>'||chr(10)||
'<xsl:call-template name="page_level_it';
    wwv_flow_api.g_varchar2_table(20) := 'ems">'||chr(10)||
'<xsl:with-param name="title">Prepared for : </xsl:with-param>'||chr(10)||
'<xsl:with-param select="/DOCUMEN';
    wwv_flow_api.g_varchar2_table(21) := 'T/USER_NAME" name="value"/>'||chr(10)||
'</xsl:call-template>'||chr(10)||
'<xsl:call-template name="page_level_items">'||chr(10)||
'<xsl:wi';
    wwv_flow_api.g_varchar2_table(22) := 'th-param name="title">Application ID :</xsl:with-param>'||chr(10)||
'<xsl:with-param select="/DOCUMENT/APP_ID" na';
    wwv_flow_api.g_varchar2_table(23) := 'me="value"/>'||chr(10)||
'</xsl:call-template>'||chr(10)||
'<xsl:call-template name="page_level_items">'||chr(10)||
'<xsl:with-param name="';
    wwv_flow_api.g_varchar2_table(24) := 'title">Application Name :</xsl:with-param>'||chr(10)||
'<xsl:with-param select="/DOCUMENT/APP_NAME" name="value"/';
    wwv_flow_api.g_varchar2_table(25) := '>'||chr(10)||
'</xsl:call-template>'||chr(10)||
'<xsl:call-template name="page_level_items">'||chr(10)||
'<xsl:with-param name="title">Page';
    wwv_flow_api.g_varchar2_table(26) := ' ID :</xsl:with-param>'||chr(10)||
'<xsl:with-param select="/DOCUMENT/PAGE_ID" name="value"/>'||chr(10)||
'</xsl:call-template';
    wwv_flow_api.g_varchar2_table(27) := '>'||chr(10)||
'<xsl:call-template name="page_level_items">'||chr(10)||
'<xsl:with-param name="title">Report Name:</xsl:with-pa';
    wwv_flow_api.g_varchar2_table(28) := 'ram>'||chr(10)||
'<xsl:with-param select="/DOCUMENT/TITLE" name="value"/>'||chr(10)||
'</xsl:call-template>'||chr(10)||
'</fo:table-body>'||chr(10)||
'<';
    wwv_flow_api.g_varchar2_table(29) := '/fo:table>'||chr(10)||
'</fo:static-content>'||chr(10)||
'<fo:static-content flow-name="xsl-region-after">'||chr(10)||
'<fo:table border-to';
    wwv_flow_api.g_varchar2_table(30) := 'p="1pt solid #CCCCCC">'||chr(10)||
'<fo:table-column column-width="proportional-column-width(1)"/>'||chr(10)||
'<fo:table-colu';
    wwv_flow_api.g_varchar2_table(31) := 'mn column-width="proportional-column-width(1)"/>'||chr(10)||
'<fo:table-column column-width="proportional-column-';
    wwv_flow_api.g_varchar2_table(32) := 'width(1)"/>'||chr(10)||
'<fo:table-body>'||chr(10)||
'<fo:table-row padding-left="2pt" font-size="9pt">'||chr(10)||
'<fo:table-cell text-al';
    wwv_flow_api.g_varchar2_table(33) := 'ign="left">'||chr(10)||
'<fo:block>Built with Oracle Application Express</fo:block>'||chr(10)||
'</fo:table-cell>'||chr(10)||
'<fo:table-ce';
    wwv_flow_api.g_varchar2_table(34) := 'll text-align="center">'||chr(10)||
'<fo:block>Page <fo:page-number/> of <fo:page-number-citation ref-id="last-pa';
    wwv_flow_api.g_varchar2_table(35) := 'ge"/>'||chr(10)||
'</fo:block>'||chr(10)||
'</fo:table-cell>'||chr(10)||
'<fo:table-cell text-align="right">'||chr(10)||
'<fo:block>'||chr(10)||
'<xsl:value-of selec';
    wwv_flow_api.g_varchar2_table(36) := 't="count(/DOCUMENT/REGION/ROWSET/ROW)"/> Rows Returned</fo:block>'||chr(10)||
'</fo:table-cell>'||chr(10)||
'</fo:table-row>'||chr(10)||
'<';
    wwv_flow_api.g_varchar2_table(37) := '/fo:table-body>'||chr(10)||
'</fo:table>'||chr(10)||
'</fo:static-content>'||chr(10)||
'<fo:flow flow-name="xsl-region-body">'||chr(10)||
'<!--Begin Rep';
    wwv_flow_api.g_varchar2_table(38) := 'ort Section The following section of the xslt outputs the basic report-->'||chr(10)||
'<xsl:for-each select="/DOC';
    wwv_flow_api.g_varchar2_table(39) := 'UMENT/REGION/ROWSET/ROW">'||chr(10)||
'<!--creates a table row for every row value in the xml feed-->'||chr(10)||
'<fo:table b';
    wwv_flow_api.g_varchar2_table(40) := 'order-bottom="1pt solid #CCCCCC" space-before=".25cm">'||chr(10)||
'<xsl:if test="position()!=last()">'||chr(10)||
'<xsl:attri';
    wwv_flow_api.g_varchar2_table(41) := 'bute name="break-after">page</xsl:attribute>'||chr(10)||
'</xsl:if>'||chr(10)||
'<fo:table-column column-width="5cm"/>'||chr(10)||
'<fo:tab';
    wwv_flow_api.g_varchar2_table(42) := 'le-column/>'||chr(10)||
'<fo:table-body>'||chr(10)||
'<xsl:for-each select="./*">'||chr(10)||
'<xsl:call-template name="row"/>'||chr(10)||
'</xsl:for-ea';
    wwv_flow_api.g_varchar2_table(43) := 'ch>'||chr(10)||
'</fo:table-body>'||chr(10)||
'</fo:table>'||chr(10)||
'</xsl:for-each>'||chr(10)||
'<fo:block id="last-page">'||chr(10)||
'<!--This Helps Calculate ';
    wwv_flow_api.g_varchar2_table(44) := 'the 1 of # Text-->'||chr(10)||
'</fo:block>'||chr(10)||
'</fo:flow>'||chr(10)||
'</fo:page-sequence>'||chr(10)||
'</fo:root>'||chr(10)||
'</xsl:template>'||chr(10)||
'<xsl:templa';
    wwv_flow_api.g_varchar2_table(45) := 'te name="page_level_items">'||chr(10)||
'<xsl:param name="title"/>'||chr(10)||
'<xsl:param name="value"/>'||chr(10)||
'<fo:table-row>'||chr(10)||
'<fo:t';
    wwv_flow_api.g_varchar2_table(46) := 'able-cell padding="2pt">'||chr(10)||
'<fo:block xsl:use-attribute-sets="header">'||chr(10)||
'<xsl:value-of select="$title"/>'||chr(10)||
'';
    wwv_flow_api.g_varchar2_table(47) := '</fo:block>'||chr(10)||
'</fo:table-cell>'||chr(10)||
'<fo:table-cell padding="2pt">'||chr(10)||
'<fo:block xsl:use-attribute-sets="column_';
    wwv_flow_api.g_varchar2_table(48) := 'heading">'||chr(10)||
'<xsl:value-of select="$value"/>'||chr(10)||
'</fo:block>'||chr(10)||
'</fo:table-cell>'||chr(10)||
'</fo:table-row>'||chr(10)||
'</xsl:templat';
    wwv_flow_api.g_varchar2_table(49) := 'e>'||chr(10)||
'<xsl:template name="row">'||chr(10)||
'<fo:table-row>'||chr(10)||
'<xsl:call-template name="header"/>'||chr(10)||
'<xsl:call-template na';
    wwv_flow_api.g_varchar2_table(50) := 'me="column"/>'||chr(10)||
'</fo:table-row>'||chr(10)||
'</xsl:template>'||chr(10)||
'<xsl:template name="header">'||chr(10)||
'<!--Some FOP processers r';
    wwv_flow_api.g_varchar2_table(51) := 'equire a block element within a table cell to render correctly-->'||chr(10)||
'<fo:table-cell xsl:use-attribute-s';
    wwv_flow_api.g_varchar2_table(52) := 'ets="header">'||chr(10)||
'<fo:block>'||chr(10)||
'<xsl:value-of select="name(.)"/>'||chr(10)||
'</fo:block>'||chr(10)||
'</fo:table-cell>'||chr(10)||
'</xsl:templat';
    wwv_flow_api.g_varchar2_table(53) := 'e>'||chr(10)||
'<xsl:template name="column">'||chr(10)||
'<!--Some FOP processers require a block element within a table cell ';
    wwv_flow_api.g_varchar2_table(54) := 'to render correctly-->'||chr(10)||
'<fo:table-cell xsl:use-attribute-sets="column">'||chr(10)||
'<fo:block>'||chr(10)||
'<fo:block>'||chr(10)||
'<xsl:ch';
    wwv_flow_api.g_varchar2_table(55) := 'oose>'||chr(10)||
'<!--Left Align Text Right Align Numbers-->'||chr(10)||
'<xsl:when test="string(number(.))=''NaN''">'||chr(10)||
'<xsl:attr';
    wwv_flow_api.g_varchar2_table(56) := 'ibute name="text-align">start</xsl:attribute>'||chr(10)||
'</xsl:when>'||chr(10)||
'<xsl:otherwise>'||chr(10)||
'<xsl:attribute name="text-';
    wwv_flow_api.g_varchar2_table(57) := 'align">end</xsl:attribute>'||chr(10)||
'</xsl:otherwise>'||chr(10)||
'</xsl:choose>'||chr(10)||
'<xsl:value-of select="."/>'||chr(10)||
'</fo:block>'||chr(10)||
'</f';
    wwv_flow_api.g_varchar2_table(58) := 'o:block>'||chr(10)||
'</fo:table-cell>'||chr(10)||
'</xsl:template>'||chr(10)||
'<xsl:attribute-set name="header">'||chr(10)||
'<!--attribute set for he';
    wwv_flow_api.g_varchar2_table(59) := 'aders-->'||chr(10)||
'<xsl:attribute name="font-weight">bold</xsl:attribute>'||chr(10)||
'<xsl:attribute name="font-size">10pt';
    wwv_flow_api.g_varchar2_table(60) := '</xsl:attribute>'||chr(10)||
'</xsl:attribute-set>'||chr(10)||
'<xsl:attribute-set name="column_name">'||chr(10)||
'<!--attribute set for c';
    wwv_flow_api.g_varchar2_table(61) := 'olumns-->'||chr(10)||
'<xsl:attribute name="font-size">10pt</xsl:attribute>'||chr(10)||
'</xsl:attribute-set>'||chr(10)||
'</xsl:stylesheet';
    wwv_flow_api.g_varchar2_table(62) := '>'||chr(10)||
'';
 
end;
/

--application/shared_components/reports/report_layouts/test2
begin
wwv_flow_api.create_report_layout(
  p_id => 17485900192233139 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_report_layout_name =>'Test2',
  p_report_layout_type =>'XSL_FILE',
  p_varchar2_table => wwv_flow_api.g_varchar2_table,
  p_xslfo_column_heading =>'',
  p_xslfo_column_template =>'',
  p_xslfo_column_template_width =>'',
  p_reference_id =>null,
  p_report_layout_comment =>'');
end;
/
prompt  ...authentication schemes
--
--application/shared_components/security/authentication/html_db
prompt  ......scheme 11076225554541515
 
begin
 
declare
  s1 varchar2(32767) := null;
  s2 varchar2(32767) := null;
  s3 varchar2(32767) := null;
  s4 varchar2(32767) := null;
  s5 varchar2(32767) := null;
begin
s1 := null;
s2 := null;
s3 := null;
s4:=s4||'-BUILTIN-';

s5 := null;
wwv_flow_api.create_auth_setup (
  p_id=> 11076225554541515 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'HTML DB',
  p_description=>'Use internal Application Express account credentials and login page in this application.',
  p_page_sentry_function=> s1,
  p_sess_verify_function=> s2,
  p_pre_auth_process=> s3,
  p_auth_function=> s4,
  p_post_auth_process=> s5,
  p_invalid_session_page=>'101',
  p_invalid_session_url=>'',
  p_cookie_name=>'',
  p_cookie_path=>'',
  p_cookie_domain=>'',
  p_ldap_host=>'',
  p_ldap_port=>'',
  p_ldap_string=>'',
  p_attribute_01=>'',
  p_attribute_02=>'wwv_flow_custom_auth_std.logout?p_this_flow=&APP_ID.&amp;p_next_flow_page_sess=&APP_ID.:1',
  p_attribute_03=>'',
  p_attribute_04=>'',
  p_attribute_05=>'',
  p_attribute_06=>'',
  p_attribute_07=>'',
  p_attribute_08=>'',
  p_required_patch=>'');
end;
null;
 
end;
/

--application/shared_components/security/authentication/database
prompt  ......scheme 11076308724541517
 
begin
 
declare
  s1 varchar2(32767) := null;
  s2 varchar2(32767) := null;
  s3 varchar2(32767) := null;
  s4 varchar2(32767) := null;
  s5 varchar2(32767) := null;
begin
s1:=s1||'-DATABASE-';

s2 := null;
s3 := null;
s4 := null;
s5 := null;
wwv_flow_api.create_auth_setup (
  p_id=> 11076308724541517 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'DATABASE',
  p_description=>'Use database authentication (user identified by DAD).',
  p_page_sentry_function=> s1,
  p_sess_verify_function=> s2,
  p_pre_auth_process=> s3,
  p_auth_function=> s4,
  p_post_auth_process=> s5,
  p_invalid_session_page=>'',
  p_invalid_session_url=>'',
  p_cookie_name=>'',
  p_cookie_path=>'',
  p_cookie_domain=>'',
  p_ldap_host=>'',
  p_ldap_port=>'',
  p_ldap_string=>'',
  p_attribute_01=>'',
  p_attribute_02=>'',
  p_attribute_03=>'',
  p_attribute_04=>'',
  p_attribute_05=>'',
  p_attribute_06=>'',
  p_attribute_07=>'',
  p_attribute_08=>'',
  p_required_patch=>'');
end;
null;
 
end;
/

--application/shared_components/security/authentication/database_account
prompt  ......scheme 11076426620541517
 
begin
 
declare
  s1 varchar2(32767) := null;
  s2 varchar2(32767) := null;
  s3 varchar2(32767) := null;
  s4 varchar2(32767) := null;
  s5 varchar2(32767) := null;
begin
s1 := null;
s2 := null;
s3 := null;
s4:=s4||'return false; end;--';

s5 := null;
wwv_flow_api.create_auth_setup (
  p_id=> 11076426620541517 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'DATABASE ACCOUNT',
  p_description=>'Use database account credentials.',
  p_page_sentry_function=> s1,
  p_sess_verify_function=> s2,
  p_pre_auth_process=> s3,
  p_auth_function=> s4,
  p_post_auth_process=> s5,
  p_invalid_session_page=>'101',
  p_invalid_session_url=>'',
  p_cookie_name=>'',
  p_cookie_path=>'',
  p_cookie_domain=>'',
  p_ldap_host=>'',
  p_ldap_port=>'',
  p_ldap_string=>'',
  p_attribute_01=>'',
  p_attribute_02=>'wwv_flow_custom_auth_std.logout?p_this_flow=&APP_ID.&amp;p_next_flow_page_sess=&APP_ID.:1',
  p_attribute_03=>'',
  p_attribute_04=>'',
  p_attribute_05=>'',
  p_attribute_06=>'',
  p_attribute_07=>'',
  p_attribute_08=>'',
  p_required_patch=>'');
end;
null;
 
end;
/

--application/shared_components/security/authentication/mip_security
prompt  ......scheme 13718119800323842
 
begin
 
declare
  s1 varchar2(32767) := null;
  s2 varchar2(32767) := null;
  s3 varchar2(32767) := null;
  s4 varchar2(32767) := null;
  s5 varchar2(32767) := null;
begin
s1 := null;
s2 := null;
s3 := null;
s4:=s4||'return mip_security.authenticate_user';

s5 := null;
wwv_flow_api.create_auth_setup (
  p_id=> 13718119800323842 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'MIP_SECURITY',
  p_description=>'The WebMIP authentication scheme.',
  p_page_sentry_function=> s1,
  p_sess_verify_function=> s2,
  p_pre_auth_process=> s3,
  p_auth_function=> s4,
  p_post_auth_process=> s5,
  p_invalid_session_page=>'101',
  p_invalid_session_url=>'',
  p_cookie_name=>'',
  p_cookie_path=>'',
  p_cookie_domain=>'',
  p_ldap_host=>'',
  p_ldap_port=>'',
  p_ldap_string=>'',
  p_attribute_01=>'',
  p_attribute_02=>'wwv_flow_custom_auth_std.logout?p_this_flow=&FLOW_ID.&p_next_flow_page_sess=&FLOW_ID.:500',
  p_attribute_03=>'',
  p_attribute_04=>'',
  p_attribute_05=>'',
  p_attribute_06=>'',
  p_attribute_07=>'',
  p_attribute_08=>'',
  p_required_patch=>'');
end;
null;
 
end;
/

--application/end_environment
commit;
commit;
begin 
execute immediate 'alter session set nls_numeric_characters='''||wwv_flow_api.g_nls_numeric_chars||'''';
end;
/
set verify on
set feedback on
prompt  ...done
