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
--   Date and Time:   16:42 Wednesday February 27, 2008
--   Exported By:     PRIESTJ
--   Flashback:       0
--   Export Type:     Application Export
--   Version: 3.0.1.00.08
 
-- Import:
--   Using application builder
--   or
--   Using SQL*Plus as the Oracle user FLOWS_030000 or as the owner (parsing schema) of the application.
 
-- Application Statistics:
--   Pages:                54
--     Items:             344
--     Computations:        1
--     Validations:       251
--     Processes:          93
--     Regions:            78
--     Buttons:           118
--   Shared Components
--     Breadcrumbs:         1
--        Entries           1
--     Items:               7
--     Computations:        4
--     Processes:           2
--     Parent Tabs:         0
--     Tab Sets:            0
--        Tabs:             0
--     NavBars:             0
--     Lists:               2
--     Shortcuts:           1
--     Themes:              1
--     Templates:
--        Page:            10
--        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_030000 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-gb'; 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_E',
  p_name  => 'webmip',
  p_alias => 'WEBMIP',
  p_page_view_logging => 'YES',
  p_default_page_template=> 24734011047526756 + wwv_flow_api.g_id_offset,
  p_printer_friendly_template=> 24735530196526758 + wwv_flow_api.g_id_offset,
  p_default_region_template=> 24740611526526770 + wwv_flow_api.g_id_offset,
  p_error_template    => 38911722486594102 + wwv_flow_api.g_id_offset,
  p_page_protection_enabled_y_n=> 'N',
  p_checksum_salt_last_reset => '20080227164207',
  p_home_link         => 'f?p=&APP_ID.:1',
  p_box_width         => '98%',
  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:',
  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_csv_encoding    => 'N',
  p_theme_id => 101,
  p_default_label_template => 24749138532526789 + wwv_flow_api.g_id_offset,
  p_default_report_template => 24743617611526775 + wwv_flow_api.g_id_offset,
  p_default_list_template => 24748312327526783 + wwv_flow_api.g_id_offset,
  p_default_menu_template => 24750232156526795 + wwv_flow_api.g_id_offset,
  p_default_button_template => 24749440874526790 + wwv_flow_api.g_id_offset,
  p_default_chart_template => 24737941385526765 + wwv_flow_api.g_id_offset,
  p_default_form_template => 24738214051526765 + wwv_flow_api.g_id_offset,
  p_default_wizard_template => 24742135446526770 + wwv_flow_api.g_id_offset,
  p_default_tabform_template => 24740611526526770 + wwv_flow_api.g_id_offset,
  p_default_reportr_template   =>24740611526526770 + wwv_flow_api.g_id_offset,
  p_default_menur_template => 24737010408526765 + wwv_flow_api.g_id_offset,
  p_default_listr_template => 24740611526526770 + wwv_flow_api.g_id_offset,
  p_substitution_string_01 => 'SYSTEM_ENVIRONMENT',
  p_substitution_value_01  => '(Development)',
  p_last_updated_by => 'PRIESTJ',
  p_last_upd_yyyymmddhh24miss=> '20080227164207',
  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/page_authorization
wwv_flow_api.create_security_scheme(
  p_id => 14572900838700208 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_name=>'PAGE_AUTHORIZATION',
  p_scheme_type=>'FUNCTION_RETURNING_BOOLEAN',
  p_scheme=>'return true;'||chr(10)||
'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_reference_id=> 14565830986682708,
  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/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/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 = 1 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 :WEBMIP_PREV_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 ft.description || '' - '' || f.filter_size display_value, f.code return_value '||chr(10)||
'from FILTERS f, filter_types ft'||chr(10)||
'where f.fity_code = ft.code'||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)||
'order by 1');
 
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)||
'             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)||
''||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 rt.description || '' - '' || r.lock_up display_value, r.code return_value '||chr(10)||
'from regulators r, regulator_types rt'||chr(10)||
'where r.rety_code = rt.code'||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 rt.description || '': Size '' || r.relief_valve_size || '': Setting ''||r.relief_valve_setting display_value, r.code return_value '||chr(10)||
'from relief_valves r, relief_valve_types rt'||chr(10)||
'where r.rvty_code = rt.code'||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'||chr(10)||
'order by 1');
 
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 rt.description || '': Size '' || r.slamshut_size || '': Setting ''||r.slamshut_setting display_value, r.code return_value '||chr(10)||
'from slamshut_valves r, slamshut_types rt'||chr(10)||
'where r.slty_code = rt.code'||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/comments
prompt  ...comments: requires application express 2.2 or higher
--
begin
wwv_flow_api.create_app_comments (
  p_id=>39796811587940845 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'19',
  p_app_comment=>'Addressed #193',
  p_updated_on=>'2008.02.20.11:30:45',
  p_updated_by=>'HARDYA',
  p_created_on=>'2008.02.20.11:30:45',
  p_created_by=>'HARDYA',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>39800812542960044 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'19',
  p_app_comment=>'Addressed #196',
  p_updated_on=>'2008.02.20.11:33:57',
  p_updated_by=>'HARDYA',
  p_created_on=>'2008.02.20.11:33:57',
  p_created_by=>'HARDYA',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>39816520133085245 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'61',
  p_app_comment=>'Ticket #277'||chr(10)||
''||chr(10)||
'Added the following validations'||chr(10)||
'P61_SHORTCODE not null '||chr(10)||
'P61_TRIPARTITE not null'||chr(10)||
'P61_NAME length <= 40'||chr(10)||
'P61_ADV_CONTRACT_REF length'||chr(10)||
'',
  p_updated_on=>'2008.02.20.13:31:46',
  p_updated_by=>'MULLENM',
  p_created_on=>'2008.02.20.13:31:46',
  p_created_by=>'MULLENM',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>39938818138765973 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'63',
  p_app_comment=>'Ticket #277'||chr(10)||
''||chr(10)||
'Added the following not null validations on the address fields'||chr(10)||
'P63_OFF_CODE not null'||chr(10)||
'P63_OFF_SUB_BUILD not null (only if building is null)'||chr(10)||
'P63_OFF_BUILDING not null (only if sub-building is null)'||chr(10)||
'P63_OFF_STREET not null'||chr(10)||
'P63_OFF_CITY not null'||chr(10)||
'P63_OFF_POSTCODE not null',
  p_updated_on=>'2008.02.20.13:48:16',
  p_updated_by=>'MULLENM',
  p_created_on=>'2008.02.20.13:48:16',
  p_created_by=>'MULLENM',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>40091213261237725 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'57',
  p_app_comment=>'Addressed #281'||chr(10)||
'Added DIM_F, removed mandatory from DIM_D, DIM_E, SLVA_CODE and REVA_CODE.'||chr(10)||
'Added numeric field validations.',
  p_updated_on=>'2008.02.21.10:12:53',
  p_updated_by=>'HARDYA',
  p_created_on=>'2008.02.21.10:12:53',
  p_created_by=>'HARDYA',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>40463604171372150 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'95',
  p_app_comment=>'Addressed #220 by adding page validation referring to mip_regions.valid_postcode_format.',
  p_updated_on=>'2008.02.21.10:55:57',
  p_updated_by=>'HARDYA',
  p_created_on=>'2008.02.21.10:55:57',
  p_created_by=>'HARDYA',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>40904231050120953 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'30',
  p_app_comment=>'Corrected searches to work where the search criteria is null and removed wildcards from the queries themselves (rely on user including them in the search criteria).',
  p_updated_on=>'2008.02.21.15:47:25',
  p_updated_by=>'HARDYA',
  p_created_on=>'2008.02.21.15:47:25',
  p_created_by=>'HARDYA',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>41037118695325569 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'62',
  p_app_comment=>'Ticket #286'||chr(10)||
''||chr(10)||
'Changed the way the drop-down list is populated.'||chr(10)||
''||chr(10)||
'If attempting to create a MKTP then you are restricted to a role of Gas supplier.'||chr(10)||
''||chr(10)||
'If creating a MANU then restricted to a role of External organization.',
  p_updated_on=>'2008.02.21.16:21:48',
  p_updated_by=>'MULLENM',
  p_created_on=>'2008.02.21.16:21:48',
  p_created_by=>'MULLENM',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>41391628119651588 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'30',
  p_app_comment=>'Added condition to hide the "Copy" enquiry link when viewing the report as a CS user.',
  p_updated_on=>'2008.02.22.09:55:51',
  p_updated_by=>'MULLENM',
  p_created_on=>'2008.02.22.09:55:51',
  p_created_by=>'MULLENM',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>41680125047079544 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'32',
  p_app_comment=>'Fixed bug 250, restricted the Service pressure drop list so that IP no longer appears for Standard Job types.',
  p_updated_on=>'2008.02.22.13:53:50',
  p_updated_by=>'PRIESTJ',
  p_created_on=>'2008.02.22.13:53:50',
  p_created_by=>'PRIESTJ',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>41694821631106961 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'90',
  p_app_comment=>'Fixed bug #222 Tripartite Regions now defaults to a null value, forcing users to select a region before saving the Tripartite screen',
  p_updated_on=>'2008.02.22.13:58:24',
  p_updated_by=>'PRIESTJ',
  p_created_on=>'2008.02.22.13:58:24',
  p_created_by=>'PRIESTJ',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>41813409847377966 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'32',
  p_app_comment=>'Fix for #231 added validations (IP MBAR a number, REQUIRE_IP_MBAR >=2000 <=7000, IP DETAILS limit to 250 chars)to ensure IP_MBAR has to be a number between 2000-7000 and the number of characters for the IP_DETAILS field to 250',
  p_updated_on=>'2008.02.22.14:43:34',
  p_updated_by=>'PRIESTJ',
  p_created_on=>'2008.02.22.14:43:34',
  p_created_by=>'PRIESTJ',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>41819131449393658 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'64',
  p_app_comment=>'Added NOT NULL validations to the address fields as per ticket #90',
  p_updated_on=>'2008.02.22.14:46:11',
  p_updated_by=>'MULLENM',
  p_created_on=>'2008.02.22.14:46:11',
  p_created_by=>'MULLENM',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>41819715996398609 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'69',
  p_app_comment=>'Corrected the way that the address report queries the database.',
  p_updated_on=>'2008.02.22.14:47:01',
  p_updated_by=>'MULLENM',
  p_created_on=>'2008.02.22.14:47:01',
  p_created_by=>'MULLENM',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>41820429156402438 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'66',
  p_app_comment=>'Corrected how the count of addresses is performed.',
  p_updated_on=>'2008.02.22.14:47:39',
  p_updated_by=>'MULLENM',
  p_created_on=>'2008.02.22.14:47:39',
  p_created_by=>'MULLENM',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>41983127975948400 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'19',
  p_app_comment=>'re-associated LOV ADDITIONALITEMS after LOV had to be removed and re-created as part of defect #299',
  p_updated_on=>'2008.02.25.13:45:16',
  p_updated_by=>'PRIESTJ',
  p_created_on=>'2008.02.25.13:45:16',
  p_created_by=>'PRIESTJ',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>41983704904951175 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'90',
  p_app_comment=>'re-associated LOV ADDITIONALITEMS after LOV had to be removed and re-created as part of defect #299',
  p_updated_on=>'2008.02.25.13:45:44',
  p_updated_by=>'PRIESTJ',
  p_created_on=>'2008.02.25.13:45:44',
  p_created_by=>'PRIESTJ',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>42007108301122525 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'32',
  p_app_comment=>'altered qmax greater than or equal to qmin validation as part of bug #262',
  p_updated_on=>'2008.02.25.14:14:17',
  p_updated_by=>'PRIESTJ',
  p_created_on=>'2008.02.25.14:14:17',
  p_created_by=>'PRIESTJ',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>42074224109543378 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'19',
  p_app_comment=>'Addressed #179 by changing regular expression for currency to:'||chr(10)||
''||chr(10)||
'[[:digit:]]{0,36}(\.[[:digit:]]{0,2}|)$ '||chr(10)||
''||chr(10)||
'i.e. escaped the ''.'' wildcard and added the ''|'' option indicator.',
  p_updated_on=>'2008.02.25.15:24:26',
  p_updated_by=>'HARDYA',
  p_created_on=>'2008.02.25.15:24:26',
  p_created_by=>'HARDYA',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>42357026944141992 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'41',
  p_app_comment=>'altered processes to use matt''s antivirus code',
  p_updated_on=>'2008.02.26.09:44:11',
  p_updated_by=>'PRIESTJ',
  p_created_on=>'2008.02.26.09:44:11',
  p_created_by=>'PRIESTJ',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>42395631904351553 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'32',
  p_app_comment=>'Altered file association process for asset location notes so that the antivirus stuff is called.  Also removed the enquiry upload field as this was confusing things, users will now have to use the upload file button.',
  p_updated_on=>'2008.02.26.10:19:07',
  p_updated_by=>'PRIESTJ',
  p_created_on=>'2008.02.26.10:19:07',
  p_created_by=>'PRIESTJ',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>42472826848485541 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'18',
  p_app_comment=>'Addressed #305 (report headings)'||chr(10)||
''||chr(10)||
'Also fixed ''Additional Items'' report to show the additional item...',
  p_updated_on=>'2008.02.26.13:28:07',
  p_updated_by=>'HARDYA',
  p_created_on=>'2008.02.26.13:28:07',
  p_created_by=>'HARDYA',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>43178801210220863 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'19',
  p_app_comment=>'Addressed 179 by adding the ''-Please Select..'' display value for null on the LOV.'||chr(10)||
'Addressed 191 by resetting pagination for page 18 on delete.',
  p_updated_on=>'2008.02.27.10:57:19',
  p_updated_by=>'HARDYA',
  p_created_on=>'2008.02.27.10:57:19',
  p_created_by=>'HARDYA',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>43240631011380813 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'66',
  p_app_comment=>'Made the party status field read-only always.'||chr(10)||
''||chr(10)||
'part of ticket #141',
  p_updated_on=>'2008.02.27.11:23:59',
  p_updated_by=>'MULLENM',
  p_created_on=>'2008.02.27.11:23:59',
  p_created_by=>'MULLENM',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>43384730168920005 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'69',
  p_app_comment=>'Ticket #278'||chr(10)||
''||chr(10)||
'address code is now read only as we are only editing an existing address.'||chr(10)||
''||chr(10)||
'I''ve aded warning message to say that editing this may impact other users in the system.',
  p_updated_on=>'2008.02.27.12:53:50',
  p_updated_by=>'MULLENM',
  p_created_on=>'2008.02.27.12:53:50',
  p_created_by=>'MULLENM',
  p_app_version=>'');
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_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 => '20080128114455',
  p_page_is_public_y_n=> 'N',
  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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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_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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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_00002
prompt  ...PAGE 2: Report 1
--
 
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     => 2,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Report 1',
  p_step_title=> 'Report 1',
  p_step_sub_title => 'Report 1',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> '',
  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_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=>2,p_text=>h);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select	 "ADDRESSES"."CODE" as "CODE",'||chr(10)||
'	 "ADDRESSES"."SUB_BUILDING" as "SUB_BUILDING",'||chr(10)||
'	 "ADDRESSES"."BUILDING" as "BUILDING",'||chr(10)||
'	 "ADDRESSES"."STREET" as "STREET",'||chr(10)||
'	 "ADDRESSES"."CITY" as "CITY",'||chr(10)||
'	 "ADDRESSES"."POSTCODE" as "POSTCODE" '||chr(10)||
' from	 "ADDRESSES" "ADDRESSES"';

wwv_flow_api.create_report_region (
  p_id=> 12175701705664283 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 2,
  p_name=> 'Report 1',
  p_region_name=>'',
  p_template=> 24740611526526770+ 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_query_row_template=> 24744236267526775+ 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=> 12176012619664286 + wwv_flow_api.g_id_offset,
  p_region_id=> 12175701705664283 + 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_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=> 12176108987664286 + wwv_flow_api.g_id_offset,
  p_region_id=> 12175701705664283 + 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=> 'SUB_BUILDING',
  p_column_display_sequence=> 2,
  p_column_heading=> 'SUB_BUILDING',
  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=> 12176210995664286 + wwv_flow_api.g_id_offset,
  p_region_id=> 12175701705664283 + 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=> 'BUILDING',
  p_column_display_sequence=> 3,
  p_column_heading=> 'BUILDING',
  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=> 12176316972664286 + wwv_flow_api.g_id_offset,
  p_region_id=> 12175701705664283 + 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=> 'STREET',
  p_column_display_sequence=> 4,
  p_column_heading=> 'STREET',
  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=> 12176428360664286 + wwv_flow_api.g_id_offset,
  p_region_id=> 12175701705664283 + 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=> 'CITY',
  p_column_display_sequence=> 5,
  p_column_heading=> 'CITY',
  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=> 12176517541664286 + wwv_flow_api.g_id_offset,
  p_region_id=> 12175701705664283 + 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=> 'POSTCODE',
  p_column_display_sequence=> 6,
  p_column_heading=> 'POSTCODE',
  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 2
--
 
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_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_suppl';

s:=s||'ier'||chr(10)||
'    ,role_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.st';

s:=s||'art_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=> 24740611526526770+ 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=> 24743617611526775+ 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_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_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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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 => 24749138532526789+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 => 24749138532526789+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_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)||
'    ';

s:=s||',role_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 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=> 24740611526526770+ 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=> 24743617611526775+ 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_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_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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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 => '20080130175623',
  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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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)||
''||chr(10)||
'FROM (SELECT DISTINCT vlare.prty_id'||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_code = ''ENQ SUPP'''||chr(10)||
'     ';

s:=s||' ) 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)||
'       '||chr(10)||
'WHERE qute.id = quro.qute_id'||chr(10)||
'AND supplier.prty_id = prty_supplier.id'||chr(10)||
'AND quro.prty_id = prty_agent.id'||chr(10)||
'AND qut';

s:=s||'e.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)||
'                                                   ''REJECTED'', ''Q REJ'','||chr(10)||
'                                                   ''SELECTED'', ''Q SEL'','||chr(10)||
'   ';

s:=s||'                                                ''Q OWN''))'||chr(10)||
'AND quote_status.qust_code <> ''LAPSED'''||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=> 24740611526526770+ 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_query_row_template=> 24743617611526775+ 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=> 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_pk_col_source=> s,
  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_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||'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)||
'FROM (SELECT DISTINCT vlare.prty_id'||chr(10)||
'      FROM quote_roles quro, quotes qute, v_latest_rt_code_for_enro vlare'||chr(10)||
'      WHERE quro.qute_id = qute.id'||chr(10)||
'      AND vlare.enqu_id = q';

s:=s||'ute.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)||
'WHERE quro.qute_id = qute.id'||chr(10)||
'AND vlare.enqu_id = qute.enq';

s:=s||'u_id'||chr(10)||
'AND vlare.prty_id = supplier.prty_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_QUTE_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)||
'ORDER BY vcqs.event_date A';

s:=s||'SC';

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=> 24740611526526770+ 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_query_row_template=> 24743617611526775+ 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_no_data_found=> 'no data found',
  p_query_num_rows_type=> 'NEXT_PREVIOUS_LINKS',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  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=> 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_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_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_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=> 5,
  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_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
 
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 => 24749138532526789+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 => 24749138532526789+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_00015
prompt  ...PAGE 15: partyaddresstime
--
 
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     => 15,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'partyaddresstime',
  p_step_title=> 'Partyaddresstime',
  p_step_sub_title => 'Partyaddresstime',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  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=> 'N',
  p_protection_level=> 'C',
  p_page_comment  => '');
 
wwv_flow_api.set_html_page_header(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>15,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=> 12974817956205609 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 15,
  p_plug_name=> 'Create a Party',
  p_region_name=>'',
  p_plug_template=> 24740611526526770+ 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 => 'ITEM_IS_NOT_NULL',
  p_plug_display_when_condition => 'P15_ROLE',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_required_patch=> '' + wwv_flow_api.g_id_offset,
  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=> 12975015039205623 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 15,
  p_plug_name=> 'Select party type',
  p_region_name=>'',
  p_plug_template=> 24738214051526765+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 4,
  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 => 'ITEM_IS_NULL',
  p_plug_display_when_condition => 'P15_ROLE',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_required_patch=> '' + wwv_flow_api.g_id_offset,
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select	 "ADDRESSES"."SUB_BUILDING" as "SUB_BUILDING",'||chr(10)||
'	 "ADDRESSES"."BUILDING" as "BUILDING",'||chr(10)||
'	 "ADDRESSES"."STREET" as "STREET",'||chr(10)||
'	 "ADDRESSES"."CITY" as "CITY",'||chr(10)||
'	 "ADDRESSES"."POSTCODE" as "POSTCODE" '||chr(10)||
' from	 "ADDRESSES" "ADDRESSES" '||chr(10)||
' where   "ADDRESSES"."CODE" IN :P15_ADDRESSCODE';

wwv_flow_api.create_report_region (
  p_id=> 12975208865205626 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 15,
  p_name=> 'Party Addresses',
  p_region_name=>'',
  p_template=> 24740611526526770+ 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=> 'P15_ADDRESSCODE',
  p_display_condition_type=> 'ITEM_IS_NOT_NULL',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_query_row_template=> 24744236267526775+ 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 addresses found',
  p_query_num_rows_type=> 'NEXT_PREVIOUS_LINKS',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  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=> 12975410431205636 + wwv_flow_api.g_id_offset,
  p_region_id=> 12975208865205626 + 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=> 'SUB_BUILDING',
  p_column_display_sequence=> 1,
  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=> 12975527557205642 + wwv_flow_api.g_id_offset,
  p_region_id=> 12975208865205626 + 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=> 'BUILDING',
  p_column_display_sequence=> 2,
  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=> 12975630520205642 + wwv_flow_api.g_id_offset,
  p_region_id=> 12975208865205626 + 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=> 'STREET',
  p_column_display_sequence=> 3,
  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=> 12975700747205642 + wwv_flow_api.g_id_offset,
  p_region_id=> 12975208865205626 + 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=> 'CITY',
  p_column_display_sequence=> 4,
  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=> 12975818465205642 + wwv_flow_api.g_id_offset,
  p_region_id=> 12975208865205626 + 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=> 'POSTCODE',
  p_column_display_sequence=> 5,
  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;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 12976105676205648 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 15,
  p_button_sequence=> 40,
  p_button_plug_id => 12974817956205609+wwv_flow_api.g_id_offset,
  p_button_name    => 'NEW_PARTY',
  p_button_image_alt=> 'New Party',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:15:&SESSION.::&DEBUG.:15::',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 12976314309205648 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 15,
  p_button_sequence=> 60,
  p_button_plug_id => 12975015039205623+wwv_flow_api.g_id_offset,
  p_button_name    => 'NEMP',
  p_button_image   => 'template:'||to_char(24749440874526790+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Non Employee',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P15_ROLE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 12975923321205644 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 15,
  p_button_sequence=> 70,
  p_button_plug_id => 12975015039205623+wwv_flow_api.g_id_offset,
  p_button_name    => 'ORG',
  p_button_image   => 'template:'||to_char(24749440874526790+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Organisation',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P15_ROLE',
  p_button_condition_type=> 'ITEM_IS_NULL',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 12976526349205648 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 15,
  p_button_sequence=> 80,
  p_button_plug_id => 12975015039205623+wwv_flow_api.g_id_offset,
  p_button_name    => 'EO',
  p_button_image   => 'template:'||to_char(24749440874526790+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'External Organisation',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P15_ROLE',
  p_button_condition_type=> 'ITEM_IS_NULL',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 12976717612205648 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 15,
  p_button_sequence=> 90,
  p_button_plug_id => 12975015039205623+wwv_flow_api.g_id_offset,
  p_button_name    => 'IO',
  p_button_image   => 'template:'||to_char(24749440874526790+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Internal Organisation',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P15_ROLE',
  p_button_condition_type=> 'ITEM_IS_NULL',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 12976920446205648 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 15,
  p_button_sequence=> 100,
  p_button_plug_id => 12975015039205623+wwv_flow_api.g_id_offset,
  p_button_name    => 'PERS',
  p_button_image   => 'template:'||to_char(24749440874526790+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Person',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P15_ROLE',
  p_button_condition_type=> 'ITEM_IS_NULL',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 12977128849205648 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 15,
  p_button_sequence=> 110,
  p_button_plug_id => 12975015039205623+wwv_flow_api.g_id_offset,
  p_button_name    => 'MKTP',
  p_button_image   => 'template:'||to_char(24749440874526790+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Market Participant',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P15_ROLE',
  p_button_condition_type=> 'ITEM_IS_NULL',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 12977330320205648 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 15,
  p_button_sequence=> 120,
  p_button_plug_id => 12975015039205623+wwv_flow_api.g_id_offset,
  p_button_name    => 'MANU',
  p_button_image   => 'template:'||to_char(24749440874526790+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Manufacturer',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P15_ROLE',
  p_button_condition_type=> 'ITEM_IS_NULL',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 12977529192205648 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 15,
  p_button_sequence=> 130,
  p_button_plug_id => 12975015039205623+wwv_flow_api.g_id_offset,
  p_button_name    => 'EMP',
  p_button_image   => 'template:'||to_char(24749440874526790+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Employee',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P15_ROLE',
  p_button_condition_type=> 'ITEM_IS_NULL',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 12977731144205648 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 15,
  p_button_sequence=> 140,
  p_button_plug_id => 12975015039205623+wwv_flow_api.g_id_offset,
  p_button_name    => 'PRTY',
  p_button_image   => 'template:'||to_char(24749440874526790+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Party',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'P15_ROLE',
  p_button_condition_type=> 'ITEM_IS_NULL',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 12978102045205651 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 15,
  p_button_sequence=> 20,
  p_button_plug_id => 12974817956205609+wwv_flow_api.g_id_offset,
  p_button_name    => 'SUBMIT',
  p_button_image   => 'template:'||to_char(24749440874526790+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Submit',
  p_button_position=> 'REGION_TEMPLATE_CHANGE',
  p_button_alignment=> 'RIGHT',
  p_database_action=>'UPDATE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 12977925180205648 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 15,
  p_button_sequence=> 10,
  p_button_plug_id => 12974817956205609+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image   => 'template:'||to_char(24749440874526790+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.:15:&SESSION.::&DEBUG.:::',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>12983217219205690 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_branch_action=> 'f?p=&APP_ID.:15:&SESSION.::&DEBUG.::P15_ROLE:ORG&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>12975923321205644+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 1,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>12982814011205686 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_branch_action=> 'f?p=&APP_ID.:15:&SESSION.::&DEBUG.::P15_ROLE:EMP&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>12977529192205648+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 11,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>12983006954205690 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_branch_action=> 'f?p=&APP_ID.:15:&SESSION.::&DEBUG.::P15_ROLE:EO&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>12976526349205648+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 21,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>12983422718205690 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_branch_action=> 'f?p=&APP_ID.:15:&SESSION.::&DEBUG.::P15_ROLE:MANU&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>12977330320205648+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 31,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>12983620760205690 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_branch_action=> 'f?p=&APP_ID.:15:&SESSION.::&DEBUG.::P15_ROLE:MKTP&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>12977128849205648+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 41,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>12983828124205690 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_branch_action=> 'f?p=&APP_ID.:15:&SESSION.::&DEBUG.::P15_ROLE:NEMP&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>12976314309205648+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 51,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>12984214120205692 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_branch_action=> 'f?p=&APP_ID.:15:&SESSION.::&DEBUG.::P15_ROLE:PERS&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>12976920446205648+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 71,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>12984425615205692 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_branch_action=> 'f?p=&APP_ID.:15:&SESSION.::&DEBUG.::P15_ROLE:PRTY&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>12977731144205648+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 81,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>12984006782205690 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_branch_action=> 'f?p=&APP_ID.:15:&SESSION.::&DEBUG.:15::',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>12978102045205651+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 91,
  p_branch_comment=> 'Created 24-OCT-2007 17:44 by PRIESTJ');
 
wwv_flow_api.create_page_branch(
  p_id=>12984609354205692 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_branch_action=> 'f?p=&APP_ID.:15:&SESSION.::&DEBUG.::P15_ROLE:IO&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>12976717612205648+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 101,
  p_branch_comment=> '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>12978320808205653 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_name=>'P15_MKTP_REF',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 110,
  p_item_plug_id => 12974817956205609+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Gas Supplier ID',
  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_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=>'MKTP',
  p_display_when2=>'P15_ROLE',
  p_display_when_type=>'CONDITION1_IN_VALUE_OF_ITEM_IN_CONDITION2',
  p_field_template => 24749138532526789+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=>12978522124205667 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_name=>'P15_USERNAME',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 50,
  p_item_plug_id => 12974817956205609+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'P 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=> 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_display_when=>'PERS',
  p_display_when2=>'P15_ROLE',
  p_display_when_type=>'CONDITION1_IN_VALUE_OF_ITEM_IN_CONDITION2',
  p_field_template => 24749138532526789+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=>12978722080205667 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_name=>'P15_PASSWORD',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 60,
  p_item_plug_id => 12974817956205609+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'P 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=> 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_display_when=>'PERS',
  p_display_when2=>'P15_ROLE',
  p_display_when_type=>'CONDITION1_IN_VALUE_OF_ITEM_IN_CONDITION2',
  p_field_template => 24749138532526789+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=>12978919967205667 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_name=>'P15_ROLE',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 12974817956205609+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'P Role',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov => 'STATIC2:ORG;ORG,EO;EO,IO;IO,PERS;PERS,MKTP;MKTP,NEMP;NEMP,MANU;MANU,EMP;EMP,PRTY;PRTY',
  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_field_template => 24749138532526789+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=>12979121947205667 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_name=>'P15_CREATED_BY',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 90,
  p_item_plug_id => 12974817956205609+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_prompt=>'P Created By',
  p_display_as=> 'TEXT',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> null,
  p_cHeight=> null,
  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_field_template => 24749138532526789+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=>12979309022205667 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_name=>'P15_ADDRESSCODE',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 180,
  p_item_plug_id => 12974817956205609+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'P Addresscode',
  p_source_type=> 'STATIC',
  p_display_as=> 'LIST_MGR',
  p_lov => 'select SUB_BUILDING ||'', ''|| BUILDING || '', '' || STREET || '', '' || CITY || '', '' || POSTCODE  display_value, CODE return_value '||chr(10)||
'from ADDRESSES'||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=> 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_field_template => 24749138532526789+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=>12979512703205669 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_name=>'P15_SHORTCODE',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 120,
  p_item_plug_id => 12974817956205609+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Customer 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=> 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_display_when=>'MKTP',
  p_display_when2=>'P15_ROLE',
  p_display_when_type=>'CONDITION1_IN_VALUE_OF_ITEM_IN_CONDITION2',
  p_field_template => 24749138532526789+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=>12979714142205669 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_name=>'P15_MANU_REF',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 160,
  p_item_plug_id => 12974817956205609+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=> 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_display_when=>'MANU',
  p_display_when2=>'P15_ROLE',
  p_display_when_type=>'CONDITION1_IN_VALUE_OF_ITEM_IN_CONDITION2',
  p_field_template => 24749138532526789+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=>12979917917205669 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_name=>'P15_DESCRIPTION',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 170,
  p_item_plug_id => 12974817956205609+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Manufacturer Description',
  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_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=>'MANU',
  p_display_when2=>'P15_ROLE',
  p_display_when_type=>'CONDITION1_IN_VALUE_OF_ITEM_IN_CONDITION2',
  p_field_template => 24749138532526789+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=>12980111343205669 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_name=>'P15_STATUS',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 80,
  p_item_plug_id => 12974817956205609+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Status',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX',
  p_lov => 'STATIC2:OPEN;OPEN,EXPIRED;EXPIRED,LOCKED;LOCKED',
  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_display_when=>'PERS',
  p_display_when2=>'P15_ROLE',
  p_display_when_type=>'CONDITION1_IN_VALUE_OF_ITEM_IN_CONDITION2',
  p_field_template => 24749138532526789+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=>12980312925205669 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_name=>'P15_NAME',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 100,
  p_item_plug_id => 12974817956205609+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Org Name',
  p_source_type=> 'ALWAYS_NULL',
  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_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=>'P15_ROLE',
  p_display_when2=>'ORG:MKTP',
  p_display_when_type=>'VALUE_OF_ITEM_IN_CONDITION_IN_COLON_DELIMITED_LIST',
  p_field_template => 24749138532526789+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=>12980504209205669 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_name=>'P15_CONTACT_MECH',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 200,
  p_item_plug_id => 12974817956205609+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'p_contact_mech',
  p_source_type=> 'STATIC',
  p_display_as=> 'LIST_MGR',
  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=> '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_field_template => 24749138532526789+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=>12980722033205669 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_name=>'P15_PERSONAL_TITLE',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 12974817956205609+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Personal 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=> 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_display_when=>'PERS',
  p_display_when2=>'P15_ROLE',
  p_display_when_type=>'CONDITION1_IN_VALUE_OF_ITEM_IN_CONDITION2',
  p_field_template => 24749138532526789+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=>12980930237205669 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_name=>'P15_COMMENTS',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 70,
  p_item_plug_id => 12974817956205609+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=> 'TEXT',
  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_display_when=>'PERS',
  p_display_when2=>'P15_ROLE',
  p_display_when_type=>'CONDITION1_IN_VALUE_OF_ITEM_IN_CONDITION2',
  p_field_template => 24749138532526789+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=>12981123998205669 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_name=>'P15_FIRST_NAME',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 30,
  p_item_plug_id => 12974817956205609+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=> 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_display_when=>'PERS',
  p_display_when2=>'P15_ROLE',
  p_display_when_type=>'CONDITION1_IN_VALUE_OF_ITEM_IN_CONDITION2',
  p_field_template => 24749138532526789+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=>12981322533205669 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_name=>'P15_LAST_NAME',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 40,
  p_item_plug_id => 12974817956205609+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=> 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_display_when=>'PERS',
  p_display_when2=>'P15_ROLE',
  p_display_when_type=>'CONDITION1_IN_VALUE_OF_ITEM_IN_CONDITION2',
  p_field_template => 24749138532526789+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=>12981510402205670 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_name=>'P15_LT_7B_CONTRACT_REF',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 130,
  p_item_plug_id => 12974817956205609+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_REF',
  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_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=>'MKTP',
  p_display_when2=>'P15_ROLE',
  p_display_when_type=>'CONDITION1_IN_VALUE_OF_ITEM_IN_CONDITION2',
  p_field_template => 24749138532526789+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=>12981718137205670 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_name=>'P15_GT_7B_CONTRACT_REF',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 140,
  p_item_plug_id => 12974817956205609+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_REF',
  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_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=>'MKTP',
  p_display_when2=>'P15_ROLE',
  p_display_when_type=>'CONDITION1_IN_VALUE_OF_ITEM_IN_CONDITION2',
  p_field_template => 24749138532526789+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=>12981923169205670 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_name=>'P15_ADVERSARIAL_CONTRACT_REF',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 150,
  p_item_plug_id => 12974817956205609+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'ADVERSAR IAL_CONTRACT_REF',
  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_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=>'MKTP',
  p_display_when2=>'P15_ROLE',
  p_display_when_type=>'CONDITION1_IN_VALUE_OF_ITEM_IN_CONDITION2',
  p_field_template => 24749138532526789+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=>12982112333205670 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 15,
  p_name=>'P15_PARTYROLE',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 190,
  p_item_plug_id => 12974817956205609+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'User role',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX',
  p_lov => 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from PARTY_ROLE_TYPES'||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=> 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_display_when=>'PERS',
  p_display_when2=>'P15_ROLE',
  p_display_when_type=>'CONDITION1_IN_VALUE_OF_ITEM_IN_CONDITION2',
  p_field_template => 24749138532526789+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'S',
  p_item_comment => '');
 
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'#OWNER#.MIP_PARTIES.ADD_PARTY('||chr(10)||
'P_ROLE => :P15_ROLE,'||chr(10)||
'P_USERNAME => :P15_USERNAME,'||chr(10)||
'P_PASSWORD => :P15_PASSWORD,'||chr(10)||
'P_CREATED_BY => :P15_CREATED_BY,'||chr(10)||
'P_NAME => :P15_NAME,'||chr(10)||
'P_MKPT_REF => :P15_MKTP_REF,'||chr(10)||
'P_SHORTCODE => :P15_SHORTCODE,'||chr(10)||
'P_LT_7B_CONTRACT_REF => :P15_LT_7B_CONTRACT_REF,'||chr(10)||
'P_GT_7B_CONTRACT_REF => :P15_GT_7B_CONTRACT_REF,'||chr(10)||
'P_ADVERSARIAL_CONTRACT_REF => :P15_ADVERSARIAL_CONTRACT_REF,'||chr(10)||
'P_MANU';

p:=p||'_REF => :P15_MANU_REF,'||chr(10)||
'P_DESCRIPTION => :P15_DESCRIPTION,'||chr(10)||
'P_STATUS => :P15_STATUS,'||chr(10)||
'P_FIRST_NAME => :P15_FIRST_NAME,'||chr(10)||
'P_LAST_NAME => :P15_LAST_NAME,'||chr(10)||
'P_PERSONAL_TITLE => :P15_PERSONAL_TITLE,'||chr(10)||
'P_COMMENTS => :P15_COMMENTS,'||chr(10)||
'P_ADDRESSCODE => :P15_ADDRESSCODE,'||chr(10)||
'P_PARTYROLE => :P15_PARTYROLE,'||chr(10)||
'P_PARTYCONTACTMECH => :P15_CONTACT_MECH);';

wwv_flow_api.create_page_process(
  p_id     => 12982304986205673 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 15,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Run add party procedure',
  p_process_sql_clob => p, 
  p_process_error_message=> '#SQLERRM#',
  p_process_when_button_id=>12978102045205651 + wwv_flow_api.g_id_offset,
  p_process_success_message=> 'New party added',
  p_process_is_stateful_y_n=>'N',
  p_required_patch=>null + wwv_flow_api.g_id_offset,
  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 PRTY_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)||
'  :P15_CODE := get_pk; '||chr(10)||
'end; ';

wwv_flow_api.create_page_process(
  p_id     => 12982507192205683 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 15,
  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=>11454202997722111 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_required_patch=>null + wwv_flow_api.g_id_offset,
  p_process_comment=>'');
end;
null;
 
end;
/

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

 
--application/pages/page_00017
prompt  ...PAGE 17: Bulk Load
--
 
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     => 17,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Bulk Load',
  p_step_title=> 'Bulk Load',
  p_step_sub_title => 'Bulk Load',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> '',
  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 => '20080204123922',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>17,p_text=>h);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select '||chr(10)||
'*'||chr(10)||
'from'||chr(10)||
'('||chr(10)||
'select ''Bases'' as import_name'||chr(10)||
',ora_err_number$'||chr(10)||
',ora_err_mesg$	'||chr(10)||
',ora_err_optyp$	'||chr(10)||
',ora_err_tag$'||chr(10)||
'from err$_bases'||chr(10)||
')';

wwv_flow_api.create_report_region (
  p_id=> 32617412795111138 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 17,
  p_name=> 'LoadErrors',
  p_region_name=>'',
  p_template=> 24740611526526770+ 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_query_row_template=> 24743617611526775+ 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=> 32617723842111164 + wwv_flow_api.g_id_offset,
  p_region_id=> 32617412795111138 + 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=> 'IMPORT_NAME',
  p_column_display_sequence=> 1,
  p_column_heading=> 'IMPORT_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=> 32617821277111164 + wwv_flow_api.g_id_offset,
  p_region_id=> 32617412795111138 + 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=> 'ORA_ERR_NUMBER$',
  p_column_display_sequence=> 2,
  p_column_heading=> 'ORA_ERR_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=> 32617909736111164 + wwv_flow_api.g_id_offset,
  p_region_id=> 32617412795111138 + 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=> 'ORA_ERR_MESG$',
  p_column_display_sequence=> 3,
  p_column_heading=> 'ORA_ERR_MESG$',
  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=> 32618015153111164 + wwv_flow_api.g_id_offset,
  p_region_id=> 32617412795111138 + 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=> 'ORA_ERR_OPTYP$',
  p_column_display_sequence=> 4,
  p_column_heading=> 'ORA_ERR_OPTYP$',
  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=> 32618126652111164 + wwv_flow_api.g_id_offset,
  p_region_id=> 32617412795111138 + 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=> 'ORA_ERR_TAG$',
  p_column_display_sequence=> 5,
  p_column_heading=> 'ORA_ERR_TAG$',
  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 17
--
 
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_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 => '20080227095107',
  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=> 24740611526526770+ 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_display_condition_type=> 'VALUE_OF_ITEM_IN_CONDITION_IN_COLON_DELIMITED_LIST',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_query_row_template=> 24743617611526775+ 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=> '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(24749440874526790+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
 
null;
 
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_required_patch=> null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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 => '20080227164137',
  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=> 24738214051526765+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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(24749440874526790+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(24749440874526790+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(24749440874526790+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(24749440874526790+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 => 24749138532526789+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 => 24749138532526789+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 => 24749318534526790+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=>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 => 24749138532526789+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 => 24749318534526790+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 => 24749138532526789+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=>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 => 24749318534526790+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)||
'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 => 24749138532526789+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 => 24749138532526789+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_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;
/

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=> '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=>'P19_REQUIRED_COST_TYPE',
  p_display_when2=>'HOCO',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_field_template => 24749318534526790+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=>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_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=>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=> '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  => '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 => 24749318534526790+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=> '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=>'P19_REQUIRED_COST_TYPE',
  p_display_when2=>'AICO',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_field_template => 24749318534526790+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=> '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=>'P19_REQUIRED_COST_TYPE',
  p_display_when2=>'MOCO',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_field_template => 24749318534526790+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_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 => 24749138532526789+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 => 24749318534526790+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',
  p_validation_condition2=> 'LACO',
  p_validation_condition_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  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
 
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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  p_process_comment=>'');
end;
null;
 
end;
/

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

 
--application/pages/page_00021
prompt  ...PAGE 21: parties with all associated tables
--
 
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     => 21,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'parties with all associated tables',
  p_step_title=> 'Report 1',
  p_step_sub_title => 'Report 1',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'AUTO_FIRST_ITEM',
  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=> '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=>21,p_text=>h);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select	 "PARTIES"."CREATED_BY" as "CREATED_BY",'||chr(10)||
'	 "PARTIES"."ID" as "ID",'||chr(10)||
'	 "PARTIES"."MANU_REF" as "MANU_REF",'||chr(10)||
'	 "PARTIES"."LT_7B_CONTRACT_REF" as "LT_7B_CONTRACT_REF",'||chr(10)||
'	 "PARTIES"."NAME" as "NAME",'||chr(10)||
'	 "PARTIES"."UPDATED_ON" as "UPDATED_ON",'||chr(10)||
'	 "PARTIES"."MKPT_REF" as "MKPT_REF",'||chr(10)||
'	 "PARTIES"."GT_7B_CONTRACT_REF" as "GT_7B_CONTRACT_REF",'||chr(10)||
'	 "PARTIES"."CREATED_ON" as "CREATED_ON",'||chr(10)||
'	 "PARTIES"."DESCRIP';

s:=s||'TION" as "DESCRIPTION",'||chr(10)||
'	 "PARTIES"."SHORTCODE" as "SHORTCODE",'||chr(10)||
'	 "PARTIES"."UPDATED_BY" as "UPDATED_BY",'||chr(10)||
'	 "PARTIES"."ADVERSARIAL_CONTRACT_REF" as "ADVERSARIAL_CONTRACT_REF",'||chr(10)||
'	 "PARTIES"."USERNAME" as "USERNAME",'||chr(10)||
'	 "PARTIES"."STATUS" as "STATUS",'||chr(10)||
'	 "PARTIES"."FIRST_NAME" as "FIRST_NAME",'||chr(10)||
'	 "PARTIES"."LAST_NAME" as "LAST_NAME",'||chr(10)||
'	 "PARTIES"."PERSONAL_TITLE" as "PERSONAL_TITLE",'||chr(10)||
'	 "PARTIES"."COMMENT';

s:=s||'S" as "COMMENTS",'||chr(10)||
'	 "PARTIES"."PRTY_TYPE" as "PRTY_TYPE",'||chr(10)||
'	 "ADDRESSES"."SUB_BUILDING" as "SUB_BUILDING",'||chr(10)||
'	 "ADDRESSES"."BUILDING" as "BUILDING",'||chr(10)||
'	 "ADDRESSES"."STREET" as "STREET",'||chr(10)||
'	 "ADDRESSES"."CITY" as "CITY",'||chr(10)||
'	 "ADDRESSES"."POSTCODE" as "POSTCODE",'||chr(10)||
'	 "PARTY_ROLE_TYPES"."DESCRIPTION" as "DESCRIPTION",'||chr(10)||
'	 "CONTACT_MECHANISM_TYPES"."DESCRIPTION" as "DESCRIPTION_1" '||chr(10)||
' from	 "PARTY_CONTACT_MECHANISM';

s:=s||'S" "PARTY_CONTACT_MECHANISMS",'||chr(10)||
'	 "CONTACT_MECHANISMS" "CONTACT_MECHANISMS",'||chr(10)||
'	 "CONTACT_MECHANISM_TYPES" "CONTACT_MECHANISM_TYPES",'||chr(10)||
'	 "PARTY_ROLES" "PARTY_ROLES",'||chr(10)||
'	 "PARTY_ROLE_TYPES" "PARTY_ROLE_TYPES",'||chr(10)||
'	 "PARTY_ADDRESSES" "PARTY_ADDRESSES",'||chr(10)||
'	 "ADDRESSES" "ADDRESSES",'||chr(10)||
'	 "PARTIES" "PARTIES" '||chr(10)||
' where   "PARTY_ADDRESSES"."PRTY_ID"="PARTIES"."ID"'||chr(10)||
' and	 "PARTY_ADDRESSES"."ADDR_CODE"="ADDRESSES"."CODE"'||chr(10)||
' ';

s:=s||'and	 "PARTY_ROLES"."PRTY_ID"="PARTIES"."ID"'||chr(10)||
' and	 "PARTY_ROLES"."PRT_CODE"="PARTY_ROLE_TYPES"."CODE"'||chr(10)||
' and	 "PARTY_CONTACT_MECHANISMS"."PRTY_ID"="PARTIES"."ID"'||chr(10)||
' and	 "PARTY_CONTACT_MECHANISMS"."COME_ID"="CONTACT_MECHANISMS"."ID"'||chr(10)||
' and	 "CONTACT_MECHANISMS"."COMT_CODE"="CONTACT_MECHANISM_TYPES"."CODE"';

wwv_flow_api.create_report_region (
  p_id=> 11954612671829356 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 21,
  p_name=> 'Report 1',
  p_region_name=>'',
  p_template=> 11998601372569095+ 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_query_row_template=> 12002226113569100+ 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_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=> 11954928688829362 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + 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=> 'CREATED_BY',
  p_column_display_sequence=> 1,
  p_column_heading=> 'Created By',
  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=> 11955006654829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + 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=> 'ID',
  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=> '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=> 11955115748829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + 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=> 'MANU_REF',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Manu Ref',
  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=> 11955225047829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + 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=> 'LT_7B_CONTRACT_REF',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Lt 7b Contract Ref',
  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=> 11955307604829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + 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=> 5,
  p_column_heading=> '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=> 11955431823829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + 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=> 'UPDATED_ON',
  p_column_display_sequence=> 6,
  p_column_heading=> 'Updated On',
  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=> 11955529825829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + 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=> 'MKPT_REF',
  p_column_display_sequence=> 7,
  p_column_heading=> 'Mkpt Ref',
  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=> 11955616125829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + 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=> 'GT_7B_CONTRACT_REF',
  p_column_display_sequence=> 8,
  p_column_heading=> 'Gt 7b Contract Ref',
  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=> 11955711564829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + 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=> 'CREATED_ON',
  p_column_display_sequence=> 9,
  p_column_heading=> 'Created On',
  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=> 11955829358829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + 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=> 'DESCRIPTION',
  p_column_display_sequence=> 26,
  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=> 11955922890829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + 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=> 'SHORTCODE',
  p_column_display_sequence=> 11,
  p_column_heading=> '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_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=> 11956001560829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + 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=> 'UPDATED_BY',
  p_column_display_sequence=> 12,
  p_column_heading=> 'Updated By',
  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=> 11956107023829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + 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=> 13,
  p_column_heading=> 'Adversarial Contract Ref',
  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=> 11956227454829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + 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=> 14,
  p_column_heading=> 'Username',
  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=> 11956317987829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + 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=> 15,
  p_column_heading=> 'Status',
  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=> 11956410436829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + 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=> 16,
  p_column_heading=> 'First 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=> 11956511524829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + 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=> 17,
  p_column_heading=> 'Last 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=> 11956626293829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + 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=> 18,
  p_column_heading=> 'Personal Title',
  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=> 11956731960829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + 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=> 19,
  p_column_heading=> 'Comments',
  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=> 11956819036829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + 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=> 20,
  p_column_heading=> 'Prty 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=> 11956901730829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + 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=> 'SUB_BUILDING',
  p_column_display_sequence=> 21,
  p_column_heading=> 'Sub Building',
  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=> 11957024391829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + 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=> 'BUILDING',
  p_column_display_sequence=> 22,
  p_column_heading=> 'Building',
  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=> 11957123959829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + 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=> 'STREET',
  p_column_display_sequence=> 23,
  p_column_heading=> 'Street',
  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=> 11957209096829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + 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=> 'CITY',
  p_column_display_sequence=> 24,
  p_column_heading=> 'City',
  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=> 11957329126829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 25,
  p_form_element_id=> null,
  p_column_alias=> 'POSTCODE',
  p_column_display_sequence=> 25,
  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=> 11957409170829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 26,
  p_form_element_id=> null,
  p_column_alias=> 'DESCRIPTION',
  p_column_display_sequence=> 26,
  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=> 11957512206829365 + wwv_flow_api.g_id_offset,
  p_region_id=> 11954612671829356 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 27,
  p_form_element_id=> null,
  p_column_alias=> 'DESCRIPTION_1',
  p_column_display_sequence=> 27,
  p_column_heading=> 'Description 1',
  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
 
null;
 
end;
/

 
begin
 
null;
 
end;
/

 
begin
 
---------------------------------------
-- ...updatable report columns for page 21
--
 
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_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 => '20080222141412',
  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=> 24740611526526770+ 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=> 24743617611526775+ 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_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=> 24738214051526765+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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 => 'MULLENM',
  p_last_upd_yyyymmddhh24miss => '20080222095313',
  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=> 24737010408526765+ 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=> 24750232156526795+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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=> 24740611526526770+ 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_query_row_template=> 24743617611526775+ 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=> 'NEXT_PREVIOUS_LINKS',
  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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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=> 24740611526526770+ 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_query_row_template=> 24743617611526775+ 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=> '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=> 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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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 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_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 => 'MULLENM',
  p_last_upd_yyyymmddhh24miss => '20080220092532',
  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=> 24737010408526765+ 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=> 24750232156526795+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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=>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 => 24749138532526789+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, enquiry_roles enro'||chr(10)||
'where enro.prty_id = prty.id'||chr(10)||
'and enro.rt_code like ''ENQ OWN'''||chr(10)||
'and enro.enqu_id = :P31_ENQUIRY_ID',
  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_field_template => 24749138532526789+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=>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)||
'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)||
'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="f?p=&APP_ID.:32:&SESSION.::::P32_ID:&P31_NEW_ID.">here</a> to open ',
  p_process_is_stateful_y_n=>'N',
  p_required_patch=>null + wwv_flow_api.g_id_offset,
  p_process_comment=>'');
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_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 => '20080227124015',
  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=> 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=>'jobinfo',
  p_plug_template=> 24738214051526765+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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=>'sitedetail',
  p_plug_template=> 24738214051526765+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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=>'contactdetails',
  p_plug_template=> 24738214051526765+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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=>'siteaddress',
  p_plug_template=> 24738214051526765+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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=>'secondcontactdetails',
  p_plug_template=> 24738214051526765+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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_redirect_url=> 'f?p=&APP_ID.:41:&SESSION.::&DEBUG.:41:P41_ENQU_ID,P41_PREVIOUS_PAGE,P41_QUTE_ID,P41_DRWG_CODE:&P32_ID.,32,,',
  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.get_enquiry_status(:P32_ID) = ''INP''',
  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             => 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    => '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    => '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    => '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    => '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    => '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    => 'UPDATE',
  p_button_image_alt=> 'Apply Changes',
  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_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    => 'UPDATE',
  p_button_image_alt=> 'Apply Changes',
  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_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    => '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_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    => '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_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    => 'UPDATE',
  p_button_image_alt=> 'Apply Changes',
  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_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    => '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_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    => 'UPDATE',
  p_button_image_alt=> 'Apply Changes',
  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_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    => '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_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    => 'UPDATE',
  p_button_image_alt=> 'Apply Changes',
  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_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    => '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_database_action=>'INSERT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>26620030200798275 + 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.:::#jobinfo',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 2,
  p_branch_condition_type=> 'REQUEST_EQUALS_CONDITION',
  p_branch_condition=> 'P32_ENTY_CODE',
  p_branch_comment=> 'Created 26-NOV-2007 15:45 by PRIESTJ');
 
wwv_flow_api.create_page_branch(
  p_id=>26620200803798277 + 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.:::#siteaddress',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 4,
  p_branch_condition_type=> 'REQUEST_EQUALS_CONDITION',
  p_branch_condition=> 'P32_INSTALL_ADDRESS',
  p_branch_comment=> 'Created 26-NOV-2007 15:45 by PRIESTJ');
 
wwv_flow_api.create_page_branch(
  p_id=>26620400768798277 + 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.:::#secondcontactdetails',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 6,
  p_branch_condition_type=> 'REQUEST_EQUALS_CONDITION',
  p_branch_condition=> 'P32_SECOND_CONTACT',
  p_branch_comment=> 'Created 26-NOV-2007 15:45 by PRIESTJ');
 
wwv_flow_api.create_page_branch(
  p_id=>26620607954798277 + 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.:::#jobinfo',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 8,
  p_branch_condition_type=> 'REQUEST_EQUALS_CONDITION',
  p_branch_condition=> 'P32_BYPASS_REQUIRED',
  p_branch_comment=> 'Created 26-NOV-2007 15:45 by PRIESTJ');
 
wwv_flow_api.create_page_branch(
  p_id=>26620828908798277 + 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.#jobinfo'||chr(10)||
'',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 10,
  p_branch_condition_type=> 'REQUEST_EQUALS_CONDITION',
  p_branch_condition=> 'P32_REQUIRED_SVCP_CODE',
  p_branch_comment=> 'Created 26-NOV-2007 15:45 by PRIESTJ');
 
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.::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=>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.:80: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=>26621023082798277 + 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=>26601328613798259+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 110,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>26621214702798277 + 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=>26601130350798259+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 120,
  p_branch_comment=> '');
 
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=>40943215953201689 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_branch_action=> 'f?p=155:32:&SESSION.#jobinfo',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 510,
  p_branch_comment=> 'Created 21-FEB-2008 16:00 by PRIESTJ');
 
 
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=> 1110,
  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',
  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_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_ENTY_CODE',
  p_display_when2=>'OFMAT:REMOVE:STD REMOVE:ADVERSARIAL',
  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 => 24749318534526790+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=> 1128,
  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 Size',
  p_source=>'EXISTING_MESC_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'EXISTINGMETERSIZES',
  p_lov => 'select CODE display_value, CODE return_value '||chr(10)||
'from METER_SIZE_CODES where VALID_FOR_EXISTING_METER=''YES'''||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=>'P32_ENTY_CODE',
  p_display_when2=>'INSTALL:STD INSTALL',
  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 => 24749318534526790+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 => 24749138532526789+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=> 1134,
  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_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 => 24749138532526789+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=>'#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 => 24749138532526789+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=> 1136,
  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=> '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_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 => 24749138532526789+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=> 1203,
  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 => 24749138532526789+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=> 1127,
  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 Type Existing',
  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=> '',
  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_ENTY_CODE',
  p_display_when2=>'INSTALL:STD INSTALL',
  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 => 24749318534526790+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=> 1104,
  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',
  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_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 => 24749318534526790+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 => 24749318534526790+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=> 1108,
  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=> 32,
  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_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 => 24749318534526790+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=> 1111,
  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 => 24749138532526789+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=> 1112,
  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 => 24749138532526789+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=> 1114,
  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',
  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_ENTY_CODE',
  p_display_when2=>'OFMAT:REMOVE:STD REMOVE:ADVERSARIAL:ADDON',
  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 => 24749318534526790+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=> 1115,
  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',
  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_ENTY_CODE',
  p_display_when2=>'OFMAT:REMOVE:STD REMOVE:ADVERSARIAL:ADDON',
  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 => 24749318534526790+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=> 1116,
  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',
  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_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_field_template => 24749318534526790+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=> 1133,
  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',
  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_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_ENTY_CODE',
  p_display_when2=>'OFMAT:INSTALL:STD INSTALL',
  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 => 24749138532526789+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=> 'NO',
  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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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',
  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_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 => 24749318534526790+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',
  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_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 => 24749138532526789+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=> 1113,
  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_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_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=> 1122,
  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_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-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_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=> 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 :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 => 24749318534526790+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=> 1107,
  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)',
  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_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_ENTY_CODE',
  p_display_when2=>'REMOVE:STD REMOVE:ADVERSARIAL',
  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 => 24749138532526789+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=> 1100,
  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_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 => 24749318534526790+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_DOWNSTREAM_BOOSTER_OR_COMPRESS',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1109,
  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',
  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_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_ENTY_CODE',
  p_display_when2=>'REMOVE:STD REMOVE:ADVERSARIAL',
  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 => 24749318534526790+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=> 1123,
  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 => 24749138532526789+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=> 1121,
  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 => 24749138532526789+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=> 1101,
  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)',
  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_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 => 24749318534526790+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=> 1102,
  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 => 24749138532526789+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=> 1103,
  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_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 => 24749138532526789+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 => 24749318534526790+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 => 24749138532526789+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 => 24749138532526789+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 => 24749318534526790+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 => 24749138532526789+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 => 24749138532526789+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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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 => 24749138532526789+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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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 => 24749138532526789+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 NAME display_value, ID return_value from PARTIES where PRTY_TYPE=''MKTP'' 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="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''',
  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 => 24749318534526790+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_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=>'#OWNER#.mip_parties.get_user_role(v(''APP_USER'')) <> ''AGENT'' and :P32_MKTP_REF is not null and :P32_MKTP_REF<> ''%''||''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;'||chr(10)||
'',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 24749318534526790+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 => 24749138532526789+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_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=>'#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 => 24749138532526789+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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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=> 1125,
  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_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 => 24749138532526789+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 => 24749318534526790+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=> 1105,
  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',
  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_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_REQUIRED_SVCP_CODE =''IP'' and :P32_ENTY_CODE <> ''STD INSTALL'' and :P32_ENTY_CODE <> ''STD EXCHANGE'' and :P32_ENTY_CODE <> ''STD REMOVE''',
  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 => 24749318534526790+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=> 1106,
  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 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_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_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 => 24749138532526789+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=> 1132,
  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',
  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_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_ENTY_CODE',
  p_display_when2=>'OFMAT:INSTALL:STD INSTALL',
  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 => 24749138532526789+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=> 1117,
  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',
  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=>'if not (:P32_ENTY_CODE in (''OFMAT'',''REMOVE'',''STD REMOVE'',''ADVERSARIAL'')) and (#OWNER#.mip_parties.is_tripartite(:P32_MKTP_REF) or #OWNER#.mip_parties.is_tripartite(:P32_MKTP_REF2)) then'||chr(10)||
'  return true;'||chr(10)||
'else'||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 => 24749318534526790+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=> 1118,
  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',
  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_begin_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:REMOVE:STD REMOVE:ADVERSARIAL',
  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 => 24749318534526790+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=> 1120,
  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',
  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_ENTY_CODE',
  p_display_when2=>'OFMAT:REMOVE:STD REMOVE:ADVERSARIAL',
  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 => 24749138532526789+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=> 1119,
  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',
  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_ENTY_CODE',
  p_display_when2=>'OFMAT:REMOVE:STD REMOVE:ADVERSARIAL:ADDON',
  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 => 24749318534526790+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=> 1124,
  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)',
  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_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 => 24749138532526789+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=> 1126,
  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',
  p_source=>'REQUIRED_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=> 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_ENTY_CODE',
  p_display_when2=>'INSTALL:OFMAT:EXCHANGE:REMOVE:STD REMOVE:ADVERSARIAL:ALTERATION:ADDON',
  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 => 24749138532526789+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=> 1130,
  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',
  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_ENTY_CODE',
  p_display_when2=>'INSTALL:STD INSTALL',
  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 => 24749318534526790+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 exisiting 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=> 1131,
  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 Model',
  p_source=>'EXISTING_METER_MODEL',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 20,
  p_cMaxlength=> 20,
  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=>'INSTALL:STD INSTALL',
  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 => 24749138532526789+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=> 1135,
  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 => 24749138532526789+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 => 24749138532526789+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
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 => 24749318534526790+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 => 24749318534526790+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 => 24749138532526789+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 => 24749318534526790+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 => 24749138532526789+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 => 24749318534526790+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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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 => 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=>'ON_ERROR_PAGE',
  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=>'ON_ERROR_PAGE',
  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 := v(''P32_DOWNSTREAM_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_METER_MODEL := :P32_EXISTING_METER_MODEL;'||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 => 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_METER_MODEL'');',
  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 => 'if not #OWNER#.mip_tripartite.enquiry_allowed(:P32_ID) then'||chr(10)||
'  return ''Enquiry not allowed under current Tripartite arrangements'';'||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_error_display_location=>'INLINE_IN_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 then'||chr(10)||
'   return ''Maximum value allowed 999999'';'||chr(10)||
'else'||chr(10)||
'   return null;'||chr(10)||
'end if;',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Maximum value allowed 999999',
  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 then'||chr(10)||
'   return ''Maximum value allowed 999999'';'||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
 
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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_button_id=>26601328613798259 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_required_patch=>null + wwv_flow_api.g_id_offset,
  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',
  p_process_when_type=>'REQUEST_NOT_IN_CONDITION',
  p_process_success_message=> 'Enquiry has been saved.',
  p_process_is_stateful_y_n=>'N',
  p_required_patch=>null + wwv_flow_api.g_id_offset,
  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 Supplier Role',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to create enquiry, primary key error',
  p_process_when_button_id=>26601328613798259 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_required_patch=>null + wwv_flow_api.g_id_offset,
  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_button_id=>26601328613798259 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_required_patch=>null + wwv_flow_api.g_id_offset,
  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_button_id=>26601328613798259 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_required_patch=>null + wwv_flow_api.g_id_offset,
  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_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_required_patch=>null + wwv_flow_api.g_id_offset,
  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%'') <> ''%n';

p:=p||'ull%'' 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 Agent Role',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to create enquiry, primary key error',
  p_process_when_button_id=>26601328613798259 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_required_patch=>null + wwv_flow_api.g_id_offset,
  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(:P32_AGENT_ID,''%n';

p:=p||'ull%'') <> ''%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;'||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_when_button_id=>26601130350798259 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_required_patch=>null + wwv_flow_api.g_id_offset,
  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_button_id=>26601130350798259 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_required_patch=>null + wwv_flow_api.g_id_offset,
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||''||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_required_patch=>null + wwv_flow_api.g_id_offset,
  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 boolean;'||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, quote may exists 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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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_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 => '20080226094320',
  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=> 24738214051526765+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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" 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=> 24740611526526770+ 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_query_row_template=> 24743617611526775+ 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(''f?p=&APP_ID.:42:&SESSION.::&DEBUG.::P41_ID:#COL02#'');}  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_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=> 'N',
  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 => 24749138532526789+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
 
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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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=> 24740611526526770+ 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=> 24743617611526775+ 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_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=> 24738214051526765+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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=> 24740611526526770+ 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=> 24743617611526775+ 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_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=> 24738214051526765+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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 => 24749138532526789+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 => 24749138532526789+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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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 => '20080227133211',
  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=> 24740611526526770+ 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=> 24743617611526775+ 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_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=> 24738214051526765+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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=> 24740611526526770+ 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=> 24743617611526775+ 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_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 => '20080222150418',
  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=> 24738214051526765+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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=> 24738214051526765+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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=> 24738214051526765+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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=> 24738214051526765+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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 rt.description || '': Size '' || r.relief_valve_size || '': Setting ''||r.relief_valve_setting display_value, r.code return_value '||chr(10)||
'from relief_valves r, relief_valve_types rt'||chr(10)||
'where r.rvty_code = rt.code'||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 => 24749138532526789+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 rt.description || '': Size '' || r.slamshut_size || '': Setting ''||r.slamshut_setting display_value, r.code return_value '||chr(10)||
'from slamshut_valves r, slamshut_types rt'||chr(10)||
'where r.slty_code = rt.code'||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 => 24749138532526789+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'||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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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 => 24749138532526789+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 => 24749138532526789+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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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 => 24749138532526789+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 => 24749138532526789+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 => 24749318534526790+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 => 24749318534526790+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 => 24749138532526789+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 rt.description || '' - '' || r.lock_up display_value, r.code return_value '||chr(10)||
'from regulators r, regulator_types rt'||chr(10)||
'where r.rety_code = rt.code'||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 => 24749318534526790+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 ft.description || '' - '' || f.filter_size display_value, f.code return_value '||chr(10)||
'from FILTERS f, filter_types ft'||chr(10)||
'where f.fity_code = ft.code'||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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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 => 24749138532526789+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 => 24749318534526790+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=> 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 => 24749138532526789+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=>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 not null',
  p_validation_sequence=> 12,
  p_validation => 'P57_INLET_SIZE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Inlet Size must have some 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 not null',
  p_validation_sequence=> 15,
  p_validation => 'P57_OUTLET_SIZE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Outlet Size must have some 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_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 => 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 => 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
 
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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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=> 24740611526526770+ 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=> 24743617611526775+ 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_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=> 24738214051526765+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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(24749440874526790+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(24749440874526790+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(24749440874526790+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(24749440874526790+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 => 24749138532526789+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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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 => 24749318534526790+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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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 => '20080124092126',
  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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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(24749440874526790+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.:::',
  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(24749440874526790+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_button_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_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=>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_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 => '20080220133018',
  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=>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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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(24749440874526790+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(24749440874526790+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=> 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(: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 => 24749138532526789+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=> 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 (''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 => 24749138532526789+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=> 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) = ''MANU'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 24749138532526789+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=> 30,
  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 => 24749138532526789+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=> 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  => '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 => 24749138532526789+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=> 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) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 24749138532526789+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=> 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) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 24749138532526789+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_field_template => 24749138532526789+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=> 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(: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 => 24749138532526789+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=> 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) 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 => 24749138532526789+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=> 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_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 => 24749138532526789+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=> 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(: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 => 24749138532526789+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=> 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(: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 => 24749138532526789+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=> 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) 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 => 24749138532526789+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=> 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_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 => 24749138532526789+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=> 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) 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 => 24749138532526789+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=> 80,
  p_cMaxlength=> 255,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  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 => 24749138532526789+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_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) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 24749138532526789+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
 
---------------------------------------
-- ...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_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 => '20080221161736',
  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=>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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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(24749440874526790+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(24749440874526790+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(24749440874526790+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 => 24749138532526789+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 => 24749138532526789+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)||
'             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)||
''||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 => 24749318534526790+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=> '',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Phone',
  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_field_template => 24749138532526789+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=>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=> '',
  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_field_template => 24749138532526789+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=>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=> '',
  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_field_template => 24749138532526789+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=>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=> '',
  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_field_template => 24749138532526789+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=>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 => 24749138532526789+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
 
---------------------------------------
-- ...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_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 => '20080222141636',
  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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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(24749440874526790+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(24749440874526790+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(24749440874526790+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=> 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_field_template => 24749138532526789+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=> 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_field_template => 24749138532526789+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=> 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  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 24749138532526789+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=> 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_field_template => 24749138532526789+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=> 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_field_template => 24749138532526789+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=> 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  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 24749138532526789+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 => 24749138532526789+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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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 => '20080222142926',
  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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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=> '',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Home 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_field_template => 24749318534526790+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=>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=> '',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Sub-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_field_template => 24749318534526790+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=>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 => 24749138532526789+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=> '',
  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 => '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 => 24749318534526790+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=>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=> '',
  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_field_template => 24749318534526790+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=>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=> '',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Town/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_field_template => 24749318534526790+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=>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=> 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_field_template => 24749318534526790+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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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 => '20080227112418',
  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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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''';

s:=s||''||chr(10)||
'from PARTIES, PARTY_ROLES, 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=> 24740611526526770+ 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_query_row_template=> 24743617611526775+ 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_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=>'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=> '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.';

s:=s||'get_user_id(:APP_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=> 24740611526526770+ 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_query_row_template=> 24743617611526775+ 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_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=> 24740611526526770+ 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=> 24743617611526775+ 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 => 24749138532526789+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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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 => '20080227112321',
  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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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=> 24738214051526765+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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 ';

s:=s||'          addr,'||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=> 24740611526526770+ 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_query_row_template=> 24743617611526775+ 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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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(24749440874526790+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(24749440874526790+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(24749440874526790+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=>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 => 24749138532526789+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 => 24749138532526789+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 => 24749318534526790+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 => 24749138532526789+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 => 24749138532526789+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 => 24749318534526790+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 => 24749013313526789+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 => 24749138532526789+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 => 24749318534526790+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 => 24749138532526789+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 => 24749013313526789+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 => 24749013313526789+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 => 24749013313526789+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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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 => 24749138532526789+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
 
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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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 => '20080212145220',
  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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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 => 24749318534526790+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 => 24749138532526789+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 => 24749318534526790+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 no 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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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 => '20080220142909',
  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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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 => 24748930478526784+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_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 => '20080227115805',
  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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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 => 24749138532526789+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=> 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_type=>'ALWAYS',
  p_field_template => 24749318534526790+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_field_template => 24749318534526790+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=> '',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Sub-Building',
  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=> 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_field_template => 24749318534526790+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=>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=> '',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Building',
  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=> 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_field_template => 24749318534526790+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=>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=> '',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Street',
  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=> 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_field_template => 24749318534526790+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=>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=> 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 => 24749318534526790+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=> 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 => 24749318534526790+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
 
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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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 => '20080219172644',
  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=> 24740611526526770+ 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=> 24743617611526775+ 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=> 24740611526526770+ 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_header=> '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_query_row_template=> 24744236267526775+ 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=> 'There are no available quotes for the selected enquiry.',
  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=> 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=> 'Q Max',
  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 => 24749138532526789+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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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 => '20080219171853',
  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=> 24740611526526770+ 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_query_row_template=> 24743617611526775+ 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=> 'Bas 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=> 'Hou 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=> 'Q max',
  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=> 24740611526526770+ 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=> 24743617611526775+ 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=>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 => 24749138532526789+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 “copy new” 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_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',
  p_begin_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 => 24748930478526784+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||'#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_required_patch=>null + wwv_flow_api.g_id_offset,
  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=>'EXISTS',
  p_process_success_message=> 'Quote selected successfully.',
  p_process_is_stateful_y_n=>'N',
  p_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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 => '20080124144724',
  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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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=> '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 => 24749138532526789+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=>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 => 24749138532526789+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 => 24749138532526789+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
 
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 => :P82_REJECTION_REASON || '' '' || :P82_REJ_REASON_DETAIL);';

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_required_patch=>null + wwv_flow_api.g_id_offset,
  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 => :P82_REJECTION_REASON || '' '' || :P82_REJ_REASON_DETAIL);';

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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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 => '20080225130651',
  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=> 24738214051526765+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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(24749440874526790+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(24749440874526790+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(24749440874526790+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(24749440874526790+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 => 24749138532526789+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 => 24749138532526789+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 => 24749318534526790+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 => 24749138532526789+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 => 'Regi Code 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 additonal 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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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 => '20080221111045',
  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 enty_code, regi_code, adit_code, id  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=> 24740611526526770+ 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=> 24744236267526775+ 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=> 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=> 1,
  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=> 2,
  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=> 3,
  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=>16308001698628897 + 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=> 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=> 4,
  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=> 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_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=> 24738214051526765+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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(24749440874526790+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(24749440874526790+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(24749440874526790+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(24749440874526790+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 => 24749138532526789+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 => 24749318534526790+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 => 24749318534526790+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 => 24749138532526789+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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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 => '20080211183050',
  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=> 24740611526526770+ 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=> 24744236267526775+ 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=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  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_group_id => 28663418596435255+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => 24734011047526756+ 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 => '20080227093007',
  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=> 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_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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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=>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=> 10,
  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 => 24749318534526790+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=> 20,
  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 => 24749318534526790+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=> 30,
  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 => 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=> 1,
  p_validation => 'P101_USERNAME',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  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_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_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_required_patch=>null + wwv_flow_api.g_id_offset,
  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 ||'':30'''||chr(10)||
'    );';

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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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 => 24749138532526789+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 => 24749138532526789+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_required_patch=>null + wwv_flow_api.g_id_offset,
  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_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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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_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 => 'PRIESTJ',
  p_last_upd_yyyymmddhh24miss => '20080201175936',
  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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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"',
  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_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=> 24740611526526770+ 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_required_patch=> '' + wwv_flow_api.g_id_offset,
  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_required_patch=> null + wwv_flow_api.g_id_offset,
  p_display_row_template_id=> 24746820611526783 + 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_required_patch=> null + wwv_flow_api.g_id_offset,
  p_display_row_template_id=> 24746820611526783 + 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_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_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=> 'f?p=&APP_ID.:18:&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=> '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=> '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 = 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.: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=> 'CURRENT_PAGE_NOT_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_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=> 'CURRENT_PAGE_NOT_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_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=> 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)',
  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/login
prompt  ......Page template 24733840230526723
 
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/common.css" type="text/css" />'||chr(10)||
'#HEAD#'||chr(10)||
'</head>'||chr(10)||
'<body #ONLOAD#>#FORM_OPEN#';

c2:=c2||'#FORM_CLOSE#</body>'||chr(10)||
'</html>'||chr(10)||
'';

c3:=c3||'<div class="t4messages">#GLOBAL_NOTIFICATION##SUCCESS_MESSAGE##NOTIFICATION_MESSAGE#</div>'||chr(10)||
'<table align="center" border="0" cellpadding="0" cellspacing="0" summary="" class="t4Login">'||chr(10)||
'<tr>'||chr(10)||
'<td>#BOX_BODY##REGION_POSITION_01##REGION_POSITION_02##REGION_POSITION_03##REGION_POSITION_04##REGION_POSITION_05##REGION_POSITION_06##REGION_POSITION_07##REGION_POSITION_08#</td>'||chr(10)||
'</tr>'||chr(10)||
'</table>'||chr(10)||
'';

wwv_flow_api.create_template(
  p_id=> 24733840230526723 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'Login',
  p_body_title=> '',
  p_header_template=> c1,
  p_box=> c3,
  p_footer_template=> c2,
  p_success_message=> '<div class="t4success">#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 => 6,
  p_required_patch   => null + wwv_flow_api.g_id_offset,
  p_translate_this_template => 'N',
  p_template_comment => '');
end;
 
null;
 
end;
/

--application/shared_components/user_interface/templates/page/no_tabs
prompt  ......Page template 24734011047526756
 
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)||
'<html lang="&BROWSER_LANGUAGE." xmlns:htmldb="http://htmldb.oracle.com">'||chr(10)||
'<head>'||chr(10)||
'<title>#TITLE#</title>'||chr(10)||
'<link rel="stylesheet" href="#WORKSPACE_IMAGES#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="hskpcol1">'||chr(10)||
'<a href="http';

c1:=c1||'://www.nationalgrid.com/"><img src="/i/ng_logo_group_medium.gif" alt="National Grid Metering" width="200" height="43"/></a>'||chr(10)||
'</div>'||chr(10)||
'<div id="navHousekeep" class="hskpcol2">'||chr(10)||
'<div class="margin5">'||chr(10)||
'<a href="this is the url for the holding page for the ICOMQ system" class="hskpnav" title="Return to the Metering Online Quotations Home Page" accesskey="1">Home</a>&nbsp;|&nbsp;<a href="&LOGOUT_URL." c';

c1:=c1||'lass="hskpnav" title="Log 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>';

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">2007</span> National Grid</div>'||chr(10)||
'	</div>'||chr(10)||
'	'||chr(10)||
'	<div class="hskpcol2">'||chr(10)||
'		<div id="navFooter">'||chr(10)||
'                        <a href="thehelp.htm">Help</a> | '||chr(10)||
'';

c2:=c2||'			<a href="thetermsandconditions.htm">Terms &amp; conditions</a>'||chr(10)||
''||chr(10)||
'			| <a href="theprivacypolicy.htm">Privacy policy</a>'||chr(10)||
'                        | #APP_VERSION#'||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)||
''||chr(10)||
'#BOX_BODY#'||chr(10)||
''||chr(10)||
'#REGION_POSITION_02#'||chr(10)||
'#REGION_POSITION_03#'||chr(10)||
'#REGION_POSITION_04#'||chr(10)||
'</div>'||chr(10)||
'<div id="colRight">'||chr(10)||
'<h1 class="podTitle"><img src="#WORKSPACE_IMAGES#exclaim.gif" alt="" width="23" height="23"/>Impo';

c3:=c3||'rtant Messages</h1>'||chr(10)||
'<div class="t4messages">#GLOBAL_NOTIFICATION##SUCCESS_MESSAGE##NOTIFICATION_MESSAGE#</div>'||chr(10)||
'</div>'||chr(10)||
'</div>'||chr(10)||
''||chr(10)||
''||chr(10)||
''||chr(10)||
'';

wwv_flow_api.create_template(
  p_id=> 24734011047526756 + 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="/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_required_patch   => null + wwv_flow_api.g_id_offset,
  p_template_comment => '');
end;
 
null;
 
end;
/

--application/shared_components/user_interface/templates/page/no_tabs_with_sidebar
prompt  ......Page template 24734336575526758
 
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||'<table border="0" cellpadding="0" cellspacing="0" summary="" id="t4PageFooter" width="100%">'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4UserPrompt">&APP_USER.</td>'||chr(10)||
'<td class="t4Copyright"><!-- Copyright --><span class="t4Customize">#CUSTOMIZE#</span></td>'||chr(10)||
'</tr>'||chr(10)||
'</table>'||chr(10)||
'<br class="t4Break"/>'||chr(10)||
'#REGION_POSITION_05#'||chr(10)||
'#FORM_CLOSE# '||chr(10)||
'</body>'||chr(10)||
'</html>';

c3:=c3||'<table border="0" cellpadding="0" cellspacing="0" summary="" width="100%">'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4Logo">#LOGO##REGION_POSITION_06#</td>'||chr(10)||
'<td width="100%" valign="top">#REGION_POSITION_07#</td>'||chr(10)||
'<td class="t4NavBar">#NAVIGATION_BAR##REGION_POSITION_08#</td>'||chr(10)||
'</tr>'||chr(10)||
'</table>'||chr(10)||
'<table border="0" cellpadding="0" cellspacing="0" summary="" id="t4PageBody"  width="100%" height="70%">'||chr(10)||
'  <tr>'||chr(10)||
'    <td colspan="2" cla';

c3:=c3||'ss="t4BreadCrumbRegion">#REGION_POSITION_01#<img src="#IMAGE_PREFIX#themes/theme_4/1px_trans.gif" width="1" height="1" alt="" /></td>'||chr(10)||
'  </tr>'||chr(10)||
'  <tr class="t4SidebarLayout">'||chr(10)||
'    <td valign="top" class="t4SideBarNav">#REGION_POSITION_02#</td>'||chr(10)||
'    <td valign="top" width="100%" class="t4ContentBody" height="100%"><table summary="" cellpadding="0" width="100%" cellspacing="0" border="0">'||chr(10)||
'<tr>'||chr(10)||
'<td width';

c3:=c3||'="100%" valign="top"><div class="t4messages">#GLOBAL_NOTIFICATION##SUCCESS_MESSAGE##NOTIFICATION_MESSAGE#</div>#BOX_BODY##REGION_POSITION_04#</td>'||chr(10)||
'<td valign="top">#REGION_POSITION_03#<br /></td>'||chr(10)||
'</tr>'||chr(10)||
'</table></td>'||chr(10)||
'  </tr>'||chr(10)||
'</table>'||chr(10)||
'';

wwv_flow_api.create_template(
  p_id=> 24734336575526758 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'No Tabs with Sidebar',
  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_sidebar_def_reg_pos => 'REGION_POSITION_02',
  p_breadcrumb_def_reg_pos => 'REGION_POSITION_01',
  p_theme_id  => 101,
  p_theme_class_id => 17,
  p_required_patch   => null + wwv_flow_api.g_id_offset,
  p_translate_this_template => 'N',
  p_template_comment => '');
end;
 
null;
 
end;
/

--application/shared_components/user_interface/templates/page/one_level_tabs
prompt  ......Page template 24734616867526758
 
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# (&P10_ROLE.)</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||'<table border="0" cellpadding="0" cellspacing="0" summary="" id="t4PageFooter" width="100%">'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4UserPrompt">&APP_USER.</td>'||chr(10)||
'<td class="t4Copyright"><!-- Copyright --><span class="t4Customize">#CUSTOMIZE#</span></td>'||chr(10)||
'</tr>'||chr(10)||
'</table>'||chr(10)||
'<br class="t4Break"/>'||chr(10)||
'#REGION_POSITION_05#'||chr(10)||
'#FORM_CLOSE# '||chr(10)||
'</body>'||chr(10)||
'</html>';

c3:=c3||'<table border="0" cellpadding="0" cellspacing="0" summary="" width="100%">'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4Logo">#LOGO##REGION_POSITION_06#</td>'||chr(10)||
'<td width="100%" valign="top">#REGION_POSITION_07#</td>'||chr(10)||
'<td class="t4NavBar">#NAVIGATION_BAR##REGION_POSITION_08#</td>'||chr(10)||
'</tr>'||chr(10)||
'</table>'||chr(10)||
'<table border="0" cellpadding="0" cellspacing="0" summary="" id="t4PageBody"  width="100%" height="70%">'||chr(10)||
'<tr><td class="t4Tabs">#TAB_CE';

c3:=c3||'LLS#</td></tr>'||chr(10)||
'<tr><td><div class="t4BreadCrumbRegion">#REGION_POSITION_01#<img src="#IMAGE_PREFIX#themes/theme_4/1px_trans.gif" width="1" height="1" alt="" /></div></td></tr>'||chr(10)||
'<tr>'||chr(10)||
'<td valign="top" class="t4ContentBody" height="100%"><table summary="" cellpadding="0" width="100%" cellspacing="0" border="0">'||chr(10)||
'<tr>'||chr(10)||
'<td width="100%" valign="top"><div class="t4messages">#GLOBAL_NOTIFICATION##SUCCESS_ME';

c3:=c3||'SSAGE##NOTIFICATION_MESSAGE#</div>#BOX_BODY##REGION_POSITION_02##REGION_POSITION_04#</td>'||chr(10)||
'<td style="width:15px;"><br /></td>'||chr(10)||
'<td valign="top">#REGION_POSITION_03#<br /></td>'||chr(10)||
'</tr>'||chr(10)||
'</table></td>'||chr(10)||
'</tr>'||chr(10)||
'</table>'||chr(10)||
'';

wwv_flow_api.create_template(
  p_id=> 24734616867526758 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'One Level 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=> '<span class="t4standardtabcurrent">#TAB_LABEL#</span>#TAB_INLINE_EDIT#',
  p_current_tab_font_attr=> '',
  p_non_current_tab=> '<a href="#TAB_LINK#" class="t4standardtab">#TAB_LABEL#</a>#TAB_INLINE_EDIT#'||chr(10)||
'',
  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_breadcrumb_def_reg_pos => 'REGION_POSITION_01',
  p_theme_id  => 101,
  p_theme_class_id => 1,
  p_required_patch   => null + wwv_flow_api.g_id_offset,
  p_translate_this_template => 'N',
  p_template_comment => '12');
end;
 
null;
 
end;
/

--application/shared_components/user_interface/templates/page/one_level_tabs_with_sidebar
prompt  ......Page template 24734922613526758
 
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||'<table border="0" cellpadding="0" cellspacing="0" summary="" id="t4PageFooter" width="100%">'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4UserPrompt">&APP_USER.</td>'||chr(10)||
'<td class="t4Copyright"><!-- Copyright --><span class="t4Customize">#CUSTOMIZE#</span></td>'||chr(10)||
'</tr>'||chr(10)||
'</table>'||chr(10)||
'<br class="t4Break"/>'||chr(10)||
'#REGION_POSITION_05#'||chr(10)||
'#FORM_CLOSE# '||chr(10)||
'</body>'||chr(10)||
'</html>';

c3:=c3||'<table border="0" cellpadding="0" cellspacing="0" summary="" width="100%">'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4Logo">#LOGO##REGION_POSITION_06#</td>'||chr(10)||
'<td width="100%" valign="top">#REGION_POSITION_07#</td>'||chr(10)||
'<td class="t4NavBar">#NAVIGATION_BAR##REGION_POSITION_08#</td>'||chr(10)||
'</tr>'||chr(10)||
'</table>'||chr(10)||
'<table border="0" cellpadding="0" cellspacing="0" summary="" id="t4PageBody"  width="100%" height="70%">'||chr(10)||
'<tr>'||chr(10)||
'<td colspan="2" class="t4';

c3:=c3||'Tabs">#TAB_CELLS#</td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td colspan="2" class="t4BreadCrumbRegion" style="z-index:1;">#REGION_POSITION_01#<img src="#IMAGE_PREFIX#themes/theme_4/1px_trans.gif" width="1" height="1" alt="" /></td>'||chr(10)||
'</tr>'||chr(10)||
'<tr class="t4SidebarLayout">'||chr(10)||
'<td valign="top" class="t4SideBarNav">#REGION_POSITION_02#</td>'||chr(10)||
'<td valign="top" width="100%" class="t4ContentBody" height="100%"><table summary="" cellpadding';

c3:=c3||'="0" width="100%" cellspacing="0" border="0">'||chr(10)||
'<tr>'||chr(10)||
'<td width="100%" valign="top"><div class="t4messages">#GLOBAL_NOTIFICATION##SUCCESS_MESSAGE##NOTIFICATION_MESSAGE#</div>#BOX_BODY##REGION_POSITION_04#</td>'||chr(10)||
'<td valign="top">#REGION_POSITION_03#<br /></td>'||chr(10)||
'</tr>'||chr(10)||
'</table></td>'||chr(10)||
'</tr>'||chr(10)||
'</table>'||chr(10)||
'';

wwv_flow_api.create_template(
  p_id=> 24734922613526758 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'One Level Tabs with Sidebar',
  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=> '<span class="t4standardtabcurrent">#TAB_LABEL#</span>#TAB_INLINE_EDIT#',
  p_current_tab_font_attr=> '',
  p_non_current_tab=> '<a href="#TAB_LINK#" class="t4standardtab">#TAB_LABEL#</a>#TAB_INLINE_EDIT#',
  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_sidebar_def_reg_pos => 'REGION_POSITION_02',
  p_breadcrumb_def_reg_pos => 'REGION_POSITION_01',
  p_theme_id  => 101,
  p_theme_class_id => 16,
  p_required_patch   => null + wwv_flow_api.g_id_offset,
  p_translate_this_template => 'N',
  p_template_comment => '');
end;
 
null;
 
end;
/

--application/shared_components/user_interface/templates/page/popup
prompt  ......Page template 24735222377526758
 
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=> 24735222377526758 + 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_required_patch   => null + wwv_flow_api.g_id_offset,
  p_translate_this_template => 'N',
  p_template_comment => '');
end;
 
null;
 
end;
/

--application/shared_components/user_interface/templates/page/printer_friendly
prompt  ......Page template 24735530196526758
 
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=> 24735530196526758 + 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_required_patch   => null + wwv_flow_api.g_id_offset,
  p_translate_this_template => 'N',
  p_template_comment => '3');
end;
 
null;
 
end;
/

--application/shared_components/user_interface/templates/page/two_level_tabs
prompt  ......Page template 24735816699526758
 
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||'<table border="0" cellpadding="0" cellspacing="0" summary="" id="t4PageFooter" width="100%">'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4UserPrompt">&APP_USER.</td>'||chr(10)||
'<td class="t4Copyright"><!-- Copyright --><span class="t4Customize">#CUSTOMIZE#</span></td>'||chr(10)||
'</tr>'||chr(10)||
'</table>'||chr(10)||
'<br class="t4Break"/>'||chr(10)||
'#REGION_POSITION_05#'||chr(10)||
'#FORM_CLOSE# '||chr(10)||
'</body>'||chr(10)||
'</html>';

c3:=c3||'<table border="0" cellpadding="0" cellspacing="0" summary="" width="100%">'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4Logo">#LOGO##REGION_POSITION_06#</td>'||chr(10)||
'<td width="100%" valign="top">#REGION_POSITION_07#</td>'||chr(10)||
'<td class="t4NavBar">#NAVIGATION_BAR##REGION_POSITION_08#</td>'||chr(10)||
'</tr>'||chr(10)||
'</table>'||chr(10)||
'<table border="0" cellpadding="0" cellspacing="0" summary="" id="t4PageBody"  width="100%" height="70%">'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4Tabs">#PAREN';

c3:=c3||'T_TAB_CELLS#</td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4BreadCrumbRegion">#REGION_POSITION_01#<img src="#IMAGE_PREFIX#themes/theme_4/1px_trans.gif" width="1" height="1" alt="" /></td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4ChildTabs">#TAB_CELLS#</td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td valign="top" width="100%" class="t4ContentBody" width="100%" height="100%"><table summary="" cellpadding="0" width="100%" cellspacing="0" border="0">'||chr(10)||
'<tr>'||chr(10)||
'<td widt';

c3:=c3||'h="100%" valign="top"><div class="t4messages">#GLOBAL_NOTIFICATION##SUCCESS_MESSAGE##NOTIFICATION_MESSAGE#</div>#BOX_BODY##REGION_POSITION_02##REGION_POSITION_04#</td>'||chr(10)||
'<td valign="top">#REGION_POSITION_03#<br /></td>'||chr(10)||
'</tr>'||chr(10)||
'</table></td>'||chr(10)||
'</tr>'||chr(10)||
'</table>'||chr(10)||
'';

wwv_flow_api.create_template(
  p_id=> 24735816699526758 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'Two Level 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=> '<span class="t4childtabcurrent">#TAB_LABEL#</span>#TAB_INLINE_EDIT#',
  p_current_tab_font_attr=> '',
  p_non_current_tab=> '<a href="#TAB_LINK#" class="t4childtab">#TAB_LABEL#</a>#TAB_INLINE_EDIT#',
  p_non_current_tab_font_attr => '',
  p_top_current_tab=> '<span class="t4standardtabcurrent">#TAB_LABEL#</span>#TAB_INLINE_EDIT#',
  p_top_current_tab_font_attr => '',
  p_top_non_curr_tab=> '<a href="#TAB_LINK#" class="t4standardtab">#TAB_LABEL#</a>#TAB_INLINE_EDIT#',
  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_breadcrumb_def_reg_pos => 'REGION_POSITION_01',
  p_theme_id  => 101,
  p_theme_class_id => 2,
  p_required_patch   => null + wwv_flow_api.g_id_offset,
  p_translate_this_template => 'N',
  p_template_comment => '8');
end;
 
null;
 
end;
/

--application/shared_components/user_interface/templates/page/two_level_tabs_with_sidebar
prompt  ......Page template 24736129572526758
 
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||'<table border="0" cellpadding="0" cellspacing="0" summary="" id="t4PageFooter" width="100%">'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4UserPrompt">&APP_USER.</td>'||chr(10)||
'<td class="t4Copyright"><!-- Copyright --><span class="t4Customize">#CUSTOMIZE#</span></td>'||chr(10)||
'</tr>'||chr(10)||
'</table>'||chr(10)||
'<br class="t4Break"/>'||chr(10)||
'#REGION_POSITION_05#'||chr(10)||
'#FORM_CLOSE# '||chr(10)||
'</body>'||chr(10)||
'</html>';

c3:=c3||'<table border="0" cellpadding="0" cellspacing="0" summary="" width="100%">'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4Logo">#LOGO##REGION_POSITION_06#</td>'||chr(10)||
'<td width="100%" valign="top">#REGION_POSITION_07#</td>'||chr(10)||
'<td class="t4NavBar">#NAVIGATION_BAR##REGION_POSITION_08#</td>'||chr(10)||
'</tr>'||chr(10)||
'</table>'||chr(10)||
'<table border="0" cellpadding="0" cellspacing="0" summary="" id="t4PageBody"  width="100%" height="70%">'||chr(10)||
'<tr>'||chr(10)||
'<td colspan="2" class="t4';

c3:=c3||'Tabs"><span>#PARENT_TAB_CELLS#</span></td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td colspan="2" class="t4BreadCrumbRegion">#REGION_POSITION_01#<img src="#IMAGE_PREFIX#themes/theme_4/1px_trans.gif" width="1" height="1" alt="" /></td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td colspan="2" class="t4ChildTabs">#TAB_CELLS#</td>'||chr(10)||
'</tr>'||chr(10)||
'<tr class="t4SidebarLayout">'||chr(10)||
'<td valign="top" class="t4SideBarNav">#REGION_POSITION_02#</td>'||chr(10)||
'<td valign="top" width="100%" ';

c3:=c3||'class="t4ContentBody" height="100%"><table summary="" cellpadding="0" width="100%" cellspacing="0" border="0">'||chr(10)||
'<tr>'||chr(10)||
'<td width="100%" valign="top"><div class="t4messages">#GLOBAL_NOTIFICATION##SUCCESS_MESSAGE##NOTIFICATION_MESSAGE#</div>#BOX_BODY##REGION_POSITION_04#</td>'||chr(10)||
'<td valign="top">#REGION_POSITION_03#<br /></td>'||chr(10)||
'</tr>'||chr(10)||
'</table></td>'||chr(10)||
'</tr>'||chr(10)||
'</table>';

wwv_flow_api.create_template(
  p_id=> 24736129572526758 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'Two Level Tabs with Sidebar',
  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=> '<span class="t4childtabcurrent">#TAB_LABEL#</span>#TAB_INLINE_EDIT#',
  p_current_tab_font_attr=> '',
  p_non_current_tab=> '<a href="#TAB_LINK#" class="t4childtab">#TAB_LABEL#</a>#TAB_INLINE_EDIT#',
  p_non_current_tab_font_attr => '',
  p_top_current_tab=> '<span class="t4standardtabcurrent">#TAB_LABEL#</span>#TAB_INLINE_EDIT#',
  p_top_current_tab_font_attr => '',
  p_top_non_curr_tab=> '<a href="#TAB_LINK#" class="t4standardtab">#TAB_LABEL#</a>#TAB_INLINE_EDIT#',
  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_sidebar_def_reg_pos => 'REGION_POSITION_02',
  p_breadcrumb_def_reg_pos => 'REGION_POSITION_01',
  p_theme_id  => 101,
  p_theme_class_id => 18,
  p_required_patch   => null + wwv_flow_api.g_id_offset,
  p_translate_this_template => 'N',
  p_template_comment => '');
end;
 
null;
 
end;
/

--application/shared_components/user_interface/templates/page/errorpage
prompt  ......Page template 38911722486594102
 
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="#WORKSPACE_IMAGES#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="hskpco';

c1:=c1||'l1">'||chr(10)||
'<a href="http://www.nationalgrid.com/"><img src="/i/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="this is the url for the holding page for the ICOMQ system" class="hskpnav" title="Return to the Metering Online Quotations Home Page" accesskey="1">Home</a>&nbsp;|&nbsp;<a href="&LOGOUT_URL." class=';

c1:=c1||'"hskpnav" title="Log 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)||
' va';

c1:=c1||'r vElementList = null;'||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; ';

c1:=c1||'i < vElementList.length; 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)||
'    vElement.innerHTML = '''';'||chr(10)||
'    vOraErrorStack = vErrorStack.split("ORA-");'||chr(10)||
'    for(var j=1; j < vOraErrorStack.length; j++) {'||chr(10)||
'      vOraError = vOraErrorStack[j];'||chr(10)||
'      vAjaxRequest = new htmldb_G';

c1:=c1||'et(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)||
'if (document.getElementById && document.createElement) {'||chr(10)||
'   var divA = document.getElementById(''ErrorOu';

c1:=c1||'tputDiv'');'||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.insertBefore(oP, divA.firstChild);'||chr(10)||
'   divA.insertBefore(oH, divA.firstChild);';

c1:=c1||''||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">2007</span> National Grid</div>'||chr(10)||
'	</div>'||chr(10)||
'	'||chr(10)||
'	<div class="hskpcol2">'||chr(10)||
'		<div id="navFooter">'||chr(10)||
'                        <a href="thehelp.htm">Help</a> | '||chr(10)||
'';

c2:=c2||'			<a href="thetermsandconditions.htm">Terms &amp; conditions</a>'||chr(10)||
''||chr(10)||
'			| <a href="theprivacypolicy.htm">Privacy policy</a>'||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="#WORKSPACE_IMAGES#exclaim.gif" alt=""/>Important Messages</h1>'||chr(10)||
'<div class="t4messages">#GLOBAL_NO';

c3:=c3||'TIFICATION##SUCCESS_MESSAGE##NOTIFICATION_MESSAGE#</div>'||chr(10)||
'</div>'||chr(10)||
'</div>'||chr(10)||
''||chr(10)||
'';

wwv_flow_api.create_template(
  p_id=> 38911722486594102 + 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_required_patch   => null + wwv_flow_api.g_id_offset,
  p_template_comment => '');
end;
 
null;
 
end;
/

prompt  ...button templates
--
--application/shared_components/user_interface/templates/button/button
prompt  ......Button Template 24749440874526790
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=>24749440874526790 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_template=>t,
  p_template_name=> 'Button',
  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 24749625234526795
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=>24749625234526795 + 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 24749825710526795
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=>24749825710526795 + 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 24750041758526795
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=>24750041758526795 + 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 24736433695526759
 
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       => 24736433695526759 + 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=> 24736433695526759 + 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 24736724835526765
 
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       => 24736724835526765 + 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=> 24736724835526765 + 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 24737010408526765
 
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       => 24737010408526765 + 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=> 24737010408526765 + 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 24737330328526765
 
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       => 24737330328526765 + 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=> 24737330328526765 + 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 24737622843526765
 
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       => 24737622843526765 + 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=> 24737622843526765 + 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 24737941385526765
 
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       => 24737941385526765 + 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=> 24737941385526765 + 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 24738214051526765
 
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=""';

t:=t||' src="#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       => 24738214051526765 + 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_template_comment       => '');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 24738214051526765 + 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 24738518890526767
 
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       => 24738518890526767 + 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=> 24738518890526767 + 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 24738834644526767
 
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       => 24738834644526767 + 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=> 24738834644526767 + 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 24739123662526769
 
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       => 24739123662526769 + 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=> 24739123662526769 + 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 24739433502526769
 
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       => 24739433502526769 + 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=> 24739433502526769 + 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 24739733896526769
 
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       => 24739733896526769 + 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=> 24739733896526769 + 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 24740038227526769
 
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       => 24740038227526769 + 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=> 24740038227526769 + 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 24740336450526770
 
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       => 24740336450526770 + 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=> 24740336450526770 + 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 24740611526526770
 
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       => 24740611526526770 + 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_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=> 24740611526526770 + 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 24740918507526770
 
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       => 24740918507526770 + 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=> 24740918507526770 + 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 24741224034526770
 
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       => 24741224034526770 + 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=> 24741224034526770 + 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 24741526614526770
 
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       => 24741526614526770 + 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=> 24741526614526770 + 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 24741814040526770
 
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       => 24741814040526770 + 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=> 24741814040526770 + 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 24742135446526770
 
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       => 24742135446526770 + 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=> 24742135446526770 + 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 24742415889526770
 
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       => 24742415889526770 + 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=> 24742415889526770 + 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 24744828281526776
 
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=>24744828281526776 + 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 24745116589526781
 
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=>24745116589526781 + 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 24745340526526781
 
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=>24745340526526781 + 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 24745635059526781
 
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=>24745635059526781 + 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 24745914580526783
 
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=>24745914580526783 + 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 24746225394526783
 
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=>24746225394526783 + 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 24746537044526783
 
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=>24746537044526783 + 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 24746820611526783
 
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=>24746820611526783 + 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_list_template_comment=>'');
end;
null;
 
end;
/

--application/shared_components/user_interface/templates/list/vertical_images_list
prompt  ......list template 24747139857526783
 
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=>24747139857526783 + 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 24747426073526783
 
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=>24747426073526783 + 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 24747712169526783
 
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=>24747712169526783 + 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 24748012261526783
 
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=>24748012261526783 + 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 24748312327526783
 
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=>24748312327526783 + 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 24748620372526784
 
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=>24748620372526784 + 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 24742731005526770
 
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=> 24742731005526770 + 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 => 24742731005526770 + 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 24743011431526773
 
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=> 24743011431526773 + 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 => 24743011431526773 + 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 24743325136526773
 
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=> 24743325136526773 + 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 => 24743325136526773 + 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 24743617611526775
 
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=> 24743617611526775 + 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 => 24743617611526775 + 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 24743927299526775
 
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=> 24743927299526775 + 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 => 24743927299526775 + 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 24744236267526775
 
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=> 24744236267526775 + 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 => 24744236267526775 + 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 24744515234526775
 
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=> 24744515234526775 + 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 => 24744515234526775 + 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 24748930478526784
 
begin
 
begin
wwv_flow_api.create_field_template (
  p_id=> 24748930478526784 + 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 24749013313526789
 
begin
 
begin
wwv_flow_api.create_field_template (
  p_id=> 24749013313526789 + 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 24749138532526789
 
begin
 
begin
wwv_flow_api.create_field_template (
  p_id=> 24749138532526789 + 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 24749222941526790
 
begin
 
begin
wwv_flow_api.create_field_template (
  p_id=> 24749222941526790 + 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 24749318534526790
 
begin
 
begin
wwv_flow_api.create_field_template (
  p_id=> 24749318534526790 + 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_template_comment=> '');
end;
null;
 
end;
/

prompt  ...breadcrumb templates
--
--application/shared_components/user_interface/templates/breadcrumb/breadcrumb_menu
prompt  ......template 24750232156526795
 
begin
 
begin
wwv_flow_api.create_menu_template (
  p_id=> 24750232156526795 + 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 24750340164526798
 
begin
 
begin
wwv_flow_api.create_menu_template (
  p_id=> 24750340164526798 + 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 24750742053526801
 
begin
 
begin
wwv_flow_api.create_popup_lov_template (
  p_id=> 24750742053526801 + 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=>'',
  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_translate_this_template => 'N',
  p_after_result_set   =>'</div>');
end;
null;
 
end;
/

prompt  ...calendar templates
--
--application/shared_components/user_interface/templates/calendar/calendar
prompt  ......template 24750440422526800
 
begin
 
begin
wwv_flow_api.create_calendar_template(
  p_id=> 24750440422526800 + 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 24750537116526801
 
begin
 
begin
wwv_flow_api.create_calendar_template(
  p_id=> 24750537116526801 + 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 24750639354526801
 
begin
 
begin
wwv_flow_api.create_calendar_template(
  p_id=> 24750639354526801 + 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
--
prompt  ......theme 24750938041526809
--application/shared_components/user_interface/themes/national_grid
begin
wwv_flow_api.create_theme (
  p_id =>24750938041526809 + 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=>24734011047526756 + wwv_flow_api.g_id_offset,
  p_error_template=>38911722486594102 + wwv_flow_api.g_id_offset,
  p_printer_friendly_template=>24735530196526758 + wwv_flow_api.g_id_offset,
  p_breadcrumb_display_point=>'REGION_POSITION_01',
  p_sidebar_display_point=>'REGION_POSITION_02',
  p_login_template=>24733840230526723 + wwv_flow_api.g_id_offset,
  p_default_button_template=>24749440874526790 + wwv_flow_api.g_id_offset,
  p_default_region_template=>24740611526526770 + wwv_flow_api.g_id_offset,
  p_default_chart_template =>24737941385526765 + wwv_flow_api.g_id_offset,
  p_default_form_template  =>24738214051526765 + wwv_flow_api.g_id_offset,
  p_default_reportr_template   =>24740611526526770 + wwv_flow_api.g_id_offset,
  p_default_tabform_template  =>24740611526526770 + wwv_flow_api.g_id_offset,
  p_default_wizard_template   =>24742135446526770 + wwv_flow_api.g_id_offset,
  p_default_menur_template    =>24737010408526765 + wwv_flow_api.g_id_offset,
  p_default_listr_template    =>24740611526526770 + wwv_flow_api.g_id_offset,
  p_default_report_template   =>24743617611526775 + wwv_flow_api.g_id_offset,
  p_default_label_template    =>24749138532526789 + wwv_flow_api.g_id_offset,
  p_default_menu_template     =>24750232156526795 + wwv_flow_api.g_id_offset,
  p_default_calendar_template =>24750440422526800 + wwv_flow_api.g_id_offset,
  p_default_list_template     =>24748312327526783 + wwv_flow_api.g_id_offset,
  p_default_option_label      =>24749138532526789 + wwv_flow_api.g_id_offset,
  p_default_required_label    =>24749318534526790 + wwv_flow_api.g_id_offset);
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/language
prompt  ...Language Maps for Application 155
--
 
begin
 
null;
 
end;
/

prompt  ...Shortcuts
--
--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/deployment/definition
prompt  ...application deployment
--
 
begin
 
declare
    s varchar2(32767) := null;
    l_clob clob;
begin
s := null;
wwv_flow_api.create_install (
  p_id => 12947628912411058 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_include_in_export_yn => 'Y',
  p_welcome_message => 'This application installer will guide you through the process of creating your database objects and seed data.',
  p_configuration_message => 'You can configure the following attributes of your application.',
  p_build_options_message => 'You can choose to include the following build options.',
  p_validation_message => 'The following validations will be performed to ensure your system is compatible with this application.',
  p_install_message=> 'Please confirm that you would like to install this application''s supporting objects.',
  p_install_success_message => 'Your application''s supporting objects have been installed.',
  p_install_failure_message => 'Installation of database objects and seed data has failed.',
  p_upgrade_message => 'The application installer has detected that this application''s supporting objects were previously installed.  This wizard will guide you through the process of upgrading these supporting objects.',
  p_upgrade_confirm_message => 'Please confirm that you would like to install this application''s supporting objects.',
  p_upgrade_success_message => 'Your application''s supporting objects have been installed.',
  p_upgrade_failure_message => 'Installation of database objects and seed data has failed.',
  p_deinstall_success_message => 'Deinstallation complete.',
  p_deinstall_message=> '');
end;
 
 
end;
/

--application/deployment/install
prompt  ...application install scripts
--
--application/deployment/checks
prompt  ...application deployment checks
--
 
begin
 
null;
 
end;
/

--application/deployment/buildoptions
prompt  ...application deployment build options
--
 
begin
 
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
