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:   14:38 Tuesday June 9, 2009
--   Exported By:     PRIESTJ
--   Flashback:       0
--   Export Type:     Application Export
--   Version: 3.1.0.00.32
 
-- Import:
--   Using application builder
--   or
--   Using SQL*Plus as the Oracle user FLOWS_030100 or as the owner (parsing schema) of the application.
 
-- Application Statistics:
--   Pages:                52
--     Items:             335
--     Computations:        5
--     Validations:       285
--     Processes:         121
--     Regions:            77
--     Buttons:           112
--   Shared Components
--     Breadcrumbs:         1
--        Entries           1
--     Items:              10
--     Computations:        4
--     Processes:           3
--     Parent Tabs:         0
--     Tab Sets:            0
--        Tabs:             0
--     NavBars:             0
--     Lists:               2
--     Shortcuts:           3
--     Themes:              1
--     Templates:
--        Page:             4
--        List:            14
--        Report:           7
--        Label:            6
--        Region:          22
--     Messages:            0
--     Build Options:       0
 
 
--       AAAA       PPPPP   EEEEEE  XX      XX
--      AA  AA      PP  PP  EE       XX    XX
--     AA    AA     PP  PP  EE        XX  XX
--    AAAAAAAAAA    PPPPP   EEEE       XXXX
--   AA        AA   PP      EE        XX  XX
--  AA          AA  PP      EE       XX    XX
--  AA          AA  PP      EEEEEE  XX      XX
prompt  Set Credentials...
 
begin
 
  -- Assumes you are running the script connected to SQL*Plus as the Oracle user FLOWS_030100 or as the owner (parsing schema) of the application.
  wwv_flow_api.set_security_group_id(p_security_group_id=>11019802792885519);
 
end;
/

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

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

end;

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

end;

/
begin wwv_flow.g_browser_language := 'en-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',
  p_name  => 'webmip',
  p_alias => 'WEBMIP255155154155',
  p_page_view_logging => 'YES',
  p_default_page_template=> 71114788560453355 + wwv_flow_api.g_id_offset,
  p_printer_friendly_template=> 71116307709453357 + wwv_flow_api.g_id_offset,
  p_default_region_template=> 71121389039453369 + wwv_flow_api.g_id_offset,
  p_error_template    => 85292499999520701 + wwv_flow_api.g_id_offset,
  p_page_protection_enabled_y_n=> 'N',
  p_checksum_salt_last_reset => '20090609143111',
  p_home_link         => 'f?p=&APP_ID.:101',
  p_flow_language     => 'en-gb',
  p_flow_language_derived_from=> 'FLOW_PRIMARY_LANGUAGE',
  p_flow_image_prefix => '/i/',
  p_documentation_banner=> '',
  p_authentication    => 'CUSTOM2',
  p_login_url         => '',
  p_logout_url        => 'wwv_flow_custom_auth_std.logout?p_this_flow=&FLOW_ID.&p_next_flow_page_sess=&FLOW_ID.:500',
  p_application_tab_set=> 1,
  p_logo_image => 'TEXT:TEXT:TEXT:TEXT:TEXT:TEXT:TEXT:TEXT:TEXT:TEXT:TEXT:TEXT:TEXT:TEXT:TEXT:TEXT:TEXT:TEXT:',
  p_logo_image_attributes => 'style="font-family:Arial; color:#004C66; font-size:18px; white-space:nowrap; font-weight:bold;"',
  p_public_url_prefix => '',
  p_public_user       => 'APEX_PUBLIC_USER',
  p_dbauth_url_prefix => '',
  p_proxy_server      => '',
  p_cust_authentication_process=> '.'||to_char(56772791679388739 + wwv_flow_api.g_id_offset)||'.',
  p_cust_authentication_page=> '',
  p_custom_auth_login_url=> '',
  p_flow_version      => '$Rev$:',
  p_flow_status       => 'AVAILABLE_W_EDIT_LINK',
  p_flow_unavailable_text=> 'This application is currently unavailable at this time.',
  p_build_status      => 'RUN_AND_BUILD',
  p_exact_substitutions_only=> 'Y',
  p_vpd               => '',
  p_security_scheme => 57620502865747605+ wwv_flow_api.g_id_offset,
  p_csv_encoding    => 'N',
  p_theme_id => 101,
  p_default_label_template => 71129916045453388 + wwv_flow_api.g_id_offset,
  p_default_report_template => 71124395124453374 + wwv_flow_api.g_id_offset,
  p_default_list_template => 71129089840453382 + wwv_flow_api.g_id_offset,
  p_default_menu_template => 71131009669453394 + wwv_flow_api.g_id_offset,
  p_default_button_template => 71130218387453389 + wwv_flow_api.g_id_offset,
  p_default_chart_template => 71118718898453364 + wwv_flow_api.g_id_offset,
  p_default_form_template => 71118991564453364 + wwv_flow_api.g_id_offset,
  p_default_wizard_template => 71122912959453369 + wwv_flow_api.g_id_offset,
  p_default_tabform_template => 71121389039453369 + wwv_flow_api.g_id_offset,
  p_default_reportr_template   =>71121389039453369 + wwv_flow_api.g_id_offset,
  p_default_menur_template => 71117787921453364 + wwv_flow_api.g_id_offset,
  p_default_listr_template => 71121389039453369 + wwv_flow_api.g_id_offset,
  p_substitution_string_01 => 'SYSTEM_ENVIRONMENT',
  p_substitution_value_01  => '',
  p_substitution_string_02 => 'T_AND_C_URL',
  p_substitution_value_02  => 'http://www.nationalgrid.com/uk/metering/mip/tc.htm',
  p_substitution_string_03 => 'PRIVACY_URL',
  p_substitution_value_03  => 'http://www.nationalgrid.com/corporate/legal/privacy.htm',
  p_substitution_string_04 => 'SITEMAP_URL',
  p_substitution_value_04  => 'http://www.nationalgrid.com/uk/sitemap.htm',
  p_last_updated_by => 'PRIESTJ',
  p_last_upd_yyyymmddhh24miss=> '20090609143111',
  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 => 57620502865747605 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_name=>'master_page_authorization',
  p_scheme_type=>'FUNCTION_RETURNING_BOOLEAN',
  p_scheme=>'IF wwv_flow_custom_auth.current_page_is_public then'||chr(10)||
'return TRUE;'||chr(10)||
'else'||chr(10)||
'return mip_security.page_authorization(p_app_user=>:app_user, p_page_id=>:app_page_id);'||chr(10)||
'END IF;',
  p_caching=>'BY_USER_BY_PAGE_VIEW',
  p_error_message=>'You are not authorized to access this page');
 
--application/shared_components/security/authorization/check_agent_access
wwv_flow_api.create_security_scheme(
  p_id => 59152281045285598 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_name=>'check agent access',
  p_scheme_type=>'FUNCTION_RETURNING_BOOLEAN',
  p_scheme=>'declare'||chr(10)||
'cursor c_supplier(cp_enqu_id number) is SELECT prty_id FROM v_latest_rt_code_for_enro where rt_code=''ENQ SUPP'' and enqu_id=cp_enqu_id;'||chr(10)||
'supplierid number;'||chr(10)||
'begin'||chr(10)||
'--copied from main authorization scheme'||chr(10)||
'IF wwv_flow_custom_auth.current_page_is_public then'||chr(10)||
'  return TRUE;'||chr(10)||
'else '||chr(10)||
''||chr(10)||
'if mip_security.page_authorization(p_app_user=>:app_user, p_page_id=>:app_page_id) then'||chr(10)||
''||chr(10)||
'--scheme code just for enquiry page, checks records against agent'||chr(10)||
'  if :P32_ID is null then'||chr(10)||
'    return true;'||chr(10)||
'  end if; '||chr(10)||
'  if #OWNER#.mip_parties.get_user_role(v(''APP_USER'')) = ''AGENT'' then '||chr(10)||
'    open c_supplier(:P32_ID);'||chr(10)||
'    fetch c_supplier into supplierid;'||chr(10)||
'    if c_supplier%found then'||chr(10)||
'      if #OWNER#.mip_parties.has_supplier(v(''APP_USER''), supplierid)    then'||chr(10)||
'        close c_supplier;'||chr(10)||
'        return true;'||chr(10)||
'      end if;'||chr(10)||
'    else'||chr(10)||
'      close c_supplier;'||chr(10)||
'      return false;'||chr(10)||
'    end if;'||chr(10)||
'  else'||chr(10)||
'    return true;'||chr(10)||
'  end if;'||chr(10)||
'end if;'||chr(10)||
'END IF;'||chr(10)||
'return false;'||chr(10)||
'end;',
  p_caching=>'BY_USER_BY_PAGE_VIEW',
  p_error_message=>'Unauthorized to view this page');
 
 
end;
/

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

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

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

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

wwv_flow_api.create_flow_process(
  p_id => 81968192034715110 + 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'' || ''%'''||chr(10)||
'    ';

p:=p||'    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 => 72310204377577561 + 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=> 58982292199731214 + 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=> 55231379887729319 + 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=> 70357903607764513 + 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=> 81967403546699491 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'ORA_ERR_CODE',
  p_data_type=> 'VARCHAR',
  p_is_persistent=> 'Y',
  p_protection_level=> 'N',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_item_comment=> '');
 
null;
 
end;
/

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

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

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

--application/shared_components/logic/application_items/webmip_prev_page_id
 
begin
 
wwv_flow_api.create_flow_item(
  p_id=> 59669978562298892 + 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=> 59669575099297941 + 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=> 60530080733151023 + 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 => 59672077009336353 + 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 => 59672498610352005 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_computation_sequence => 2,
  p_computation_item => 'WEBMIP_PREV_PAGE_ID',
  p_computation_point    => 'AFTER_HEADER',
  p_computation_type => 'FUNCTION_BODY',
  p_computation_processed=> 'REPLACE_EXISTING',
  p_computation => 'IF :APP_PAGE_ID = 30 THEN'||chr(10)||
'  RETURN :WEBMIP_THIS_PAGE_ID;'||chr(10)||
'ELSIF :WEBMIP_THIS_PAGE_ID <> :APP_PAGE_ID THEN'||chr(10)||
'  RETURN :WEBMIP_THIS_PAGE_ID;'||chr(10)||
'ELSE'||chr(10)||
'  RETURN nvl(:WEBMIP_PREV_PAGE_ID, :APP_PAGE_ID);'||chr(10)||
'END IF;'||chr(10)||
'',
  p_compute_when=> '',
  p_compute_when_type=> '',
  p_computation_error_message=>'',
  p_computation_comment=> '',
  p_required_patch=> null + wwv_flow_api.g_id_offset);
 
--application/shared_components/logic/application_computations/webmip_this_page_id
wwv_flow_api.create_flow_computation (
  p_id => 59672884889357561 + 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 => 60530998395156056 + 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       => 84998178571770625 + 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       => 62251585405765605 + 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       => 63567298563234241 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'ADDRESS_TYPES',
  p_lov_query=> '.'||to_char(63567298563234241 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>63567589394234252 + wwv_flow_api.g_id_offset,
  p_lov_id=>63567298563234241 + 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=>63567775072234253 + wwv_flow_api.g_id_offset,
  p_lov_id=>63567298563234241 + 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       => 71818801976159349 + 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       => 59006977063749908 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'ASSETLOCATIONNOTES',
  p_lov_query=> '.'||to_char(59006977063749908 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>59007279841749919 + wwv_flow_api.g_id_offset,
  p_lov_id=>59006977063749908 + 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=>59007498257749920 + wwv_flow_api.g_id_offset,
  p_lov_id=>59006977063749908 + 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=>59007684988749920 + wwv_flow_api.g_id_offset,
  p_lov_id=>59006977063749908 + 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=>59007879028749920 + wwv_flow_api.g_id_offset,
  p_lov_id=>59006977063749908 + 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/assetlocationnotes1
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 53493674363765292 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'ASSETLOCATIONNOTES1',
  p_lov_query=> '.'||to_char(53493674363765292 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>53494001385765292 + wwv_flow_api.g_id_offset,
  p_lov_id=>53493674363765292 + 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=>53494200070765292 + wwv_flow_api.g_id_offset,
  p_lov_id=>53493674363765292 + 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=>53494390045765292 + wwv_flow_api.g_id_offset,
  p_lov_id=>53493674363765292 + 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=>53494574078765292 + wwv_flow_api.g_id_offset,
  p_lov_id=>53493674363765292 + 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/assetlocationnotes2
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 53621079104782758 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'ASSETLOCATIONNOTES2',
  p_lov_query=> '.'||to_char(53621079104782758 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>53621372550782758 + wwv_flow_api.g_id_offset,
  p_lov_id=>53621079104782758 + 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=>53621603358782758 + wwv_flow_api.g_id_offset,
  p_lov_id=>53621079104782758 + 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=>53621779827782758 + wwv_flow_api.g_id_offset,
  p_lov_id=>53621079104782758 + 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=>53621996938782758 + wwv_flow_api.g_id_offset,
  p_lov_id=>53621079104782758 + 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       => 55951800329760667 + 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       => 59010594314749923 + 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       => 67691677367246691 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'CAVEAT_POSITIONS',
  p_lov_query=> '.'||to_char(67691677367246691 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>67691997885246699 + wwv_flow_api.g_id_offset,
  p_lov_id=>67691677367246691 + 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=>67692188692246700 + wwv_flow_api.g_id_offset,
  p_lov_id=>67691677367246691 + 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=>67692385178246700 + wwv_flow_api.g_id_offset,
  p_lov_id=>67691677367246691 + 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=>67692592191246700 + wwv_flow_api.g_id_offset,
  p_lov_id=>67691677367246691 + 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       => 55913694441321625 + 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       => 55915779035355019 + 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       => 59010286935749923 + 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       => 55857887834461102 + 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       => 58364887785611247 + 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       => 59008998841749922 + 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       => 55920496406464130 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'FILTERS',
  p_lov_query=> 'select code x, code y'||chr(10)||
'from filters'||chr(10)||
'order by 1');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/gas_act_owners
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 70987701238499306 + 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(70987701238499306 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>70987977415499308 + wwv_flow_api.g_id_offset,
  p_lov_id=>70987701238499306 + 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=>70988182533499309 + wwv_flow_api.g_id_offset,
  p_lov_id=>70987701238499306 + 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=>70988372957499309 + wwv_flow_api.g_id_offset,
  p_lov_id=>70987701238499306 + 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/gas_act_owners1
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 53498575888765308 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'GAS_ACT_OWNERS1',
  p_lov_query=> '.'||to_char(53498575888765308 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>53498879527765308 + wwv_flow_api.g_id_offset,
  p_lov_id=>53498575888765308 + 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=>53499084385765308 + wwv_flow_api.g_id_offset,
  p_lov_id=>53498575888765308 + 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=>53499293568765308 + wwv_flow_api.g_id_offset,
  p_lov_id=>53498575888765308 + 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/gas_act_owners2
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 53626577701782762 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'GAS_ACT_OWNERS2',
  p_lov_query=> '.'||to_char(53626577701782762 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>53626893544782762 + wwv_flow_api.g_id_offset,
  p_lov_id=>53626577701782762 + 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=>53627081802782764 + wwv_flow_api.g_id_offset,
  p_lov_id=>53626577701782762 + 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=>53627292762782764 + wwv_flow_api.g_id_offset,
  p_lov_id=>53626577701782762 + 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       => 55859492814472077 + 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       => 55952983630763166 + 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       => 68576198567123938 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'INDICATIVE_TIMES',
  p_lov_query=> '.'||to_char(68576198567123938 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>68576486010123941 + wwv_flow_api.g_id_offset,
  p_lov_id=>68576198567123938 + 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=>68576685812123942 + wwv_flow_api.g_id_offset,
  p_lov_id=>68576198567123938 + 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=>68576887172123942 + wwv_flow_api.g_id_offset,
  p_lov_id=>68576198567123938 + 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/indicative_times1
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 53497695296765300 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'INDICATIVE_TIMES1',
  p_lov_query=> '.'||to_char(53497695296765300 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>53497995495765301 + wwv_flow_api.g_id_offset,
  p_lov_id=>53497695296765300 + 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=>53498179506765306 + wwv_flow_api.g_id_offset,
  p_lov_id=>53497695296765300 + 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=>53498378331765308 + wwv_flow_api.g_id_offset,
  p_lov_id=>53497695296765300 + 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/indicative_times2
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 53625687690782762 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'INDICATIVE_TIMES2',
  p_lov_query=> '.'||to_char(53625687690782762 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>53625972032782762 + wwv_flow_api.g_id_offset,
  p_lov_id=>53625687690782762 + 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=>53626181256782762 + wwv_flow_api.g_id_offset,
  p_lov_id=>53625687690782762 + 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=>53626389616782762 + wwv_flow_api.g_id_offset,
  p_lov_id=>53625687690782762 + 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       => 59008074473749922 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'LOADCONTROLTYPES',
  p_lov_query=> '.'||to_char(59008074473749922 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>59008394301749922 + wwv_flow_api.g_id_offset,
  p_lov_id=>59008074473749922 + 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=>59008589529749922 + wwv_flow_api.g_id_offset,
  p_lov_id=>59008074473749922 + 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=>59008800900749922 + wwv_flow_api.g_id_offset,
  p_lov_id=>59008074473749922 + 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/loadcontroltypes1
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 53494785765765292 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'LOADCONTROLTYPES1',
  p_lov_query=> '.'||to_char(53494785765765292 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>53495073966765292 + wwv_flow_api.g_id_offset,
  p_lov_id=>53494785765765292 + 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=>53495280055765292 + wwv_flow_api.g_id_offset,
  p_lov_id=>53494785765765292 + 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=>53495491643765292 + wwv_flow_api.g_id_offset,
  p_lov_id=>53494785765765292 + 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/loadcontroltypes2
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 53622184339782759 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'LOADCONTROLTYPES2',
  p_lov_query=> '.'||to_char(53622184339782759 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>53622493311782759 + wwv_flow_api.g_id_offset,
  p_lov_id=>53622184339782759 + 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=>53622703275782759 + wwv_flow_api.g_id_offset,
  p_lov_id=>53622184339782759 + 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=>53622899885782759 + wwv_flow_api.g_id_offset,
  p_lov_id=>53622184339782759 + 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       => 55860586019479567 + 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       => 59009601279749923 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'MARKETSECTORCODES',
  p_lov_query=> '.'||to_char(59009601279749923 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>59009875231749923 + wwv_flow_api.g_id_offset,
  p_lov_id=>59009601279749923 + 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=>59010083375749923 + wwv_flow_api.g_id_offset,
  p_lov_id=>59009601279749923 + 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/marketsectorcodes1
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 53495882631765293 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'MARKETSECTORCODES1',
  p_lov_query=> '.'||to_char(53495882631765293 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>53496177649765293 + wwv_flow_api.g_id_offset,
  p_lov_id=>53495882631765293 + 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=>53496387691765300 + wwv_flow_api.g_id_offset,
  p_lov_id=>53495882631765293 + 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/marketsectorcodes2
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 53623302234782759 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'MARKETSECTORCODES2',
  p_lov_query=> '.'||to_char(53623302234782759 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>53623586543782759 + wwv_flow_api.g_id_offset,
  p_lov_id=>53623302234782759 + 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=>53623798267782759 + wwv_flow_api.g_id_offset,
  p_lov_id=>53623302234782759 + 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       => 55972088674004194 + 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       => 58365493672612897 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'METERSIZECODES',
  p_lov_query=> 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from METER_SIZE_CODES'||chr(10)||
'');
 
null;
 
end;
/

--application/shared_components/user_interface/lov/metertypes
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 55923472005570566 + 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       => 58465591651470927 + 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       => 59009283924749922 + 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       => 60491202926334148 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'NOORYES',
  p_lov_query=> '.'||to_char(60491202926334148 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>60491486436334150 + wwv_flow_api.g_id_offset,
  p_lov_id=>60491202926334148 + 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=>60491702945334150 + wwv_flow_api.g_id_offset,
  p_lov_id=>60491202926334148 + 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/nooryes1
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 53624177552782759 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'NOORYES1',
  p_lov_query=> '.'||to_char(53624177552782759 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>53624473954782759 + wwv_flow_api.g_id_offset,
  p_lov_id=>53624177552782759 + 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=>53624673637782761 + wwv_flow_api.g_id_offset,
  p_lov_id=>53624177552782759 + 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       => 62463593105825452 + 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       => 62243386506759464 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'PRTY_ROLES',
  p_lov_query=> 'BEGIN'||chr(10)||
'  IF mip_parties.get_user_role(:app_user) = ''MIPADMIN'' THEN'||chr(10)||
'    IF :p61_prty_type = ''MKTP'' THEN'||chr(10)||
'      RETURN ''SELECT ''''Gas supplier'''' display_value, ''''SUPP'''' return_value'||chr(10)||
'          from dual'';'||chr(10)||
'    ELSIF :p61_prty_type = ''MANU'' THEN'||chr(10)||
'      RETURN ''SELECT ''''External organization'''' display_value, ''''EXTORG'''' return_value'||chr(10)||
'          from dual'';'||chr(10)||
'    ELSE'||chr(10)||
'      RETURN ''select DESCRIPTION display_value, CODE return_value '||chr(10)||
'              from ROLE_TYPES'||chr(10)||
'             where upper(rt_type) = ''''PRT'''''||chr(10)||
'             and not upper(code) in (''''EXTORG'''',''''SUPP'''')'||chr(10)||
'             order by 1'';'||chr(10)||
'    END IF;'||chr(10)||
'  ELSE'||chr(10)||
'    RETURN ''SELECT ''''Agent'''' display_value, ''''AGENT'''' return_value'||chr(10)||
'          from dual'';'||chr(10)||
'  END IF;'||chr(10)||
''||chr(10)||
'END;');
 
null;
 
end;
/

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

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>62232680454753292 + wwv_flow_api.g_id_offset,
  p_lov_id=>62231788486753283 + 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=>62232882632753292 + wwv_flow_api.g_id_offset,
  p_lov_id=>62231788486753283 + 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=>62233081898753292 + wwv_flow_api.g_id_offset,
  p_lov_id=>62231788486753283 + 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       => 69141285605942389 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'QUOTE_REJECTION',
  p_lov_query=> '.'||to_char(69141285605942389 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>69141592625942397 + wwv_flow_api.g_id_offset,
  p_lov_id=>69141285605942389 + 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=>69141786577942399 + wwv_flow_api.g_id_offset,
  p_lov_id=>69141285605942389 + 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=>69142003147942399 + wwv_flow_api.g_id_offset,
  p_lov_id=>69141285605942389 + 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=>69142201597942399 + wwv_flow_api.g_id_offset,
  p_lov_id=>69141285605942389 + 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=>69142402193942399 + wwv_flow_api.g_id_offset,
  p_lov_id=>69141285605942389 + 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=>69142598589942399 + wwv_flow_api.g_id_offset,
  p_lov_id=>69141285605942389 + 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=>69142797831942399 + wwv_flow_api.g_id_offset,
  p_lov_id=>69141285605942389 + 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       => 73103679722372194 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'QUOTE_STATUS',
  p_lov_query=> 'if mip_parties.check_user_role(:APP_USER, ''AGENT'') then'||chr(10)||
' return ''select qust.description AS display_value, qust.code AS return_value'||chr(10)||
'from quote_statuses qust'||chr(10)||
'where qust.code <> ''''LAPSED'''' and qust.code <> ''''SELREJ'''''||chr(10)||
'order by 1'';'||chr(10)||
' else'||chr(10)||
' return ''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'';'||chr(10)||
'end if;');
 
null;
 
end;
/

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

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

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

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

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

--application/shared_components/user_interface/lov/suppliers
 
begin
 
wwv_flow_api.create_list_of_values (
  p_id       => 62243696777759466 + 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       => 62275588696787262 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'USER_STATUS',
  p_lov_query=> '.'||to_char(62275588696787262 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>62275883193787262 + wwv_flow_api.g_id_offset,
  p_lov_id=>62275588696787262 + 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=>62276083511787262 + wwv_flow_api.g_id_offset,
  p_lov_id=>62275588696787262 + 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=>62276290076787262 + wwv_flow_api.g_id_offset,
  p_lov_id=>62275588696787262 + 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       => 55828074497351617 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_lov_name => 'YN',
  p_lov_query=> '.'||to_char(55828074497351617 + wwv_flow_api.g_id_offset)||'.');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>55828601488351622 + wwv_flow_api.g_id_offset,
  p_lov_id=>55828074497351617 + 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=>55828800836351622 + wwv_flow_api.g_id_offset,
  p_lov_id=>55828074497351617 + 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;
/

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

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>53493087746765281 + wwv_flow_api.g_id_offset,
  p_lov_id=>53492778036765272 + 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=>53493281282765284 + wwv_flow_api.g_id_offset,
  p_lov_id=>53492778036765272 + 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;
/

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

 
begin
 
wwv_flow_api.create_static_lov_data (
  p_id=>53620481111782758 + wwv_flow_api.g_id_offset,
  p_lov_id=>53620172088782758 + 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=>53620695810782758 + wwv_flow_api.g_id_offset,
  p_lov_id=>53620172088782758 + 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=>71716300041493456 + 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=>71720278317543956 + 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=>71718090475500152 + 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=>71710475144439027 + 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=>56011098571790619 + 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=>10926915364063975 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'62',
  p_app_comment=>'updated email validation expression to allow & in the email address',
  p_updated_on=>'2008.06.13.15:54:35',
  p_updated_by=>'MULLENM',
  p_created_on=>'2008.06.13.15:54:35',
  p_created_by=>'MULLENM',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>10927127831067620 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'66',
  p_app_comment=>'updated email validation expression to allow & in the email address',
  p_updated_on=>'2008.06.13.15:55:11',
  p_updated_by=>'MULLENM',
  p_created_on=>'2008.06.13.15:55:11',
  p_created_by=>'MULLENM',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>11152305312524343 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'32',
  p_app_comment=>'Altered Screen so that the duplicate Access Password (Access Password2) has been removed also Switched back on validation processes as follows:'||chr(10)||
''||chr(10)||
' * EXISTING METER ASSET PROVIDER'||chr(10)||
' * Agent Contact Mech Val limit 240'||chr(10)||
' * Meter Asset Provider Limit to 210'||chr(10)||
' * Job Description Limit to 500 Chars'||chr(10)||
' * IP Details Limit to 250'||chr(10)||
''||chr(10)||
'Also move all validations that test the limit of characters to the top of the process order so that they are run before our call to AH''s validation check, this way it prevents the system from raising an error if we pass a sting that is too big for AH''s validation procedure.  They now all start in from sequence 455 onwards.'||chr(10)||
''||chr(10)||
'Also worth mentioning that the Menu list has also been repaired it now includes the Edit Enquiry and Create Enquiry menu options again.',
  p_updated_on=>'2008.06.23.16:04:43',
  p_updated_by=>'PRIESTJ',
  p_created_on=>'2008.06.23.16:04:43',
  p_created_by=>'PRIESTJ',
  p_app_version=>'');
end;
/
begin
wwv_flow_api.create_app_comments (
  p_id=>11155407147657278 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_pages=>'32',
  p_app_comment=>'Altered MPRN and MPRN_ALT so that they display if the ENTY_CODE is null as these fields are available for all job types and it''s one of the first fields you come across when entering data into the form.  Also altered AMR field so that if the ENTY_CODE is null then the AMR is not displayed, otherwise it would appear for the user even if they were not a Tripartite member. ',
  p_updated_on=>'2008.06.23.16:26:40',
  p_updated_by=>'PRIESTJ',
  p_created_on=>'2008.06.23.16:26:40',
  p_created_by=>'PRIESTJ',
  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_include_apex_css_js_yn=>'Y',
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'HARDYA',
  p_last_upd_yyyymmddhh24miss => '20080502091010',
  p_page_is_public_y_n=> 'Y',
  p_protection_level=> 'N',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 60262997901945591 + 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=> 60236678425813886 + wwv_flow_api.g_id_offset,
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => 'CURRENT_PAGE_NOT_IN_CONDITION',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
null;
 
end;
/

 
begin
 
null;
 
end;
/

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

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

ph := null;
wwv_flow_api.create_page(
  p_id     => 1,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Home',
  p_alias  => 'HOME',
  p_step_title=> 'Home',
  p_step_sub_title => 'login',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'AUTO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => ' ',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'HARDYA',
  p_last_upd_yyyymmddhh24miss => '20080429111534',
  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||'<H2>This is the National Grid Metering I&amp;C Online Quotation System Website</H2>'||chr(10)||
'Contact I&C Operations Non-Standard Team on 02476 286 322 or  '||chr(10)||
'<a href="mailto:ic.nonstandard1@uk.ngrid.com">ic.nonstandard1@uk.ngrid.com</a>'||chr(10)||
'for details on how to access the quotation system. ';

wwv_flow_api.create_page_plug (
  p_id=> 58587995776958819 + 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=> 53349279953171514+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 11,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
null;
 
end;
/

 
begin
 
null;
 
end;
/

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

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

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

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

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

wwv_flow_api.create_report_region (
  p_id=> 71452081825927764 + 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=> 71121389039453369+ 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=> 71124395124453374+ 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=> 71452391111927777 + wwv_flow_api.g_id_offset,
  p_region_id=> 71452081825927764 + 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_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=> 71452480520927777 + wwv_flow_api.g_id_offset,
  p_region_id=> 71452081825927764 + 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_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=> 71452595526927777 + wwv_flow_api.g_id_offset,
  p_region_id=> 71452081825927764 + 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_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=> 71452691709927777 + wwv_flow_api.g_id_offset,
  p_region_id=> 71452081825927764 + 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_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
 
null;
 
end;
/

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

 
--application/pages/page_00004
prompt  ...PAGE 4: Design Selection Tool
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 4,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Design Selection Tool',
  p_step_title=> 'Design Selection Tool',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'PRIESTJ',
  p_last_upd_yyyymmddhh24miss => '20080317170517',
  p_page_comment  => '');
 
end;
 
end;
/

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

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

wwv_flow_api.create_report_region (
  p_id=> 91106890277294154 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 4,
  p_name=> 'Design Selection Tool Report',
  p_region_name=>'',
  p_template=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 20,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_display_when_condition=> 'declare'||chr(10)||
'  l_count number;'||chr(10)||
'begin'||chr(10)||
''||chr(10)||
'SELECT count(*)'||chr(10)||
' into l_count'||chr(10)||
'FROM modules modu, '||chr(10)||
'     connection_orientations cnor_inlet,'||chr(10)||
'     connection_orientations cnor_outlet,'||chr(10)||
'     v_moco cost_modu'||chr(10)||
'WHERE modu.inlet_cnor_code = cnor_inlet.code'||chr(10)||
'AND modu.outlet_cnor_code = cnor_outlet.code'||chr(10)||
'AND modu.code = cost_modu.modu_code'||chr(10)||
'AND modu.valid_from IS NOT NULL'||chr(10)||
'AND SYSDATE BETWEEN cost_modu.effective_from AND cost_modu.effective_to'||chr(10)||
'AND modu.qmax >= :P4_REQUESTED_QMAX'||chr(10)||
'AND modu.svcp_code LIKE :P4_SERVICE_PRESSURE_TIER;'||chr(10)||
''||chr(10)||
'if l_count > 0 then '||chr(10)||
'  return true;'||chr(10)||
'else '||chr(10)||
'  return false;'||chr(10)||
'end if;'||chr(10)||
''||chr(10)||
'exception'||chr(10)||
'  when others then '||chr(10)||
'   return false;'||chr(10)||
'end;',
  p_display_condition_type=> 'FUNCTION_BODY',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 71124395124453374+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_show_nulls_as=> ' - ',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'no data found',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_query_row_count_max=> '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=> 91107181218294156 + wwv_flow_api.g_id_offset,
  p_region_id=> 91106890277294154 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'CODE',
  p_column_display_sequence=> 1,
  p_column_heading=> 'Module Code',
  p_column_link=>'f?p=&APP_ID.:8:&SESSION.::&DEBUG.::P8_MODULE_CODE:#CODE#',
  p_column_linktext=>'#CODE#',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'N',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 91107286681294156 + wwv_flow_api.g_id_offset,
  p_region_id=> 91106890277294154 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'BAS_CODE',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Base Code',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 91107373036294156 + wwv_flow_api.g_id_offset,
  p_region_id=> 91106890277294154 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'HOU_CODE',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Housing Code',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 91107480015294156 + wwv_flow_api.g_id_offset,
  p_region_id=> 91106890277294154 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'QMAX',
  p_column_display_sequence=> 4,
  p_column_heading=> 'QMAX',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 91117103886430634 + wwv_flow_api.g_id_offset,
  p_region_id=> 91106890277294154 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'INLET_ORIENTATION',
  p_column_display_sequence=> 5,
  p_column_heading=> 'Inlet Orientation',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 91117181970430634 + wwv_flow_api.g_id_offset,
  p_region_id=> 91106890277294154 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 6,
  p_form_element_id=> null,
  p_column_alias=> 'OUTLET_ORIENTATION',
  p_column_display_sequence=> 6,
  p_column_heading=> 'Outlet Orientation',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 44402285919790795 + wwv_flow_api.g_id_offset,
  p_region_id=> 91106890277294154 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 7,
  p_form_element_id=> null,
  p_column_alias=> 'SELLING_PRICE',
  p_column_display_sequence=> 7,
  p_column_heading=> 'Selling Price',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 91054875490722125 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 4,
  p_button_sequence=> 10,
  p_button_plug_id => 90969481471430561+wwv_flow_api.g_id_offset,
  p_button_name    => 'SUBMIT',
  p_button_image_alt=> 'Search',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_cattributes=>'name="Search"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

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

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>91030302259512231 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 4,
  p_name=>'P4_REQUESTED_QMAX',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 10,
  p_item_plug_id => 90969481471430561+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Requested QMAX',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT_WITH_ENTER_SUBMIT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 32,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>91050202539682647 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 4,
  p_name=>'P4_SERVICE_PRESSURE_TIER',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 20,
  p_item_plug_id => 90969481471430561+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Service Pressure Tier',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'SERVICEPRESSURES',
  p_lov => 'select description d, code r'||chr(10)||
'from   service_pressures',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'- Select Service Pressure Tier - ',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 71129916045453388+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 => 91035794125547807 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 4,
  p_validation_name => 'P4_REQUESTED_QMAX',
  p_validation_sequence=> 10,
  p_validation => 'P4_REQUESTED_QMAX',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Required QMAX value must be specified.'||chr(10)||
'',
  p_associated_item=> 91030302259512231 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

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

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

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

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

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

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

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 55820692196309337 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 55821685401316878 + 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 => 55820692196309337+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=>55821997223316883 + 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=>55821685401316878+ 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=>55826890296346658 + 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 => 55820692196309337+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 => 71129916045453388+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=>55830386618355103 + 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 => 55820692196309337+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(55828074497351617 + 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 => 71129916045453388+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'S',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

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

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

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

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

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

wwv_flow_api.create_report_region (
  p_id=> 71563388514797820 + 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=> 71121389039453369+ 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=> 71124395124453374+ 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=> 71563681593797828 + wwv_flow_api.g_id_offset,
  p_region_id=> 71563388514797820 + 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_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=> 71563788786797830 + wwv_flow_api.g_id_offset,
  p_region_id=> 71563388514797820 + 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_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=> 71563891247797830 + wwv_flow_api.g_id_offset,
  p_region_id=> 71563388514797820 + 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_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=> 71563989189797830 + wwv_flow_api.g_id_offset,
  p_region_id=> 71563388514797820 + 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_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
 
null;
 
end;
/

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

 
--application/pages/page_00009
prompt  ...PAGE 9: CSV Export
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 9,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'CSV Export',
  p_alias  => 'CSV_EXPORT',
  p_step_title=> 'CSV Export',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_role => 57627572717765105+ 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     => 55834888050383866 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 9,
  p_process_sequence=> 10,
  p_process_point=> 'BEFORE_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'export',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'This process will export the table passed by session variable P5_TABLES to a CSV file.  Ask A Gilbert about the finer workings if you need to know. ');
end;
null;
 
end;
/

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

 
--application/pages/page_00014
prompt  ...PAGE 14: Quotes Reports
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 14,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Quotes Reports',
  p_step_title=> 'Quotes Reports',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'PRIESTJ',
  p_last_upd_yyyymmddhh24miss => '20080409165251',
  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=> 72885087951642966 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'SELECT qute.id AS "Quote Reference Number"'||chr(10)||
'      ,prty_supplier.name AS "Supplier Name"'||chr(10)||
'      ,prty_agent.first_name||'' ''||prty_agent.last_name AS "Agent Name"'||chr(10)||
'      ,quote_status.event_date AS "Date Status Change"'||chr(10)||
'      ,v_files.id as View_PDF '||chr(10)||
'FROM (SELECT DISTINCT vlare.*'||chr(10)||
'      FROM quotes qute, v_latest_rt_code_for_enro vlare'||chr(10)||
'      WHERE vlare.enqu_id = qute.enqu_id'||chr(10)||
'      AND vlare.rt_code = ''';

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

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

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

wwv_flow_api.create_report_region (
  p_id=> 72893086678850875 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 20,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_display_when_condition=> 'if upper(mip_parties.get_user_role(:APP_USER)) in (''ICU'',''MIPADMIN'',''CS'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_condition_type=> 'FUNCTION_BODY',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 71124395124453374+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_show_nulls_as=> ' - ',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'no data found',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_query_row_count_max=> '10000',
  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=> 72893387595850895 + wwv_flow_api.g_id_offset,
  p_region_id=> 72893086678850875 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'Quote Reference Number',
  p_column_display_sequence=> 1,
  p_column_heading=> 'Quote Reference Number',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'Y',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 73499484690775674 + wwv_flow_api.g_id_offset,
  p_region_id=> 72893086678850875 + 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=> 73498877417773641 + wwv_flow_api.g_id_offset,
  p_region_id=> 72893086678850875 + 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=> 73584997689943353 + wwv_flow_api.g_id_offset,
  p_region_id=> 72893086678850875 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'Date Status Change',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Date Status Change',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 51138376129406782 + wwv_flow_api.g_id_offset,
  p_region_id=> 72893086678850875 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'VIEW_PDF',
  p_column_display_sequence=> 5,
  p_column_heading=> '',
  p_column_link=>'p?n=#VIEW_PDF#',
  p_column_linktext=>'View PDF',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'N',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'SELECT DISTINCT qute.id "Quote Reference Number"'||chr(10)||
'               ,prty_supplier.name "Supplier"'||chr(10)||
'               ,prty_agent.first_name||'' ''||prty_agent.last_name "Agent"'||chr(10)||
'               ,vcqs.event_date "Date Status Change"'||chr(10)||
'               ,v_files.id as View_PDF '||chr(10)||
'FROM (SELECT DISTINCT vlare.*'||chr(10)||
'      FROM quote_roles quro, quotes qute, v_latest_rt_code_for_enro vlare'||chr(10)||
'      WHERE quro.qute_id = qute.id'||chr(10)||
'';

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

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

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

wwv_flow_api.create_report_region (
  p_id=> 73508882528794011 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 30,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_display_when_condition=> 'return mip_parties.check_user_role(:APP_USER, ''AGENT'');',
  p_display_condition_type=> 'FUNCTION_BODY',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 71124395124453374+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'QUERY_COLUMNS',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_show_nulls_as=> ' - ',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'no data found',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_query_row_count_max=> '10000',
  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=> 73509184606794027 + wwv_flow_api.g_id_offset,
  p_region_id=> 73508882528794011 + 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=> 73509276752794027 + wwv_flow_api.g_id_offset,
  p_region_id=> 73508882528794011 + 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_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=> 73509389059794027 + wwv_flow_api.g_id_offset,
  p_region_id=> 73508882528794011 + 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_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=> 73585703922945094 + wwv_flow_api.g_id_offset,
  p_region_id=> 73508882528794011 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'Date Status Change',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Date Status Change',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 51139589251457867 + wwv_flow_api.g_id_offset,
  p_region_id=> 73508882528794011 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 5,
  p_form_element_id=> null,
  p_column_alias=> 'VIEW_PDF',
  p_column_display_sequence=> 5,
  p_column_heading=> 'View Pdf',
  p_column_link=>'p?n=#VIEW_PDF#',
  p_column_linktext=>'View PDF',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'N',
  p_column_comment=>'');
end;
/
 
begin
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>72895402463859138 + 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=>72892085854841155 + 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 => 72885087951642966+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 => 71129916045453388+wwv_flow_api.g_id_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=>73105484355383013 + 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 => 72885087951642966+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=>73107291412394508 + 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 => 72885087951642966+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 => 'if mip_parties.check_user_role(:APP_USER, ''AGENT'') then'||chr(10)||
' return ''select qust.description AS display_value, qust.code AS return_value'||chr(10)||
'from quote_statuses qust'||chr(10)||
'where qust.code <> ''''LAPSED'''' and qust.code <> ''''SELREJ'''''||chr(10)||
'order by 1'';'||chr(10)||
' else'||chr(10)||
' return ''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'';'||chr(10)||
'end if;',
  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 => 71129916045453388+wwv_flow_api.g_id_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=>73626777294240242 + 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 => 72893086678850875+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

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

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

ph := null;
wwv_flow_api.create_page(
  p_id     => 18,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Report on Costs',
  p_step_title=> 'Report on &P18_COSTS_TITLE.',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'AUTO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => ' ',
  p_html_page_header => '',
  p_step_template => '',
  p_required_role => 57627572717765105+ 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 => '20080429111137',
  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 "#OWNER#"."COSTS" '||chr(10)||
'where ';

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

wwv_flow_api.create_report_region (
  p_id=> 58302689035262167 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 10,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_display_when_condition=> 'P18_REQUIRED_COST_TYPE',
  p_display_when_cond2=> 'LACO:AICO:MOCO:BACO:HOCO',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 71124395124453374+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'no data found',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_query_row_count_max=> '20000',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'Y',
  p_csv_output_link_text=> 'Export to Spreadsheet',
  p_prn_output=> 'N',
  p_prn_format=> 'PDF',
  p_prn_output_show_link=> 'Y',
  p_prn_output_link_text=> 'Print',
  p_prn_units=> 'MILLIMETERS',
  p_prn_paper_size=> 'A4',
  p_prn_width=> 297,
  p_prn_height=> 210,
  p_prn_orientation=> 'HORIZONTAL',
  p_prn_page_header_font_color=> '#000000',
  p_prn_page_header_font_family=> 'Helvetica',
  p_prn_page_header_font_weight=> 'normal',
  p_prn_page_header_font_size=> '12',
  p_prn_page_footer_font_color=> '#000000',
  p_prn_page_footer_font_family=> 'Helvetica',
  p_prn_page_footer_font_weight=> 'normal',
  p_prn_page_footer_font_size=> '12',
  p_prn_header_bg_color=> '#9bafde',
  p_prn_header_font_color=> '#ffffff',
  p_prn_header_font_family=> 'Helvetica',
  p_prn_header_font_weight=> 'normal',
  p_prn_header_font_size=> '10',
  p_prn_body_bg_color=> '#efefef',
  p_prn_body_font_color=> '#000000',
  p_prn_body_font_family=> 'Helvetica',
  p_prn_body_font_weight=> 'normal',
  p_prn_body_font_size=> '10',
  p_prn_border_width=> .5,
  p_prn_page_header_alignment=> 'LEFT',
  p_prn_page_footer_alignment=> 'LEFT',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_exp_filename=> '&P18_EXPORT_FILENAME.',
  p_plug_query_exp_separator=> ',',
  p_plug_query_exp_enclosed_by=> '"',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 58479674476514372 + wwv_flow_api.g_id_offset,
  p_region_id=> 58302689035262167 + 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=> 58480303632514372 + wwv_flow_api.g_id_offset,
  p_region_id=> 58302689035262167 + 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=>58364887785611247 + 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=> 58490178088676309 + wwv_flow_api.g_id_offset,
  p_region_id=> 58302689035262167 + 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=>55951800329760667 + 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=> 58490298179676309 + wwv_flow_api.g_id_offset,
  p_region_id=> 58302689035262167 + 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=>55952983630763166 + 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=> 58490388030676309 + wwv_flow_api.g_id_offset,
  p_region_id=> 58302689035262167 + 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=>55972088674004194 + 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=> 77139800302699475 + wwv_flow_api.g_id_offset,
  p_region_id=> 58302689035262167 + 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=>84998178571770625 + 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=> 58479975458514372 + wwv_flow_api.g_id_offset,
  p_region_id=> 58302689035262167 + 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=>58363976011607870 + 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=> 58480382103514372 + wwv_flow_api.g_id_offset,
  p_region_id=> 58302689035262167 + 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=>58365493672612897 + 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=> 58480496736514372 + wwv_flow_api.g_id_offset,
  p_region_id=> 58302689035262167 + 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=>58465591651470927 + 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=> 58488293270576573 + wwv_flow_api.g_id_offset,
  p_region_id=> 58302689035262167 + 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=>58366499906614767 + 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=> 58480080329514372 + wwv_flow_api.g_id_offset,
  p_region_id=> 58302689035262167 + 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=> 58479786885514372 + wwv_flow_api.g_id_offset,
  p_region_id=> 58302689035262167 + 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=> 58479882495514372 + wwv_flow_api.g_id_offset,
  p_region_id=> 58302689035262167 + 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=> 58480201990514372 + wwv_flow_api.g_id_offset,
  p_region_id=> 58302689035262167 + 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=> 58545373164119581 + wwv_flow_api.g_id_offset,
  p_region_id=> 58302689035262167 + 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             => 58309085734262172 + 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 => 58302689035262167+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image   => 'template:'||to_char(71130218387453389+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Create',
  p_button_position=> 'REGION_TEMPLATE_CREATE',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:19:&SESSION.::&DEBUG.:19:P19_REQUIRED_COST_TYPE:&P18_REQUIRED_COST_TYPE.',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>50631189493767590 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 18,
  p_branch_action=> 'f?p=&FLOW_ID.:19:&SESSION.::&DEBUG.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>50630899887767589+ 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=>58430802987030636 + 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 => 58302689035262167+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=>58439574177192553 + 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 => 58302689035262167+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=>58904204339185881 + 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 => 58302689035262167+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=> 58940178741405589 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 18,
  p_computation_sequence => 10,
  p_computation_item=> 'P18_EXPORT_FILENAME',
  p_computation_point=> 'AFTER_BOX_BODY',
  p_computation_type=> 'PLSQL_EXPRESSION',
  p_computation_processed=> 'REPLACE_EXISTING',
  p_computation=> 'apex_util.url_encode(''MIP_&P18_COSTS_TITLE.'')||''.CSV''',
  p_compute_when => '',
  p_compute_when_type=>'');
 
null;
 
end;
/

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

p:=p||':= ''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     => 58438896209189472 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 18,
  p_process_sequence=> 10,
  p_process_point=> 'BEFORE_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'SetRegionTitle',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

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

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

wwv_flow_api.create_page(
  p_id     => 19,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Manage Costs',
  p_step_title=> 'Manage &P19_COSTS_TITLE.',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'AUTO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => ' ',
  p_html_page_header => ' ',
  p_step_template => '',
  p_required_role => 57627572717765105+ wwv_flow_api.g_id_offset,
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'HARDYA',
  p_last_upd_yyyymmddhh24miss => '20080326172339',
  p_page_is_public_y_n=> 'N',
  p_protection_level=> 'C',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>19,p_text=>h);
wwv_flow_api.set_html_page_header(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>19,p_text=>ph);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 58297897480262161 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 58298180662262161 + 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 => 58297897480262161+wwv_flow_api.g_id_offset,
  p_button_name    => 'SAVE',
  p_button_image   => 'template:'||to_char(71130218387453389+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             => 58298475198262161 + 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 => 58297897480262161+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image   => 'template:'||to_char(71130218387453389+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             => 58298079917262161 + 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 => 58297897480262161+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image   => 'template:'||to_char(71130218387453389+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             => 58298284858262161 + 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 => 58297897480262161+wwv_flow_api.g_id_offset,
  p_button_name    => 'DELETE',
  p_button_image   => 'template:'||to_char(71130218387453389+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=>58299092998262162 + 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=>58299293213262164 + 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 => 58297897480262161+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 => 71129916045453388+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=>58299478063262164 + 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 => 58297897480262161+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 => 71129916045453388+wwv_flow_api.g_id_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=>58299700256262164 + 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 => 58297897480262161+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 => 71130096047453389+wwv_flow_api.g_id_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=>58300082134262164 + 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 => 58297897480262161+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 => 71129916045453388+wwv_flow_api.g_id_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=>58300287807262164 + 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 => 58297897480262161+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 => 71130096047453389+wwv_flow_api.g_id_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=>58300692851262166 + 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 => 58297897480262161+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 => 71129916045453388+wwv_flow_api.g_id_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=>58300881033262166 + 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 => 58297897480262161+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 => 71130096047453389+wwv_flow_api.g_id_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=>58301077523262166 + 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 => 58297897480262161+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Meter Size Range',
  p_source=>'MESC_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'METERSIZECODES',
  p_lov => 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from METER_SIZE_CODES'||chr(10)||
'',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not Applicable',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P19_REQUIRED_COST_TYPE',
  p_display_when2=>'LACO',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>58301285975262166 + 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 => 58297897480262161+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 => 71129916045453388+wwv_flow_api.g_id_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=>58360876872570233 + 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 => 58297897480262161+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default => '&P18_REQUIRED_COST_TYPE.',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source=>'COST_TYPE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>58525784753009378 + 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 => 58297897480262161+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Housing Name',
  p_source=>'HOU_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'HOUSINGS',
  p_lov => 'select code as display_value, code as return_value'||chr(10)||
'from housings'||chr(10)||
'order by code',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please Select a Value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P19_REQUIRED_COST_TYPE',
  p_display_when2=>'HOCO',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_field_template => 71130096047453389+wwv_flow_api.g_id_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=>58539102638080745 + 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 => 58297897480262161+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=>58539680259083784 + 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 => 58297897480262161+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 1,
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>59334796200558375 + 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 => 58297897480262161+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Base Name',
  p_source=>'BAS_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'BASES',
  p_lov => 'select code as display_value, code as return_value'||chr(10)||
'from bases'||chr(10)||
'order by code',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please Select a Value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P19_REQUIRED_COST_TYPE',
  p_display_when2=>'BACO',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_field_template => 71130096047453389+wwv_flow_api.g_id_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=>59351186428650166 + 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 => 58297897480262161+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Additional Item',
  p_source=>'ADIT_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'ADDITIONALITEMS',
  p_lov => 'select description d, code r'||chr(10)||
'from  additional_items'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please Select a Value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P19_REQUIRED_COST_TYPE',
  p_display_when2=>'AICO',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_field_template => 71130096047453389+wwv_flow_api.g_id_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=>61488997529927506 + 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 => 58297897480262161+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Module Name',
  p_source=>'MODU_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'MODULES',
  p_lov => 'select code display_value, code return_value '||chr(10)||
'from modules'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please Select a Value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P19_REQUIRED_COST_TYPE',
  p_display_when2=>'MOCO',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_field_template => 71130096047453389+wwv_flow_api.g_id_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=>82779203375623502 + 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 => 58297897480262161+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Delivery Price',
  p_source=>'DELIVERY_COST',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>86777604507338647 + 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 => 58297897480262161+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 => 71130096047453389+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 => 58299981560262164 + 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=> 58299700256262164 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 58300595124262166 + 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=> 58300287807262164 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 82777897357612311 + 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=> 58299478063262164 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 85100885243529444 + 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=> 82779203375623502 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 82910083195261135 + 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=> 58300287807262164 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

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

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 82787989616676339 + 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=> 58299700256262164 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 82789001737679861 + 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=> 58300692851262166 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 82793090318752235 + 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=> 58299700256262164 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 82794073826756960 + 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=> 58300692851262166 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

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

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

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

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

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

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 49626099784754128 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_validation_name => 'Meter type must not be null',
  p_validation_sequence=> 210,
  p_validation => 'if :P19_COST_TYPE = ''LACO'' and :P19_METY_CODE is null then'||chr(10)||
'  return ''Meter type must have some value.'';'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_associated_item=> 86777604507338647 + 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     => 58301579839262166 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'DML_FETCH_ROW',
  p_process_name=> 'Fetch Row from COSTS',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to fetch row.',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 58301791017262166 + 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=>58298079917262161 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

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

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

wwv_flow_api.create_page_process(
  p_id     => 58302176284262166 + 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=>58298284858262161 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 86222185799156905 + 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=>58298284858262161 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

p:=p||':= ''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     => 58540773810091367 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 19,
  p_process_sequence=> 50,
  p_process_point=> 'BEFORE_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'SetRegionTitle',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

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

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

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

wwv_flow_api.create_report_region (
  p_id=> 79130098499133089 + 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=> 71121389039453369+ 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=> 71124395124453374+ 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=> 79130278601133097 + wwv_flow_api.g_id_offset,
  p_region_id=> 79130098499133089 + 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=> 79130389603133097 + wwv_flow_api.g_id_offset,
  p_region_id=> 79130098499133089 + 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=> 79130487967133097 + wwv_flow_api.g_id_offset,
  p_region_id=> 79130098499133089 + 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             => 79130601827133099 + 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 => 79130098499133089+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image_alt=> 'Create',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:24:&SESSION.::&DEBUG.:24::',
  p_button_cattributes=>'id="create"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
null;
 
end;
/

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

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

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

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

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 79226293983417147 + 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=> 71118991564453364+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 79226491063417150 + 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 => 79226293983417147+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             => 79226691568417152 + 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 => 79226293983417147+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             => 79226903123417152 + 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 => 79226293983417147+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             => 79227083535417152 + 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 => 79226293983417147+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=>79228578624417167 + 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=>79227292331417153 + 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 => 79226293983417147+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 => 71129916045453388+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=>79227491035417156 + 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 => 79226293983417147+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 => 71129916045453388+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=>79227687486417156 + 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 => 79226293983417147+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 => 71129916045453388+wwv_flow_api.g_id_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=>84790679368271795 + 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 => 79226293983417147+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 => 82625779310636888 + 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=> 79227491035417156 + 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     => 79227889637417158 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 24,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'DML_FETCH_ROW',
  p_process_name=> 'Fetch Row from ADDITIONAL_ITEMS',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to fetch row.',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

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

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

wwv_flow_api.create_page_process(
  p_id     => 79228295005417160 + 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=>79226691568417152 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

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

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

 
--application/pages/page_00030
prompt  ...PAGE 30: Search Enquiries
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 30,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Search Enquiries',
  p_step_title=> 'Search Enquiries',
  p_step_sub_title => 'Search Enquiries',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 71720278317543956+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'PRIESTJ',
  p_last_upd_yyyymmddhh24miss => '20080317171622',
  p_page_is_public_y_n=> 'N',
  p_protection_level=> 'C',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 58967000262714853 + 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=> 71117787921453364+ 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(54469776284420739 + wwv_flow_api.g_id_offset),
  p_menu_template_id=> 71131009669453394+ wwv_flow_api.g_id_offset,
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'SELECT DISTINCT enquiries.id "Enquiry ID"'||chr(10)||
'                ,enquiries.mprn "MPRN"'||chr(10)||
'                ,enquiries.transaction_reference "Transaction Reference"'||chr(10)||
'                ,enquiries.install_postcode "Postcode"'||chr(10)||
'                ,''View'' AS "Details"'||chr(10)||
'                ,''Copy'' AS "Copy"'||chr(10)||
'                ,(SELECT ''View quotes'''||chr(10)||
'                   FROM dual'||chr(10)||
'                  WHERE EXISTS (SELECT 1'||chr(10)||
'           ';

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

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

s:=s||'                           ,'' '''||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=> 58967198001714862 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 21,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_display_when_condition=> 'if upper(mip_parties.get_user_role(:APP_USER)) in (''ICU'',''MIPADMIN'',''CS'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_condition_type=> 'FUNCTION_BODY',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 71124395124453374+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_show_nulls_as=> ' - ',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'No enquiries matching the search criteria found.',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_query_row_count_max=> '8000',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_prn_output=> 'N',
  p_prn_format=> 'PDF',
  p_prn_output_show_link=> 'Y',
  p_prn_output_link_text=> 'Print',
  p_prn_units=> 'MILLIMETERS',
  p_prn_paper_size=> 'A4',
  p_prn_width=> 297,
  p_prn_height=> 210,
  p_prn_orientation=> 'HORIZONTAL',
  p_prn_page_header_font_color=> '#000000',
  p_prn_page_header_font_family=> 'Helvetica',
  p_prn_page_header_font_weight=> 'normal',
  p_prn_page_header_font_size=> '12',
  p_prn_page_footer_font_color=> '#000000',
  p_prn_page_footer_font_family=> 'Helvetica',
  p_prn_page_footer_font_weight=> 'normal',
  p_prn_page_footer_font_size=> '12',
  p_prn_header_bg_color=> '#9bafde',
  p_prn_header_font_color=> '#ffffff',
  p_prn_header_font_family=> 'Helvetica',
  p_prn_header_font_weight=> 'normal',
  p_prn_header_font_size=> '10',
  p_prn_body_bg_color=> '#efefef',
  p_prn_body_font_color=> '#000000',
  p_prn_body_font_family=> 'Helvetica',
  p_prn_body_font_weight=> 'normal',
  p_prn_body_font_size=> '10',
  p_prn_border_width=> .5,
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 69393091663036117 + wwv_flow_api.g_id_offset,
  p_region_id=> 58967198001714862 + 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=> 69393183844036117 + wwv_flow_api.g_id_offset,
  p_region_id=> 58967198001714862 + 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=> 69393281280036117 + wwv_flow_api.g_id_offset,
  p_region_id=> 58967198001714862 + 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=> 69393400178036117 + wwv_flow_api.g_id_offset,
  p_region_id=> 58967198001714862 + 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=> 71393582672215847 + wwv_flow_api.g_id_offset,
  p_region_id=> 58967198001714862 + 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=> 71388094915153150 + wwv_flow_api.g_id_offset,
  p_region_id=> 58967198001714862 + 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=> 70222303421300742 + wwv_flow_api.g_id_offset,
  p_region_id=> 58967198001714862 + 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=> 58968001846714866 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 11,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'BEFORE_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_footer=> 'When searching for enquiries, wildcard characters (''%'' and ''_''), may be used in any of the fields above.',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'SELECT DISTINCT enquiries.id "Enquiry ID"'||chr(10)||
'                ,enquiries.mprn "MPRN"'||chr(10)||
'                ,enquiries.transaction_reference "Transaction Reference"'||chr(10)||
'                ,enquiries.install_postcode "Postcode"'||chr(10)||
'                ,''View'' "Details"'||chr(10)||
'                ,''Copy'' "Copy"'||chr(10)||
'                ,(SELECT ''View quotes'''||chr(10)||
'                   FROM dual'||chr(10)||
'                  WHERE EXISTS (SELECT 1'||chr(10)||
'                 ';

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

s:=s||' 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(enq.install_postcode'||chr(10)||
'        ';

s:=s||'                     ,'' '''||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 IN'||chr(10)||
'       (SELECT veps.enqu_id'||chr(10)||
'         ';

s:=s||' 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=> 69391804345030349 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 31,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_display_when_condition=> 'return mip_parties.check_user_role(:APP_USER, ''AGENT'');',
  p_display_condition_type=> 'FUNCTION_BODY',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 71124395124453374+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_show_nulls_as=> ' - ',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'no data found',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_query_row_count_max=> '8000',
  p_pagination_display_position=> 'BOTTOM_RIGHT',
  p_csv_output=> 'N',
  p_sort_null=> 'F',
  p_query_asc_image=> 'arrow_down_gray_dark.gif',
  p_query_asc_image_attr=> 'width="13" height="12" alt=""',
  p_query_desc_image=> 'arrow_up_gray_dark.gif',
  p_query_desc_image_attr=> 'width="13" height="12" alt=""',
  p_plug_query_strip_html=> 'Y',
  p_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 69392096352030372 + wwv_flow_api.g_id_offset,
  p_region_id=> 69391804345030349 + 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=> 69392174464030372 + wwv_flow_api.g_id_offset,
  p_region_id=> 69391804345030349 + 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=> 69392284076030372 + wwv_flow_api.g_id_offset,
  p_region_id=> 69391804345030349 + 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=> 69392401516030372 + wwv_flow_api.g_id_offset,
  p_region_id=> 69391804345030349 + 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=> 70235172347348542 + wwv_flow_api.g_id_offset,
  p_region_id=> 69391804345030349 + 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=> 69392599848030372 + wwv_flow_api.g_id_offset,
  p_region_id=> 69391804345030349 + 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=> 70223899743309152 + wwv_flow_api.g_id_offset,
  p_region_id=> 69391804345030349 + 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             => 58968173512714867 + 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 => 58968001846714866+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             => 59030492715043628 + 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 => 58968001846714866+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=>58970501196714905 + 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=>58968386498714872 + 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 => 58968001846714866+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 => 71129916045453388+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=>58968900314714889 + 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 => 58968001846714866+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 => 71129916045453388+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=>58969384588714891 + 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 => 58968001846714866+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 => 71129916045453388+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=>58969891552714891 + 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 => 58968001846714866+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 => 71129916045453388+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'S',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

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

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

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

 
--application/pages/page_00031
prompt  ...PAGE 31: Copy Enquiry
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 31,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Copy Enquiry',
  p_step_title=> 'Copy Enquiry',
  p_step_sub_title => 'Copy Enquiry',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 71720278317543956+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'PRIESTJ',
  p_last_upd_yyyymmddhh24miss => '20080310155952',
  p_page_is_public_y_n=> 'N',
  p_protection_level=> 'C',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 58975397713718456 + 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=> 71117787921453364+ 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(54469776284420739 + wwv_flow_api.g_id_offset),
  p_menu_template_id=> 71131009669453394+ wwv_flow_api.g_id_offset,
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 58975602345718456 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 11,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 58975983741718458 + 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 => 58975602345718456+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             => 58975792017718458 + 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 => 58975602345718456+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=>58977677176718464 + 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=>58975983741718458+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 10,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>79963804311679199 + 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=>45917376861660342 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 31,
  p_name=>'P31_URL',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 60,
  p_item_plug_id => 58975602345718456+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Url',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 71129916045453388+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=>58976186518718458 + 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 => 58975602345718456+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 => 71129916045453388+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=>58976372410718459 + 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 => 58975602345718456+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Agent',
  p_source=>'select prty.id'||chr(10)||
'from parties prty'||chr(10)||
'where upper(prty.username) = upper(:APP_USER)',
  p_source_type=> 'QUERY',
  p_display_as=> 'COMBOBOX',
  p_lov => 'select FIRST_NAME || '' '' || LAST_NAME display_value, ID return_value'||chr(10)||
'  from PARTIES prty, PARTY_RELATIONSHIPS parl'||chr(10)||
' where prty.id = parl.from_parl_prty_id'||chr(10)||
'   and parl.FROM_PRTP_RT_CODE = ''AGENT'''||chr(10)||
'   and parl.TO_PRTP_RT_CODE = ''SUPP'''||chr(10)||
'   and parl.TO_PARL_PRTY_ID = :P31_SUPPLIER'||chr(10)||
' order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'if mip_parties.get_user_role(:APP_USER) = ''AGENT'' then'||chr(10)||
'  return true;'||chr(10)||
'else '||chr(10)||
'  return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>58976580518718459 + 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 => 58975602345718456+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=>58976800597718459 + 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 => 58975602345718456+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=>58976991894718459 + 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 => 58975602345718456+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 => 82704203113254452 + 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=> 58975983741718458 + wwv_flow_api.g_id_offset,
  p_associated_item=> 58976186518718458 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 82703287530249905 + 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=> 58975983741718458 + wwv_flow_api.g_id_offset,
  p_associated_item=> 58976372410718459 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

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

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

wwv_flow_api.create_page_process(
  p_id     => 58977176857718459 + 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=>58975983741718458 + wwv_flow_api.g_id_offset,
  p_process_success_message=> 'Enquiry &P31_ENQUIRY_ID. copied successfully as &P31_NEW_ID.. Click <a href="&P31_URL.">here</a> to open',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'f?p=&APP_ID.:32:&SESSION.::::P32_ID:&P31_NEW_ID.'||chr(10)||
'apex_util.prepare_url(''f?p=''||v(''APP_ID'')||'':32:''||v(''APP_SESSION'')||''::::''||:P32_ID||'':''||l_ret_str);'||chr(10)||
'');
end;
null;
 
end;
/

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

 
--application/pages/page_00032
prompt  ...PAGE 32: Enquiry
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 32,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Enquiry',
  p_step_title=> 'Enquiry',
  p_step_sub_title => 'Enquiry',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 80766197584938716+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_role => 59152281045285598+ wwv_flow_api.g_id_offset,
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'PRIESTJ',
  p_last_upd_yyyymmddhh24miss => '20090609143111',
  p_page_is_public_y_n=> 'N',
  p_protection_level=> 'C',
  p_page_comment  => '');
 
end;
 
end;
/

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

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

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

wwv_flow_api.create_page_plug (
  p_id=> 53546800583782704 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 32,
  p_plug_name=> 'Job Info',
  p_region_name=>'5',
  p_plug_template=> 71118991564453364+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 70,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 53546975174782704 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 32,
  p_plug_name=> 'Site Detail',
  p_region_name=>'1',
  p_plug_template=> 71118991564453364+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 20,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 53547190803782704 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 32,
  p_plug_name=> 'Contact Details',
  p_region_name=>'3',
  p_plug_template=> 71118991564453364+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 40,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 53547373421782704 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 32,
  p_plug_name=> 'Site Address',
  p_region_name=>'2',
  p_plug_template=> 71118991564453364+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 30,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 53547604586782706 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 32,
  p_plug_name=> 'Second Contact Details',
  p_region_name=>'4',
  p_plug_template=> 71118991564453364+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 60,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => 'PLSQL_EXPRESSION',
  p_plug_display_when_condition => ':P32_SECOND_CONTACT = ''Yes'' or (:P32_SECOND_CONTACT_NAME IS NOT NULL or :P32_SECOND_ALT_SUB_BUILDING IS NOT NULL or :P32_SECOND_ALT_BUILDING IS NOT NULL or :P32_SECOND_ALT_STREET IS NOT NULL or :P32_SECOND_ALT_CITY IS NOT NULL or :P32_SECOND_ALT_POSTCODE IS NOT NULL)',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 53547799827782706 + 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 => 53546800583782704+wwv_flow_api.g_id_offset,
  p_button_name    => 'UPLOAD_FILE',
  p_button_image_alt=> 'Upload File',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> ':P32_ID is not null and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'')',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 53547989532782708 + 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 => 53546800583782704+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             => 53548192150782708 + 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 => 53546800583782704+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             => 53548383917782708 + 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 => 53546800583782704+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             => 53548584341782708 + 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 => 53546800583782704+wwv_flow_api.g_id_offset,
  p_button_name    => 'delete_enquiry',
  p_button_image_alt=> 'Delete Enquiry',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'javascript:confirmDelete(''Are you sure you want to delete this enquiry'',''delete_enquiry'');',
  p_button_condition=> ':P32_ID is not null and '||chr(10)||
'#OWNER#.mip_security.component_authorization(v(''APP_USER''),''icadmin'') and #OWNER#.mip_enquiry.can_enquiry_be_deleted(:P32_ID)',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 53548795976782708 + 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 => 53546800583782704+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             => 53548996416782708 + wwv_flow_api.g_id_offset,
  p_flow_id        => wwv_flow.g_flow_id,
  p_flow_step_id   => 32,
  p_button_sequence=> 210,
  p_button_plug_id => 53546800583782704+wwv_flow_api.g_id_offset,
  p_button_name    => 'delete_quotes',
  p_button_image_alt=> 'Delete Quotes',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'javascript:confirmDelete(''Are you sure you want to delete associated with this enquiry'',''delete_quotes'');',
  p_button_condition=> ':P32_ID is not null and '||chr(10)||
'#OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'') and #OWNER#.mip_enquiry.enquiry_has_quotes(:P32_ID)and #OWNER#.mip_enquiry.can_enquiry_be_deleted(:P32_ID)',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 53549177283782708 + 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 => 53546800583782704+wwv_flow_api.g_id_offset,
  p_button_name    => 'JOB_INFO_CANCEL',
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'REGION_TEMPLATE_NEXT',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'if :P32_ID is not null then'||chr(10)||
'  if #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP'' and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'    return true;'||chr(10)||
'  else'||chr(10)||
'    return false;'||chr(10)||
'  end if;'||chr(10)||
'else'||chr(10)||
' return true;'||chr(10)||
'end if;',
  p_button_condition_type=> 'FUNCTION_BODY',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 53549375281782708 + 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 => 53546975174782704+wwv_flow_api.g_id_offset,
  p_button_name    => 'SITE_DETAIL_CANCEL',
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'REGION_TEMPLATE_NEXT',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'if :P32_ID is not null then'||chr(10)||
'  if #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP'' and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'    return true;'||chr(10)||
'  else'||chr(10)||
'    return false;'||chr(10)||
'  end if;'||chr(10)||
'else'||chr(10)||
' return true;'||chr(10)||
'end if;',
  p_button_condition_type=> 'FUNCTION_BODY',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 53549574824782708 + 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 => 53547373421782704+wwv_flow_api.g_id_offset,
  p_button_name    => 'SITE_ADDRESS_CANCEL',
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'REGION_TEMPLATE_NEXT',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'if :P32_ID is not null then'||chr(10)||
'  if #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP'' and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'    return true;'||chr(10)||
'  else'||chr(10)||
'    return false;'||chr(10)||
'  end if;'||chr(10)||
'else'||chr(10)||
' return true;'||chr(10)||
'end if;',
  p_button_condition_type=> 'FUNCTION_BODY',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 53549781798782708 + 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 => 53547190803782704+wwv_flow_api.g_id_offset,
  p_button_name    => 'CONTACT_DETAILS_CANCEL',
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'REGION_TEMPLATE_NEXT',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'if :P32_ID is not null then'||chr(10)||
'  if #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP'' and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'    return true;'||chr(10)||
'  else'||chr(10)||
'    return false;'||chr(10)||
'  end if;'||chr(10)||
'else'||chr(10)||
' return true;'||chr(10)||
'end if;',
  p_button_condition_type=> 'FUNCTION_BODY',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 53549986309782709 + 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 => 53547604586782706+wwv_flow_api.g_id_offset,
  p_button_name    => 'SECOND_CONTACT_DETAILS_CANCEL',
  p_button_image_alt=> 'Cancel',
  p_button_position=> 'REGION_TEMPLATE_NEXT',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> 'if :P32_ID is not null then'||chr(10)||
'  if #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP'' and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'    return true;'||chr(10)||
'  else'||chr(10)||
'    return false;'||chr(10)||
'  end if;'||chr(10)||
'else'||chr(10)||
' return true;'||chr(10)||
'end if;',
  p_button_condition_type=> 'FUNCTION_BODY',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 53550204579782709 + 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 => 53546975174782704+wwv_flow_api.g_id_offset,
  p_button_name    => 'SITE_DETAIL_UPDATE',
  p_button_image_alt=> 'Save',
  p_button_position=> 'REGION_TEMPLATE_PREVIOUS',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> ':P32_ID is not null and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') '||chr(10)||
'and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP''',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_button_cattributes=>'class="update"',
  p_database_action=>'UPDATE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 53550398194782709 + 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 => 53546800583782704+wwv_flow_api.g_id_offset,
  p_button_name    => 'JOB_INFO_UPDATE',
  p_button_image_alt=> 'Save',
  p_button_position=> 'REGION_TEMPLATE_PREVIOUS',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> ':P32_ID is not null and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP''',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_button_cattributes=>'class="update"',
  p_database_action=>'UPDATE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 53550578929782709 + 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 => 53546975174782704+wwv_flow_api.g_id_offset,
  p_button_name    => 'SITE_DETAIL_SAVE',
  p_button_image_alt=> 'Save',
  p_button_position=> 'REGION_TEMPLATE_PREVIOUS',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> ':P32_ID is null and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'')',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_button_cattributes=>'class="save"',
  p_database_action=>'INSERT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 53550781444782709 + 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 => 53546800583782704+wwv_flow_api.g_id_offset,
  p_button_name    => 'JOB_INFO_SAVE',
  p_button_image_alt=> 'Save',
  p_button_position=> 'REGION_TEMPLATE_PREVIOUS',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> ':P32_ID is null and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'')',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_button_cattributes=>'class="save"',
  p_database_action=>'INSERT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 53550986487782709 + 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 => 53547373421782704+wwv_flow_api.g_id_offset,
  p_button_name    => 'SITE_ADDRESS_UPDATE',
  p_button_image_alt=> 'Save',
  p_button_position=> 'REGION_TEMPLATE_PREVIOUS',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> ':P32_ID is not null and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP''',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_button_cattributes=>'class="update"',
  p_database_action=>'UPDATE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 53551180081782709 + 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 => 53547373421782704+wwv_flow_api.g_id_offset,
  p_button_name    => 'SITE_ADDRESS_SAVE',
  p_button_image_alt=> 'Save',
  p_button_position=> 'REGION_TEMPLATE_PREVIOUS',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> ':P32_ID is null and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'')',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_button_cattributes=>'class="save"',
  p_database_action=>'INSERT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 53551397585782709 + 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 => 53547190803782704+wwv_flow_api.g_id_offset,
  p_button_name    => 'CONTACT_DETAILS_UPDATE',
  p_button_image_alt=> 'Save',
  p_button_position=> 'REGION_TEMPLATE_PREVIOUS',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> ':P32_ID is not null and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP''',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_button_cattributes=>'class="update"',
  p_database_action=>'UPDATE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 53551588303782709 + 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 => 53547190803782704+wwv_flow_api.g_id_offset,
  p_button_name    => 'CONTACT_DETAILS_SAVE',
  p_button_image_alt=> 'Save',
  p_button_position=> 'REGION_TEMPLATE_PREVIOUS',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> ':P32_ID is null and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'')',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_button_cattributes=>'class="save"',
  p_database_action=>'INSERT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 53551778885782711 + 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 => 53547604586782706+wwv_flow_api.g_id_offset,
  p_button_name    => 'SECOND_CONTACT_DETAILS_UPDATE',
  p_button_image_alt=> 'Save',
  p_button_position=> 'REGION_TEMPLATE_PREVIOUS',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> ':P32_ID is not null and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP''',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_button_cattributes=>'class="update"',
  p_database_action=>'UPDATE',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 53551978157782711 + 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 => 53547604586782706+wwv_flow_api.g_id_offset,
  p_button_name    => 'SECOND_CONTACT_DETAILS_SAVE',
  p_button_image_alt=> 'Save',
  p_button_position=> 'REGION_TEMPLATE_PREVIOUS',
  p_button_alignment=> 'RIGHT',
  p_button_condition=> ':P32_ID is null and #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''A'') and not #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'')',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_button_cattributes=>'class="save"',
  p_database_action=>'INSERT',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>53618303055782756 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_branch_action=> 'f?p=&APP_ID.:&APP_PAGE_ID.:&SESSION.::&DEBUG.::::#&P32_ANCHOR.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 1,
  p_branch_condition_type=> 'ITEM_IS_NOT_NULL',
  p_branch_condition=> 'P32_ANCHOR',
  p_branch_comment=> 'Created 18-MAR-2008 14:41 by HARDYA');
 
wwv_flow_api.create_page_branch(
  p_id=>53618490942782756 + 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=>53548584341782708+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 12,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>53618679443782756 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_branch_action=> 'f?p=&APP_ID.:41:&SESSION.::&DEBUG.:41:P41_ENQU_ID,P41_PREVIOUS_PAGE,P41_QUTE_ID,P41_DRWG_CODE:&P32_ID.,&APP_PAGE_ID.,,&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>53547799827782706+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 14,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>53618876429782756 + 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=>53548795976782708+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 16,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>53619078441782756 + 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=>53548192150782708+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 18,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>53619294866782756 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_branch_action=> 'f?p=&APP_ID.:80:&SESSION.::&DEBUG.:RP,80,32:P80_ENQU_ID:&P32_ID.&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>53548383917782708+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 20,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>53619473067782756 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_branch_action=> 'f?p=&APP_ID.:32:&SESSION.::&DEBUG.:32:P32_ID:&P32_ID.',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 130,
  p_branch_condition_type=> 'REQUEST_IN_CONDITION',
  p_branch_condition=> 'SITE_DETAIL_CANCEL,SITE_ADDRESS_CANCEL,CONTACT_DETAILS_CANCEL,SECOND_CONTACT_DETAILS_CANCEL,JOB_INFO_CANCEL',
  p_branch_comment=> 'Created 28-FEB-2008 16:11 by PRIESTJ');
 
wwv_flow_api.create_page_branch(
  p_id=>53619672949782756 + 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=>53548996416782708+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 140,
  p_branch_comment=> 'Created 28-FEB-2008 16:11 by PRIESTJ');
 
wwv_flow_api.create_page_branch(
  p_id=>53619889269782758 + 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=>53620104339782758 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_branch_action=> 'f?p=&APP_ID.:&PAGE_ID.:&SESSION.::&DEBUG.:::&P32_ANCHOR.',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 510,
  p_branch_condition_type=> 'ITEM_IS_NOT_NULL',
  p_branch_condition=> 'P32_ANCHOR',
  p_branch_comment=> 'Created 20-MAR-2008 18:08 by HARDYA');
 
 
end;
/

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

wwv_flow_api.create_page_item(
  p_id=>53552680528782711 + 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 => 53547190803782704+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 => 71130096047453389+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=>53553181654782711 + 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 => 53547190803782704+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 => 71130096047453389+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=>53553692289782711 + 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 => 53547190803782704+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 => 71130096047453389+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=>53554202619782712 + 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 => 53547604586782706+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 => 71129916045453388+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=>53554672737782712 + 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 => 53547604586782706+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 => 71130096047453389+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=>53555174953782712 + 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 => 53547604586782706+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 => 71130096047453389+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=>53555690133782712 + 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 => 53547604586782706+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 => 71130096047453389+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=>53556172056782712 + 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 => 53547190803782704+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=> 'YN2',
  p_lov => '.'||to_char(53620172088782758 + 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 => 71129916045453388+wwv_flow_api.g_id_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=>53556393420782712 + 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 => 53546975174782704+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Supplier',
  p_source=>'SELECT prty_id FROM v_latest_rt_code_for_enro where rt_code=''ENQ SUPP'' and enqu_id=:p32_ID;',
  p_source_type=> 'QUERY',
  p_display_as=> 'COMBOBOX_WITH_SUBMIT',
  p_lov => 'select unique p.NAME display_value, p.ID return_value from PARTIES p , PARTY_RELATIONSHIPS pr where p.PRTY_TYPE=''MKTP'' and p.id =  pr.to_parl_prty_id and pr.to_parl_rt_code = ''SUPP''  and pr.from_parl_rt_code = ''AGENT'' order by 1 ',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'#OWNER#.mip_parties.get_user_role(v(''APP_USER'')) <> ''AGENT'' or :P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'' and #OWNER#.mip_parties.get_user_role(v(''APP_USER'')) = ''AGENT''',
  p_display_when_type=>'PLSQL_EXPRESSION',
  p_read_only_when=>'declare '||chr(10)||
'partytime number;'||chr(10)||
'privilege boolean;'||chr(10)||
'begin'||chr(10)||
'SELECT count (*) into partytime FROM v_latest_rt_code_for_enro where rt_code=''ENQ SUPP'' and enqu_id=:P32_ID;'||chr(10)||
''||chr(10)||
'privilege := #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'');'||chr(10)||
'if privilege or partytime>0 or #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'' then'||chr(10)||
' return true;'||chr(10)||
'else '||chr(10)||
' return false;'||chr(10)||
'end if;'||chr(10)||
'end;'||chr(10)||
'',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 71130096047453389+wwv_flow_api.g_id_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=>53556604574782712 + 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 => 53546975174782704+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Agent',
  p_source=>'SELECT prty_id FROM v_latest_rt_code_for_enro where rt_code=''ENQ OWN'' and enqu_id=:P32_ID;',
  p_source_type=> 'QUERY',
  p_display_as=> 'COMBOBOX_WITH_SUBMIT',
  p_lov => 'select FIRST_NAME || '' '' || LAST_NAME display_value, ID return_value'||chr(10)||
'  from PARTIES, PARTY_RELATIONSHIPS'||chr(10)||
' where from_parl_prty_id = id'||chr(10)||
'   and FROM_PRTP_RT_CODE = ''AGENT'''||chr(10)||
'   and TO_PRTP_RT_CODE = ''SUPP'''||chr(10)||
'   and TO_PARL_PRTY_ID = :P32_MKTP_REF'||chr(10)||
' order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if #OWNER#.mip_parties.get_user_role(v(''APP_USER'')) <> ''AGENT'' and :P32_MKTP_REF is not null then'||chr(10)||
'  return true;'||chr(10)||
'else'||chr(10)||
'  if :P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'' and #OWNER#.mip_parties.get_user_role(v(''APP_USER'')) = ''AGENT'' then'||chr(10)||
'    return true;'||chr(10)||
'  else'||chr(10)||
'    return false;'||chr(10)||
'  end if;'||chr(10)||
'  return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;'||chr(10)||
'',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 71130096047453389+wwv_flow_api.g_id_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=>53556798514782714 + 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 => 53546975174782704+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 => 71129916045453388+wwv_flow_api.g_id_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=>53556986031782714 + 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 => 53546975174782704+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Supplier',
  p_source=>'SELECT prty_id FROM v_latest_rt_code_for_enro where rt_code=''ENQ SUPP'' and enqu_id=:P32_ID;',
  p_source_type=> 'QUERY',
  p_display_as=> 'COMBOBOX_WITH_SUBMIT',
  p_lov => 'select NAME display_value, ID return_value'||chr(10)||
'  from PARTIES p, PARTY_RELATIONSHIPS pr'||chr(10)||
' where p.ID = pr.TO_PARL_PRTY_ID'||chr(10)||
'   and pr.FROM_PARL_PRTY_ID = #OWNER#.mip_parties.get_user_id(v(''APP_USER''))'||chr(10)||
'   and pr.TO_PARL_RT_CODE = ''SUPP'''||chr(10)||
'   and pr.FROM_PARL_RT_CODE = ''AGENT'''||chr(10)||
' order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 50,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'#OWNER#.mip_parties.get_user_role(v(''APP_USER'')) = ''AGENT'' and (:P32_ID is null '||chr(10)||
'or #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP'')',
  p_display_when_type=>'PLSQL_EXPRESSION',
  p_read_only_when=>'declare '||chr(10)||
'partytime number;'||chr(10)||
'privilege boolean;'||chr(10)||
'begin'||chr(10)||
'SELECT count (*) into partytime FROM v_latest_rt_code_for_enro where rt_code=''ENQ SUPP'' and enqu_id=:P32_ID;'||chr(10)||
''||chr(10)||
'privilege := #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'');'||chr(10)||
'if privilege or partytime>0 or #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'' then'||chr(10)||
' return true;'||chr(10)||
'else '||chr(10)||
' return false;'||chr(10)||
'end if;'||chr(10)||
'end;'||chr(10)||
'',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>53557179415782714 + 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 => 53547373421782704+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 => 71130096047453389+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=>53557681003782714 + 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 => 53547373421782704+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 => 71130096047453389+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 preferred method of communication';

wwv_flow_api.create_page_item(
  p_id=>53558188370782714 + 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 => 53546975174782704+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 => 71130096047453389+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=>53558683191782714 + 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 => 53547373421782704+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 => 71130096047453389+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=>53559192828782714 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_QMIN',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 60,
  p_item_plug_id => 53546800583782704+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Measuring Capacity QMIN(kWh)',
  p_post_element_text=>' kWh',
  p_source=>'QMIN',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+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=>53559674978782715 + 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 => 53547604586782706+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 => 71130096047453389+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||'<p>'||chr(10)||
'Please input the T/PM/GT/1(Management procedure for requesting gas service pipe pressure and capacity information from National Gid Gas/GT) information.  '||chr(10)||
'</p>'||chr(10)||
'<p>'||chr(10)||
'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)||
'<ol style="list-style-type: lower-alpha">'||chr(10)||
'<li>Confirmation of a live gas service pipe (for an e';

h:=h||'xisting installation),</li>'||chr(10)||
'<li>Design minimum pressure DMP</li>'||chr(10)||
'<li>Lowest operating pressure LOP</li>'||chr(10)||
'<li>Maximum operating pressure MOP</li>'||chr(10)||
'<li>Design pressure DP</li>'||chr(10)||
'<li>Design maximum incidental pressure DMIP</li>'||chr(10)||
'<li>Nominated or maximum capacity of the service pipe (energy capacity or volumetric capacity)</li>'||chr(10)||
'<li>Any constraints that National Grid Gas (or other GT) has imposed on the ser';

h:=h||'vice, meter installation, or use of the meter housing</li>'||chr(10)||
'</ol>'||chr(10)||
'</p>';

wwv_flow_api.create_page_item(
  p_id=>53560201285782715 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_REQUIRED_IP_DETAILS',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 32,
  p_item_plug_id => 53546800583782704+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_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''REQUIRED_IP_DETAILS'') <> ''H'''||chr(10)||
' AND :P32_REQUIRED_SVCP_CODE =''IP'');',
  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 => 32443332494481752+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 &quot;service&quot; pressure in mbar?  This is the LOP or lowest operating pressure. '||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>53560688416782715 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_REQUIRED_IP_MBAR',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 33,
  p_item_plug_id => 53546800583782704+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'IP Inlet pressure',
  p_post_element_text=>'mbar',
  p_source=>'REQUIRED_IP_MBAR',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_REQUIRED_SVCP_CODE',
  p_display_when2=>'IP',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 32443332494481752+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=>53561195665782715 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_EXISTING_LOGGER',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 56,
  p_item_plug_id => 53546800583782704+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=> 'NOORYES1',
  p_lov => '.'||to_char(53624177552782759 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''EXISTING_LOGGER'') <> ''H'''||chr(10)||
');',
  p_display_when2=>'H',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 32443332494481752+wwv_flow_api.g_id_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||'<p>Would you like AMR? (Automated Meter Reading).</p>'||chr(10)||
'<p>There are many advantages to Smart Metering; better budget management, accurate billing, environmental benefits, no meter reading visits.</p>'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>53561399164782715 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_AMR_REQUIRED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 44,
  p_item_plug_id => 53546800583782704+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=> 'NOORYES1',
  p_lov => '.'||to_char(53624177552782759 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 240,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'DECLARE'||chr(10)||
'  l_tripartite_region BOOLEAN;'||chr(10)||
'  l_regi_code         regions.code%TYPE;'||chr(10)||
'BEGIN'||chr(10)||
'  IF mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''AMR_REQUIRED'') = ''H'' or :P32_ENTY_CODE is null THEN'||chr(10)||
'    RETURN FALSE; -- Not valid for this enquiry type'||chr(10)||
'  ELSIF (mip_parties.is_tripartite(:p32_mktp_ref) OR'||chr(10)||
'        mip_parties.is_tripartite(:p32_mktp_ref2)) THEN'||chr(10)||
'    RETURN TRUE; -- Tripartite members can do anything.'||chr(10)||
'  ELSE'||chr(10)||
'    IF mip_regions.valid_postcode_format(:p32_install_postcode) THEN'||chr(10)||
'      l_tripartite_region := mip_tripartite.tripartite_region(:p32_install_postcode);'||chr(10)||
'      l_regi_code         := mip_regions.get_region_for_postcode(:p32_install_postcode);'||chr(10)||
'    ELSE'||chr(10)||
'      l_tripartite_region := FALSE;'||chr(10)||
'    END IF;'||chr(10)||
'  '||chr(10)||
'    IF NOT l_tripartite_region THEN'||chr(10)||
'      RETURN TRUE; -- not a tripartite region'||chr(10)||
'    ELSE'||chr(10)||
'      RETURN(mip_tripartite.addon_allowed(''AMR'''||chr(10)||
'                                         ,l_regi_code));'||chr(10)||
'    END IF;'||chr(10)||
'  END IF;'||chr(10)||
'END;'||chr(10)||
''||chr(10)||
'',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 32443332494481752+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||'<p>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 chargeable work may be required.</p>'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>53561901017782715 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_EMS_REQUIRED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 45,
  p_item_plug_id => 53546800583782704+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=> 'NOORYES1',
  p_lov => '.'||to_char(53624177552782759 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 240,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''EMS_REQUIRED'') <> ''H'''||chr(10)||
');',
  p_display_when2=>'H',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 32443332494481752+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||'<p>Does the meter module require a by-pass?</p>'||chr(10)||
'<p>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 unnecessary in the T/PM/GT/3 process.  A meter by-pass should only be provided where the provision of a meter by-pass would,';

h:=h||' in the MAM''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)||
'<ol style="list-style-type: lower-alpha">'||chr(10)||
'<li>Hospitals or hospice</li>'||chr(10)||
'<li>institutionalised accommodation (fo';

h:=h||'r example homes for the elderly, schools, and prisons)</li>'||chr(10)||
'<li>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</li>'||chr(10)||
'<li>and at meter installations connected to:</li>'||chr(10)||
'<ul>'||chr(10)||
'<li>exceptionally extensive and complex pipework and gas consuming plant'||chr(10)||
'<li>multi-occupied prem';

h:=h||'ises or a number of discrete consumers (for example a single meter installation serving a block of flats).'||chr(10)||
'</ul>'||chr(10)||
'</ol>'||chr(10)||
'</p>';

wwv_flow_api.create_page_item(
  p_id=>53562381573782717 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_BYPASS_REQUIRED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 47,
  p_item_plug_id => 53546800583782704+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=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''BYPASS_REQUIRED'') <> ''H'''||chr(10)||
');',
  p_display_when2=>'H',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 32443332494481752+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||'<p>Multi-stream systems may be installed for a variety of commercial and technical reasons, including:'||chr(10)||
'<ul>'||chr(10)||
'<li>continuity of supply</li>'||chr(10)||
'<li>partial continuity of supply for essential loads</li>'||chr(10)||
'<li>improved pressure control over the required flow range</li>'||chr(10)||
'<li>achieving the required capacity</li>'||chr(10)||
'<li>provision of standby metering</li>'||chr(10)||
'<li>provision of reference metering</li>'||chr(10)||
'</ul>'||chr(10)||
'</p>'||chr(10)||
'<p>'||chr(10)||
'For ';

h:=h||'supply pressures of MP and above with a single stream installation - 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)||
'</p>';

wwv_flow_api.create_page_item(
  p_id=>53562901355782717 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_TWIN_STREAM_REQUIRED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 46,
  p_item_plug_id => 53546800583782704+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=> 'NOORYES1',
  p_lov => '.'||to_char(53624177552782759 + 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=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''TWIN_STREAM_REQUIRED'') <> ''H'''||chr(10)||
');',
  p_display_when2=>'H',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 32443332494481752+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=>53563372115782717 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_QMAX',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 59,
  p_item_plug_id => 53546800583782704+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_display_when=>'return mip_enquiry.show_qmax('||chr(10)||
'p_enty_code => :p32_enty_code, '||chr(10)||
'p_existing_metr_code => :p32_existing_meter_model,'||chr(10)||
'p_existing_mesc_code => :p32_existing_mesc_code,'||chr(10)||
'p_required_mesc_code => :p32_meter_size'||chr(10)||
');'||chr(10)||
'',
  p_display_when2=>'H',
  p_display_when_type=>'ALWAYS',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 32443332494481752+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=>53563900112782717 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_REQUIRED_MESC_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 58,
  p_item_plug_id => 53546800583782704+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_WITH_SUBMIT',
  p_named_lov=> 'NEWMETERSIZES',
  p_lov => 'select CODE display_value, CODE return_value '||chr(10)||
'from METER_SIZE_CODES where VALID_FOR_NEW_METER=''YES''',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 240,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'RETURN ('||chr(10)||
'mip_enquiries_helper.label_condition(p_field_name => ''REQUIRED_MESC_CODE'''||chr(10)||
'                    ,p_enty_code => :P32_enty_code) <> ''H'''||chr(10)||
');'||chr(10)||
'',
  p_display_when2=>'H',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 32443332494481752+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=>53564395710782718 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_EXISTING_METER_SERIAL_NO',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 55,
  p_item_plug_id => 53546800583782704+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=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''EXISTING_METER_SERIAL_NO'') <> ''H'''||chr(10)||
');',
  p_display_when2=>'H',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 32443332494481752+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_help_text   => h,
  p_item_comment => '');
 
 
end;
/

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

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

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

wwv_flow_api.create_page_item(
  p_id=>53566083553782718 + 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 => 53546975174782704+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 => 71130096047453389+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=>53566596802782718 + 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 => 53547190803782704+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 => 71130096047453389+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=>53567103830782720 + 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 => 53547190803782704+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 => 71129916045453388+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 existing meter type from the drop-down menu. '||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>53567593263782720 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_EXISTING_METY_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 51,
  p_item_plug_id => 53546800583782704+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Existing Meter Type',
  p_source=>'EXISTING_METY_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'METERTYPES',
  p_lov => 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from METER_TYPES'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> 'OTHER',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_tag_attributes  => 'onchange="get_AJAX_SELECT_XML(''METY_MANU'',''P32_EXISTING_PRTY_ID'',this.value,'''');get_AJAX_SELECT_XML(''MANU_METR'',''P32_EXISTING_METR_CODE'',$x(''P32_EXISTING_PRTY_ID'').value,this.value);"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'RETURN ('||chr(10)||
'mip_enquiries_helper.label_condition(p_field_name => ''EXISTING_METY_CODE'''||chr(10)||
'                    ,p_enty_code => :P32_enty_code) <> ''H'''||chr(10)||
');'||chr(10)||
'',
  p_display_when2=>'H',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 32443332494481752+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 LOP or lowest operating pressure.'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>53568091440782720 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_REQUIRED_SVCP_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 31,
  p_item_plug_id => 53546800583782704+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_display_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''REQUIRED_SVCP_CODE'') <> ''H'''||chr(10)||
');',
  p_display_when2=>'H',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 32443332494481752+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=>53568600418782720 + 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 => 53547190803782704+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 => 71130096047453389+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||'<p>'||chr(10)||
'What metering pressure do you require?  '||chr(10)||
'</p>'||chr(10)||
'<p>'||chr(10)||
'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)||
'</p>';

wwv_flow_api.create_page_item(
  p_id=>53569073478782720 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_REQUIRED_METERING_PRESSURE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 35,
  p_item_plug_id => 53546800583782704+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default => '21',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Required Metering Pressure (mbar)',
  p_post_element_text=>'mbar',
  p_source=>'REQUIRED_METERING_PRESSURE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 4,
  p_cMaxlength=> 8,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''REQUIRED_METERING_PRESSURE'') <> ''H'''||chr(10)||
');',
  p_display_when2=>'H',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 32443332494481752+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||'<p>'||chr(10)||
'Input a preferential substantial competion date.  '||chr(10)||
'</p>'||chr(10)||
'<p>'||chr(10)||
'National Grid Metering will endeavour to meet this date.  The planned dates will be confirmed within 5 working days of quotation acceptance'||chr(10)||
'</p>';

wwv_flow_api.create_page_item(
  p_id=>53569576359782720 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_INDICATIVE_DATE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 38,
  p_item_plug_id => 53546800583782704+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 => 71129916045453388+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||'<p>'||chr(10)||
'Is this enquiry related to any other job or project?  '||chr(10)||
'</p>'||chr(10)||
'<p>'||chr(10)||
'If so, please indicate by stating connected web-enquiry/project/job reference numbers and site addresses.'||chr(10)||
'</p>'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>53570073877782722 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_OTHER_PROJECT_REFERENCE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 39,
  p_item_plug_id => 53546800583782704+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 => 71129916045453388+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||'<p>'||chr(10)||
'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)||
'</p>';

wwv_flow_api.create_page_item(
  p_id=>53570587790782722 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_HOUSING_REQUIRED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 41,
  p_item_plug_id => 53546800583782704+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=> 'NOORYES1',
  p_lov => '.'||to_char(53624177552782759 + 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=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''HOUSING_REQUIRED'') <> ''H'''||chr(10)||
');',
  p_display_when2=>'H',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 32443332494481752+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||'<p>'||chr(10)||
'Does the site require a new base to position the meter module?  '||chr(10)||
'</p>'||chr(10)||
'<p>'||chr(10)||
'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)||
'</p>';

wwv_flow_api.create_page_item(
  p_id=>53571078152782722 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_BASE_REQUIRED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 42,
  p_item_plug_id => 53546800583782704+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=> 'NOORYES1',
  p_lov => '.'||to_char(53624177552782759 + 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=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''BASE_REQUIRED'') <> ''H'''||chr(10)||
');',
  p_display_when2=>'H',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 32443332494481752+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||'<p>'||chr(10)||
'Would you like a converter installed?  '||chr(10)||
'</p>'||chr(10)||
'<p>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 ge';

h:=h||'nerate an automatic quotation.  A manual quote will be generated off-line and uploaded back onto the system within the normal SLA.'||chr(10)||
'</p>';

wwv_flow_api.create_page_item(
  p_id=>53571586770782722 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_CONVERTOR_REQUIRED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 43,
  p_item_plug_id => 53546800583782704+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Converter Required',
  p_source=>'CONVERTOR_REQUIRED',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'NOORYES1',
  p_lov => '.'||to_char(53624177552782759 + 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=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''CONVERTOR_REQUIRED'') <> ''H'''||chr(10)||
');',
  p_display_when2=>'H',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 32443332494481752+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=>53572102152782722 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_EXISTING_CONVERTOR',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 57,
  p_item_plug_id => 53546800583782704+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 Converter',
  p_source=>'EXISTING_CONVERTOR',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'NOORYES1',
  p_lov => '.'||to_char(53624177552782759 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'RETURN ('||chr(10)||
'mip_enquiries_helper.label_condition(p_field_name => ''EXISTING_CONVERTOR'''||chr(10)||
'                    ,p_enty_code => :P32_enty_code) <> ''H'''||chr(10)||
');'||chr(10)||
'',
  p_display_when2=>'H',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 32443332494481752+wwv_flow_api.g_id_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=>53572303724782722 + 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 => 53546975174782704+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Care Category',
  p_source=>'CACA_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_lov => 'select DESCRIPTION display_value, CODE return_value '||chr(10)||
'from CARE_CATEGORIES'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+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=>53572776373782723 + 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 => 53546975174782704+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=> 'ASSETLOCATIONNOTES2',
  p_lov => '.'||to_char(53621079104782758 + 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  => 'LEFT',
  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 => 71129916045453388+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=>53573299251782723 + 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 => 53546975174782704+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 => 71129916045453388+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=>53573804382782723 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_ANCHOR',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 1303,
  p_item_plug_id => 53546975174782704+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Anchor',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN_PROTECTED',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

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

wwv_flow_api.create_page_item(
  p_id=>53573998506782723 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_LOAD_CONTROL_TYPE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 37,
  p_item_plug_id => 53546800583782704+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=> 'LOADCONTROLTYPES2',
  p_lov => '.'||to_char(53622184339782759 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''LOAD_CONTROL_TYPE'') <> ''H'''||chr(10)||
');',
  p_display_when2=>'H',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 32443332494481752+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 existing meter size from the drop-down menu.  This is only necessary for diaphragm meters.'||chr(10)||
'';

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

wwv_flow_api.create_page_item(
  p_id=>53575182618782723 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_MARKET_SECTOR_CODE',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 61,
  p_item_plug_id => 53546800583782704+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=> 'MARKETSECTORCODES2',
  p_lov => '.'||to_char(53623302234782759 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+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=>53575702885782725 + 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 => 53546975174782704+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Agent',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX',
  p_lov => 'select FIRST_NAME || '' '' || LAST_NAME display_value, ID return_value'||chr(10)||
'  from PARTIES'||chr(10)||
' where id = #OWNER#.mip_parties.get_user_id(v(''APP_USER''))'||chr(10)||
' order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if :P32_ID is null and #OWNER#.mip_parties.get_user_role(v(''APP_USER'')) = ''AGENT'' then'||chr(10)||
'  return true;'||chr(10)||
'else'||chr(10)||
'  if #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) = ''INP'' and #OWNER#.mip_parties.get_user_role(v(''APP_USER'')) = ''AGENT'' then'||chr(10)||
'    return true;'||chr(10)||
'  else'||chr(10)||
'    return false;'||chr(10)||
'  end if;'||chr(10)||
'  return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>53575897627782725 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_ENQUIRY_FILES',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 63,
  p_item_plug_id => 53546800583782704+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Upload file for enquiry',
  p_source_type=> 'STATIC',
  p_display_as=> 'FILE',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'class="assetlocnot"',
  p_cattributes_element=>'class="assetlocnot"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when_type=>'NEVER',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>53576073265782725 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_ENQUIRY_UPLOADED_FILES',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 64,
  p_item_plug_id => 53546800583782704+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 => 71129916045453388+wwv_flow_api.g_id_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||'Are there any additional access requirements to gain access to the site?';

wwv_flow_api.create_page_item(
  p_id=>53576280567782725 + 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 => 53546975174782704+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 => 71129916045453388+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. Please 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=>53576776230782725 + 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 => 53546975174782704+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_display_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''MPRN'') <> ''H'' or :P32_ENTY_CODE is null'||chr(10)||
');',
  p_display_when2=>'H',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 32443332494481752+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=>53577301818782725 + 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 => 53546975174782704+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  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''MPRN_ALT'') <> ''H'' or :P32_ENTY_CODE is null'||chr(10)||
');',
  p_display_when2=>'H',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 32443332494481752+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=>53577786275782726 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_ADD_SERVICES',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 40,
  p_item_plug_id => 53546800583782704+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Additional Services',
  p_source=>'<hr />',
  p_source_type=> 'STATIC',
  p_display_as=> 'DISPLAY_ONLY_HTML',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P32_ENTY_CODE',
  p_display_when2=>'OFMAT',
  p_display_when_type=>'VALUE_OF_ITEM_IN_CONDITION_NOT_IN_COLON_DELIMITED_LIST',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_is_persistent=> 'Y',
  p_lov_display_extra=>'NO',
  p_protection_level => 'N',
  p_item_comment => '');
 
 
end;
/

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

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

wwv_flow_api.create_page_item(
  p_id=>53578197349782726 + 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 => 53546975174782704+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Agent Contact Value',
  p_post_element_text=>'&nbsp;',
  p_source=>'AGENT_CONTACT_VALUE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov => 'select contact_value display_value, contact_value return_value'||chr(10)||
'from party_contact_mechanisms pacm,'||chr(10)||
'     contact_mechanisms come'||chr(10)||
'where pacm.come_id = come.id and come.comt_code = :P32_AGENT_COMT_CODE'||chr(10)||
'and (pacm.prty_id = :P32_AGENT_ID OR pacm.prty_id = :P32_AGENT_ID2)',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 50,
  p_cMaxlength=> 240,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if :P32_ID is not null then'||chr(10)||
'  if :P32_AGENT_COMT_CODE is not null and :P32_AGENT_COMT_CODE <> ''%''||''null%'' and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) =''INP'' and not(#OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'')) then'||chr(10)||
'    return true;'||chr(10)||
'  else'||chr(10)||
'    return false;'||chr(10)||
'  end if;'||chr(10)||
'else'||chr(10)||
'  if :P32_AGENT_COMT_CODE is not null and :P32_AGENT_COMT_CODE <> ''%''||''null%'' then'||chr(10)||
'    return true;'||chr(10)||
'  else'||chr(10)||
'    return false;'||chr(10)||
'  end if;'||chr(10)||
'end if;'||chr(10)||
'',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 71130096047453389+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=>53578678514782726 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_ANNUAL_QUANTITY',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 34,
  p_item_plug_id => 53546800583782704+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_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''ANNUAL_QUANTITY'') <> ''H'''||chr(10)||
');'||chr(10)||
'',
  p_display_when2=>'H',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 32443332494481752+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. '||chr(10)||
'<dl>'||chr(10)||
'<dt>Installation of new Standard meter</dt>'||chr(10)||
'<dd>'||chr(10)||
'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 &quot;Installation of new non-Standard meter&quot;'||chr(10)||
'<dd>'||chr(10)||
'<dt>Installation of new non-Standard meter</dt>'||chr(10)||
'<dd>'||chr(10)||
'Used for in';

h:=h||'stallations with a metering pressure above 21 mbar. '||chr(10)||
'</dd>'||chr(10)||
'<dt>Exchange of a Standard meter<dt>'||chr(10)||
'<dd>To exchange a meter module with a metering pressure of 21 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. '||chr(10)||
'</dd>'||chr(10)||
'<dt>Exchange of non-Standard meter</dt>'||chr(10)||
'<dd>'||chr(10)||
'For all exchanges where the requested me';

h:=h||'tering pressure is above 21 mbar.'||chr(10)||
'</dd>'||chr(10)||
'<dt>Request for OFGEM Meter Accuracy Test (OFMAT)</dt>'||chr(10)||
'<dd>'||chr(10)||
'To request an OFGEM accuracy test.'||chr(10)||
'</dd>'||chr(10)||
'<dt>Removal of a Standard meter</dt>'||chr(10)||
'<dd>'||chr(10)||
'For removal of meter modules that are on LP or MP services. '||chr(10)||
'</dd>'||chr(10)||
'</dt>Removal of non-Standard meter</dt>'||chr(10)||
'<dd>For all other removals. </dd>'||chr(10)||
'<dt>Adversarial removal of a meter</dt>'||chr(10)||
'<dd>For adversarial meter removals.<';

h:=h||'/dd>'||chr(10)||
'<dt>Alteration (relocation or reposition) of an existing meter</dt>'||chr(10)||
'<dd>Used to request alterations such as pressure changes.</dd>'||chr(10)||
'<dt>Change of capacity</dt>'||chr(10)||
'<dd>Used if the site occupier wants to change the amount of gas consumed.</dd>'||chr(10)||
'<dt>Purchase of standard add-ons for an existing meter module</dt>'||chr(10)||
'<dd>If EMS/AMR/Converter are requested, but as a stand alone job.</dd>'||chr(10)||
'<dt>Other</dt>'||chr(10)||
'<dd>';

h:=h||''||chr(10)||
'Used if none of the other jobs types are suitable. Please indicate in the Job Description field the requirements of the request for quotation.'||chr(10)||
'</dd>'||chr(10)||
'</dl>';

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

wwv_flow_api.create_page_item(
  p_id=>53579676364782726 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_DS_BOOSTER_OR_COMPRESS',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 36,
  p_item_plug_id => 53546800583782704+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=> 'NOORYES1',
  p_lov => '.'||to_char(53624177552782759 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please select a value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''DOWNSTREAM_BOOSTER_OR_COMPRESS'') <> ''H'''||chr(10)||
');',
  p_display_when2=>'H',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 32443332494481752+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||'<p>'||chr(10)||
'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';

h:=h||' and uploaded back onto the system within the normal SLA.'||chr(10)||
'</p>';

wwv_flow_api.create_page_item(
  p_id=>53580175820782726 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_JOB_DESCRIPTION',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 50,
  p_item_plug_id => 53546800583782704+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 => 71129916045453388+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=>53580681909782728 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_BYPASS_OTHER',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 48,
  p_item_plug_id => 53546800583782704+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 => 71129916045453388+wwv_flow_api.g_id_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:'||chr(10)||
'<dl>'||chr(10)||
'<dt>GT</dt><dd>The gas transporter</dd>'||chr(10)||
'<dt>Supplier</dt><dd>if the meter is supplier owned</dd>'||chr(10)||
'<dt>Consumer</dt><dd>if the meter is privately owned</dd>'||chr(10)||
'</dl>'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>53580902523782728 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_EXISTING_METER_OWNER',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 28,
  p_item_plug_id => 53546800583782704+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_OWNERS2',
  p_lov => '.'||to_char(53626577701782762 + 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=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''EXISTING_METER_OWNER'') <> ''H'''||chr(10)||
');',
  p_display_when2=>'H',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 32443332494481752+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.  '||chr(10)||
'<ul>'||chr(10)||
'<li>Gas transporter</li>'||chr(10)||
'<li>Supplier</li>'||chr(10)||
'<li>Consumer</li>'||chr(10)||
'</ul>'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>53581403997782728 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_EXISTING_METER_ASSET_PROVIDER',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 29,
  p_item_plug_id => 53546800583782704+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 => 71129916045453388+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 endeavour to meet this time wherever possible, but cannot guarantee it.'||chr(10)||
'';

wwv_flow_api.create_page_item(
  p_id=>53581897296782728 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_INDICATIVE_TIME',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 30,
  p_item_plug_id => 53546800583782704+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_TIMES2',
  p_lov => '.'||to_char(53625687690782762 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+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=>53582402249782728 + 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 => 53547373421782704+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 => 71130096047453389+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=>53582882847782728 + 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 => 53546975174782704+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 => 71129916045453388+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=>53583372640782729 + 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 => 53547373421782704+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 => 71129916045453388+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=>53583886835782729 + 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 => 53547604586782706+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 => 71130096047453389+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=>53584382426782729 + 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 => 53547190803782704+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=> 'YN2',
  p_lov => '.'||to_char(53620172088782758 + 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 => 71129916045453388+wwv_flow_api.g_id_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=>53584584616782729 + 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 => 53547190803782704+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 => 71129916045453388+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=>53585079371782729 + 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 => 53547190803782704+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 => 71130096047453389+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=>53585604143782729 + 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 => 53547604586782706+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 => 71130096047453389+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=>53586088062782731 + 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 => 53547604586782706+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 => 71129916045453388+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=>53586578820782731 + 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 => 53546975174782704+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 => 71130096047453389+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=>53586774031782731 + 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 => 53547190803782704+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 => 71129916045453388+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=>53587277699782731 + 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 => 53547604586782706+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 => 71129916045453388+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=>53587788430782731 + 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 => 53547190803782704+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 => 71129916045453388+wwv_flow_api.g_id_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=>53587993443782731 + 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 => 53547604586782706+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 => 71129916045453388+wwv_flow_api.g_id_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=>53588172275782731 + 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 => 53547190803782704+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 => 71129916045453388+wwv_flow_api.g_id_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=>53588379025782731 + 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 => 53547604586782706+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 => 71129916045453388+wwv_flow_api.g_id_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=>53588581126782733 + 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 => 53547190803782704+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 => 71129916045453388+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=>53589090865782733 + 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 => 53547604586782706+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 => 71129916045453388+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=>53589602533782733 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_name=>'P32_EXISTING_PRTY_ID',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 52,
  p_item_plug_id => 53546800583782704+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Existing Meter Manufacturer',
  p_source=>'EXISTING_PRTY_ID',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_lov => 'select name as display_value, id as return_value'||chr(10)||
'from parties prty'||chr(10)||
'where prty.prty_type = ''MANU'''||chr(10)||
'order by 1 asc',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please Select a Value-',
  p_lov_null_value=> '',
  p_cSize=> 20,
  p_cMaxlength=> 20,
  p_cHeight=> 1,
  p_tag_attributes  => 'onchange="get_AJAX_SELECT_XML(''MANU_METR'',''P32_EXISTING_METR_CODE'',this.value,$x(''P32_EXISTING_METY_CODE'').value);"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''EXISTING_PRTY_ID'') <> ''H'''||chr(10)||
');'||chr(10)||
'',
  p_display_when2=>'H',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when=>'If (:P32_ID is not null and #OWNER#.mip_enquiry.get_enquiry_status(:P32_ID) <> ''INP'') or #OWNER#.mip_security.page_authorization(v(''APP_USER''),v(''APP_PAGE_ID''),''R'') then'||chr(10)||
'return true;'||chr(10)||
'else'||chr(10)||
'return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 32443332494481752+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_computation(
  p_id=> 53589876595782733 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 32,
  p_computation_sequence => 10,
  p_computation_item=> 'P32_ANCHOR',
  p_computation_point=> 'AFTER_SUBMIT',
  p_computation_type=> 'PLSQL_EXPRESSION',
  p_computation_processed=> 'REPLACE_EXISTING',
  p_computation=> 'case :REQUEST'||chr(10)||
' when ''SITE_DETAIL_CANCEL'' then 1'||chr(10)||
' when ''SITE_DETAIL_UPDATE'' then 1'||chr(10)||
' when ''SITE_DETAIL_SAVE''   then 1'||chr(10)||
''||chr(10)||
' when ''SITE_ADDRESS_CANCEL'' then 2'||chr(10)||
' when ''SITE_ADDRESS_UPDATE'' then 2'||chr(10)||
' when ''SITE_ADDRESS_SAVE''   then 2'||chr(10)||
' when ''P32_INSTALL_ADDRESS'' then 2'||chr(10)||
''||chr(10)||
' when ''CONTACT_DETAILS_CANCEL'' then 3'||chr(10)||
' when ''CONTACT_DETAILS_UPDATE'' then 3'||chr(10)||
' when ''CONTACT_DETAILS_SAVE''   then 3'||chr(10)||
''||chr(10)||
''||chr(10)||
' when ''SECOND_CONTACTS_DETAIL_CANCEL'' then 4'||chr(10)||
' when ''SECOND_CONTACTS_DETAIL_UPDATE'' then 4'||chr(10)||
' when ''SECOND_CONTACTS_DETAIL_SAVE''   then 4'||chr(10)||
' when ''P32_SECOND_CONTACT''            then 4'||chr(10)||
''||chr(10)||
''||chr(10)||
' when ''JOB_INFO_CANCEL'' then 5'||chr(10)||
' when ''JOB_INFO_UPDATE'' then 5'||chr(10)||
' when ''JOB_INFO_SAVE''   then 5'||chr(10)||
' when ''P32_ENTY_CODE''   then 5'||chr(10)||
' when ''P32_REQUIRED_MESC_CODE''  then 5'||chr(10)||
' when ''P32_REQUIRED_SVCP_CODE''   then 5'||chr(10)||
' when ''APPLY_METER_MODEL_CHANGES'' then 5'||chr(10)||
' when ''P32_EXISTING_METY_CODE''  then 5'||chr(10)||
' when ''P32_EXISTING_METR_CODE''  then 5'||chr(10)||
' when ''P32_EXISTING_PRTY_ID''     then 5'||chr(10)||
' when ''P32_BYPASS_REQUIRED'' then 5'||chr(10)||
''||chr(10)||
' else null'||chr(10)||
'end;',
  p_compute_when => '',
  p_compute_when_type=>'');
 
null;
 
end;
/

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

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

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

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

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

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53591077296782734 + 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=> 53569073478782720 + 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 => 53591280654782734 + 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=> 53569576359782720 + 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 => 53591493115782734 + 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=> 53563372115782717 + 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 => 53591696149782734 + 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=> 53559192828782714 + 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 => 53591880357782734 + 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=> 53560688416782715 + 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 => 53592077863782734 + 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=> 53576776230782725 + 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 => 53592281682782734 + 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=> 53578678514782726 + 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 => 53607679841782743 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'Agent Contact Mech Val  limit to 240 chars',
  p_validation_sequence=> 455,
  p_validation => 'if length(:P32_AGENT_CONTACT_VALUE) > 240 then'||chr(10)||
'   return ''Limit of 240 chars'';'||chr(10)||
'else'||chr(10)||
'   return null;'||chr(10)||
'end if;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_associated_item=> 53578197349782726 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53607872622782743 + 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=> 456,
  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=> 53576280567782725 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53608103087782743 + 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=> 457,
  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=> 53577301818782725 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53608276497782743 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => 'Meter Asset Provider limit to 210 chars',
  p_validation_sequence=> 458,
  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=> 53581403997782728 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53608890614782745 + 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=> 459,
  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=> 53580175820782726 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53609675062782745 + 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=> 460,
  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=> 53560201285782715 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

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

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

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

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53592904315782734 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53556604574782712 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53593102000782734 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53558188370782714 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53593275770782734 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53578197349782726 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53593473335782736 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53566083553782718 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53593703284782736 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53572776373782723 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53593873081782736 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53572303724782722 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53594091976782736 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53573299251782723 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53594281846782736 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53576280567782725 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53594502482782736 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53576776230782725 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53594676617782736 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53577301818782725 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53594871940782736 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53582882847782728 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53595103892782736 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53583372640782729 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53595280493782736 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53557179415782714 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53595479077782736 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53582402249782728 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53595693075782736 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53557681003782714 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53596075693782737 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53558683191782714 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53596287010782737 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53587788430782731 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53596500127782737 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53588172275782731 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53596694812782737 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53568600418782720 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53596886087782737 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53566596802782718 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53597099668782737 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53567103830782720 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53597274872782737 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53586774031782731 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53597486665782737 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53584584616782729 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53597678522782737 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53585079371782729 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53597891385782737 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53552680528782711 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53598079146782737 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53553181654782711 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53598278964782737 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53553692289782711 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53598481673782737 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53587993443782731 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53598675943782739 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53588379025782731 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53598888286782739 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53583886835782729 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53599080608782739 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53585604143782729 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53599291450782739 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53586088062782731 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53599492147782739 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53587277699782731 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53599672694782739 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53554202619782712 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53599890115782739 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53554672737782712 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53600090895782739 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53555174953782712 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53600297315782739 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53559674978782715 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53600480740782739 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53555690133782712 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53600700876782739 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53579198232782726 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53600877059782739 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53580902523782728 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53601099414782739 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53581403997782728 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53601292619782739 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53581897296782728 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53601490614782740 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53568091440782720 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53601702024782740 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53560201285782715 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53601888562782740 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53560688416782715 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53602086490782740 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53578678514782726 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53602288204782740 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53569073478782720 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53602489472782740 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53579676364782726 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53602698639782740 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53573998506782723 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53602886501782740 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53569576359782720 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53603099773782740 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53570073877782722 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53603289338782740 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53570587790782722 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53603490785782740 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53571078152782722 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53603676997782742 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53571586770782722 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53603885538782742 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53561399164782715 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53604076590782742 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53561901017782715 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53604287851782742 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53562901355782717 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53604476785782742 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53562381573782717 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53604696974782742 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53580681909782728 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53604887739782742 + 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_validation_condition_type=> 'NOT_DISPLAYING_INLINE_VALIDATION_ERRORS',
  p_when_button_pressed=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53580175820782726 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53605087714782742 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53563372115782717 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53605293917782742 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53559192828782714 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53605477653782742 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_validation_name => '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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53563900112782717 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53605696031782742 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53567593263782720 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53605886239782742 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53574474411782723 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53606091027782742 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53564395710782718 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

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

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

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53606698250782743 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53561195665782715 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53606874896782743 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53572102152782722 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53607097006782743 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53575182618782723 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53607292793782743 + 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=> 53548383917782708 + wwv_flow_api.g_id_offset,
  p_associated_item=> 53565380151782718 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53607481282782743 + 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 => '--Tripartite validation check'||chr(10)||
'DECLARE'||chr(10)||
'  l_tab_messages #OWNER#.mip_tripartite.t_tab_messages;'||chr(10)||
'  l_idx          pls_integer;'||chr(10)||
'  l_error_text   varchar2(2000);'||chr(10)||
'  l_supp_prty_id parties.id%type;'||chr(10)||
'  l_regi_code    regions.code%TYPE;'||chr(10)||
'BEGIN'||chr(10)||
'  --following code is change required to fix ticket #543'||chr(10)||
'  l_regi_code    := mip_regions.get_region_for_postcode(p_postcode => :P32_INSTALL_POSTCODE);'||chr(10)||
'  l_supp_prty_id := mip_enquiry.get_enquiry_role(p_enquiryid => :P32_ID,'||chr(10)||
'                                                 p_rolecode  => ''ENQ SUPP'');'||chr(10)||
'  if not mip_tripartite.enquiry_allowed(p_supp_prty_id => l_supp_prty_id,'||chr(10)||
'                                        p_enty_code    => :P32_ENTY_CODE,'||chr(10)||
'                                        p_regi_code    => l_regi_code) then'||chr(10)||
'    return ''Enquiry not allowed under current Tripartite arrangements'';'||chr(10)||
'  end if;'||chr(10)||
'  --check for tripartite addons'||chr(10)||
'  IF #OWNER#.mip_tripartite.tripartite_region(:P32_INSTALL_POSTCODE) THEN'||chr(10)||
'    l_supp_prty_id := #OWNER#.mip_enquiry.get_enquiry_role(p_enquiryid => :P32_ID,'||chr(10)||
'                                                           p_rolecode  => ''ENQ SUPP'');'||chr(10)||
'    IF NOT'||chr(10)||
'        #OWNER#.mip_tripartite.tripartite_member(p_supp_prty_id => l_supp_prty_id) AND NOT'||chr(10)||
'        #OWNER#.mip_tripartite.addons_allowed(p_amr_required    => :P32_AMR_REQUIRED,'||chr(10)||
'                                                                                                                              p_ems_required    => :P32_EMS_REQUIRED,'||chr(10)||
'                                                                                                                              p_bypass_required => :P32_BYPASS_REQUIRED,'||chr(10)||
'                                                                                                                              p_regi_code       => #OWNER#.mip_regions.get_region_for_postcode(p_postcode => :P32_INSTALL_POSTCODE),'||chr(10)||
'                                                                                                                              p_tab_messages    => l_tab_messages) THEN'||chr(10)||
'      l_idx := l_tab_messages.first;'||chr(10)||
'      loop'||chr(10)||
'        exit when l_idx is null;'||chr(10)||
'        l_error_text := l_error_text || l_tab_messages(l_idx);'||chr(10)||
'        l_idx        := l_tab_messages.next(l_idx);'||chr(10)||
'      end loop;'||chr(10)||
'      return l_error_text;'||chr(10)||
'    END IF;'||chr(10)||
'  END IF;'||chr(10)||
'END;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_validation_condition_type=> 'NOT_DISPLAYING_INLINE_VALIDATION_ERRORS',
  p_when_button_pressed=> 53548383917782708 + 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 => 53608493054782743 + 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=> 53569073478782720 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53608704317782743 + 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=> 53569576359782720 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

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

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

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 53609476795782745 + 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=> 53560688416782715 + 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     => 53610202611782745 + 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_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 53610376131782747 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 3,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET EXISTING METR CODE',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''EXISTING_METR_CODE'') = ''H'''||chr(10)||
');',
  p_process_when_type=>'FUNCTION_BODY',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 53610588488782747 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'Reset AMR',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''AMR_REQUIRED'') = ''H'''||chr(10)||
');',
  p_process_when_type=>'FUNCTION_BODY',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 53610798595782748 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'Reset Annual Quantity',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''ANNUAL_QUANTITY'') = ''H'''||chr(10)||
');',
  p_process_when_type=>'FUNCTION_BODY',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 53610986410782748 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'Reset Base Required',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''BASE_REQUIRED'') = ''H'''||chr(10)||
');',
  p_process_when_type=>'FUNCTION_BODY',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 53611196949782748 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'Reset Bypass Required',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''BYPASS_REQUIRED'') = ''H'''||chr(10)||
');',
  p_process_when_type=>'FUNCTION_BODY',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 53611402619782748 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'Reset Convertor Required',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''CONVERTOR_REQUIRED'') = ''H'''||chr(10)||
');',
  p_process_when_type=>'FUNCTION_BODY',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 53611604085782750 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'Reset DS Booster',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''DOWNSTREAM_BOOSTER_OR_COMPRESS'') = ''H'''||chr(10)||
');',
  p_process_when_type=>'FUNCTION_BODY',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 53611791527782750 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'Reset EMS required',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''EMS_REQUIRED'') = ''H'''||chr(10)||
');',
  p_process_when_type=>'FUNCTION_BODY',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 53612000131782750 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'Reset EXISTING CONVERTOR',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''EXISTING_CONVERTOR'') = ''H'''||chr(10)||
');',
  p_process_when_type=>'FUNCTION_BODY',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 53612188460782750 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET EXISTING LOGGER',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''EXISTING_LOGGER'') = ''H'''||chr(10)||
');',
  p_process_when_type=>'FUNCTION_BODY',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 53612378088782750 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET EXISTING METER OWNER',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''EXISTING_METER_OWNER'') = ''H'''||chr(10)||
');',
  p_process_when_type=>'FUNCTION_BODY',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 53612578436782751 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET EXISTING METER SERIAL NO',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''EXISTING_METER_SERIAL_NO'') = ''H'''||chr(10)||
');',
  p_process_when_type=>'FUNCTION_BODY',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 53612781958782751 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET HOUSING REQUIRED',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''HOUSING_REQUIRED'') = ''H'''||chr(10)||
');',
  p_process_when_type=>'FUNCTION_BODY',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 53612972004782751 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET LOAD CONTROL TYPE',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''LOAD_CONTROL_TYPE'') = ''H'''||chr(10)||
');',
  p_process_when_type=>'FUNCTION_BODY',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 53613185891782751 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET MPRN',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''MPRN'') = ''H'''||chr(10)||
');',
  p_process_when_type=>'FUNCTION_BODY',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 53613391252782751 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET MPRN ALT',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''MPRN_ALT'') = ''H'''||chr(10)||
');',
  p_process_when_type=>'FUNCTION_BODY',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 53613604364782751 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET REQUIRED IP DETAILS',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''REQUIRED_IP_DETAILS'') = ''H'''||chr(10)||
');',
  p_process_when_type=>'FUNCTION_BODY',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 53613781958782751 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET REQUIRED IP MBAR',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''REQUIRED_IP_MBAR'') = ''H'''||chr(10)||
');',
  p_process_when_type=>'FUNCTION_BODY',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 53613974365782751 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET REQUIRED MESC CODE',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''REQUIRED_MESC_CODE'') = ''H'''||chr(10)||
');',
  p_process_when_type=>'FUNCTION_BODY',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 53614184373782751 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET REQUIRED METERING PRESSURE',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''REQUIRED_METERING_PRESSURE'') = ''H'''||chr(10)||
');',
  p_process_when_type=>'FUNCTION_BODY',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 53614395322782751 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET REQUIRED SVCP CPDE',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''REQUIRED_SVCP_CODE'') = ''H'''||chr(10)||
');',
  p_process_when_type=>'FUNCTION_BODY',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 53614574075782751 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 5,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'RESET TWIN STREAM REQUIRED',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'return ('||chr(10)||
'mip_enquiries_helper.label_condition(:P32_ENTY_CODE, ''TWIN_STREAM_REQUIRED'') = ''H'''||chr(10)||
');',
  p_process_when_type=>'FUNCTION_BODY',
  p_process_when2=>'H',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

p:=p||'SSET_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)||
'    end if;'||chr(10)||
'   '||chr(10)||
'  end ';

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

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

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'--Used to set the agent and supplier associations by writing records to the enquiry_roles table'||chr(10)||
'declare '||chr(10)||
'  success  boolean;'||chr(10)||
'begin'||chr(10)||
'  if :P32_ID is not null then'||chr(10)||
'    if nvl(:P32_AGENT_ID,''%null%'') <> ''%null%'' then '||chr(10)||
'      success := #OWNER#.mip_enquiry.set_enquiry_role(:P32_ID,:P32_AGENT_ID,''ENQ OWN'');'||chr(10)||
'    end if;'||chr(10)||
'    --Used when an agent creates an enquiry'||chr(10)||
'    if nvl(:P32_AGENT_ID2,''%null%'') <> ''%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     => 53616585683782753 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 200,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Create ENQ OWN role',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to create enquiry, primary key error',
  p_process_when=>'mip_enquiry.get_enquiry_role(p_enquiryid => :P32_ID,'||chr(10)||
'                                          p_rolecode => ''ENQ OWN'') is null'||chr(10)||
'',
  p_process_when_type=>'PLSQL_EXPRESSION',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'--Used to set the agent and supplier associations by writing records to the enquiry_roles table'||chr(10)||
'declare '||chr(10)||
'  success boolean;'||chr(10)||
'  partyid number;'||chr(10)||
'  cursor c_partyid is SELECT prty_id FROM v_latest_rt_code_for_enro where rt_code=''ENQ OWN'' and enqu_id=:P32_ID;'||chr(10)||
''||chr(10)||
'begin'||chr(10)||
''||chr(10)||
''||chr(10)||
'    open c_partyid;'||chr(10)||
'      fetch c_partyid into partyid;'||chr(10)||
'    close c_partyid;'||chr(10)||
''||chr(10)||
'  if :P32_ID is not null then'||chr(10)||
'    if nvl(: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     => 53616783537782754 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 32,
  p_process_sequence=> 210,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Create Agent Role',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to create enquiry, primary key error',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

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

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare'||chr(10)||
'  e_rquote_error EXCEPTION;'||chr(10)||
'begin'||chr(10)||
'--check to see if we''ve already quoted (catch if the user has clicked back in the browser)'||chr(10)||
'if #OWNER#.mip_enquiry.enquiry_has_quotes(:P32_ID) then'||chr(10)||
'  raise e_rquote_error;'||chr(10)||
'else'||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'||chr(10)||
'    #OWNER#.mip_quotation.produce_quotes(:P32';

p:=p||'_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;'||chr(10)||
'end if;'||chr(10)||
'EXCEPTION'||chr(10)||
'when e_rquote_error then'||chr(10)||
'  #OWNER#.cout_err.report_and_stop(-20110);'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 53617185494782754 + 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=>53548383917782708 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

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

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

p:=p||'ETE_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     => 53617598926782756 + 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=>53548192150782708 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 53617799114782756 + 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=>53548795976782708 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

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

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

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

 
begin
 
null;
 
end;
/

 
begin
 
null;
 
end;
/

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

 
--application/pages/page_00041
prompt  ...PAGE 41: Upload File
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 41,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Upload File',
  p_step_title=> 'Upload File',
  p_step_sub_title => 'Upload File',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_role => 59152281045285598+ wwv_flow_api.g_id_offset,
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'PRIESTJ',
  p_last_upd_yyyymmddhh24miss => '20080904153038',
  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=> 69643304337854708 + 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=> 71118991564453364+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 20,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => 'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_plug_display_when_condition => 'P41_DELETE_ONLY',
  p_plug_display_when_cond2=>'YES',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'SELECT d.uri, d.id as "ID",''Delete'' as "Delete", apex_util.prepare_url(''f?p=&APP_ID.:42:&SESSION.::&DEBUG.::P41_ID:''||d.id) as url FROM documents d, document_roles dr,v_current_document_status s where (dr.enqu_id=:P41_ENQU_ID or dr.DRWG_CODE=:P41_DRWG_CODE or dr.QUTE_ID=:P41_QUTE_ID) and d.id=dr.docu_id and s.docu_id = d.id and s.dost_code = ''AVAILABLE'';';

wwv_flow_api.create_report_region (
  p_id=> 73986189974052800 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 10,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_display_when_condition=> 'if not :P41_ENQU_ID is null and :P41_DRWG_CODE is null and :P41_QUTE_ID is null then'||chr(10)||
'  return true;'||chr(10)||
'else'||chr(10)||
'  if not :P41_DRWG_CODE is null or not :P41_QUTE_ID is null and #OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'') then'||chr(10)||
'    return true;'||chr(10)||
'  else'||chr(10)||
'    return false;'||chr(10)||
'  end if;'||chr(10)||
'end if;',
  p_display_condition_type=> 'FUNCTION_BODY',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 71124395124453374+ 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_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=> 74012272864312794 + wwv_flow_api.g_id_offset,
  p_region_id=> 73986189974052800 + 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=> 74012385461312794 + wwv_flow_api.g_id_offset,
  p_region_id=> 73986189974052800 + 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=> 74012486750312794 + wwv_flow_api.g_id_offset,
  p_region_id=> 73986189974052800 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'COL03',
  p_column_display_sequence=> 3,
  p_column_heading=> '',
  p_column_link=>'javascript:var confDel = null;confDel= confirm(''Are you sure you want to delete this file'');if (confDel==true){redirect(''#COL04#'');}  else{redirect(''f?p=&APP_ID.:41:&SESSION.::&DEBUG.::'');}   ',
  p_column_linktext=>'Delete',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'NOT_EXISTS',
  p_display_when_condition=> 'select * from v_current_quote_status t where t.qust_code = ''ACCEPTED'' and t.qute_id = :P41_QUTE_ID;',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'N',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 74012595603312794 + wwv_flow_api.g_id_offset,
  p_region_id=> 73986189974052800 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'COL04',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Col04',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 69643488231854708 + 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 => 69643304337854708+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=>69645373876854711 + 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=>69643672446854708 + 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 => 69643304337854708+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=>69643877392854709 + 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 => 69643304337854708+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=>69644094433854709 + 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 => 69643304337854708+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=>69644299335854709 + 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 => 69643304337854708+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 => 71129916045453388+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=>69644503703854709 + 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 => 69643304337854708+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=>74061504433776130 + 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 => 73986189974052800+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=>74918076048606366 + 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 => 69643304337854708+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=>74935782412617644 + 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 => 73986189974052800+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'HIDDEN',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

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

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

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

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

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

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

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

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

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

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

 
--application/pages/page_00042
prompt  ...PAGE 42: Delete File
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 42,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Delete File',
  p_step_title=> 'Delete File',
  p_step_sub_title => 'Delete File',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_role => 57627572717765105+ 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=> 74102276307212716 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 74103302972220442 + 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 => 74102276307212716+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=>74095175998165338 + 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     => 74042096100623649 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 42,
  p_process_sequence=> 10,
  p_process_point=> 'BEFORE_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Delete',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to delete file',
  p_process_success_message=> 'File deleted successfully',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'This process will delete the file selected on page 41 ');
end;
null;
 
end;
/

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

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

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

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

wwv_flow_api.create_report_region (
  p_id=> 60981177153741241 + 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=> 71121389039453369+ 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=> 71124395124453374+ 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=> 60981876065741245 + wwv_flow_api.g_id_offset,
  p_region_id=> 60981177153741241 + 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=> 60981994239741245 + wwv_flow_api.g_id_offset,
  p_region_id=> 60981177153741241 + 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=> 60982076351741245 + wwv_flow_api.g_id_offset,
  p_region_id=> 60981177153741241 + 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=> 60982172761741245 + wwv_flow_api.g_id_offset,
  p_region_id=> 60981177153741241 + 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=> 60982272708741245 + wwv_flow_api.g_id_offset,
  p_region_id=> 60981177153741241 + 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=> 60982397324741245 + wwv_flow_api.g_id_offset,
  p_region_id=> 60981177153741241 + 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=> 60982496054741247 + wwv_flow_api.g_id_offset,
  p_region_id=> 60981177153741241 + 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=> 60981378725741244 + wwv_flow_api.g_id_offset,
  p_region_id=> 60981177153741241 + 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=> 60981500371741245 + wwv_flow_api.g_id_offset,
  p_region_id=> 60981177153741241 + 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=> 60981601454741245 + wwv_flow_api.g_id_offset,
  p_region_id=> 60981177153741241 + 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=> 60981689752741245 + wwv_flow_api.g_id_offset,
  p_region_id=> 60981177153741241 + 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=> 60981797895741245 + wwv_flow_api.g_id_offset,
  p_region_id=> 60981177153741241 + 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=> 67491184402496742 + wwv_flow_api.g_id_offset,
  p_region_id=> 60981177153741241 + 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             => 60982583433741247 + 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 => 60981177153741241+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image_alt=> 'Create',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:51:&SESSION.::&DEBUG.:51::',
  p_button_cattributes=>'id="create"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
null;
 
end;
/

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

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

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

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

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 60990296966759617 + 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=> 71118991564453364+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 60991073903759617 + 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 => 60990296966759617+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             => 60990503541759617 + 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 => 60990296966759617+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             => 60990700602759617 + 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 => 60990296966759617+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             => 60990890008759617 + 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 => 60990296966759617+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=>60994580264759630 + 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=>60991283529759617 + 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 => 60990296966759617+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 => 71129916045453388+wwv_flow_api.g_id_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=>60991487025759623 + 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 => 60990296966759617+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 => 71129916045453388+wwv_flow_api.g_id_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=>60991683406759623 + 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 => 60990296966759617+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 => 71129916045453388+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=>60991891295759623 + 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 => 60990296966759617+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 => 71129916045453388+wwv_flow_api.g_id_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=>60992073385759623 + 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 => 60990296966759617+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 => 71129916045453388+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=>60992293626759623 + 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 => 60990296966759617+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 => 71129916045453388+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=>60992491812759625 + 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 => 60990296966759617+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 => 71129916045453388+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=>60992679596759625 + 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 => 60990296966759617+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 => 71129916045453388+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=>60992894084759625 + 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 => 60990296966759617+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 => 71129916045453388+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=>60993072550759625 + 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 => 60990296966759617+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 => 71129916045453388+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=>60993303505759625 + 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 => 60990296966759617+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 => 71129916045453388+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=>60993485102759627 + 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 => 60990296966759617+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 => 71129916045453388+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=>67557788642829089 + 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 => 60990296966759617+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 => 71129916045453388+wwv_flow_api.g_id_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=>84811797769305569 + 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 => 60990296966759617+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 => 60993779731759627 + 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=> 60991283529759617 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 82226478294637094 + 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=> 67557788642829089 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 82227790068640436 + 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=> 60991891295759623 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 82229000804643614 + 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=> 60992073385759623 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 82230477386646260 + 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=> 60993485102759627 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 82232089160649713 + 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=> 60992293626759623 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 82233676824655533 + 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=> 60992491812759625 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 82234685828658205 + 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=> 60992679596759625 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 82235694140660583 + 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=> 60992894084759625 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 82236702451662947 + 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=> 60993072550759625 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 82238577648665320 + 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=> 60993303505759625 + 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     => 60993889388759627 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 51,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'DML_FETCH_ROW',
  p_process_name=> 'Fetch Row from BASES',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to fetch row.',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

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

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

wwv_flow_api.create_page_process(
  p_id     => 60994282076759630 + 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=>60990503541759617 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

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

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

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

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

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

wwv_flow_api.create_report_region (
  p_id=> 61013080756890462 + 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=> 71121389039453369+ 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=> 71124395124453374+ 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=> 61013298591890462 + wwv_flow_api.g_id_offset,
  p_region_id=> 61013080756890462 + 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=> 61013403145890462 + wwv_flow_api.g_id_offset,
  p_region_id=> 61013080756890462 + 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_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             => 61013479402890462 + 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 => 61013080756890462+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image_alt=> 'Create',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:53:&SESSION.::&DEBUG.:53::',
  p_button_cattributes=>'id="create"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
null;
 
end;
/

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

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

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

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

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 61016675021898611 + 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=> 71118991564453364+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 61017489244898611 + 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 => 61016675021898611+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             => 61016883791898611 + 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 => 61016675021898611+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             => 61017074239898611 + 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 => 61016675021898611+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             => 61017272187898611 + 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 => 61016675021898611+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             => 70179303196234411 + 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 => 61016675021898611+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=>61018993462898614 + 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=>70179580963234414 + 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=>70179303196234411+ 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=>61017675042898611 + 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 => 61016675021898611+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 => 71129916045453388+wwv_flow_api.g_id_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=>61017898108898612 + 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 => 61016675021898611+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 => 71129916045453388+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=>84858496093409097 + 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 => 61016675021898611+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 => 61018179729898612 + 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=> 61017675042898611 + 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     => 61018691004898614 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 53,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'DML_FETCH_ROW',
  p_process_name=> 'Fetch Row from DRAWINGS',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to fetch row.',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

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

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

wwv_flow_api.create_page_process(
  p_id     => 61018493343898614 + 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=>61016883791898611 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

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

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

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

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

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select HOU.CODE, '||chr(10)||
'HOU.DRWG_CODE,'||chr(10)||
'HOU.HOTY_CODE,'||chr(10)||
'PRTY.NAME,'||chr(10)||
'HOU.DESCRIPTION,'||chr(10)||
'HOU.DIM_L,'||chr(10)||
'HOU.DIM_W,'||chr(10)||
'HOU.DIM_H,'||chr(10)||
'HOU.WEIGHT'||chr(10)||
'from HOUSINGS HOU, PARTIES PRTY'||chr(10)||
'where PRTY.ID = HOU.PRTY_ID'||chr(10)||
'and PRTY.PRTY_TYPE = ''MANU'''||chr(10)||
''||chr(10)||
'  '||chr(10)||
'';

wwv_flow_api.create_report_region (
  p_id=> 61027484997038808 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 10,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 71124395124453374+ 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=> 61028481649038809 + wwv_flow_api.g_id_offset,
  p_region_id=> 61027484997038808 + 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=> 61027776363038809 + wwv_flow_api.g_id_offset,
  p_region_id=> 61027484997038808 + 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=> 61027898203038809 + wwv_flow_api.g_id_offset,
  p_region_id=> 61027484997038808 + 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=>55859492814472077 + 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=> 61027676413038809 + wwv_flow_api.g_id_offset,
  p_region_id=> 61027484997038808 + 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=> 61027999249038809 + wwv_flow_api.g_id_offset,
  p_region_id=> 61027484997038808 + 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=> 61028096234038809 + wwv_flow_api.g_id_offset,
  p_region_id=> 61027484997038808 + 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=> 61028178218038809 + wwv_flow_api.g_id_offset,
  p_region_id=> 61027484997038808 + 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=> 61028275880038809 + wwv_flow_api.g_id_offset,
  p_region_id=> 61027484997038808 + 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=> 61028394935038809 + wwv_flow_api.g_id_offset,
  p_region_id=> 61027484997038808 + 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             => 61028587605038809 + 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 => 61027484997038808+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image_alt=> 'Create',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:55:&SESSION.::&DEBUG.:55:P55_CREATEUPDATE:CREATE',
  p_button_cattributes=>'id="create"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
null;
 
end;
/

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

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

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

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

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 61032395657054611 + 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=> 71118991564453364+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 61032586379054619 + 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 => 61032395657054611+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             => 61032774592054622 + 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 => 61032395657054611+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             => 61033001929054622 + 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 => 61032395657054611+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             => 61033183595054622 + 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 => 61032395657054611+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=>61037289861054650 + 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=>61033399230054622 + 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 => 61032395657054611+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 => 71130096047453389+wwv_flow_api.g_id_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=>61033601826054628 + 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 => 61032395657054611+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 => 71130096047453389+wwv_flow_api.g_id_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=>61033789984054628 + 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 => 61032395657054611+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 => 71130096047453389+wwv_flow_api.g_id_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=>61033973100054628 + 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 => 61032395657054611+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 => 71130096047453389+wwv_flow_api.g_id_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=>61034174488054630 + 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 => 61032395657054611+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 => 71130096047453389+wwv_flow_api.g_id_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=>61034388297054630 + 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 => 61032395657054611+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 => 71130096047453389+wwv_flow_api.g_id_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=>61034600736054630 + 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 => 61032395657054611+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 => 71130096047453389+wwv_flow_api.g_id_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=>61034780199054631 + 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 => 61032395657054611+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 => 71130096047453389+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=>61034984217054631 + 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 => 61032395657054611+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 => 71130096047453389+wwv_flow_api.g_id_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=>84711103882023452 + 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 => 61032395657054611+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 => 76982680788991981 + 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=> 61033973100054628 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61036473108054642 + 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=> 61034174488054630 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61035297615054633 + 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=> 61034388297054630 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61035481970054642 + 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=> 61034600736054630 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61035674508054642 + 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=> 61034984217054631 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61035900183054642 + 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=> 61033399230054622 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61036075094054642 + 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=> 61033601826054628 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61036298816054642 + 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=> 61033789984054628 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 67183189648307858 + 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=> 61034984217054631 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 67184200037310774 + 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=> 61033399230054622 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 67185678005313913 + 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=> 61033601826054628 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 67187187701316691 + 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=> 61033789984054628 + 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     => 61036988384054650 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 55,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'DML_FETCH_ROW',
  p_process_name=> 'Fetch Row from HOUSINGS',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to fetch row.',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

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

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

wwv_flow_api.create_page_process(
  p_id     => 61036800898054650 + 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=>61032774592054622 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

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

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

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

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

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select "CODE", '||chr(10)||
'"METR_CODE",'||chr(10)||
'"REVA_CODE",'||chr(10)||
'"SLVA_CODE",'||chr(10)||
'"SVCP_CODE",'||chr(10)||
'"REGU_CODE",'||chr(10)||
'"FLTR_CODE"'||chr(10)||
'from "#OWNER#"."MODULES" '||chr(10)||
'  '||chr(10)||
'';

wwv_flow_api.create_report_region (
  p_id=> 61053399944079420 + 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=> 71121389039453369+ 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=> 71124395124453374+ 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=> 61053590822079422 + wwv_flow_api.g_id_offset,
  p_region_id=> 61053399944079420 + 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=> 61053673471079422 + wwv_flow_api.g_id_offset,
  p_region_id=> 61053399944079420 + 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=> 61053790356079422 + wwv_flow_api.g_id_offset,
  p_region_id=> 61053399944079420 + 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=> 61053893451079425 + wwv_flow_api.g_id_offset,
  p_region_id=> 61053399944079420 + 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=> 61053979044079425 + wwv_flow_api.g_id_offset,
  p_region_id=> 61053399944079420 + 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=>55965278556395670 + 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=> 61054073344079425 + wwv_flow_api.g_id_offset,
  p_region_id=> 61053399944079420 + 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=> 61054186404079425 + wwv_flow_api.g_id_offset,
  p_region_id=> 61053399944079420 + 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             => 61054291919079425 + 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 => 61053399944079420+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image_alt=> 'Create',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:57:&SESSION.::&DEBUG.:57:P57_CREATEUPDATE:CREATE',
  p_button_cattributes=>'id="create"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
null;
 
end;
/

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

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

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

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

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 61057991874090783 + 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=> 71118991564453364+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 81824304053885869 + 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=> 71118991564453364+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 20,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 81826197604893513 + 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=> 71118991564453364+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 30,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 81826874186896195 + 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=> 71118991564453364+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 40,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 61058177274090783 + 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 => 81826874186896195+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             => 61058398325090783 + 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 => 81826874186896195+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             => 61058597193090784 + 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 => 81826874186896195+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             => 61058775520090784 + 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 => 81826874186896195+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=>61071198926090800 + 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=>61058982450090784 + 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 => 61057991874090783+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 => 71130096047453389+wwv_flow_api.g_id_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=>61059190378090786 + 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 => 81826874186896195+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 => 71130096047453389+wwv_flow_api.g_id_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=>61059401143090786 + 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 => 81826197604893513+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 => 71130096047453389+wwv_flow_api.g_id_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=>61059593170090787 + 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 => 61057991874090783+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 => 71130096047453389+wwv_flow_api.g_id_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=>61059786285090787 + 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 => 81824304053885869+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 => 71130096047453389+wwv_flow_api.g_id_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=>61059975778090787 + 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 => 81824304053885869+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Relief Valve',
  p_source=>'REVA_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'RELIEFVALVES',
  p_lov => 'select code display_value, code return_value '||chr(10)||
'from relief_valves'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not Assigned',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>61060178015090787 + 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 => 81824304053885869+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Slamshut Valve',
  p_source=>'SLVA_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'SLAMSHUTVALVES',
  p_lov => 'select code display_value, code return_value '||chr(10)||
'from slamshut_valves'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not Assigned',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>61060397600090787 + 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 => 61057991874090783+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Service Pressure',
  p_source=>'SVCP_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'SERVICEPRESSURES',
  p_lov => 'select description d, code r'||chr(10)||
'from   service_pressures',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not Assigned',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 71130096047453389+wwv_flow_api.g_id_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=>61060575741090789 + 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 => 61057991874090783+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 => 71130096047453389+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=>61060995189090789 + 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 => 81826197604893513+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 => 71130096047453389+wwv_flow_api.g_id_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=>61061173251090789 + 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 => 81826197604893513+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 => 71130096047453389+wwv_flow_api.g_id_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=>61061385296090789 + 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 => 81826874186896195+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 => 71130096047453389+wwv_flow_api.g_id_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=>61061604374090789 + 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 => 81826874186896195+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 => 71130096047453389+wwv_flow_api.g_id_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=>61061790629090789 + 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 => 81826874186896195+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 => 71130096047453389+wwv_flow_api.g_id_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=>61061975939090789 + 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 => 81824304053885869+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 => 71129916045453388+wwv_flow_api.g_id_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=>61062175294090789 + 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 => 81824304053885869+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 => 71129916045453388+wwv_flow_api.g_id_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=>61062379018090789 + 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 => 61057991874090783+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 => 71130096047453389+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=>61062590596090789 + 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 => 61057991874090783+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 => 71130096047453389+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=>61062799828090791 + 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 => 61057991874090783+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 => 71130096047453389+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=>61062992466090791 + 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 => 61057991874090783+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 => 71129916045453388+wwv_flow_api.g_id_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=>61063190058090791 + 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 => 61057991874090783+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 => 71129916045453388+wwv_flow_api.g_id_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=>61063374135090791 + 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 => 61057991874090783+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 => 71130096047453389+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=>61063598321090791 + 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 => 61057991874090783+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 => 71130096047453389+wwv_flow_api.g_id_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=>61063801303090791 + 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 => 61057991874090783+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 => 71129916045453388+wwv_flow_api.g_id_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=>61063987194090791 + 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 => 81824304053885869+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Regulator',
  p_source=>'REGU_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'REGULATORS',
  p_lov => 'select description display_value, code return_value '||chr(10)||
'from regulators'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not Assigned',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 71130096047453389+wwv_flow_api.g_id_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=>61064193634090791 + 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 => 81824304053885869+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Filter',
  p_source=>'FLTR_CODE',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'COMBOBOX',
  p_named_lov=> 'FILTERS',
  p_lov => 'select code x, code y'||chr(10)||
'from filters'||chr(10)||
'order by 1',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'Not Assigned',
  p_lov_null_value=> '',
  p_cSize=> 32,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 71130096047453389+wwv_flow_api.g_id_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=>61064375930090791 + 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 => 81826197604893513+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 => 71130096047453389+wwv_flow_api.g_id_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=>61064603748090792 + 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 => 81826874186896195+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 => 71130096047453389+wwv_flow_api.g_id_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=>61064787019090792 + 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 => 61057991874090783+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 => 71130096047453389+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=>67554002578814174 + 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 => 61057991874090783+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 => 71129916045453388+wwv_flow_api.g_id_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=>82101380925202497 + 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 => 61057991874090783+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 => 71130096047453389+wwv_flow_api.g_id_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=>83097903532260558 + 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 => 61057991874090783+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Dim F (mm)',
  p_source=>'DIM_F',
  p_source_type=> 'DB_COLUMN',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 22,
  p_cMaxlength=> 22,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>84768572133222403 + 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 => 61057991874090783+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 => 61065599722090794 + 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=> 61059190378090786 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61065386251090794 + 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=> 61059401143090786 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61065789871090795 + 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=> 61059593170090787 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61065996720090795 + 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=> 61059786285090787 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61066604027090797 + 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=> 61060397600090787 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61066789406090797 + 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=> 61060575741090789 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61067195233090797 + 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=> 61060995189090789 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61067387779090797 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_INLET_SIZE',
  p_validation_sequence=> 12,
  p_validation => 'P57_INLET_SIZE',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Inlet Size must be a numeric value',
  p_associated_item=> 61061173251090789 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61067589043090797 + 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=> 61061385296090789 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61067773662090797 + 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=> 61061604374090789 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61068001815090797 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_OUTLET_SIZE ',
  p_validation_sequence=> 15,
  p_validation => 'P57_OUTLET_SIZE',
  p_validation_type => 'ITEM_IS_NUMERIC',
  p_error_message => 'Outlet Size must be a numeric value',
  p_associated_item=> 61061790629090789 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61068195090090798 + 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=> 61062379018090789 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61068397087090798 + 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=> 61062590596090789 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61068586432090798 + 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=> 61062799828090791 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61069204054090798 + 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=> 61063374135090791 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61069398729090798 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_VALID_FROM not null',
  p_validation_sequence=> 24,
  p_validation => 'P57_VALID_FROM',
  p_validation_type => 'ITEM_IS_DATE',
  p_error_message => 'Valid From must have some value.',
  p_associated_item=> 61063598321090791 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61069602993090798 + 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=> 61063987194090791 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61069801655090798 + 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=> 61064193634090791 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61069989696090798 + 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=> 61064375930090791 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61070175773090798 + 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=> 61064603748090792 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 61070374512090798 + 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=> 61064787019090792 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 82375798584958220 + 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=> 61058982450090784 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 82381675297970417 + 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=> 82101380925202497 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 83089986086246077 + 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=> 61062379018090789 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 83091593704248306 + 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=> 61062590596090789 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 83093202362250822 + 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=> 61062799828090791 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 83094379983253819 + 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=> 61062992466090791 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 83095790026256695 + 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=> 61063190058090791 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 83103302624269758 + 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=> 83097903532260558 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 83104480591272842 + 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=> 61063374135090791 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 83122795829277314 + 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=> 61060575741090789 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 83127675528280874 + 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=> 82101380925202497 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 83136089034284786 + 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=> 61060995189090789 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 83140799769287894 + 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=> 61061604374090789 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 83142984316292911 + 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=> 61061385296090789 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 46002676458256290 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_VALID_FROM not null',
  p_validation_sequence=> 179,
  p_validation => 'P57_VALID_FROM',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Valid From must have some value.',
  p_associated_item=> 61063598321090791 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 83148385964312228 + 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=> 61063598321090791 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 83149399816316236 + 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=> 61063801303090791 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 83151199601325711 + 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 => 83152080339329561 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'VALID_TO_GTE_VALID_FROM',
  p_validation_sequence=> 210,
  p_validation => 'BEGIN'||chr(10)||
'IF :P57_VALID_FROM is NULL and :P57_VALID_TO is not NULL then'||chr(10)||
' RETURN ''Cannot enter Valid To without Valid From'';'||chr(10)||
'ELSIF :P57_VALID_FROM IS NOT NULL AND :P57_VALID_TO IS NOT NULL THEN'||chr(10)||
'  IF to_date(:P57_VALID_FROM,''DD/MM/YYYY'') > to_date(:P57_VALID_TO,''DD/MM/YYYY'') THEN'||chr(10)||
'    RETURN ''Valid To must be after Valid From'';'||chr(10)||
'  END IF;'||chr(10)||
'END IF;'||chr(10)||
'RETURN NULL;'||chr(10)||
'END;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 44851080737209695 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_INLET_SIZE',
  p_validation_sequence=> 220,
  p_validation => 'P57_INLET_SIZE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_associated_item=> 61061173251090789 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 44851290433212528 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 57,
  p_validation_name => 'P57_OUTLET_SIZE',
  p_validation_sequence=> 230,
  p_validation => 'P57_OUTLET_SIZE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_associated_item=> 61061790629090789 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

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

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

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

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

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

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

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

wwv_flow_api.create_page_process(
  p_id     => 61070888133090800 + 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=>61058398325090783 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

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

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select enty_code, mety_code, svcpt_code, document_position, sort_order, text, id from caveat_texts order by 1,2,3,4,5';

wwv_flow_api.create_report_region (
  p_id=> 67681276599155399 + 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=> 71121389039453369+ 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=> 71124395124453374+ 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=> 67681578640155402 + wwv_flow_api.g_id_offset,
  p_region_id=> 67681276599155399 + 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=> 67681679723155402 + wwv_flow_api.g_id_offset,
  p_region_id=> 67681276599155399 + 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=> 67681798537155402 + wwv_flow_api.g_id_offset,
  p_region_id=> 67681276599155399 + 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=> 67681875639155402 + wwv_flow_api.g_id_offset,
  p_region_id=> 67681276599155399 + 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=> 67682000725155402 + wwv_flow_api.g_id_offset,
  p_region_id=> 67681276599155399 + 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=> 67682100460155402 + wwv_flow_api.g_id_offset,
  p_region_id=> 67681276599155399 + 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=> 67698978429282017 + wwv_flow_api.g_id_offset,
  p_region_id=> 67681276599155399 + 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=> 67681486991155402 + wwv_flow_api.g_id_offset,
  p_region_id=> 67681276599155399 + 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             => 67682390493155402 + 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 => 67681276599155399+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=>67682682637155405 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 58,
  p_branch_action=> 'f?p=&APP_ID.:58:&SESSION.::&DEBUG.::F155_PREVIOUS_PAGE:58&success_msg=#SUCCESS_MSG#',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_sequence=> 20,
  p_branch_comment=> 'Created 20-NOV-2007 14:56 by MULLENM');
 
 
end;
/

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

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

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

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

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 67687088423246680 + 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=> 71118991564453364+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 67687697108246680 + 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 => 67687088423246680+wwv_flow_api.g_id_offset,
  p_button_name    => 'SAVE',
  p_button_image   => 'template:'||to_char(71130218387453389+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             => 67687299785246680 + 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 => 67687088423246680+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image   => 'template:'||to_char(71130218387453389+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             => 67687896638246680 + 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 => 67687088423246680+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image   => 'template:'||to_char(71130218387453389+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             => 67687491428246680 + 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 => 67687088423246680+wwv_flow_api.g_id_offset,
  p_button_name    => 'DELETE',
  p_button_image   => 'template:'||to_char(71130218387453389+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=>67691574468246689 + 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=>67688091706246680 + 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 => 67687088423246680+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 => 71129916045453388+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=>67688289688246683 + 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 => 67687088423246680+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 => 71130096047453389+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=>67688495475246683 + 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 => 67687088423246680+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 => 71130096047453389+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=>67688684066246683 + 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 => 67687088423246680+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 => 71130096047453389+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=>67688882503246683 + 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 => 67687088423246680+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(67691677367246691 + 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 => 71130096047453389+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=>67689078132246683 + 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 => 67687088423246680+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 => 71130096047453389+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=>67689301837246683 + 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 => 67687088423246680+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 => 71130096047453389+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 => 67689797416246684 + 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=> 67688289688246683 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 67689986746246684 + 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=> 67688495475246683 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 67690173678246684 + 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=> 67688684066246683 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 67690377630246684 + 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=> 67688882503246683 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 67689601948246684 + 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=> 67689078132246683 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 67690604191246684 + 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=> 67689301837246683 + 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     => 67690671915246684 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 59,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'DML_FETCH_ROW',
  p_process_name=> 'Fetch Row from CAVEAT_TEXTS',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to fetch row.',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 67690883129246688 + 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=>67687896638246680 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

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

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

wwv_flow_api.create_page_process(
  p_id     => 67691286661246688 + 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=>67687491428246680 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

 
--application/pages/page_00060
prompt  ...PAGE 60: Manage Parties
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 60,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Manage Parties',
  p_step_title=> 'Manage Parties',
  p_step_sub_title => 'Manage Parties',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 71710475144439027+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'PRIESTJ',
  p_last_upd_yyyymmddhh24miss => '20080402104353',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 63942489251344827 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 63942692776344830 + 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 => 63942489251344827+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE_NEW_PARTY',
  p_button_image   => 'template:'||to_char(71130218387453389+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Create New Party',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:61:&SESSION.::&DEBUG.:61,62,63,64::',
  p_button_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''useradmin'')',
  p_button_condition_type=> 'PLSQL_EXPRESSION',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_page_button(
  p_id             => 63942886094344830 + 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 => 63942489251344827+wwv_flow_api.g_id_offset,
  p_button_name    => 'EDIT_PARTIES',
  p_button_image   => 'template:'||to_char(71130218387453389+wwv_flow_api.g_id_offset),
  p_button_image_alt=> 'Edit Party',
  p_button_position=> 'BOTTOM',
  p_button_alignment=> 'RIGHT',
  p_button_redirect_url=> 'f?p=&APP_ID.:65:&SESSION.::&DEBUG.:::',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

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

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

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

ph := null;
wwv_flow_api.create_page(
  p_id     => 61,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Create Party',
  p_step_title=> 'Create Party',
  p_step_sub_title => 'Create Party',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 71710475144439027+ wwv_flow_api.g_id_offset,
  p_help_text => ' ',
  p_html_page_header => '',
  p_step_template => '',
  p_required_role => 57627572717765105+ wwv_flow_api.g_id_offset,
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'MULLENM',
  p_last_upd_yyyymmddhh24miss => '20080402093146',
  p_page_is_public_y_n=> 'N',
  p_protection_level=> 'N',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>61,p_text=>h);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 63946286702348441 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 20,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => 'ITEM_IS_NOT_NULL',
  p_plug_display_when_condition => 'P61_PRTY_TYPE',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 63946497120348441 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 63946673247348442 + 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 => 63946286702348441+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image   => 'template:'||to_char(71130218387453389+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             => 63946882407348442 + 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 => 63946286702348441+wwv_flow_api.g_id_offset,
  p_button_name    => 'NEXT',
  p_button_image   => 'template:'||to_char(71130218387453389+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=>63957785925348453 + 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=>63946882407348442+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 20,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>63957981223348453 + 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=>63947085638348442 + 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 => 63946286702348441+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(60491202926334148 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 3,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>63947299223348442 + 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 => 63946286702348441+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Name',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) in (''MANU'',''MKTP'',''IO'',''EO'',''ORG'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+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=>63947780955348444 + 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 => 63946286702348441+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Manufacturer Reference',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) = ''MANU'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+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=>63948274312348444 + 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 => 63946286702348441+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Description',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXTAREA_CHAR_COUNT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 60,
  p_cMaxlength=> 255,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 2,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) = ''MANU'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+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=>63948793393348445 + 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 => 63946286702348441+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Market Participant Reference',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+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=>63949295229348445 + 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 => 63946286702348441+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'LT 7B Contract Reference',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 25,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>63949502316348445 + 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 => 63946286702348441+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'GT 7B Contract Reference',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 25,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>63949691850348445 + 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 => 63946497120348441+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(62231788486753283 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'- Select Party Type -',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'if not mip_parties.get_user_role(:APP_USER) = ''MIPADMIN'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_read_only_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+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=>63950199073348445 + 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 => 63946286702348441+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Repeat Password',
  p_source_type=> 'STATIC',
  p_display_as=> 'PASSWORD',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 255,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) in (''PERS'',''EMP'',''NEMP'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>63950385397348445 + 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 => 63946286702348441+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=>63950572860348445 + 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 => 63946286702348441+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Password',
  p_source_type=> 'STATIC',
  p_display_as=> 'PASSWORD',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 255,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) IN (''PERS'',''EMP'',''NEMP'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>63950784565348445 + 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 => 63946286702348441+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(55828074497351617 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 3,
  p_cHeight=> 5,
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) IN (''PERS'',''EMP'',''NEMP'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>63950990134348447 + 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 => 63946286702348441+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Adversarial Contract Reference',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 25,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>63951171920348447 + 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 => 63946286702348441+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Username',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 80,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) IN (''PERS'',''EMP'',''NEMP'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+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=>63951682709348447 + 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 => 63946286702348441+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'First Name',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 80,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) IN (''PERS'',''EMP'',''NEMP'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+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=>63952177726348447 + 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 => 63946286702348441+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Last Name',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 80,
  p_cHeight=> 5,
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) IN (''PERS'',''EMP'',''NEMP'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+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=>63952673121348447 + 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 => 63946286702348441+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Title',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 6,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) IN (''PERS'',''EMP'',''NEMP'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+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=>63953187965348449 + 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 => 63946286702348441+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Comments',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXTAREA_CHAR_COUNT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 60,
  p_cMaxlength=> 255,
  p_cHeight=> 5,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 3,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) IN (''PERS'',''EMP'',''NEMP'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+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=>63953680094348449 + 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 => 63946286702348441+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Shortcode',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 3,
  p_cMaxlength=> 3,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P61_PRTY_TYPE) = ''MKTP'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_field_template => 71129916045453388+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 => 63953990367348449 + 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=> 63946882407348442 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63951171920348447 + 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 => 63954195850348449 + 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=> 63946882407348442 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63947299223348442 + 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 => 63954376709348449 + 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=> 63946882407348442 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63948793393348445 + 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 => 63954596789348449 + 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=> 63946882407348442 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63952673121348447 + 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 => 63954772770348450 + 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=> 63946882407348442 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63947780955348444 + 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 => 63954986422348450 + 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=> 63946882407348442 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63949295229348445 + 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 => 63955195964348450 + 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=> 63946882407348442 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63951682709348447 + 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 => 63955401546348450 + 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=> 63946882407348442 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63948274312348444 + 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 => 63955572458348452 + 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=> 63946882407348442 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63949502316348445 + 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 => 63955779015348452 + 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=> 63946882407348442 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63952177726348447 + 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 => 63955993364348452 + 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=> 63946882407348442 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63950990134348447 + 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 => 63956172985348452 + 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=> 63946882407348442 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63950572860348445 + 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 => 63956378048348452 + 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=> 63946882407348442 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63951171920348447 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 63956596305348452 + 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=> 63946882407348442 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63950572860348445 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 63956785311348452 + 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=> 63946882407348442 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63950572860348445 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 63956976598348453 + 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=> 63946882407348442 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63950572860348445 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 63957193044348453 + 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=> 63946882407348442 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63950572860348445 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 63957375317348453 + 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=> 63946882407348442 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63950572860348445 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 63957582246348453 + 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=> 63946882407348442 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63950199073348445 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 82869800538143188 + 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=> 63946882407348442 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63953680094348449 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 82873297337161122 + 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=> 63946882407348442 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63947085638348442 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 82875795652188991 + 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=> 63946882407348442 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63947299223348442 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 82974977148722991 + 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=> 63946882407348442 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63950990134348447 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'begin'||chr(10)||
'  if not mip_parties.get_user_role(:APP_USER) = ''MIPADMIN'' then '||chr(10)||
'     :P61_PRTY_TYPE := ''PERS'';'||chr(10)||
'  end if; '||chr(10)||
'end;';

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

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

 
--application/pages/page_00062
prompt  ...PAGE 62: Assign Party Role
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph := null;
wwv_flow_api.create_page(
  p_id     => 62,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Assign Party Role',
  p_step_title=> 'Assign Party Role',
  p_step_sub_title => 'Assign Party Role',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 71710475144439027+ 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 => '20080613155409',
  p_page_is_public_y_n=> 'N',
  p_protection_level=> 'N',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>62,p_text=>h);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 64027873980381813 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 64028102841381813 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 20,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 64028296050381814 + 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 => 64027873980381813+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image   => 'template:'||to_char(71130218387453389+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             => 64028473693381814 + 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 => 64027873980381813+wwv_flow_api.g_id_offset,
  p_button_name    => 'NEXT',
  p_button_image   => 'template:'||to_char(71130218387453389+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             => 64028679093381814 + 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 => 64027873980381813+wwv_flow_api.g_id_offset,
  p_button_name    => 'PREVIOUS',
  p_button_image   => 'template:'||to_char(71130218387453389+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=>64031400142381819 + 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=>64028473693381814+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 20,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>64031577374381819 + 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=>64031789421381819 + 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=>64028679093381814+ 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=>64028900578381814 + 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 => 64027873980381813+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 => 71129916045453388+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=>64029392518381814 + 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 => 64027873980381813+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 => 71129916045453388+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=>64029894431381814 + 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 => 64027873980381813+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Party Role',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX_WITH_SUBMIT',
  p_named_lov=> 'PRTY_ROLES',
  p_lov => 'BEGIN'||chr(10)||
'  IF mip_parties.get_user_role(:app_user) = ''MIPADMIN'' THEN'||chr(10)||
'    IF :p61_prty_type = ''MKTP'' THEN'||chr(10)||
'      RETURN ''SELECT ''''Gas supplier'''' display_value, ''''SUPP'''' return_value'||chr(10)||
'          from dual'';'||chr(10)||
'    ELSIF :p61_prty_type = ''MANU'' THEN'||chr(10)||
'      RETURN ''SELECT ''''External organization'''' display_value, ''''EXTORG'''' return_value'||chr(10)||
'          from dual'';'||chr(10)||
'    ELSE'||chr(10)||
'      RETURN ''select DESCRIPTION display_value, CODE return_value '||chr(10)||
'              from ROLE_TYPES'||chr(10)||
'             where upper(rt_type) = ''''PRT'''''||chr(10)||
'             and not upper(code) in (''''EXTORG'''',''''SUPP'''')'||chr(10)||
'             order by 1'';'||chr(10)||
'    END IF;'||chr(10)||
'  ELSE'||chr(10)||
'    RETURN ''SELECT ''''Agent'''' display_value, ''''AGENT'''' return_value'||chr(10)||
'          from dual'';'||chr(10)||
'  END IF;'||chr(10)||
''||chr(10)||
'END;',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'- Select Role -',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 71130096047453389+wwv_flow_api.g_id_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=>64030081970381814 + 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 => 64028102841381813+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Phone',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 240,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>64030287094381816 + 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 => 64028102841381813+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Fax',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 240,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>64030500025381816 + 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 => 64028102841381813+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Mobile',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 240,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>64030674917381816 + 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 => 64028102841381813+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Email',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 240,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>64030879339381819 + 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 => 64027873980381813+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 => 71129916045453388+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 => 64031198254381819 + 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=> 64028473693381814 + wwv_flow_api.g_id_offset,
  p_associated_item=> 64028900578381814 + 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 => 64083781571669349 + 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=> 64028473693381814 + wwv_flow_api.g_id_offset,
  p_associated_item=> 64030081970381814 + 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 => 64083991501669350 + 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=> 64028473693381814 + wwv_flow_api.g_id_offset,
  p_associated_item=> 64030674917381816 + 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 => 78612697179898822 + 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=> 64028473693381814 + wwv_flow_api.g_id_offset,
  p_associated_item=> 64029894431381814 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 78723789166218283 + 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=> 64028473693381814 + wwv_flow_api.g_id_offset,
  p_associated_item=> 64030879339381819 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 87656372120109867 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 62,
  p_validation_name => 'P62_PHONE is valid',
  p_validation_sequence=> 62,
  p_validation => 'P62_PHONE',
  p_validation2 => '^((\(?0\d{4}\)?\s*\d{3}\s*\d{3})|(\(?0\d{3}\)?\s*\d{3}\s*\d{4})|(\(?0\d{2}\)?\s*\d{4}\s*\d{4}))(\s*\#(\d{4}|\d{3}))?$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Phone number format not recognized.'||chr(10)||
'e.g (01234) 567890',
  p_when_button_pressed=> 64028473693381814 + wwv_flow_api.g_id_offset,
  p_associated_item=> 64030081970381814 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 87657883548113183 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 62,
  p_validation_name => 'P62_FAX is valid',
  p_validation_sequence=> 72,
  p_validation => 'P62_FAX',
  p_validation2 => '^((\(?0\d{4}\)?\s*\d{3}\s*\d{3})|(\(?0\d{3}\)?\s*\d{3}\s*\d{4})|(\(?0\d{2}\)?\s*\d{4}\s*\d{4}))(\s*\#(\d{4}|\d{3}))?$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Phone number format not recognized.'||chr(10)||
'e.g (01234) 567890',
  p_when_button_pressed=> 64028473693381814 + wwv_flow_api.g_id_offset,
  p_associated_item=> 64030287094381816 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 87658792205115667 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 62,
  p_validation_name => 'P62_MOBILE is valid',
  p_validation_sequence=> 82,
  p_validation => 'P62_MOBILE',
  p_validation2 => '^((\(?0\d{4}\)?\s*\d{3}\s*\d{3})|(\(?0\d{3}\)?\s*\d{3}\s*\d{4})|(\(?0\d{2}\)?\s*\d{4}\s*\d{4}))(\s*\#(\d{4}|\d{3}))?$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Phone number format not recognized.'||chr(10)||
'e.g (01234) 567890',
  p_when_button_pressed=> 64028473693381814 + wwv_flow_api.g_id_offset,
  p_associated_item=> 64030500025381816 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 87660402033127927 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 62,
  p_validation_name => 'P62_EMAIL is valid',
  p_validation_sequence=> 92,
  p_validation => 'P62_EMAIL',
  p_validation2 => '^([a-zA-Z0-9_\-\.&+-]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Invalid email address.',
  p_when_button_pressed=> 64028473693381814 + wwv_flow_api.g_id_offset,
  p_associated_item=> 64030674917381816 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

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

 
--application/pages/page_00063
prompt  ...PAGE 63: Party Contact Details
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph := null;
wwv_flow_api.create_page(
  p_id     => 63,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Party Contact Details',
  p_step_title=> 'Party Contact Details',
  p_step_sub_title => 'Party Contact Details',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 71710475144439027+ wwv_flow_api.g_id_offset,
  p_help_text => ' ',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'PRIESTJ',
  p_last_upd_yyyymmddhh24miss => '20080229134330',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>63,p_text=>h);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 63963073302351941 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 63963278589351941 + 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 => 63963073302351941+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image   => 'template:'||to_char(71130218387453389+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             => 63963482602351942 + 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 => 63963073302351941+wwv_flow_api.g_id_offset,
  p_button_name    => 'NEXT',
  p_button_image   => 'template:'||to_char(71130218387453389+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             => 63963687380351942 + 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 => 63963073302351941+wwv_flow_api.g_id_offset,
  p_button_name    => 'PREVIOUS',
  p_button_image   => 'template:'||to_char(71130218387453389+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=>63965980286351945 + 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=>63963482602351942+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 1,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>63966183986351945 + 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=>63965281058351944+ 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=>63966395295351945 + 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=>63963687380351942+ 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=>63963891918351942 + 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 => 63963073302351941+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Office Address Code',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 71130096047453389+wwv_flow_api.g_id_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=>63964101131351942 + 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 => 63963073302351941+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Sub-Building',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>63964279439351942 + 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 => 63963073302351941+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Building',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 1,
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>63964472258351944 + 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 => 63963073302351941+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Street',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 60,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 71130096047453389+wwv_flow_api.g_id_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=>63964703860351944 + 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 => 63963073302351941+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Town/City',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 71130096047453389+wwv_flow_api.g_id_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=>63964872104351944 + 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 => 63963073302351941+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Postcode',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 8,
  p_cHeight=> 1,
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 71130096047453389+wwv_flow_api.g_id_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=>63965090408351944 + 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 => 63963073302351941+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 => 71129916045453388+wwv_flow_api.g_id_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=>63965281058351944 + 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 => 63963073302351941+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 => 82983998843795491 + 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=> 63963482602351942 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63963891918351942 + 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 => 82984199394795503 + 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=> 63963482602351942 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63964101131351942 + 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 => 82984388579795503 + 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=> 63963482602351942 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63964279439351942 + 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 => 82984575008795503 + 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=> 63963482602351942 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63964472258351944 + 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 => 82984791131795503 + 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=> 63963482602351942 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63964703860351944 + 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 => 82984978387795503 + 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=> 63963482602351942 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63964872104351944 + 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 => 63965601131351944 + 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=> 63963482602351942 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63963891918351942 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 64352892293815486 + 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=> 63963482602351942 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63964872104351944 + 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     => 63965685448351944 + 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=>63965281058351944 + wwv_flow_api.g_id_offset,
  p_process_when=>'P63_SELECT_ADDRESS',
  p_process_when_type=>'ITEM_IS_NOT_NULL',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

 
--application/pages/page_00064
prompt  ...PAGE 64: Home Address Details
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 64,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Home Address Details',
  p_step_title=> 'Home Address Details',
  p_step_sub_title => 'Home Address Details',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 71710475144439027+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'MULLENM',
  p_last_upd_yyyymmddhh24miss => '20080228135441',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 63970281818355278 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 63970502717355278 + 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 => 63970281818355278+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             => 63970681392355278 + 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 => 63970281818355278+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             => 63970896893355278 + 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 => 63970281818355278+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=>63974382389355281 + 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=>63970681392355278+ 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=>63974600270355281 + 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=>63971688151355278+ 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=>63974781056355281 + 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=>63970896893355278+ 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=>63971087719355278 + 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 => 63970281818355278+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Home Address Code',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 80,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>63971281451355278 + 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 => 63970281818355278+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Sub-building',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>63971484519355278 + 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 => 63970281818355278+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 => 71129916045453388+wwv_flow_api.g_id_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=>63971688151355278 + 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 => 63970281818355278+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=>63971872615355280 + 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 => 63970281818355278+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Building',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>63972097109355280 + 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 => 63970281818355278+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Street',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 60,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>63972277283355280 + 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 => 63970281818355278+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Town/City',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>63972482183355280 + 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 => 63970281818355278+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Postcode',
  p_format_mask=>'AA99 9AA',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 8,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 71129916045453388+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 => 84801502355287941 + 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=> 63970681392355278 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63971281451355278 + 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 => 84801691151287942 + 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=> 63970681392355278 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63971872615355280 + 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 => 84801899287287942 + 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=> 63970681392355278 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63972097109355280 + 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 => 84802072807287944 + 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=> 63970681392355278 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63972277283355280 + 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 => 84802283956287944 + 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=> 63970681392355278 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63972482183355280 + 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 => 63972783032355280 + 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=> 63970681392355278 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63971087719355278 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 64362404207904078 + 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=> 63970681392355278 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63972482183355280 + 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)||
'   '||chr(10)||
'EXCEPTION'||chr(10)||
' ';

p:=p||' WHEN no_data_found THEN'||chr(10)||
'    NULL;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 63972892799355280 + 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=>63971688151355278 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'DECLARE'||chr(10)||
'  l_addr_office addresses%ROWTYPE;'||chr(10)||
'  l_addr        addresses%ROWTYPE;'||chr(10)||
''||chr(10)||
'BEGIN'||chr(10)||
'  /******************'||chr(10)||
'  *  CREATE PARTY  *'||chr(10)||
'  ******************/'||chr(10)||
'  -- get the unique party id'||chr(10)||
'  SELECT prty_seq.NEXTVAL INTO :P61_ID FROM dual;'||chr(10)||
''||chr(10)||
'  mip_parties.create_party(p_manu_ref                 => :P61_MANU_REF,'||chr(10)||
'                           p_created_by               => :APP_USER,'||chr(10)||
'                           p_s';

p:=p||'hortcode                => :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_contract_ref       => :P6';

p:=p||'1_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           => :P61_TITLE,'||chr(10)||
'          ';

p:=p||'                 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_expire_pword            ';

p:=p||' => :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'', ''SUPPADMIN'') THEN'||chr(10)||
'    -- associate th';

p:=p||'em 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 with a supp_admin too'||chr(10)||
'  IF upper(:P62_PRTY_ROLE) = ';

p:=p||'''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)||
'  *  CREATE OFFICE ADDRESS  *'||chr(10)||
'  ***************************/'||chr(10)||
'  l_';

p:=p||'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);'||chr(10)||
''||chr(10)||
'  mip_parties.create_party_address(p_addr_code => :P63_OFF_CODE';

p:=p||','||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_CODE;'||chr(10)||
'    l_addr.sub_building := :P64_HOME_SUB_BUILD;'||chr(10)||
'    l_addr.building   ';

p:=p||'  := :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_prty_id   => :P61_ID,'||chr(10)||
'                                     p_addr_type => ''HOME'');'||chr(10)||
'  END I';

p:=p||'F;'||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_contact_value     => :P62_PHONE);'||chr(10)||
'  END IF;'||chr(10)||
''||chr(10)||
'  IF :P62_FAX IS NOT NULL';

p:=p||' 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_parties.create_party_contact_details(p_prty_id           => :P61_ID,'||chr(10)||
'                                         ';

p:=p||'    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_contact_mech_type => ''EMAIL'','||chr(10)||
'                                             p_contact_value     => :P62_EMAIL);'||chr(10)||
'  ';

p:=p||'END IF;'||chr(10)||
'END;';

wwv_flow_api.create_page_process(
  p_id     => 82315191611577717 + 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=>63970681392355278 + wwv_flow_api.g_id_offset,
  p_process_success_message=> 'Party created successfully.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

 
--application/pages/page_00065
prompt  ...PAGE 65: Edit Parties
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 65,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Edit Parties',
  p_step_title=> 'Edit Parties',
  p_step_sub_title => 'Edit Parties',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 71710475144439027+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'MULLENM',
  p_last_upd_yyyymmddhh24miss => '20080310133147',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 63978401610358208 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 5,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select PARTIES.ID, '||chr(10)||
'MANU_REF,'||chr(10)||
'CREATED_BY,'||chr(10)||
'SHORTCODE,'||chr(10)||
'NAME,'||chr(10)||
'PARTIES.DESCRIPTION,'||chr(10)||
'CREATED_ON,'||chr(10)||
'UPDATED_ON,'||chr(10)||
'UPDATED_BY,'||chr(10)||
'MKTP_REF,'||chr(10)||
'LT_7B_CONTRACT_REF,'||chr(10)||
'GT_7B_CONTRACT_REF,'||chr(10)||
'ADVERSARIAL_CONTRACT_REF,'||chr(10)||
'USERNAME,'||chr(10)||
'STATUS,'||chr(10)||
'FIRST_NAME,'||chr(10)||
'LAST_NAME,'||chr(10)||
'PERSONAL_TITLE,'||chr(10)||
'COMMENTS,'||chr(10)||
'PRTY_TYPE,'||chr(10)||
'ROLE_TYPES.DESCRIPTION as "User Role",'||chr(10)||
'NAME||USERNAME||MANU_REF||MKTP_REF as General_Info,'||chr(10)||
'''Reset Password'''||chr(10)||
'from PARTIES, PARTY_RO';

s:=s||'LES, ROLE_TYPES'||chr(10)||
'where PARTIES.ID = PARTY_ROLES.PRTY_ID'||chr(10)||
'and PARTY_ROLES.RT_CODE = ROLE_TYPES.CODE'||chr(10)||
'and prty_type LIKE :P65_PRTY_TYPE ';

wwv_flow_api.create_report_region (
  p_id=> 63978578000358209 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 20,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_display_when_condition=> 'if mip_parties.get_user_role(:APP_USER) = ''MIPADMIN'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_condition_type=> 'FUNCTION_BODY',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 71124395124453374+ 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=> 63978792888358209 + wwv_flow_api.g_id_offset,
  p_region_id=> 63978578000358209 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'ID',
  p_column_display_sequence=> 22,
  p_column_heading=> '',
  p_column_link=>'f?p=&APP_ID.:66:&SESSION.::&DEBUG.::P66_ID:#ID#',
  p_column_linktext=>'Edit',
  p_column_link_attr=>'name="Edit #USERNAME##NAME# #SHORTCODE#"',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'N',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'PARTIES',
  p_ref_column_name=> 'ID',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 63978896332358209 + wwv_flow_api.g_id_offset,
  p_region_id=> 63978578000358209 + 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=> 63978996668358209 + wwv_flow_api.g_id_offset,
  p_region_id=> 63978578000358209 + 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=> 63979084904358209 + wwv_flow_api.g_id_offset,
  p_region_id=> 63978578000358209 + 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=> 63979172468358209 + wwv_flow_api.g_id_offset,
  p_region_id=> 63978578000358209 + 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=> 63979295924358209 + wwv_flow_api.g_id_offset,
  p_region_id=> 63978578000358209 + 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=> 63979386443358209 + wwv_flow_api.g_id_offset,
  p_region_id=> 63978578000358209 + 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=> 63979494343358209 + wwv_flow_api.g_id_offset,
  p_region_id=> 63978578000358209 + 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=> 63979586328358209 + wwv_flow_api.g_id_offset,
  p_region_id=> 63978578000358209 + 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=> 63979685069358209 + wwv_flow_api.g_id_offset,
  p_region_id=> 63978578000358209 + 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=> 63979786870358209 + wwv_flow_api.g_id_offset,
  p_region_id=> 63978578000358209 + 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=> 63979887503358209 + wwv_flow_api.g_id_offset,
  p_region_id=> 63978578000358209 + 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=> 63979973402358209 + wwv_flow_api.g_id_offset,
  p_region_id=> 63978578000358209 + 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=> 63980082937358209 + wwv_flow_api.g_id_offset,
  p_region_id=> 63978578000358209 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 14,
  p_form_element_id=> null,
  p_column_alias=> 'USERNAME',
  p_column_display_sequence=> 13,
  p_column_heading=> 'Username',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'N',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'FUNCTION_BODY',
  p_display_when_condition=> 'if upper(:P65_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_ref_schema=> 'MIP_DEV_E',
  p_ref_table_name=> 'PARTIES',
  p_ref_column_name=> 'USERNAME',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 63980189193358209 + wwv_flow_api.g_id_offset,
  p_region_id=> 63978578000358209 + 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=> 63980290155358209 + wwv_flow_api.g_id_offset,
  p_region_id=> 63978578000358209 + 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=> 63980391876358209 + wwv_flow_api.g_id_offset,
  p_region_id=> 63978578000358209 + 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=> 63980503231358209 + wwv_flow_api.g_id_offset,
  p_region_id=> 63978578000358209 + 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=> 63980599996358209 + wwv_flow_api.g_id_offset,
  p_region_id=> 63978578000358209 + 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=> 63980700731358209 + wwv_flow_api.g_id_offset,
  p_region_id=> 63978578000358209 + 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=> 83584886196572411 + wwv_flow_api.g_id_offset,
  p_region_id=> 63978578000358209 + 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=> 63980789170358211 + wwv_flow_api.g_id_offset,
  p_region_id=> 63978578000358209 + 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=> 63980872952358211 + wwv_flow_api.g_id_offset,
  p_region_id=> 63978578000358209 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 23,
  p_form_element_id=> null,
  p_column_alias=> '''RESETPASSWORD''',
  p_column_display_sequence=> 23,
  p_column_heading=> '',
  p_column_link=>'f?p=&APP_ID.:67:&SESSION.::&DEBUG.::P67_USER_ID,P67_USERNAME,P67_USER_STATUS:#ID#,#USERNAME#,#STATUS#',
  p_column_linktext=>'Reset Password',
  p_column_link_attr=>'name="Reset #USERNAME##NAME# #SHORTCODE#"',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_when_cond_type=> 'FUNCTION_BODY',
  p_display_when_condition=> 'if upper(:P65_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select "ID", '||chr(10)||
'"CREATED_BY",'||chr(10)||
'"CREATED_ON",'||chr(10)||
'"UPDATED_ON",'||chr(10)||
'"UPDATED_BY",'||chr(10)||
'"USERNAME",'||chr(10)||
'"STATUS",'||chr(10)||
'"FIRST_NAME",'||chr(10)||
'"LAST_NAME",'||chr(10)||
'"PERSONAL_TITLE",'||chr(10)||
'"COMMENTS",'||chr(10)||
'"PRTY_TYPE",'||chr(10)||
'''Reset Password'''||chr(10)||
'from "#OWNER#"."PARTIES" '||chr(10)||
' where prty_type LIKE ''PERS'''||chr(10)||
'   and parties.id in (SELECT vparl.from_parl_prty_id FROM v_party_relationships vparl'||chr(10)||
'                      WHERE vparl.to_parl_prty_id = mip_parties.get_user_id(:APP';

s:=s||'_USER)'||chr(10)||
'                        AND vparl.to_rt_code = ''SUPPADMIN'')';

wwv_flow_api.create_report_region (
  p_id=> 63980989390358211 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 30,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_display_when_condition=> 'if mip_parties.check_user_role(p_username => :APP_USER, p_role => ''SUPPADMIN'') then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_condition_type=> 'FUNCTION_BODY',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 71124395124453374+ 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_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=> 63981198846358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63980989390358211 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'ID',
  p_column_display_sequence=> 12,
  p_column_heading=> '',
  p_column_link=>'f?p=&APP_ID.:66:&SESSION.::&DEBUG.::P66_ID:#ID#',
  p_column_linktext=>'Edit',
  p_column_link_attr=>'name="Edit #USERNAME##NAME# #SHORTCODE#"',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_lov_show_nulls=> 'NO',
  p_pk_col_source=> s,
  p_lov_display_extra=> 'YES',
  p_include_in_export=> 'N',
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 63981301806358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63980989390358211 + 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_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=> 63981389150358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63980989390358211 + 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_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=> 63981492098358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63980989390358211 + 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_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=> 63981596383358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63980989390358211 + 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_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=> 63981689515358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63980989390358211 + 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_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=> 63981799217358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63980989390358211 + 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_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=> 63981899961358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63980989390358211 + 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_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=> 63981978562358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63980989390358211 + 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_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=> 63982098880358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63980989390358211 + 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_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=> 63982172780358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63980989390358211 + 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_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=> 63982288913358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63980989390358211 + 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_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=> 63982392017358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63980989390358211 + 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=> 63982491942358214 + 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=> 71121389039453369+ 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=> 71124395124453374+ 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_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=> 63982678407358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63982491942358214 + 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=> 63982781086358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63982491942358214 + 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_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=> 63982897922358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63982491942358214 + 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_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=> 63983002293358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63982491942358214 + 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_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=> 63983088014358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63982491942358214 + 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_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=> 63983193575358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63982491942358214 + 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_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=> 63983276587358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63982491942358214 + 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_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=> 63983386842358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63982491942358214 + 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_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=> 63983501826358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63982491942358214 + 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_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=> 63983603907358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63982491942358214 + 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_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=> 63983699848358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63982491942358214 + 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_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=> 63983803036358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63982491942358214 + 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_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=> 63983889102358214 + wwv_flow_api.g_id_offset,
  p_region_id=> 63982491942358214 + 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=>63984481393358216 + 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=>63983980339358214 + 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 => 63978401610358208+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(62231788486753283 + 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 => 71129916045453388+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     => 63984204011358216 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 65,
  p_process_sequence=> 10,
  p_process_point=> 'BEFORE_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'set_prty_type',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

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

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

wwv_flow_api.create_page(
  p_id     => 66,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Edit Party',
  p_step_title=> 'Edit Party',
  p_step_sub_title => 'Edit Party',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'AUTO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 71710475144439027+ 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 => '20080613155500',
  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=> 63988099061361828 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 40,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 63988282345361839 + 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=> 71118991564453364+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'SELECT prty.id party,'||chr(10)||
'       addr.code code,'||chr(10)||
'       addr.sub_building sub_building,'||chr(10)||
'       addr.building building,'||chr(10)||
'       addr.street street,'||chr(10)||
'       addr.city city,'||chr(10)||
'       addr.postcode postcode,'||chr(10)||
'       paddr.start_date start_date,'||chr(10)||
'       paddr.end_date end_date,'||chr(10)||
'       prty_addr_ro.rt_code address_code,'||chr(10)||
'       ''Edit'','||chr(10)||
'       ''Remove'''||chr(10)||
'  FROM parties             prty,'||chr(10)||
'       addresses           add';

s:=s||'r,'||chr(10)||
'       party_addresses     paddr,'||chr(10)||
'       party_address_roles prty_addr_ro'||chr(10)||
' WHERE paddr.addr_code = addr.code'||chr(10)||
'   AND prty_addr_ro.paddr_addr_code = addr.code'||chr(10)||
'   AND paddr.prty_id = prty.id'||chr(10)||
'   AND prty_addr_ro.paddr_prty_id = prty.id'||chr(10)||
'   AND paddr.end_date IS NULL'||chr(10)||
'   and prty_addr_ro.end_date is null'||chr(10)||
'   AND prty.id = :P66_ID';

wwv_flow_api.create_report_region (
  p_id=> 63988480041361839 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 20,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 71124395124453374+ 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_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=> 63989788192361839 + wwv_flow_api.g_id_offset,
  p_region_id=> 63988480041361839 + 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=> 63988875632361839 + wwv_flow_api.g_id_offset,
  p_region_id=> 63988480041361839 + 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_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=> 63988977847361839 + wwv_flow_api.g_id_offset,
  p_region_id=> 63988480041361839 + 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_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=> 63989095405361839 + wwv_flow_api.g_id_offset,
  p_region_id=> 63988480041361839 + 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_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=> 63989176491361839 + wwv_flow_api.g_id_offset,
  p_region_id=> 63988480041361839 + 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_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=> 63989297689361839 + wwv_flow_api.g_id_offset,
  p_region_id=> 63988480041361839 + 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_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=> 63989383997361839 + wwv_flow_api.g_id_offset,
  p_region_id=> 63988480041361839 + 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_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=> 63988780657361839 + wwv_flow_api.g_id_offset,
  p_region_id=> 63988480041361839 + 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=> 63988696767361839 + wwv_flow_api.g_id_offset,
  p_region_id=> 63988480041361839 + 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=> 63989492043361839 + wwv_flow_api.g_id_offset,
  p_region_id=> 63988480041361839 + 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_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=> 63989592764361839 + wwv_flow_api.g_id_offset,
  p_region_id=> 63988480041361839 + 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=> 63989693359361839 + wwv_flow_api.g_id_offset,
  p_region_id=> 63988480041361839 + 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=> 63989896381361839 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 30,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 63990694994361841 + 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 => 63988282345361839+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image   => 'template:'||to_char(71130218387453389+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             => 63990500943361841 + 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 => 63988282345361839+wwv_flow_api.g_id_offset,
  p_button_name    => 'SAVE',
  p_button_image   => 'template:'||to_char(71130218387453389+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             => 63990099749361839 + 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 => 63988480041361839+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             => 63990284873361841 + 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 => 63988282345361839+wwv_flow_api.g_id_offset,
  p_button_name    => 'DELETE',
  p_button_image   => 'template:'||to_char(71130218387453389+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=>63998202317361847 + 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=>44233777001651050 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 66,
  p_name=>'P66_SUPPLIER',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 210,
  p_item_plug_id => 63988282345361839+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Supplier',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'if upper(:P66_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_display_when_type=>'FUNCTION_BODY',
  p_read_only_when_type=>'ALWAYS',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>63990878915361841 + 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 => 63988282345361839+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(60491202926334148 + 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 => 71129916045453388+wwv_flow_api.g_id_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=>63991083225361841 + 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 => 63988480041361839+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=>63991286813361841 + 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 => 63989896381361839+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=>63991503406361841 + 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 => 63989896381361839+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=>63991689838361841 + 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 => 63989896381361839+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=>63991897393361841 + 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 => 63989896381361839+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=>63992103296361842 + 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 => 63988282345361839+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 => 71129916045453388+wwv_flow_api.g_id_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=>63992273847361842 + 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 => 63988282345361839+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 => 71129916045453388+wwv_flow_api.g_id_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=>63992493719361842 + 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 => 63988282345361839+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 => 71129916045453388+wwv_flow_api.g_id_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=>63992688854361842 + 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 => 63988282345361839+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 => 71129916045453388+wwv_flow_api.g_id_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=>63992895434361842 + 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 => 63988282345361839+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 => 71130096047453389+wwv_flow_api.g_id_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=>63993104132361842 + 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 => 63988099061361828+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 => 71129790826453388+wwv_flow_api.g_id_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=>63993273154361842 + 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 => 63988282345361839+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 => 71129916045453388+wwv_flow_api.g_id_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=>63993495626361842 + 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 => 63988282345361839+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 => 71130096047453389+wwv_flow_api.g_id_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=>63993690631361842 + 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 => 63988282345361839+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 => 71129916045453388+wwv_flow_api.g_id_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=>63993898754361842 + 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 => 63988099061361828+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 => 71129790826453388+wwv_flow_api.g_id_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=>63994086689361842 + 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 => 63988099061361828+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 => 71129790826453388+wwv_flow_api.g_id_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=>63994278356361844 + 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 => 63988099061361828+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 => 71129790826453388+wwv_flow_api.g_id_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=>63994479927361844 + 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 => 63988282345361839+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 => 71129916045453388+wwv_flow_api.g_id_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=>63994681320361844 + 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 => 63988282345361839+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 => 71129916045453388+wwv_flow_api.g_id_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=>63994876914361844 + 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 => 63988282345361839+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 => 71129916045453388+wwv_flow_api.g_id_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=>63995073170361844 + 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 => 63988282345361839+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 => 71129916045453388+wwv_flow_api.g_id_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=>63995300813361844 + 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 => 63988282345361839+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(62275588696787262 + 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 => 71129916045453388+wwv_flow_api.g_id_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=>63995480030361844 + 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 => 63988282345361839+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 => 71129916045453388+wwv_flow_api.g_id_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=>63995686426361844 + 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 => 63988282345361839+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 => 71129916045453388+wwv_flow_api.g_id_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=>63995872706361844 + 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 => 63988282345361839+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 => 71129916045453388+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 => 63996202759361845 + 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=> 63993104132361842 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 63996397193361845 + 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=> 63993898754361842 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 63996577827361845 + 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=> 63992273847361842 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 77286583903461141 + 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=> 63990500943361841 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63993495626361842 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 77295886252556439 + 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=> 63992895434361842 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 87663980394159569 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_validation_name => 'P66_EMAIL is valid',
  p_validation_sequence=> 230,
  p_validation => 'P66_EMAIL',
  p_validation2 => '^([a-zA-Z0-9_\-\.&+-]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Invalid email address.',
  p_when_button_pressed=> 63990500943361841 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63991897393361841 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 87664895631163947 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_validation_name => 'P66_TELEPHONE is valid',
  p_validation_sequence=> 240,
  p_validation => 'P66_TELEPHONE',
  p_validation2 => '^((\(?0\d{4}\)?\s*\d{3}\s*\d{3})|(\(?0\d{3}\)?\s*\d{3}\s*\d{4})|(\(?0\d{2}\)?\s*\d{4}\s*\d{4}))(\s*\#(\d{4}|\d{3}))?$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Phone number format not recognized.'||chr(10)||
'e.g. (01234) 567890',
  p_when_button_pressed=> 63990500943361841 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63991286813361841 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 87665772560166747 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_validation_name => 'P66_MOBILE is valid',
  p_validation_sequence=> 250,
  p_validation => 'P66_MOBILE',
  p_validation2 => '^((\(?0\d{4}\)?\s*\d{3}\s*\d{3})|(\(?0\d{3}\)?\s*\d{3}\s*\d{4})|(\(?0\d{2}\)?\s*\d{4}\s*\d{4}))(\s*\#(\d{4}|\d{3}))?$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Phone number format not recognized.'||chr(10)||
'e.g. (01234) 567890',
  p_when_button_pressed=> 63990500943361841 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63991503406361841 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 87666684334170180 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_validation_name => 'P66_FAX is valid',
  p_validation_sequence=> 260,
  p_validation => 'P66_FAX',
  p_validation2 => '^((\(?0\d{4}\)?\s*\d{3}\s*\d{3})|(\(?0\d{3}\)?\s*\d{3}\s*\d{4})|(\(?0\d{2}\)?\s*\d{4}\s*\d{4}))(\s*\#(\d{4}|\d{3}))?$',
  p_validation_type => 'REGULAR_EXPRESSION',
  p_error_message => 'Phone number format not recognized.'||chr(10)||
'e.g. (01234) 567890',
  p_when_button_pressed=> 63990500943361841 + wwv_flow_api.g_id_offset,
  p_associated_item=> 63991689838361841 + 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     => 63997481621361845 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'DML_FETCH_ROW',
  p_process_name=> 'Fetch Row from PARTIES',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to fetch row.',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'begin'||chr(10)||
''||chr(10)||
'  if upper(:P66_PRTY_TYPE) = ''PERS'' then '||chr(10)||
'    SELECT p.NAME'||chr(10)||
'      INTO :P66_SUPPLIER'||chr(10)||
'      FROM v_party_relationships v, parties p'||chr(10)||
'     WHERE v.to_parl_prty_id = p.ID'||chr(10)||
'       AND v.from_parl_prty_id = :P66_ID'||chr(10)||
'       AND v.to_rt_code = ''SUPP'';'||chr(10)||
'  end if;'||chr(10)||
'exception'||chr(10)||
'  when no_data_found then'||chr(10)||
'    :P66_SUPPLIER := ''N/A'';'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 44237486931795840 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_process_sequence=> 50,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'get_supplier',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'if upper(:P66_PRTY_TYPE) = ''PERS'' then'||chr(10)||
'  return true;'||chr(10)||
'else return false;'||chr(10)||
'end if;',
  p_process_when_type=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'begin'||chr(10)||
'  :P66_UPDATED_BY := :APP_USER;'||chr(10)||
''||chr(10)||
'  :P66_UPDATED_ON := SYSDATE;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 63997277619361845 + 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=>63990500943361841 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'#OWNER#.mip_parties.remove_party(p_prty_id => :P66_ID);';

wwv_flow_api.create_page_process(
  p_id     => 76321878352870506 + 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=>63990284873361841 + wwv_flow_api.g_id_offset,
  p_process_success_message=> 'Party removed successfully.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'#OWNER#:PARTIES:P66_ID:ID|U';

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

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'begin'||chr(10)||
'  if not :P66_TELEPHONE is null then'||chr(10)||
'    mip_parties.update_contact_details(p_prty_id => :P66_ID,'||chr(10)||
'                                 p_contact_value => :P66_TELEPHONE,'||chr(10)||
'                                 p_contact_mech_type => ''PHONE'');'||chr(10)||
'  end if;'||chr(10)||
''||chr(10)||
'  if not :P66_FAX is null then'||chr(10)||
'    mip_parties.update_contact_details(p_prty_id => :P66_ID,'||chr(10)||
'                                 p_contact_value => :P66_FA';

p:=p||'X,'||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_details(p_prty_id =>';

p:=p||' :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     => 63997100314361845 + 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=>63990500943361841 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 63997886967361845 + 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=>63990284873361841 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'begin'||chr(10)||
'  :P66_TELEPHONE := mip_contact_details.get_party_contact_detail(p_prty_id => :P66_ID,'||chr(10)||
'                                        p_come_type => ''PHONE'');'||chr(10)||
''||chr(10)||
'  :P66_MOBILE    := mip_contact_details.get_party_contact_detail(p_prty_id => :P66_ID,'||chr(10)||
'                                        p_come_type => ''MOBILE'');'||chr(10)||
''||chr(10)||
'  :P66_FAX       := mip_contact_details.get_party_contact_detail(p_prty_id => :P66_ID,'||chr(10)||
'';

p:=p||'                                        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     => 63996688973361845 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 66,
  p_process_sequence=> 50,
  p_process_point=> 'BEFORE_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'get_contact_details',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'SELECT COUNT(*)'||chr(10)||
'into :P66_ADDRESS_COUNT'||chr(10)||
'FROM parties prty, party_addresses paddr'||chr(10)||
'WHERE paddr.prty_id = prty.ID'||chr(10)||
'AND prty.ID = :P66_ID'||chr(10)||
'AND  paddr.end_date IS NULL;';

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

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

 
--application/pages/page_00067
prompt  ...PAGE 67: Reset User Password
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 67,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Reset User Password',
  p_step_title=> 'Reset User Password',
  p_step_sub_title => 'Reset User Password',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 71710475144439027+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'MULLENM',
  p_last_upd_yyyymmddhh24miss => '20080328141416',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 64003986298364464 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 64004187303364464 + 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 => 64003986298364464+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             => 64004392608364464 + 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 => 64003986298364464+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=>64007486520364467 + 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=>64004187303364464+ 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=>64004577055364466 + 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 => 64003986298364464+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 => 71130096047453389+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=>64004790940364466 + 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 => 64003986298364464+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(62275588696787262 + 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 => 71129916045453388+wwv_flow_api.g_id_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=>64004979858364466 + 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 => 64003986298364464+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=>64005181732364466 + 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 => 64003986298364464+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=>64005378646364466 + 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 => 64003986298364464+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 => 71130096047453389+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 64005691148364466 + 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=> 64005378646364466 + 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 => 64005878260364466 + 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=> 64004577055364466 + 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 => 64006093236364466 + 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=> 64004187303364464 + wwv_flow_api.g_id_offset,
  p_associated_item=> 64005378646364466 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 64006302541364466 + 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=> 64004187303364464 + wwv_flow_api.g_id_offset,
  p_associated_item=> 64005378646364466 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 64006476997364467 + 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=> 64004187303364464 + wwv_flow_api.g_id_offset,
  p_associated_item=> 64005378646364466 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 64006673922364467 + 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=> 64004187303364464 + wwv_flow_api.g_id_offset,
  p_associated_item=> 64005378646364466 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 64007093348364467 + 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=> 64004187303364464 + wwv_flow_api.g_id_offset,
  p_associated_item=> 64005378646364466 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 64006895233364467 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 67,
  p_validation_name => 'P67_REPEAT_PASSWORD_match',
  p_validation_sequence=> 62,
  p_validation => ':P67_PASSWORD = :P67_REPEAT_PASSWORD',
  p_validation_type => 'SQL_EXPRESSION',
  p_error_message => 'Passwords entered do not match.',
  p_when_button_pressed=> 64004187303364464 + wwv_flow_api.g_id_offset,
  p_associated_item=> 64004577055364466 + 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     => 64007187348364467 + 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=>64004187303364464 + wwv_flow_api.g_id_offset,
  p_process_success_message=> 'Password reset successfully.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

 
--application/pages/page_00068
prompt  ...PAGE 68: Party Creation Results
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 68,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Party Creation Results',
  p_step_title=> 'Party Creation Results',
  p_step_sub_title => 'Party Creation Results',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 71710475144439027+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'MULLENM',
  p_last_upd_yyyymmddhh24miss => '20080306111145',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 64010295876366367 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 64010495968366367 + 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 => 64010295876366367+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             => 64010696750366369 + 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 => 64010295876366367+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=>64010889118366369 + 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 => 64010295876366367+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 => 71129707991453383+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

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

 
--application/pages/page_00069
prompt  ...PAGE 69: Edit Party Address
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 69,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Edit Party Address',
  p_step_title=> 'Edit Party Address',
  p_step_sub_title => 'Edit Party Address',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 71710475144439027+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'MULLENM',
  p_last_upd_yyyymmddhh24miss => '20080312160127',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 64013904604369441 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_header=> '<b>NOTE:</b>Updating this data may change the address for a number of users.',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 64014084235369441 + 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 => 64013904604369441+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=>64017594599369444 + 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=>64014084235369441+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 10,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>64017384645369444 + 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=>64014296610369442 + 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 => 64013904604369441+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=>64014479479369442 + 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 => 64013904604369441+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 => 71129916045453388+wwv_flow_api.g_id_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=>64014690549369442 + 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 => 64013904604369441+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=>64014877903369442 + 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 => 64013904604369441+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Address Code',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 80,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_read_only_when=>'P69_ACTION',
  p_read_only_when2=>'NEW',
  p_read_only_when_type=>'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_field_template => 71130096047453389+wwv_flow_api.g_id_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=>64015089203369442 + 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 => 64013904604369441+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(63567298563234241 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_read_only_when=>'P69_ACTION',
  p_read_only_when2=>'NEW',
  p_read_only_when_type=>'VAL_OF_ITEM_IN_COND_NOT_EQ_COND2',
  p_field_template => 71130096047453389+wwv_flow_api.g_id_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=>64015294308369442 + 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 => 64013904604369441+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Sub-Building',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov => 'STATIC2:1,2,3,4,5,6,7,8,9,10',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 71130096047453389+wwv_flow_api.g_id_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=>64015499170369442 + 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 => 64013904604369441+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=>64015693829369442 + 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 => 64013904604369441+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Building',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov => 'STATIC2:1,2,3,4,5,6,7,8,9,10',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 71130096047453389+wwv_flow_api.g_id_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=>64015900921369442 + 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 => 64013904604369441+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Street',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov => 'STATIC2:1,2,3,4,5,6,7,8,9,10',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 60,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 71130096047453389+wwv_flow_api.g_id_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=>64016084919369442 + 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 => 64013904604369441+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'City',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov => 'STATIC2:1,2,3,4,5,6,7,8,9,10',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 40,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 71130096047453389+wwv_flow_api.g_id_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=>64016287004369444 + 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 => 64013904604369441+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Postcode',
  p_source_type=> 'STATIC',
  p_display_as=> 'TEXT',
  p_lov => 'STATIC2:1,2,3,4,5,6,7,8,9,10',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 8,
  p_cHeight=> 1,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT-CENTER',
  p_field_template => 71130096047453389+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 => 64016602080369444 + 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=> 64014084235369441 + wwv_flow_api.g_id_offset,
  p_associated_item=> 64014877903369442 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 64354478918821095 + 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=> 64014084235369441 + wwv_flow_api.g_id_offset,
  p_associated_item=> 64016287004369444 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 87235779515995403 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 69,
  p_validation_name => 'address not assigned',
  p_validation_sequence=> 30,
  p_validation => 'declare'||chr(10)||
'  l_count number;'||chr(10)||
'begin'||chr(10)||
'  select count(*)'||chr(10)||
'    into l_count'||chr(10)||
'    from party_addresses paddr'||chr(10)||
'   WHERE paddr.prty_id = :P69_PRTY_ID'||chr(10)||
'     AND upper(paddr.addr_code) = upper(:P69_ADDR_CODE)'||chr(10)||
'     and paddr.end_date is null;'||chr(10)||
''||chr(10)||
'   if not l_count = 0 then'||chr(10)||
'      return false;'||chr(10)||
'  else'||chr(10)||
'      return true;'||chr(10)||
'  end if;'||chr(10)||
'end;',
  p_validation_type => 'FUNC_BODY_RETURNING_BOOLEAN',
  p_error_message => 'Selected address is already assigned to this user.',
  p_validation_condition=> 'P69_ACTION',
  p_validation_condition2=> 'NEW',
  p_validation_condition_type=> 'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_when_button_pressed=> 64014084235369441 + wwv_flow_api.g_id_offset,
  p_associated_item=> 64014877903369442 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 44494887808078086 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 69,
  p_validation_name => 'P69_ADDR_CODE not null',
  p_validation_sequence=> 40,
  p_validation => 'P69_ADDR_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Address code must be specified.',
  p_when_button_pressed=> 64014084235369441 + wwv_flow_api.g_id_offset,
  p_associated_item=> 64014877903369442 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 46819178014981581 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 69,
  p_validation_name => 'P69_ADDR_STREET not null',
  p_validation_sequence=> 50,
  p_validation => 'P69_ADDR_STREET',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Street must be specified',
  p_when_button_pressed=> 64014084235369441 + wwv_flow_api.g_id_offset,
  p_associated_item=> 64015900921369442 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 46819388057984514 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 69,
  p_validation_name => 'P69_ADDR_CITY not null',
  p_validation_sequence=> 60,
  p_validation => 'P69_ADDR_CITY',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'City must be specified.',
  p_when_button_pressed=> 64014084235369441 + wwv_flow_api.g_id_offset,
  p_associated_item=> 64016084919369442 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 46819896714986979 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 69,
  p_validation_name => 'P69_ADDR_SUB_BUILDING Not Null',
  p_validation_sequence=> 70,
  p_validation => 'P69_ADDR_SUB_BUILDING',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Either sub-building or building must be specified.',
  p_validation_condition=> 'P69_ADDR_BUILDING',
  p_validation_condition_type=> 'ITEM_IS_NULL',
  p_when_button_pressed=> 64014084235369441 + wwv_flow_api.g_id_offset,
  p_associated_item=> 64015294308369442 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 12-MAR-2008 16:00');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 46820087704986979 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 69,
  p_validation_name => 'P69_ADDR_BUILDING Not Null',
  p_validation_sequence=> 80,
  p_validation => 'P69_ADDR_BUILDING',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Either sub-building or building must be specified.',
  p_validation_condition=> 'P69_ADDR_SUB_BUILDING',
  p_validation_condition_type=> 'ITEM_IS_NULL',
  p_when_button_pressed=> 64014084235369441 + wwv_flow_api.g_id_offset,
  p_associated_item=> 64015693829369442 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> 'generated 12-MAR-2008 16:00');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare'||chr(10)||
'  l_addr addresses%rowtype;'||chr(10)||
'  l_addr_type varchar2(10);'||chr(10)||
'begin'||chr(10)||
'  select addr.*'||chr(10)||
'    into l_addr'||chr(10)||
'    from addresses addr, parties prty, party_addresses paddr'||chr(10)||
'   where paddr.addr_code = addr.code'||chr(10)||
'     and paddr.prty_id = prty.id'||chr(10)||
'     AND paddr.prty_id = :P69_PRTY_ID'||chr(10)||
'     and addr.code = :P69_ADDR_CODE'||chr(10)||
'     and paddr.end_date is null;'||chr(10)||
''||chr(10)||
'  select rt_code'||chr(10)||
'    into l_addr_type'||chr(10)||
'    from party_addres';

p:=p||'s_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)||
'  :P69_ADDR_POSTCODE := l_addr';

p:=p||'.postcode;'||chr(10)||
''||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 64016701212369444 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 69,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'populate_details',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P69_ACTION',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'EDIT',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare '||chr(10)||
'  l_addr addresses%ROWTYPE;'||chr(10)||
'  '||chr(10)||
'begin'||chr(10)||
'  SELECT *'||chr(10)||
'    INTO l_addr'||chr(10)||
'    FROM addresses'||chr(10)||
'   WHERE code = :P69_SELECT_ADDRESS;'||chr(10)||
'   '||chr(10)||
'   :P69_ADDR_CODE      := l_addr.code;'||chr(10)||
'   :P69_ADDR_SUB_BUILDING := l_addr.sub_building;'||chr(10)||
'   :P69_ADDR_BUILDING  := l_addr.building;'||chr(10)||
'   :P69_ADDR_STREET    := l_addr.street;'||chr(10)||
'   :P69_ADDR_CITY      := l_addr.city;'||chr(10)||
'   :P69_ADDR_POSTCODE  := l_addr.postcode;'||chr(10)||
'   '||chr(10)||
'EXCEPTIO';

p:=p||'N'||chr(10)||
'  WHEN no_data_found THEN'||chr(10)||
'    NULL;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 64016877432369444 + 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=>64014690549369442 + wwv_flow_api.g_id_offset,
  p_process_when=>'P69_ACTION',
  p_process_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_process_when2=>'NEW',
  p_process_when_type2=>'',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare'||chr(10)||
'  l_addr addresses%rowtype;'||chr(10)||
'begin'||chr(10)||
'  l_addr.code := :P69_ADDR_CODE;'||chr(10)||
'  l_addr.sub_building := :P69_ADDR_SUB_BUILDING;'||chr(10)||
'  l_addr.building := :P69_ADDR_BUILDING;'||chr(10)||
'  l_addr.street := :P69_ADDR_STREET;'||chr(10)||
'  l_addr.city := :P69_ADDR_CITY;'||chr(10)||
'  l_addr.postcode := :P69_ADDR_POSTCODE;'||chr(10)||
''||chr(10)||
'  '||chr(10)||
''||chr(10)||
'  -- if we''re adding a new address then make the assignments.'||chr(10)||
'  if :P69_ACTION = ''NEW'' then'||chr(10)||
'    -- create the address'||chr(10)||
' ';

p:=p||'   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 => :P69_PRTY_ID, '||chr(10)||
'          ';

p:=p||'                           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     => 64017103831369444 + 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=>64014084235369441 + wwv_flow_api.g_id_offset,
  p_process_success_message=> 'Address added successfully.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

 
--application/pages/page_00070
prompt  ...PAGE 70: Confirm Address Delete
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 70,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Confirm Address Delete',
  p_step_title=> 'Confirm Address Delete',
  p_step_sub_title => 'Confirm Address Delete',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 71710475144439027+ 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=> 64021203117371508 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 64021589116371508 + 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 => 64021203117371508+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             => 64021373116371508 + 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 => 64021203117371508+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=>64023902765371511 + 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=>64021373116371508+ 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=>64021782463371509 + 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 => 64021203117371508+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=>64021981209371509 + 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 => 64021203117371508+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=>64022172494371509 + 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 => 64021203117371508+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=>64022375957371509 + 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 => 64021203117371508+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=>64022602197371509 + 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 => 64021203117371508+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=>64022793365371509 + 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 => 64021203117371508+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=>64022979397371509 + 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 => 64021203117371508+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=>64023199562371509 + 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 => 64021203117371508+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     => 64023593173371511 + 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=>64021373116371508 + wwv_flow_api.g_id_offset,
  p_process_success_message=> 'Address removed from user successfully.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare'||chr(10)||
'  l_addr addresses%rowtype;'||chr(10)||
'  l_addr_type varchar2(10);'||chr(10)||
'begin'||chr(10)||
'  select addr.*'||chr(10)||
'    into l_addr'||chr(10)||
'    from addresses addr, parties prty, party_addresses paddr'||chr(10)||
'   where paddr.addr_code = addr.code'||chr(10)||
'     and paddr.prty_id = prty.id'||chr(10)||
'     AND paddr.prty_id = :P70_PRTY_ID'||chr(10)||
'     and addr.code = :P70_ADDR_CODE;'||chr(10)||
''||chr(10)||
'  select rt_code'||chr(10)||
'    into l_addr_type'||chr(10)||
'    from party_address_roles paddr_ro'||chr(10)||
'   where paddr_';

p:=p||'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     => 64023397179371511 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 70,
  p_process_sequence=> 10,
  p_process_point=> 'BEFORE_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'populate_details',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

 
--application/pages/page_00080
prompt  ...PAGE 80: View Available Quotes
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 80,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'View Available Quotes',
  p_step_title=> 'View Available Quotes',
  p_step_sub_title => 'View Available Quotes',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 71716300041493456+ 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 => 'HARDYA',
  p_last_upd_yyyymmddhh24miss => '20081009121230',
  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_types e';

s:=s||'nty'||chr(10)||
' where enqu.enty_code = enty.code'||chr(10)||
'   and enqu.id = :P80_ENQU_ID';

wwv_flow_api.create_report_region (
  p_id=> 69126181468937534 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 10,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 71124395124453374+ 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_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=> 69126581468937541 + wwv_flow_api.g_id_offset,
  p_region_id=> 69126181468937534 + 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_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=> 69126701028937541 + wwv_flow_api.g_id_offset,
  p_region_id=> 69126181468937534 + 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_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=> 69126790603937541 + wwv_flow_api.g_id_offset,
  p_region_id=> 69126181468937534 + 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_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=> 69126880021937541 + wwv_flow_api.g_id_offset,
  p_region_id=> 69126181468937534 + 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_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=> 69126996328937541 + wwv_flow_api.g_id_offset,
  p_region_id=> 69126181468937534 + 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_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=> 69126403311937539 + wwv_flow_api.g_id_offset,
  p_region_id=> 69126181468937534 + 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=> 69126498806937541 + wwv_flow_api.g_id_offset,
  p_region_id=> 69126181468937534 + 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=>'N',
  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)||
'  ORDER BY v.qmax'||chr(10)||
'  ';

wwv_flow_api.create_report_region (
  p_id=> 69127304590937541 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 20,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_footer=> 'Once a quote has been selected for an enquiry, all remaining quotes will no longer be available in the system.',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 71125013780453374+ wwv_flow_api.g_id_offset,
  p_query_headings_type=> 'COLON_DELMITED_LIST',
  p_query_num_rows=> '15',
  p_query_options=> 'DERIVED_REPORT_COLUMNS',
  p_query_show_nulls_as=> ' - ',
  p_query_break_cols=> '0',
  p_query_no_data_found=> 'Thank you for requesting a quotation using the National Grid Metering Online I&C Quotations System. There are no automatic quotations available for this request, and a manual quotation will be prepared and uploaded to the website within the agreed time-scales for the work type involved. We will notify you when this quotation is ready for your consideration.',
  p_query_num_rows_type=> 'ROW_RANGES_IN_SELECT_LIST',
  p_query_row_count_max=> '10',
  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=> 69127678231937541 + wwv_flow_api.g_id_offset,
  p_region_id=> 69127304590937541 + 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=> 69127774056937541 + wwv_flow_api.g_id_offset,
  p_region_id=> 69127304590937541 + 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=> 69127901220937541 + wwv_flow_api.g_id_offset,
  p_region_id=> 69127304590937541 + 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=> 69127973285937541 + wwv_flow_api.g_id_offset,
  p_region_id=> 69127304590937541 + 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=> 69128081453937541 + wwv_flow_api.g_id_offset,
  p_region_id=> 69127304590937541 + 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=>'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=> 69128203048937541 + wwv_flow_api.g_id_offset,
  p_region_id=> 69127304590937541 + 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=> 69128294592937541 + wwv_flow_api.g_id_offset,
  p_region_id=> 69127304590937541 + 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=> 69128385860937541 + wwv_flow_api.g_id_offset,
  p_region_id=> 69127304590937541 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 8,
  p_form_element_id=> null,
  p_column_alias=> 'Q max',
  p_column_display_sequence=> 9,
  p_column_heading=> 'QMAX',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'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=> 69127589766937541 + wwv_flow_api.g_id_offset,
  p_region_id=> 69127304590937541 + 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=> 69128480447937541 + wwv_flow_api.g_id_offset,
  p_region_id=> 69127304590937541 + 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=>'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=> 69128588397937542 + wwv_flow_api.g_id_offset,
  p_region_id=> 69127304590937541 + 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=>'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=> 69128692086937542 + wwv_flow_api.g_id_offset,
  p_region_id=> 69127304590937541 + 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=>'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=> 69128799355937542 + wwv_flow_api.g_id_offset,
  p_region_id=> 69127304590937541 + 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=> 69127479595937541 + wwv_flow_api.g_id_offset,
  p_region_id=> 69127304590937541 + 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             => 69129091986937542 + 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 => 69127304590937541+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=>70245580602596999 + 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=>69129275403937544 + 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 => 69126181468937534+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 => 71129916045453388+wwv_flow_api.g_id_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=>69129496560937545 + 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 => 69126181468937534+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     => 69129696476937547 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 80,
  p_process_sequence=> 10,
  p_process_point=> 'BEFORE_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'get_qmin',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P80_ENQU_ID',
  p_process_when_type=>'ITEM_IS_NOT_NULL',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

 
--application/pages/page_00081
prompt  ...PAGE 81: View Selected Quote
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 81,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'View Selected Quote',
  p_step_title=> 'View Selected Quote',
  p_step_sub_title => 'View Selected Quote',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 71716300041493456+ 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 => '20080411153925',
  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=> 69133279981939603 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_display_sequence=> 20,
  p_display_column=> 1,
  p_display_point=> 'AFTER_SHOW_ITEMS',
  p_source=> s,
  p_source_type=> 'SQL_QUERY',
  p_display_error_message=> '#SQLERRM#',
  p_customized=> '0',
  p_translate_title=> 'Y',
  p_ajax_enabled=> 'N',
  p_query_row_template=> 71124395124453374+ 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_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=> 69133492192939605 + wwv_flow_api.g_id_offset,
  p_region_id=> 69133279981939603 + 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=>'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=> 69133591312939605 + wwv_flow_api.g_id_offset,
  p_region_id=> 69133279981939603 + 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_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=> 69133684452939605 + wwv_flow_api.g_id_offset,
  p_region_id=> 69133279981939603 + 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_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=> 69133791689939605 + wwv_flow_api.g_id_offset,
  p_region_id=> 69133279981939603 + 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_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=> 69133885194939605 + wwv_flow_api.g_id_offset,
  p_region_id=> 69133279981939603 + 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_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=> 69133999543939605 + wwv_flow_api.g_id_offset,
  p_region_id=> 69133279981939603 + 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_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=> 69134104217939605 + wwv_flow_api.g_id_offset,
  p_region_id=> 69133279981939603 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 7,
  p_form_element_id=> null,
  p_column_alias=> 'BAS_CODE',
  p_column_display_sequence=> 7,
  p_column_heading=> 'Base Code',
  p_column_alignment=>'LEFT',
  p_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=> 70255076755643206 + wwv_flow_api.g_id_offset,
  p_region_id=> 69133279981939603 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 8,
  p_form_element_id=> null,
  p_column_alias=> 'HOU_CODE',
  p_column_display_sequence=> 14,
  p_column_heading=> 'House Code',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 69134197272939605 + wwv_flow_api.g_id_offset,
  p_region_id=> 69133279981939603 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 9,
  p_form_element_id=> null,
  p_column_alias=> 'QMAX',
  p_column_display_sequence=> 8,
  p_column_heading=> 'QMAX',
  p_column_alignment=>'LEFT',
  p_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=> 69134674741939605 + wwv_flow_api.g_id_offset,
  p_region_id=> 69133279981939603 + 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=> 69134290158939605 + wwv_flow_api.g_id_offset,
  p_region_id=> 69133279981939603 + 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_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=> 69134378236939605 + wwv_flow_api.g_id_offset,
  p_region_id=> 69133279981939603 + 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_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=> 69134502026939605 + wwv_flow_api.g_id_offset,
  p_region_id=> 69133279981939603 + 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_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=> 69134584400939605 + wwv_flow_api.g_id_offset,
  p_region_id=> 69133279981939603 + 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_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=> 70278487537674702 + wwv_flow_api.g_id_offset,
  p_region_id=> 69133279981939603 + 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=> 74818787758379653 + 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=> 71121389039453369+ 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=> 71124395124453374+ 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_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=> 74819104031379686 + wwv_flow_api.g_id_offset,
  p_region_id=> 74818787758379653 + 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             => 69134894781939605 + 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 => 69133279981939603+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             => 69135090342939605 + 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 => 69133279981939603+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=>69135995456939606 + 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=>69134894781939605+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 10,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>69136200031939606 + 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=>69135090342939605+ 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=>44044381664788331 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 81,
  p_name=>'P81_TC_ACCEPTED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 50,
  p_item_plug_id => 69133279981939603+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'Terms and Conditions',
  p_format_mask=>'style="display: inline;"',
  p_source_type=> 'STATIC',
  p_display_as=> 'COMBOBOX',
  p_lov => 'STATIC2:I accept the Terms and Conditions described within the quotation document;YES,I <b>do not</b> accept the Terms and Conditions described within the quotation document;NO',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-- Select one of the following statements --',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'SELECT 1'||chr(10)||
'FROM v_current_quote_status'||chr(10)||
'WHERE qute_id = :P81_QUOTE_ID'||chr(10)||
'AND qust_code = ''SELECTED''',
  p_display_when_type=>'EXISTS',
  p_field_template => 71130000454453389+wwv_flow_api.g_id_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=>69135291774939606 + 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 => 69133279981939603+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=>69135472575939606 + 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 => 69133279981939603+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=>71894202359462281 + 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 => 69133279981939603+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 => 71129916045453388+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=>82410190132220719 + 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 => 69133279981939603+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=>82413088878229816 + 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 => 69133279981939603+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default => 'Please note!  The module you have selected has a minimum flow rate that is greater than the requirement input on the enquiry screen. '||chr(10)||
''||chr(10)||
'Please check that the Qmin entered on the enquiry screen is correct, or &ldquo;copy new&rdquo; and select a module that has a minimum flow rate lower than the Qmin request.',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_source_type=> 'STATIC',
  p_display_as=> 'DISPLAY_ONLY_HTML',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_display_when=>'P81_QMIN_GT_ENQU_QMIN',
  p_display_when2=>'YES',
  p_display_when_type=>'VAL_OF_ITEM_IN_COND_EQ_COND2',
  p_field_template => 71129707991453383+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 => 44083571948034523 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 81,
  p_validation_name => 'TC_ACCEPTED',
  p_validation_sequence=> 10,
  p_validation => 'P81_TC_ACCEPTED',
  p_validation2 => 'YES',
  p_validation_type => 'ITEM_IN_VALIDATION_EQ_STRING2',
  p_error_message => 'Terms and Conditions Must Be Accepted Before You Accept A Quote',
  p_when_button_pressed=> 69134894781939605 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'#OWNER#.mip_quotation.accept_quote(p_qute_id => :P81_QUOTE_ID'||chr(10)||
'                          ,p_prty_id => #OWNER#.mip_parties.get_user_id(:APP_USER)'||chr(10)||
'                          ,p_owner_prty_id => :P81_ACCEPT_FOR'||chr(10)||
'                          ,p_description => ''Quote accepted by ''||:APP_USER);';

wwv_flow_api.create_page_process(
  p_id     => 71067578653937525 + 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=>69134894781939605 + wwv_flow_api.g_id_offset,
  p_process_success_message=> 'Quote accepted.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare'||chr(10)||
'  num_processed number;'||chr(10)||
'  cur_quote number;'||chr(10)||
'begin'||chr(10)||
'      SELECT COUNT(*)'||chr(10)||
'        INTO num_processed '||chr(10)||
'        FROM v_current_quote_status v, quotes q'||chr(10)||
'       WHERE v.qute_id = q.id'||chr(10)||
'         AND v.qust_code IN (''SELECTED'', ''SELREJ'', ''REJECTED'', ''ACCEPTED'')'||chr(10)||
'         AND q.enqu_id = :P81_ENQU_ID;'||chr(10)||
'    '||chr(10)||
'      SELECT COUNT(*)'||chr(10)||
'        INTO cur_quote'||chr(10)||
'        FROM v_current_quote_status v'||chr(10)||
'       WHERE';

p:=p||' 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 => :P81_QUOTE_ID'||chr(10)||
'        ';

p:=p||'                ,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     => 69135678324939606 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 81,
  p_process_sequence=> 10,
  p_process_point=> 'BEFORE_BOX_BODY',
  p_process_type=> 'PLSQL',
  p_process_name=> 'select_quote',
  p_process_sql_clob => p, 
  p_process_error_message=> 'An error occurred whilst selecting this quote.'||chr(10)||
'#SQLERRM#',
  p_process_when=>'SELECT 1'||chr(10)||
'  FROM v_current_quote_status v'||chr(10)||
' WHERE v.qute_id = :P81_QUOTE_ID'||chr(10)||
'   AND v.qust_code IN (''AV'');',
  p_process_when_type=>'',
  p_process_success_message=> 'Quote selected successfully.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'SELECT v.qute_id'||chr(10)||
'  into :P81_QUOTE_ID'||chr(10)||
'  FROM v_current_quote_status v, quotes q'||chr(10)||
' WHERE v.qute_id = q.id'||chr(10)||
'   AND v.qust_code IN (''SELECTED'', ''ACCEPTED'')'||chr(10)||
'   AND q.enqu_id = :P81_ENQU_ID;';

wwv_flow_api.create_page_process(
  p_id     => 74010786800297888 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 81,
  p_process_sequence=> 5,
  p_process_point=> 'BEFORE_HEADER',
  p_process_type=> 'PLSQL',
  p_process_name=> 'get_quote_id',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when=>'P81_QUOTE_ID',
  p_process_when_type=>'ITEM_IS_NULL',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

 
--application/pages/page_00082
prompt  ...PAGE 82: Quote Rejection Reasons
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 82,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Quote Rejection Reasons',
  p_step_title=> 'Quote Rejection Reasons',
  p_step_sub_title => 'Quote Rejection Reasons',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 71716300041493456+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'PRIESTJ',
  p_last_upd_yyyymmddhh24miss => '20080317135136',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'Please select a reason for rejecting the quote(s).';

wwv_flow_api.create_page_plug (
  p_id=> 69139088921942383 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 69139277366942383 + 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 => 69139088921942383+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=>69141198268942388 + 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=>69139277366942383+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 10,
  p_branch_comment=> '');
 
wwv_flow_api.create_page_branch(
  p_id=>69729598613433733 + 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=>69139492243942384 + 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 => 69139088921942383+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=>69139688431942384 + 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 => 69139088921942383+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=>69139890159942384 + 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 => 69139088921942383+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(69141285605942389 + wwv_flow_api.g_id_offset)||'.',
  p_lov_columns=> 1,
  p_lov_display_null=> 'YES',
  p_lov_translated=> 'N',
  p_lov_null_text=>'-Please Select a Value-',
  p_lov_null_value=> '',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 71129916045453388+wwv_flow_api.g_id_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=>69140099828942386 + 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 => 69139088921942383+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 => 71129916045453388+wwv_flow_api.g_id_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=>71822174533170331 + 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 => 69139088921942383+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 => 71129916045453388+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 => 69140403727942386 + 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=> 69139277366942383 + wwv_flow_api.g_id_offset,
  p_associated_item=> 69140099828942386 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 49441177716404082 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 82,
  p_validation_name => 'P82_REJ_REASON',
  p_validation_sequence=> 20,
  p_validation => 'P82_REJECTION_REASON',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Please select a reason',
  p_when_button_pressed=> 69139277366942383 + wwv_flow_api.g_id_offset,
  p_associated_item=> 69139890159942384 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'mip_quotation.reject_quote(p_qute_id => :P82_QUTE_ID'||chr(10)||
'                          ,p_prty_id  => mip_parties.get_user_id(:APP_USER)'||chr(10)||
'                          ,p_owner_prty_id => :P82_REJ_FOR'||chr(10)||
'                          ,p_description => CASE UPPER(:P82_REJECTION_REASON) WHEN ''OTHER'' THEN substr(:P82_REJ_REASON_DETAIL,1,2000) ELSE :P82_REJECTION_REASON END);';

wwv_flow_api.create_page_process(
  p_id     => 69140503813942386 + 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=>69139277366942383 + wwv_flow_api.g_id_offset,
  p_process_when=>'P82_QUTE_ID',
  p_process_when_type=>'ITEM_IS_NOT_NULL',
  p_process_success_message=> 'Quote(s) successfully rejected.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'mip_quotation.reject_all_quotes(p_enqu_id => :P82_ENQU_ID'||chr(10)||
'                              ,p_prty_id  => mip_parties.get_user_id(:APP_USER)'||chr(10)||
'                              ,p_owner_prty_id => :P82_REJ_FOR'||chr(10)||
'                              ,p_description => CASE UPPER(:P82_REJECTION_REASON) WHEN ''OTHER'' THEN substr(:P82_REJ_REASON_DETAIL,1,2000) ELSE :P82_REJECTION_REASON END);';

wwv_flow_api.create_page_process(
  p_id     => 69140700454942386 + 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=>69139277366942383 + wwv_flow_api.g_id_offset,
  p_process_when=>'P82_ENQU_ID',
  p_process_when_type=>'ITEM_IS_NOT_NULL',
  p_process_success_message=> 'All quotes rejected successfully.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'P82_REJECTION_REASON,P82_REJ_REASON_DETAIL,P82_REJ_FOR';

wwv_flow_api.create_page_process(
  p_id     => 47662690727615576 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 82,
  p_process_sequence=> 30,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_ITEMS',
  p_process_name=> 'ResetRejection',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_when_button_id=>69139277366942383 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

 
--application/pages/page_00090
prompt  ...PAGE 90: Non-Tripartite Exclusion
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph:=ph||'<script language="JavaScript" type="text/javascript">'||chr(10)||
'<!--'||chr(10)||
''||chr(10)||
' htmldb_delete_message=''"DELETE_CONFIRM_MSG"'';'||chr(10)||
''||chr(10)||
'//-->'||chr(10)||
'</script>';

wwv_flow_api.create_page(
  p_id     => 90,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Non-Tripartite Exclusion',
  p_alias  => 'NONTRIPARTITEREPORT',
  p_step_title=> 'Non-Tripartite Exclusion',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => '',
  p_html_page_header => ' ',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'PRIESTJ',
  p_last_upd_yyyymmddhh24miss => '20080317175900',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
wwv_flow_api.set_html_page_header(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>90,p_text=>ph);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 78234085238464949 + 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=> 71118991564453364+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 78234383142464974 + 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 => 78234085238464949+wwv_flow_api.g_id_offset,
  p_button_name    => 'SAVE',
  p_button_image   => 'template:'||to_char(71130218387453389+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             => 78234693367464975 + 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 => 78234085238464949+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image   => 'template:'||to_char(71130218387453389+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             => 78234304586464974 + 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 => 78234085238464949+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image   => 'template:'||to_char(71130218387453389+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             => 78234502601464974 + 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 => 78234085238464949+wwv_flow_api.g_id_offset,
  p_button_name    => 'DELETE',
  p_button_image   => 'template:'||to_char(71130218387453389+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=>78235296686464981 + 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=>78235501951464983 + 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 => 78234085238464949+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 => 71129916045453388+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=>78235678818464995 + 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 => 78234085238464949+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 => 71129916045453388+wwv_flow_api.g_id_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=>78235890365464995 + 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 => 78234085238464949+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 => 71130096047453389+wwv_flow_api.g_id_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=>78236301415465000 + 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 => 78234085238464949+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 => 71129916045453388+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 => 78236175779464999 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 90,
  p_validation_name => 'P90_REGI_CODE not null',
  p_validation_sequence=> 20,
  p_validation => 'P90_REGI_CODE',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Region must have some value.',
  p_associated_item=> 78235890365464995 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 83595502828652899 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 90,
  p_validation_name => 'ENTY_ADIT_MUTEX',
  p_validation_sequence=> 30,
  p_validation => 'IF NOT ((:P90_enty_code is null'||chr(10)||
'and :P90_adit_code is not null) OR (:P90_enty_code is not null'||chr(10)||
'and :P90_adit_code is null)) THEN'||chr(10)||
'  RETURN ''Must enter EITHER enquiry type OR additional item'';'||chr(10)||
'ELSE'||chr(10)||
'  RETURN NULL;'||chr(10)||
'END IF;',
  p_validation_type => 'FUNC_BODY_RETURNING_ERR_TEXT',
  p_error_message => '',
  p_associated_item=> 78235678818464995 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 83596488068658100 + 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=> 78236301415465000 + 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     => 78236576949465002 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 90,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'DML_FETCH_ROW',
  p_process_name=> 'Fetch Row from REGI_ENQU_EXCLUSIONS',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to fetch row.',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 78236797037465005 + 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=>78234304586464974 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 78237003323465005 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 90,
  p_process_sequence=> 30,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'DML_PROCESS_ROW',
  p_process_name=> 'Process Row of REGI_ENQU_EXCLUSIONS',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to process Exclusion.',
  p_process_success_message=> 'Exclusion saved.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 78237187869465005 + 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=>78234502601464974 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

 
--application/pages/page_00091
prompt  ...PAGE 91: Non-Tripartite Exclusions
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h:=h||'No help is available for this page.';

ph := null;
wwv_flow_api.create_page(
  p_id     => 91,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Non-Tripartite Exclusions',
  p_alias  => 'NONTRIPARTITEEDIT',
  p_step_title=> 'Non-Tripartite Exclusions',
  p_step_sub_title => 'Tripartite Exclusions',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'AUTO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => ' ',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'PRIESTJ',
  p_last_upd_yyyymmddhh24miss => '20080229171339',
  p_page_is_public_y_n=> 'N',
  p_page_comment  => '');
 
wwv_flow_api.set_page_help_text(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>91,p_text=>h);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select id, enty_code, regi_code, adit_code from #OWNER#.regi_enqu_exclusions reex, enquiry_types enty, regions regi'||chr(10)||
'where enty.code (+) = reex.enty_code'||chr(10)||
'and regi.code = reex.regi_code'||chr(10)||
'order by enty.description, regi.description';

wwv_flow_api.create_report_region (
  p_id=> 78253974982569108 + 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=> 71121389039453369+ 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=> 71125013780453374+ 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=> 83553981207485794 + wwv_flow_api.g_id_offset,
  p_region_id=> 78253974982569108 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 1,
  p_form_element_id=> null,
  p_column_alias=> 'ID',
  p_column_display_sequence=> 5,
  p_column_heading=> 'Id',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'CENTER',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'Y',
  p_display_as=>'WITHOUT_MODIFICATION',
  p_pk_col_source=> s,
  p_column_comment=>'');
end;
/
declare
  s varchar2(32767) := null;
begin
s := null;
wwv_flow_api.create_report_columns (
  p_id=> 78254294434569122 + wwv_flow_api.g_id_offset,
  p_region_id=> 78253974982569108 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 2,
  p_form_element_id=> null,
  p_column_alias=> 'ENTY_CODE',
  p_column_display_sequence=> 2,
  p_column_heading=> 'Enquiry Type',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'TEXT_FROM_LOV',
  p_named_lov=>58364887785611247 + 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=> 78254382322569124 + wwv_flow_api.g_id_offset,
  p_region_id=> 78253974982569108 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 3,
  p_form_element_id=> null,
  p_column_alias=> 'REGI_CODE',
  p_column_display_sequence=> 3,
  p_column_heading=> 'Region',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'TEXT_FROM_LOV',
  p_named_lov=>58363976011607870 + 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=> 78254597740569124 + wwv_flow_api.g_id_offset,
  p_region_id=> 78253974982569108 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_query_column_id=> 4,
  p_form_element_id=> null,
  p_column_alias=> 'ADIT_CODE',
  p_column_display_sequence=> 4,
  p_column_heading=> 'Add-On',
  p_column_alignment=>'LEFT',
  p_heading_alignment=>'LEFT',
  p_default_sort_column_sequence=>0,
  p_disable_sort_column=>'Y',
  p_sum_column=> 'N',
  p_hidden_column=> 'N',
  p_display_as=>'TEXT_FROM_LOV',
  p_named_lov=>84998178571770625 + 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=> 78259996638591250 + wwv_flow_api.g_id_offset,
  p_region_id=> 78253974982569108 + 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             => 78256089234579695 + 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 => 78253974982569108+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=>78256386600579716 + 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=>78256089234579695+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 10,
  p_branch_comment=> '');
 
 
end;
/

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

 
--application/pages/page_00095
prompt  ...PAGE 95: Postcode
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph:=ph||'<script language="JavaScript" type="text/javascript">'||chr(10)||
'<!--'||chr(10)||
''||chr(10)||
' htmldb_delete_message=''"DELETE_CONFIRM_MSG"'';'||chr(10)||
''||chr(10)||
'//-->'||chr(10)||
'</script>';

wwv_flow_api.create_page(
  p_id     => 95,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Postcode',
  p_step_title=> 'Postcode',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_help_text => '',
  p_html_page_header => ' ',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'PRIESTJ',
  p_last_upd_yyyymmddhh24miss => '20080222141708',
  p_page_comment  => '');
 
wwv_flow_api.set_html_page_header(p_flow_id=>wwv_flow.g_flow_id,p_flow_step_id=>95,p_text=>ph);
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s := null;
wwv_flow_api.create_page_plug (
  p_id=> 78278092061684555 + 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=> 71118991564453364+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 78278391520684580 + 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 => 78278092061684555+wwv_flow_api.g_id_offset,
  p_button_name    => 'SAVE',
  p_button_image   => 'template:'||to_char(71130218387453389+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             => 78278696131684581 + 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 => 78278092061684555+wwv_flow_api.g_id_offset,
  p_button_name    => 'CANCEL',
  p_button_image   => 'template:'||to_char(71130218387453389+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             => 78278289748684580 + 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 => 78278092061684555+wwv_flow_api.g_id_offset,
  p_button_name    => 'CREATE',
  p_button_image   => 'template:'||to_char(71130218387453389+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             => 78278472718684580 + 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 => 78278092061684555+wwv_flow_api.g_id_offset,
  p_button_name    => 'DELETE',
  p_button_image   => 'template:'||to_char(71130218387453389+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=>78279290408684583 + 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=>78279475598684585 + 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 => 78278092061684555+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 => 71129916045453388+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=>78279703035684595 + 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 => 78278092061684555+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 => 71130096047453389+wwv_flow_api.g_id_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=>78280076854684599 + 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 => 78278092061684555+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 => 71130096047453389+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=>78280484434684600 + 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 => 78278092061684555+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 => 71129916045453388+wwv_flow_api.g_id_offset,
  p_is_persistent=> 'Y',
  p_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 78279990807684597 + 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=> 78279703035684595 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 78280384137684600 + 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=> 78280076854684599 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 83514495135395233 + 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     => 78280785915684602 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 95,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_HEADER',
  p_process_type=> 'DML_FETCH_ROW',
  p_process_name=> 'Fetch Row from POSTCODES',
  p_process_sql_clob => p, 
  p_process_error_message=> 'Unable to fetch row.',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 78281002723684603 + 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=>78278289748684580 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

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

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

wwv_flow_api.create_page_process(
  p_id     => 78281381067684603 + 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=>78278472718684580 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||':p95_outcode := upper(:p95_outcode);'||chr(10)||
':p95_incode := upper(:p95_incode);';

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

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

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

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

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'select * from postcodes order by 1,2,3';

wwv_flow_api.create_report_region (
  p_id=> 78285292390698817 + 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=> 71121389039453369+ 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=> 71125013780453374+ 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=> 78285577113698828 + wwv_flow_api.g_id_offset,
  p_region_id=> 78285292390698817 + 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_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=> 78285689148698828 + wwv_flow_api.g_id_offset,
  p_region_id=> 78285292390698817 + 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_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=> 78285801223698828 + wwv_flow_api.g_id_offset,
  p_region_id=> 78285292390698817 + 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_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=> 78285888905698828 + wwv_flow_api.g_id_offset,
  p_region_id=> 78285292390698817 + 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=> 78287974446707874 + wwv_flow_api.g_id_offset,
  p_region_id=> 78285292390698817 + 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             => 78286788167702413 + 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 => 78285292390698817+wwv_flow_api.g_id_offset,
  p_button_name    => 'NEW',
  p_button_image_alt=> 'New',
  p_button_position=> 'TOP',
  p_button_alignment=> 'LEFT',
  p_button_redirect_url=> 'f?p=&APP_ID.:95:&SESSION.::&DEBUG.:95::',
  p_button_cattributes=>'id="new" name="new"',
  p_required_patch => null + wwv_flow_api.g_id_offset);
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>78287084129702431 + 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=>78286788167702413+ 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_step_title=> 'Login',
  p_step_sub_title => 'Login',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'AUTO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 61069974858083363+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => 71114788560453355+ 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 => '20080501170203',
  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=> 43078471885089844 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_page_id=> 101,
  p_plug_name=> 'Login',
  p_region_name=>'',
  p_plug_template=> 0,
  p_plug_display_sequence=> 20,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'COLON_DELMITED_LIST',
  p_plug_query_row_count_max => 500,
  p_plug_display_condition_type => '',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>43082578274089850 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 101,
  p_branch_action=> 'f?p=&APP_ID.:103:&SESSION.::&DEBUG.:::',
  p_branch_point=> 'AFTER_PROCESSING',
  p_branch_type=> 'REDIRECT_URL',
  p_branch_when_button_id=>43080273833089847+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 5,
  p_branch_comment=> 'Created 01-MAY-2008 15:51 by HARDYA');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>43078660629089845 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 101,
  p_name=>'P101_TC_ACCEPTED',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 49,
  p_item_plug_id => 43078471885089844+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'YES',
  p_item_default_type => 'STATIC_TEXT_WITH_SUBSTITUTIONS',
  p_prompt=>'The Terms and Conditions for using this site are defined <a href="&T_AND_C_URL." target="_blank">here</a>',
  p_source_type=> 'STATIC',
  p_display_as=> 'RADIOGROUP',
  p_lov => 'STATIC2:I accept the Terms and Conditions of using this site;YES',
  p_lov_columns=> 1,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> 30,
  p_cMaxlength=> 2000,
  p_cHeight=> 5,
  p_cAttributes=> 'nowrap="nowrap"',
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 6,
  p_rowspan => 1,
  p_label_alignment  => 'ABOVE',
  p_field_alignment  => 'LEFT',
  p_field_template => 71130000454453389+wwv_flow_api.g_id_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||'Usernames are created by your Supplier Administrator.';

wwv_flow_api.create_page_item(
  p_id=>43078864175089845 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 101,
  p_name=>'P101_USERNAME',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 51,
  p_item_plug_id => 43078471885089844+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=> 44,
  p_cMaxlength=> 100,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 5,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 71130096047453389+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||'Your password must conform to the following rules:'||chr(10)||
'<ul>'||chr(10)||
'<li>Have a minimum length of 8 characters</li>'||chr(10)||
'<li>Contain a non-alphanumeric character e.g. %</li>'||chr(10)||
'<li>Contain both upper case and lower case characters</li>'||chr(10)||
'<li>Contain alpha and numeric characters</li>'||chr(10)||
'</ul>';

wwv_flow_api.create_page_item(
  p_id=>43079376933089847 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 101,
  p_name=>'P101_PASSWORD',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 52,
  p_item_plug_id => 43078471885089844+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=> 44,
  p_cMaxlength=> 100,
  p_cHeight=> 1,
  p_begin_on_new_line => 'YES',
  p_begin_on_new_field=> 'YES',
  p_colspan => 5,
  p_rowspan => 1,
  p_label_alignment  => 'RIGHT',
  p_field_alignment  => 'LEFT',
  p_field_template => 71130096047453389+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=>43079857920089847 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 101,
  p_name=>'P101_LOGIN',
  p_data_type=> '',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 53,
  p_item_plug_id => 43078471885089844+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 => '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=>43080061068089847 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 101,
  p_name=>'P101_NEW_PASSWORD',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 63,
  p_item_plug_id => 43078471885089844+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default => 'NEW_PASSWORD',
  p_prompt=>'New Password',
  p_source=>'NEW_PASSWORD',
  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_item_comment => '');
 
 
end;
/

declare
    h varchar2(32767) := null;
begin
wwv_flow_api.create_page_item(
  p_id=>43080273833089847 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id=> 101,
  p_name=>'P101_FORGOTTEN_PASSWORD',
  p_data_type=> 'VARCHAR',
  p_accept_processing=> 'REPLACE_EXISTING',
  p_item_sequence=> 73,
  p_item_plug_id => 43078471885089844+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default => 'FORGOTTEN_PASSWORD',
  p_prompt=>'Forgotten Password',
  p_source=>'FORGOTTEN_PASSWORD',
  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_item_comment => '');
 
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 43080587191089847 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 101,
  p_validation_name => 'TC_ACCEPTED',
  p_validation_sequence=> 1,
  p_validation => 'P101_TC_ACCEPTED',
  p_validation2 => 'YES',
  p_validation_type => 'ITEM_IN_VALIDATION_EQ_STRING2',
  p_error_message => 'Terms and Conditions must be accepted before entering this site',
  p_validation_condition=> 'FORGOTTEN_PASSWORD',
  p_validation_condition_type=> 'REQUEST_NOT_EQUAL_CONDITION',
  p_associated_item=> 43078660629089845 + 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 => 43080765593089848 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 101,
  p_validation_name => 'P101_USERNAME Not Null',
  p_validation_sequence=> 10,
  p_validation => 'P101_USERNAME',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'FORGOTTEN_PASSWORD',
  p_validation_condition_type=> 'REQUEST_NOT_EQUAL_CONDITION',
  p_associated_item=> 43078864175089845 + 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 => 43080972870089848 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 101,
  p_validation_name => 'P101_VALID_LOGIN',
  p_validation_sequence=> 12,
  p_validation => 'declare'||chr(10)||
' l_users number;'||chr(10)||
' l_pword boolean;'||chr(10)||
'begin'||chr(10)||
'  select count(*)'||chr(10)||
'    into l_users'||chr(10)||
'    from parties'||chr(10)||
'   where upper(username) = upper(:P101_USERNAME);'||chr(10)||
''||chr(10)||
'  l_pword := mip_security.authenticate_user(p_username => :P101_USERNAME,p_password => :P101_PASSWORD);'||chr(10)||
''||chr(10)||
'  if not l_pword or l_users = 0 then'||chr(10)||
'   return false;'||chr(10)||
'  else'||chr(10)||
'   return true;'||chr(10)||
'  end if;'||chr(10)||
'end;',
  p_validation_type => 'FUNC_BODY_RETURNING_BOOLEAN',
  p_error_message => 'Invalid username/password specified.',
  p_validation_condition=> 'FORGOTTEN_PASSWORD',
  p_validation_condition_type=> 'REQUEST_NOT_EQUAL_CONDITION',
  p_associated_item=> 43078864175089845 + 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 => 43081181833089848 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_flow_step_id => 101,
  p_validation_name => 'P101_PASSWORD Not Null',
  p_validation_sequence=> 20,
  p_validation => 'P101_PASSWORD',
  p_validation_type => 'ITEM_NOT_NULL',
  p_error_message => 'Value must be specified.',
  p_validation_condition=> 'FORGOTTEN_PASSWORD',
  p_validation_condition_type=> 'REQUEST_NOT_EQUAL_CONDITION',
  p_associated_item=> 43079376933089847 + 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     => 43081480028089848 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 101,
  p_process_sequence=> 10,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'PLSQL',
  p_process_name=> 'Set Username Cookie',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'if #OWNER#.mip_parties.get_user_role(:P101_USERNAME)=''SUPPADMIN'' then'||chr(10)||
'  mip_security.login('||chr(10)||
'    P_UNAME       => :P101_USERNAME,'||chr(10)||
'    P_PASSWORD    => :P101_PASSWORD,'||chr(10)||
'    P_SESSION_ID  => v(''APP_SESSION''),'||chr(10)||
'    P_FLOW_PAGE   => :APP_ID ||'':60'''||chr(10)||
'    );'||chr(10)||
'else'||chr(10)||
'  mip_security.login('||chr(10)||
'    P_UNAME       => :P101_USERNAME,'||chr(10)||
'    P_PASSWORD    => :P101_PASSWORD,'||chr(10)||
'    P_SESSION_ID  => v(''APP_SESSION''),'||chr(10)||
'    P_FLOW_';

p:=p||'PAGE   => :APP_ID ||'':30'''||chr(10)||
'    );'||chr(10)||
'end if;';

wwv_flow_api.create_page_process(
  p_id     => 43081282131089848 + 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:FORGOTTEN_PASSWORD',
  p_process_when_type=>'REQUEST_NOT_IN_CONDITION',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'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     => 43082083558089850 + 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=>43080061068089847 + wwv_flow_api.g_id_offset,
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

wwv_flow_api.create_page_process(
  p_id     => 43081876141089848 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_flow_step_id => 101,
  p_process_sequence=> 30,
  p_process_point=> 'AFTER_SUBMIT',
  p_process_type=> 'CLEAR_CACHE_FOR_PAGES',
  p_process_name=> 'Clear Page(s) Cache',
  p_process_sql_clob => p, 
  p_process_error_message=> '',
  p_process_success_message=> '',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

 
begin
 
declare
  p varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
p:=p||'declare'||chr(10)||
'    v varchar2(255) := null;'||chr(10)||
'    c owa_cookie.cookie;'||chr(10)||
'begin'||chr(10)||
'   c := owa_cookie.get(''LOGIN_USERNAME_COOKIE'');'||chr(10)||
'   :P101_USERNAME := c.vals(1);'||chr(10)||
'exception when others then null;'||chr(10)||
'end;';

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

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

 
--application/pages/page_00102
prompt  ...PAGE 102: New Password
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 102,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'New Password',
  p_alias  => 'CHANGEPASSWORD',
  p_step_title=> 'New Password',
  p_step_sub_title => 'New Password',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'AUTO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 71710475144439027+ 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=> 57285386545878612 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 57285578305878636 + 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 => 57285386545878612+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=>57288085310878695 + 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=>57285578305878636+ 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=>57285785278878648 + 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 => 57285386545878612+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=>57285977030878672 + 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 => 57285386545878612+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 => 71129916045453388+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=>57286195239878672 + 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 => 57285386545878612+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 => 71129916045453388+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 => 57286497223878675 + 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=> 57285578305878636 + wwv_flow_api.g_id_offset,
  p_associated_item=> 57285977030878672 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 57287472160878683 + 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=> 57285578305878636 + wwv_flow_api.g_id_offset,
  p_associated_item=> 57285977030878672 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 57287086616878678 + 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=> 57285578305878636 + wwv_flow_api.g_id_offset,
  p_associated_item=> 57285977030878672 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 57286686812878678 + 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=> 57285578305878636 + wwv_flow_api.g_id_offset,
  p_associated_item=> 57285977030878672 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 57287684635878683 + 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=> 57285578305878636 + wwv_flow_api.g_id_offset,
  p_associated_item=> 57285977030878672 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 57287303728878683 + 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=> 57285578305878636 + wwv_flow_api.g_id_offset,
  p_associated_item=> 57285977030878672 + wwv_flow_api.g_id_offset,
  p_error_display_location=>'INLINE_WITH_FIELD_AND_NOTIFICATION',
  p_validation_comment=> '');
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_validation(
  p_id => 57286874922878678 + 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=> 57285578305878636 + wwv_flow_api.g_id_offset,
  p_associated_item=> 57286195239878672 + 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)||
'  null;'||chr(10)||
'end;';

wwv_flow_api.create_page_process(
  p_id     => 57287775897878684 + 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=>57285578305878636 + wwv_flow_api.g_id_offset,
  p_process_success_message=> 'Password updated.',
  p_process_is_stateful_y_n=>'N',
  p_process_comment=>'');
end;
null;
 
end;
/

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

 
--application/pages/page_00103
prompt  ...PAGE 103: Forgotten Password
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 103,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Forgotten Password',
  p_alias  => 'FORGOTTEN_PWORD',
  p_step_title=> 'Forgotten Password',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 71718090475500152+ 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=> 60709289912941934 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
wwv_flow_api.create_page_button(
  p_id             => 60714093291961897 + 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 => 60709289912941934+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=>60714388396961897 + 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=>60714093291961897+ wwv_flow_api.g_id_offset,
  p_branch_sequence=> 10,
  p_branch_comment=> '');
 
 
end;
/

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

 
--application/pages/page_00500
prompt  ...PAGE 500: Logout
--
 
begin
 
declare
    h varchar2(32767) := null;
    ph varchar2(32767) := null;
begin
h := null;
ph := null;
wwv_flow_api.create_page(
  p_id     => 500,
  p_flow_id=> wwv_flow.g_flow_id,
  p_tab_set=> '',
  p_name   => 'Logout',
  p_step_title=> 'Logout',
  p_step_sub_title => 'Logout',
  p_step_sub_title_type => 'TEXT_WITH_SUBSTITUTIONS',
  p_first_item=> 'NO_FIRST_ITEM',
  p_include_apex_css_js_yn=>'Y',
  p_group_id => 71718090475500152+ wwv_flow_api.g_id_offset,
  p_help_text => '',
  p_html_page_header => '',
  p_step_template => '',
  p_required_patch=> null + wwv_flow_api.g_id_offset,
  p_last_updated_by => 'MULLENM',
  p_last_upd_yyyymmddhh24miss => '20080306111043',
  p_page_is_public_y_n=> 'Y',
  p_protection_level=> 'C',
  p_page_comment  => '');
 
end;
 
end;
/

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'You have successfully logged out.'||chr(10)||
'';

wwv_flow_api.create_page_plug (
  p_id=> 57290873570881405 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>57291396775881406 + 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=>57291086356881406 + 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 => 57290873570881405+wwv_flow_api.g_id_offset,
  p_use_cache_before_default=> 'NO',
  p_item_default => 'Login',
  p_prompt=>'Login',
  p_source=>'Login',
  p_source_type=> 'STATIC',
  p_display_as=> 'BUTTON',
  p_lov_columns=> null,
  p_lov_display_null=> 'NO',
  p_lov_translated=> 'N',
  p_cSize=> null,
  p_cMaxlength=> 2000,
  p_cHeight=> null,
  p_tag_attributes  => 'id="login" name = "login"',
  p_begin_on_new_line => 'NO',
  p_begin_on_new_field=> 'YES',
  p_colspan => 1,
  p_rowspan => 1,
  p_label_alignment  => 'LEFT',
  p_field_alignment  => 'LEFT',
  p_is_persistent=> 'N',
  p_protection_level => 'S',
  p_item_comment => '');
 
 
end;
/

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

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

declare
  s varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
s:=s||'The user account specified is locked.'||chr(10)||
''||chr(10)||
'Please contact the system administrator.'||chr(10)||
'';

wwv_flow_api.create_page_plug (
  p_id=> 57385279562108150 + 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=> 71121389039453369+ wwv_flow_api.g_id_offset,
  p_plug_display_sequence=> 10,
  p_plug_display_column=> 1,
  p_plug_display_point=> 'AFTER_SHOW_ITEMS',
  p_plug_source=> s,
  p_plug_source_type=> 'STATIC_TEXT',
  p_translate_title=> 'Y',
  p_plug_display_error_message=> '#SQLERRM#',
  p_plug_query_row_template=> 1,
  p_plug_query_headings_type=> 'QUERY_COLUMNS',
  p_plug_query_num_rows_type => 'NEXT_PREVIOUS_LINKS',
  p_plug_query_row_count_max => 500,
  p_plug_query_show_nulls_as => ' - ',
  p_plug_display_condition_type => '',
  p_pagination_display_position=>'BOTTOM_RIGHT',
  p_plug_customized=>'0',
  p_plug_caching=> 'NOT_CACHED',
  p_plug_comment=> '');
end;
/
 
begin
 
null;
 
end;
/

 
begin
 
wwv_flow_api.create_page_branch(
  p_id=>57385786795108159 + 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=>57385477996108156 + 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 => 57385279562108150+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=> 60134299914066216 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'TreeList',
  p_list_status=> 'PUBLIC',
  p_list_displayed=> 'BY_DEFAULT',
  p_display_row_template_id=> 71127598124453382 + wwv_flow_api.g_id_offset);
 
null;
 
end;
/

--application/shared_components/navigation/lists/webmip_menu
 
begin
 
wwv_flow_api.create_list (
  p_id=> 60236678425813886 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'webmip_menu',
  p_list_status=> 'PUBLIC',
  p_list_displayed=> 'BY_DEFAULT',
  p_display_row_template_id=> 71127598124453382 + wwv_flow_api.g_id_offset);
 
wwv_flow_api.create_list_item (
  p_id=> 60239078122813889 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>100,
  p_list_item_link_text=> 'Home',
  p_list_item_link_target=> 'f?p=&APP_ID.:1:&SESSION.::&DEBUG.::::',
  p_list_item_disp_cond_type=> 'CURRENT_PAGE_NOT_IN_CONDITION',
  p_list_item_disp_condition=> '102',
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_current_for_pages=> '1',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 60238178813813889 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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=> 60240276973813891 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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=> 60238178813813889 + 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=> 79163388956172070 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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=> 60238178813813889 + 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=> 60238784147813889 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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=> 60238178813813889 + 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=> 60238486328813889 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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=> 60238178813813889 + 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=> 66963273516519622 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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=> 60238178813813889 + 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=> 60240588237813891 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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=> 60238178813813889 + 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=> 67706494200400119 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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=> 60238178813813889 + 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=> 67707181864405983 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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=> 67706494200400119 + 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=> 62291376839828587 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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=> 60238178813813889 + 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=> 64152793279543178 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>261,
  p_list_item_link_text=> 'Create Party',
  p_list_item_link_target=> 'f?p=&APP_ID.:61:&SESSION.::&DEBUG.:61, 62, 63, 64:::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''useradmin'')',
  p_parent_list_item_id=> 62291376839828587 + 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=> 64153102629545945 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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=> 62291376839828587 + 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=> 62200092189691116 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>270,
  p_list_item_link_text=> 'Costs',
  p_list_item_link_target=> '',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'')',
  p_parent_list_item_id=> 60238178813813889 + 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=> 60236979292813887 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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=> 62200092189691116 + 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=> 61486500599900027 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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=> 62200092189691116 + 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=> 60237296950813887 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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=> 62200092189691116 + 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=> 60237581455813887 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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=> 62200092189691116 + 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=> 60237881420813889 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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=> 62200092189691116 + 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=> 75759793998992277 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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=> 60238178813813889 + 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=> 78301799043790652 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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=> 75759793998992277 + 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=> 78271375260641914 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>290,
  p_list_item_link_text=> 'Non-Tripartite Exclusions',
  p_list_item_link_target=> 'f?p=&APP_ID.:91:&SESSION.::&DEBUG.::::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''sysadmin'')',
  p_parent_list_item_id=> 60238178813813889 + 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=> 78272494653647530 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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=> 78271375260641914 + 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=> 60240886748813891 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>201,
  p_list_item_link_text=> 'Administration',
  p_list_item_link_target=> 'f?p=&APP_ID.:40:&SESSION.::&DEBUG.::::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''adminmenu'') and (:APP_PAGE_ID = 14 or :APP_PAGE_ID = 30 or :APP_PAGE_ID = 31 or :APP_PAGE_ID = 32 or :APP_PAGE_ID = 41 or :APP_PAGE_ID = 80 or :APP_PAGE_ID = 81 or :APP_PAGE_ID = 82 or :APP_PAGE_ID = 3 or :APP_PAGE_ID = 6 or :APP_PAGE_ID = 1 or :APP_PAGE_ID = 101 or :APP_PAGE_ID = 103 or :APP_PAGE_ID = 500 or :APP_PAGE_ID = 501)',
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 60239392273813889 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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=> 11101100896453804 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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=> 60239392273813889 + 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=> 60241795265813892 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>320,
  p_list_item_link_text=> 'Search for Enquiry',
  p_list_item_link_target=> 'f?p=&APP_ID.:30:&SESSION.::&DEBUG.:RP,30,32:::',
  p_parent_list_item_id=> 60239392273813889 + 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=> 11101403760511398 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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)||
'',
  p_parent_list_item_id=> 60239392273813889 + 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=> 67704297270372556 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>301,
  p_list_item_link_text=> 'Enquiries',
  p_list_item_link_target=> 'f?p=&APP_ID.:30:&SESSION.::&DEBUG.::::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''enqumenu'') and (:APP_PAGE_ID <> 30 and :APP_PAGE_ID <> 31 and :APP_PAGE_ID <> 32 and :APP_PAGE_ID <> 102)',
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 60239672166813891 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>400,
  p_list_item_link_text=> 'Quotes',
  p_list_item_link_target=> 'f?p=&APP_ID.:14:&SESSION.::&DEBUG.:14:::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''quotemenu'') and (:APP_PAGE_ID <> 14 and :APP_PAGE_ID <> 80 and :APP_PAGE_ID <> 81 and :APP_PAGE_ID <> 82 and :APP_PAGE_ID <> 102)',
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 73595078437022963 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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=> 73596876275041188 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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=> 73595078437022963 + 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=> 90965898393407092 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>430,
  p_list_item_link_text=> 'Design Selection Tool',
  p_list_item_link_target=> 'f?p=&APP_ID.:4:&SESSION.::&DEBUG.::::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> '#OWNER#.mip_security.component_authorization(v(''APP_USER''),''icadmin'') and (:APP_PAGE_ID <> 102)',
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_owner=> '');
 
wwv_flow_api.create_list_item (
  p_id=> 60240003796813891 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + 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=> 72912002402940517 + wwv_flow_api.g_id_offset,
  p_list_id=> 60236678425813886 + wwv_flow_api.g_id_offset,
  p_list_item_type=> 'LINK',
  p_list_item_status=> 'PUBLIC',
  p_item_displayed=> 'BY_DEFAULT',
  p_list_item_display_sequence=>510,
  p_list_item_link_text=> 'Login',
  p_list_item_link_target=> 'f?p=&APP_ID.:101:&SESSION.::&DEBUG.:101:::',
  p_list_item_disp_cond_type=> 'PLSQL_EXPRESSION',
  p_list_item_disp_condition=> 'not(APEX_CUSTOM_AUTH.IS_SESSION_VALID) and (:APP_PAGE_ID <> 102)',
  p_list_countclicks_y_n=> 'N',
  p_list_text_01=> '',
  p_list_item_current_type=> 'COLON_DELIMITED_PAGE_LIST',
  p_list_item_owner=> '');
 
null;
 
end;
/

--application/shared_components/navigation/breadcrumbs
prompt  ...breadcrumbs
--
 
begin
 
wwv_flow_api.create_menu (
  p_id=> 54132301514606426 + 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=>54132580817606433 + wwv_flow_api.g_id_offset,
  p_menu_id=>54132301514606426 + wwv_flow_api.g_id_offset,
  p_parent_id=>0,
  p_option_sequence=>10,
  p_short_name=>'login',
  p_long_name=>'',
  p_link=>'f?p=&APP_ID.:101:&SESSION.::&DEBUG.:::',
  p_page_id=>1,
  p_also_current_for_pages=> '');
 
null;
 
end;
/

prompt  ...page templates for application: 155
--
--application/shared_components/user_interface/templates/page/no_tabs
prompt  ......Page template 71114788560453355
 
begin
 
declare
  c1 varchar2(32767) := null;
  c2 varchar2(32767) := null;
  c3 varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
c1:=c1||'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"'||chr(10)||
'"http://www.w3.org/TR/html4/loose.dtd">'||chr(10)||
''||chr(10)||
'<html lang="&BROWSER_LANGUAGE."'||chr(10)||
'      xmlns:htmldb="http://htmldb.oracle.com">'||chr(10)||
'<head>'||chr(10)||
'  <title>#TITLE#</title>'||chr(10)||
'  <link rel="stylesheet"'||chr(10)||
'        href="#IMAGE_PREFIX#ng_common.css"'||chr(10)||
'        type="text/css">'||chr(10)||
'</head>'||chr(10)||
''||chr(10)||
'<body>'||chr(10)||
'  #HEAD# #FORM_OPEN#'||chr(10)||
''||chr(10)||
'  <div id="rowHd">'||chr(10)||
'    <div id="logo"';

c1:=c1||''||chr(10)||
'         class="hskpcol1">'||chr(10)||
'      <a href="http://www.nationalgrid.com/"><img src='||chr(10)||
'      "#IMAGE_PREFIX#ng_logo_group_medium.gif"'||chr(10)||
'           alt="National Grid homepage"'||chr(10)||
'           width="200"'||chr(10)||
'           height="43"></a>'||chr(10)||
'    </div>'||chr(10)||
''||chr(10)||
'    <div id="navHousekeep"'||chr(10)||
'         class="hskpcol2">'||chr(10)||
'      <div class="margin5">'||chr(10)||
'        <a href="http://www.nationalgrid.com/uk/Metering/"'||chr(10)||
'             c';

c1:=c1||'lass="hskpnav"'||chr(10)||
'             title='||chr(10)||
'             "National Grid Metering homepage"'||chr(10)||
'             accesskey="1">Home</a> | <a href="&LOGOUT_URL."'||chr(10)||
'             class="hskpnav"'||chr(10)||
'             title="Log out of the system"'||chr(10)||
'             accesskey="2">Logout</a> | '||chr(10)||
'             <!--a href="/group/help" class="hskpnav">Help</a>&nbsp;|&nbsp;--><span>'||chr(10)||
'        You are logged in as:&APP_USER.</span>'||chr(10)||
'   ';

c1:=c1||'   </div>'||chr(10)||
'    </div>'||chr(10)||
'  </div>'||chr(10)||
''||chr(10)||
'  <div id="rowSiteNav">'||chr(10)||
'  </div>';

c2:=c2||'<div id="rowFooter"><!-- bottom strip of info -->'||chr(10)||
'	'||chr(10)||
'	<div class="clear"></div>'||chr(10)||
'	<div class="access"><hr></div>'||chr(10)||
''||chr(10)||
'	'||chr(10)||
'	<div class="hskpcol1"><!-- copyright box -->'||chr(10)||
'		<div id="copyright">Copyright &copy; <!--2006--><span id="Pagefooter_lblYear">2008</span> National Grid, Copyright &copy; 2008 Advantica Ltd.</div>'||chr(10)||
'	</div>'||chr(10)||
'	'||chr(10)||
'	<div class="hskpcol2">'||chr(10)||
'		<div id="navFooter">'||chr(10)||
'                     ';

c2:=c2||'   <a href="&SITEMAP_URL.">Site map</a> | '||chr(10)||
'			<a href="&T_AND_C_URL." target="blank">Terms &amp; conditions</a>'||chr(10)||
'			| <a href="&PRIVACY_URL.">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)||
'<!-- '||chr(10)||
' #APP_VERSION# '||chr(10)||
'-->'||chr(10)||
'</body>'||chr(10)||
'</html>';

c3:=c3||'  <div id="UKSubNav"'||chr(10)||
'       class="reg">'||chr(10)||
'    #REGION_POSITION_01#'||chr(10)||
'  </div>'||chr(10)||
''||chr(10)||
'  <div id="rowContent">'||chr(10)||
'    <div id="colLeft">'||chr(10)||
'      <div id="navTier"'||chr(10)||
'           class="w180">'||chr(10)||
'        #REGION_POSITION_08#'||chr(10)||
'      </div>'||chr(10)||
'    </div>'||chr(10)||
''||chr(10)||
'    <div id="colMid">'||chr(10)||
'      #BOX_BODY# #REGION_POSITION_02# #REGION_POSITION_03#'||chr(10)||
'      #REGION_POSITION_04#'||chr(10)||
'    </div>'||chr(10)||
''||chr(10)||
'    <div id="colRight">'||chr(10)||
'      <h1 c';

c3:=c3||'lass="podTitle"><img src='||chr(10)||
'      "#IMAGE_PREFIX#ng_exclaim.gif"'||chr(10)||
'           alt=""'||chr(10)||
'           width="23"'||chr(10)||
'           height="23">Important Messages</h1>'||chr(10)||
''||chr(10)||
'      <div class="t4messages">'||chr(10)||
'        #GLOBAL_NOTIFICATION##SUCCESS_MESSAGE##NOTIFICATION_MESSAGE#'||chr(10)||
'      </div>'||chr(10)||
'    </div>'||chr(10)||
'  </div>';

wwv_flow_api.create_template(
  p_id=> 71114788560453355 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'No Tabs',
  p_body_title=> '',
  p_header_template=> c1,
  p_box=> c3,
  p_footer_template=> c2,
  p_success_message=> '<div class="t4success">#SUCCESS_MESSAGE#</div>',
  p_current_tab=> '',
  p_current_tab_font_attr=> '',
  p_non_current_tab=> '',
  p_non_current_tab_font_attr => '',
  p_top_current_tab=> '',
  p_top_current_tab_font_attr => '',
  p_top_non_curr_tab=> '',
  p_top_non_curr_tab_font_attr=> '',
  p_current_image_tab=> '',
  p_non_current_image_tab=> '',
  p_notification_message=> '<div class="t4notification">#MESSAGE#</div>',
  p_navigation_bar=> '',
  p_navbar_entry=> '<li><img src="#IMAGE_PREFIX#ng_black.gif" alt=""><a href="#LINK#">#TEXT#</a></li>',
  p_app_tab_before_tabs=>'',
  p_app_tab_current_tab=>'',
  p_app_tab_non_current_tab=>'',
  p_app_tab_after_tabs=>'',
  p_region_table_cattributes=> ' summary="" cellpadding="0" border="0" cellspacing="0" width="100%"',
  p_sidebar_def_reg_pos => 'REGION_POSITION_02',
  p_breadcrumb_def_reg_pos => 'REGION_POSITION_01',
  p_theme_id  => 101,
  p_theme_class_id => 3,
  p_template_comment => '');
end;
 
null;
 
end;
/

--application/shared_components/user_interface/templates/page/popup
prompt  ......Page template 71115999890453357
 
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=> 71115999890453357 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'Popup',
  p_body_title=> '',
  p_header_template=> c1,
  p_box=> c3,
  p_footer_template=> c2,
  p_success_message=> '<div class="t4success">#SUCCESS_MESSAGE#</div>',
  p_current_tab=> '',
  p_current_tab_font_attr=> '',
  p_non_current_tab=> '',
  p_non_current_tab_font_attr => '',
  p_top_current_tab=> '',
  p_top_current_tab_font_attr => '',
  p_top_non_curr_tab=> '',
  p_top_non_curr_tab_font_attr=> '',
  p_current_image_tab=> '',
  p_non_current_image_tab=> '',
  p_notification_message=> '<div class="t4notification">#MESSAGE#</div>',
  p_navigation_bar=> '<div class="t4NavigationBar">#BAR_BODY#</div>',
  p_navbar_entry=> '<a href="#LINK#" class="t4NavigationBar">#TEXT#</a>',
  p_app_tab_before_tabs=>'',
  p_app_tab_current_tab=>'',
  p_app_tab_non_current_tab=>'',
  p_app_tab_after_tabs=>'',
  p_region_table_cattributes=> ' summary="" cellpadding="0" border="0" cellspacing="0" width="100%"',
  p_theme_id  => 101,
  p_theme_class_id => 4,
  p_translate_this_template => 'N',
  p_template_comment => '');
end;
 
null;
 
end;
/

--application/shared_components/user_interface/templates/page/printer_friendly
prompt  ......Page template 71116307709453357
 
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=> 71116307709453357 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'Printer Friendly',
  p_body_title=> '',
  p_header_template=> c1,
  p_box=> c3,
  p_footer_template=> c2,
  p_success_message=> '<div class="t4success">#SUCCESS_MESSAGE#</div>',
  p_current_tab=> '',
  p_current_tab_font_attr=> '',
  p_non_current_tab=> '',
  p_non_current_tab_font_attr => '',
  p_top_current_tab=> '',
  p_top_current_tab_font_attr => '',
  p_top_non_curr_tab=> '',
  p_top_non_curr_tab_font_attr=> '',
  p_current_image_tab=> '',
  p_non_current_image_tab=> '',
  p_notification_message=> '<div class="t4notification">#MESSAGE#</div>',
  p_navigation_bar=> '<div class="t4NavigationBar">#BAR_BODY#</div>',
  p_navbar_entry=> '<a href="#LINK#" class="t4NavigationBar">#TEXT#</a>',
  p_app_tab_before_tabs=>'',
  p_app_tab_current_tab=>'',
  p_app_tab_non_current_tab=>'',
  p_app_tab_after_tabs=>'',
  p_region_table_cattributes=> ' summary="" cellpadding="0" border="0" cellspacing="0" width="100%"',
  p_theme_id  => 101,
  p_theme_class_id => 5,
  p_translate_this_template => 'N',
  p_template_comment => '3');
end;
 
null;
 
end;
/

--application/shared_components/user_interface/templates/page/errorpage
prompt  ......Page template 85292499999520701
 
begin
 
declare
  c1 varchar2(32767) := null;
  c2 varchar2(32767) := null;
  c3 varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
c1:=c1||'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml1-transitional.dtd">'||chr(10)||
'<html lang="&BROWSER_LANGUAGE." xmlns:htmldb="http://htmldb.oracle.com">'||chr(10)||
'<head>'||chr(10)||
'<title>#TITLE#</title>'||chr(10)||
'<link rel="stylesheet" href="#IMAGE_PREFIX#ng_common.css" type="text/css" />'||chr(10)||
'#HEAD#'||chr(10)||
'</head>'||chr(10)||
'<body #ONLOAD#>#FORM_OPEN#'||chr(10)||
'<div id="rowHd">'||chr(10)||
'<div id="logo" class="hskpcol';

c1:=c1||'1">'||chr(10)||
'<a href="http://www.nationalgrid.com/"><img src="#IMAGE_PREFIX#ng_logo_group_medium.gif" alt="National Grid homepage"/></a>'||chr(10)||
'</div>'||chr(10)||
'<div id="navHousekeep" class="hskpcol2">'||chr(10)||
'<div class="margin5">'||chr(10)||
'<a href="http://www.nationalgrid.com/uk/Metering/" class="hskpnav" title="National Grid Metering homepage" accesskey="1">Home</a>&nbsp;|&nbsp;<a href="&LOGOUT_URL." class="hskpnav" title="Log out o';

c1:=c1||'f 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)||
'</div>'||chr(10)||
''||chr(10)||
'<script type="text/javascript">'||chr(10)||
''||chr(10)||
'function MyErrorPage(p_err_item,p_err_process)'||chr(10)||
'{'||chr(10)||
''||chr(10)||
' var vElementList = null;'||chr(10)||
' var vElement     = null;'||chr(10)||
' var vErrorStack  = null;'||chr(10)||
' var vOraErr';

c1:=c1||'orStack = null;'||chr(10)||
' var vOraError    = null;'||chr(10)||
' var vOraCode     = null;'||chr(10)||
' var vAjaxRequest = null;'||chr(10)||
' var vAjaxResult  = null;'||chr(10)||
' var vMyMsg       = '''';'||chr(10)||
''||chr(10)||
'if (!document.getElementById)'||chr(10)||
' return;'||chr(10)||
''||chr(10)||
'if (!document.createElement)'||chr(10)||
' return;'||chr(10)||
''||chr(10)||
' vElementList = window.document.getElementsByTagName("div");'||chr(10)||
' for (i=0; i < vElementList.length; i++)'||chr(10)||
' {'||chr(10)||
'  vElement = vElementList[i];'||chr(10)||
' '||chr(10)||
'  if (vElement.classN';

c1:=c1||'ame == "ErrorPageMessage")'||chr(10)||
'  {'||chr(10)||
'    vErrorStack = (vErrorStack ==null?"":vErrorStack)+vElement.innerHTML;'||chr(10)||
'    vOraErrorStack = vErrorStack.split("ORA-");'||chr(10)||
'   if (vOraErrorStack.length > 1 ) {'||chr(10)||
'      vElement.innerHTML = ''''; '||chr(10)||
'      for(var j=1; j < vOraErrorStack.length; j++) {'||chr(10)||
'        vOraError = vOraErrorStack[j];'||chr(10)||
'        vAjaxRequest = new htmldb_Get(null,&APP_ID.,''APPLICATION_PROCESS=''+p_e';

c1:=c1||'rr_process,0);'||chr(10)||
'        vAjaxRequest.add(p_err_item,vOraError);'||chr(10)||
'        vAjaxResult = vAjaxRequest.get();'||chr(10)||
'        if (vAjaxResult) {'||chr(10)||
'          vMyMsg = vMyMsg + vAjaxResult;'||chr(10)||
'        } else {'||chr(10)||
'          vMyMsg = vMyMsg + vOraError.substring(0);'||chr(10)||
'        }'||chr(10)||
'      }'||chr(10)||
'    }'||chr(10)||
'if (document.getElementById && document.createElement && vMyMsg.length > 0) {'||chr(10)||
'   var divA = document.getElementById(''ErrorO';

c1:=c1||'utputDiv'');'||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">2008</span> National Grid</div>'||chr(10)||
'	</div>'||chr(10)||
'	'||chr(10)||
'	<div class="hskpcol2">'||chr(10)||
'		<div id="navFooter">'||chr(10)||
'                        <a href="&SITEMAP_URL.">Site map</a';

c2:=c2||'> | '||chr(10)||
'			<a href="&T_AND_C_URL." target="blank">Terms &amp; conditions</a>'||chr(10)||
''||chr(10)||
'			| <a href="&PRIVACY_URL.">Privacy policy</a>'||chr(10)||
'		</div>'||chr(10)||
'	</div>'||chr(10)||
'	'||chr(10)||
'</div>'||chr(10)||
'#REGION_POSITION_05#'||chr(10)||
'#FORM_CLOSE# '||chr(10)||
'<!-- #APP_VERSION# -->'||chr(10)||
'</body>'||chr(10)||
'</html>';

c3:=c3||'<div id="UKSubNav" class="reg">'||chr(10)||
'#REGION_POSITION_01#'||chr(10)||
'</div>'||chr(10)||
'<div id="rowContent">'||chr(10)||
'<div id="colLeft">'||chr(10)||
'<div id="navTier" class="w180">#REGION_POSITION_08#</div>'||chr(10)||
'</div>'||chr(10)||
' <div id="colMid">'||chr(10)||
'<div id="ErrorOutputDiv">'||chr(10)||
'#BOX_BODY#'||chr(10)||
'</div>'||chr(10)||
'</div>'||chr(10)||
''||chr(10)||
'<div id="colRight">'||chr(10)||
'<h1 class="podTitle"><img src="#IMAGE_PREFIX#ng_exclaim.gif" alt=""/>Important Messages</h1>'||chr(10)||
'<div class="t4messages">#GLOBAL_NOT';

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

wwv_flow_api.create_template(
  p_id=> 85292499999520701 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'ErrorPage',
  p_body_title=> '',
  p_header_template=> c1,
  p_box=> c3,
  p_footer_template=> c2,
  p_success_message=> '<div class="t4success">#SUCCESS_MESSAGE#</div>',
  p_current_tab=> '',
  p_current_tab_font_attr=> '',
  p_non_current_tab=> '',
  p_non_current_tab_font_attr => '',
  p_top_current_tab=> '',
  p_top_current_tab_font_attr => '',
  p_top_non_curr_tab=> '',
  p_top_non_curr_tab_font_attr=> '',
  p_current_image_tab=> '',
  p_non_current_image_tab=> '',
  p_notification_message=> '<div class="t4notification">#MESSAGE#</div>',
  p_navigation_bar=> '',
  p_navbar_entry=> '<li><img src="/i/ng_black.gif" alt=""><a href="#LINK#">#TEXT#</a></li>',
  p_app_tab_before_tabs=>'',
  p_app_tab_current_tab=>'',
  p_app_tab_non_current_tab=>'',
  p_app_tab_after_tabs=>'',
  p_region_table_cattributes=> ' summary="" cellpadding="0" border="0" cellspacing="0" width="100%"',
  p_sidebar_def_reg_pos => 'REGION_POSITION_02',
  p_breadcrumb_def_reg_pos => 'REGION_POSITION_01',
  p_theme_id  => 101,
  p_theme_class_id => 3,
  p_error_page_template => '<table summary=""><tr><td><img src="/i/error.gif" border="0" /></td>'||chr(10)||
'</tr>'||chr(10)||
'<b id=''ORA''>Error</b>'||chr(10)||
'<tr><td><a href=#BACK_LINK#>#OK#</a></td>'||chr(10)||
'<td><br /></td></tr></table> ',
  p_template_comment => '');
end;
 
null;
 
end;
/

prompt  ...button templates
--
--application/shared_components/user_interface/templates/button/button
prompt  ......Button Template 71130218387453389
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=>71130218387453389 + wwv_flow_api.g_id_offset,
  p_flow_id=>wwv_flow.g_flow_id,
  p_template=>t,
  p_template_name=> 'Button',
  p_translate_this_template => 'N',
  p_theme_id  => 101,
  p_theme_class_id => 1,
  p_template_comment       => 'Standard Button');
end;
/
--application/shared_components/user_interface/templates/button/button_alternative_1
prompt  ......Button Template 71130402747453394
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=>71130402747453394 + 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 71130603223453394
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=>71130603223453394 + 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 71130819271453394
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=>71130819271453394 + 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/form_region_without_buttons
prompt  ......region template 53349279953171514
 
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)||
'<!--'||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)||
'-->'||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       => 53349279953171514 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_template => t,
  p_page_plug_template_name=> 'Form Region without Buttons',
  p_plug_table_bgcolor     => '#f7f7e7',
  p_theme_id  => 101,
  p_theme_class_id => 8,
  p_plug_heading_bgcolor => '#f7f7e7',
  p_plug_font_size => '-1',
  p_translate_this_template => 'N',
  p_template_comment       => '');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 53349279953171514 + 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/borderless_region
prompt  ......region template 71117211208453358
 
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       => 71117211208453358 + 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=> 71117211208453358 + 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 71117502348453364
 
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       => 71117502348453364 + 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=> 71117502348453364 + 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 71117787921453364
 
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       => 71117787921453364 + 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=> 71117787921453364 + 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 71118107841453364
 
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       => 71118107841453364 + 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=> 71118107841453364 + 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 71118400356453364
 
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       => 71118400356453364 + 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=> 71118400356453364 + 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 71118718898453364
 
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       => 71118718898453364 + 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=> 71118718898453364 + 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 71118991564453364
 
begin
 
declare
  t varchar2(32767) := null;
  t2 varchar2(32767) := null;
  t3 varchar2(32767) := null;
  l_clob clob;
  l_clob2 clob;
  l_clob3 clob;
  l_length number := 1;
begin
t:=t||'<h1 class="regionheader">#TITLE#<a name="#REGION_STATIC_ID#"> </a></h1>'||chr(10)||
'<table class="t4FormRegion" id="#REGION_ID#" border="0" cellpadding="0" cellspacing="0" summary="">'||chr(10)||
'<tr><td class="t4RegionHeader"></td></tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4ButtonHolder">#CLOSE#&nbsp;#EXPAND##HELP##DELETE##EDIT##CHANGE##COPY##PREVIOUS##NEXT##CREATE##CREATE2#</td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4RegionBody">#BODY#<img alt="" src="#';

t:=t||'IMAGE_PREFIX#themes/theme_4/1px_trans.gif" style="display:block;" width="600" height="1" /></td>'||chr(10)||
'</tr>'||chr(10)||
'</table>';

t2 := null;
wwv_flow_api.create_plug_template (
  p_id       => 71118991564453364 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_template => t,
  p_page_plug_template_name=> 'Form Region',
  p_plug_table_bgcolor     => '#f7f7e7',
  p_theme_id  => 101,
  p_theme_class_id => 8,
  p_plug_heading_bgcolor => '#f7f7e7',
  p_plug_font_size => '-1',
  p_translate_this_template => 'N',
  p_template_comment       => '');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 71118991564453364 + 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 71119296403453366
 
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       => 71119296403453366 + 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=> 71119296403453366 + 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 71119612157453366
 
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       => 71119612157453366 + 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=> 71119612157453366 + 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 71119901175453368
 
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       => 71119901175453368 + 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=> 71119901175453368 + 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 71120211015453368
 
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       => 71120211015453368 + 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=> 71120211015453368 + 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 71120511409453368
 
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       => 71120511409453368 + 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=> 71120511409453368 + 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 71120815740453368
 
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       => 71120815740453368 + 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=> 71120815740453368 + 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 71121113963453369
 
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       => 71121113963453369 + 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=> 71121113963453369 + 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 71121389039453369
 
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       => 71121389039453369 + wwv_flow_api.g_id_offset,
  p_flow_id  => wwv_flow.g_flow_id,
  p_template => t,
  p_page_plug_template_name=> 'Reports Region',
  p_plug_table_bgcolor     => '#ffffff',
  p_theme_id  => 101,
  p_theme_class_id => 9,
  p_plug_heading_bgcolor => '#ffffff',
  p_plug_font_size => '-1',
  p_translate_this_template => 'N',
  p_template_comment       => 'Red Theme');
end;
null;
 
end;
/

 
begin
 
declare
    t2 varchar2(32767) := null;
begin
t2 := null;
wwv_flow_api.set_plug_template_tab_attr (
  p_id=> 71121389039453369 + 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 71121696020453369
 
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       => 71121696020453369 + 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=> 71121696020453369 + 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 71122001547453369
 
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       => 71122001547453369 + 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=> 71122001547453369 + 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 71122304127453369
 
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       => 71122304127453369 + 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=> 71122304127453369 + 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 71122591553453369
 
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       => 71122591553453369 + 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=> 71122591553453369 + 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 71122912959453369
 
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       => 71122912959453369 + 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=> 71122912959453369 + 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 71123193402453369
 
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       => 71123193402453369 + 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=> 71123193402453369 + 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 71125605794453375
 
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=>71125605794453375 + 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 71125894102453380
 
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=>71125894102453380 + 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 71126118039453380
 
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=>71126118039453380 + 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 71126412572453380
 
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=>71126412572453380 + 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 71126692093453382
 
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=>71126692093453382 + 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 71127002907453382
 
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=>71127002907453382 + 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 71127314557453382
 
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=>71127314557453382 + 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 71127598124453382
 
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="/i/ng_black.gif" alt="" width="5" height="11"/>#TEXT#</a></li>';

t4:=t4||'<li><a name="#LIST_LABEL#" href="#LINK#"><img src="/i/ng_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="/i/ng_black.gif" alt="" width="5" height="11"/>#TEXT#</a></li>';

t8:=t8||'<li><a name="#LIST_LABEL#" href="#LINK#"><img src="/i/ng_black.gif" alt="" width="5" height="11"/>#TEXT#</a></li>';

wwv_flow_api.create_list_template (
  p_id=>71127598124453382 + 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 71127917370453382
 
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=>71127917370453382 + 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 71128203586453382
 
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=>71128203586453382 + 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 71128489682453382
 
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=>71128489682453382 + 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 71128789774453382
 
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=>71128789774453382 + 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 71129089840453382
 
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=>71129089840453382 + 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 71129397885453383
 
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=>71129397885453383 + 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 71123508518453369
 
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=> 71123508518453369 + 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 => 71123508518453369 + 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 71123788944453372
 
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=> 71123788944453372 + 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 => 71123788944453372 + 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 71124102649453372
 
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=> 71124102649453372 + 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 => 71124102649453372 + 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 71124395124453374
 
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=> 71124395124453374 + 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 => 71124395124453374 + 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 71124704812453374
 
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=> 71124704812453374 + 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 => 71124704812453374 + 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 71125013780453374
 
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=> 71125013780453374 + 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 => 71125013780453374 + 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 71125292747453374
 
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=> 71125292747453374 + 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 => 71125292747453374 + 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/p32_optional_label_with_help
prompt  ......label template 32443332494481752
 
begin
 
begin
wwv_flow_api.create_field_template (
  p_id=> 32443332494481752 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_template_name=>'P32 Optional Label with Help',
  p_template_body1=>'<label for="#CURRENT_ITEM_NAME#">'||chr(10)||
'<a class="t4OptionalLabelwithHelp" href="javascript:popupFieldHelp(''#CURRENT_ITEM_ID#'',''&SESSION.'')" tabindex="999">'||chr(10)||
'',
  p_template_body2=>' "P32_LABEL"</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/no_label
prompt  ......label template 71129707991453383
 
begin
 
begin
wwv_flow_api.create_field_template (
  p_id=> 71129707991453383 + 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 71129790826453388
 
begin
 
begin
wwv_flow_api.create_field_template (
  p_id=> 71129790826453388 + 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 71129916045453388
 
begin
 
begin
wwv_flow_api.create_field_template (
  p_id=> 71129916045453388 + 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#">'||chr(10)||
'<a class="t4OptionalLabelwithHelp" href="javascript:popupFieldHelp(''#CURRENT_ITEM_ID#'',''&SESSION.'')" tabindex="999">'||chr(10)||
'',
  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 71130000454453389
 
begin
 
begin
wwv_flow_api.create_field_template (
  p_id=> 71130000454453389 + 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 71130096047453389
 
begin
 
begin
wwv_flow_api.create_field_template (
  p_id=> 71130096047453389 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_template_name=>'Required Label with Help',
  p_template_body1=>'<label for="#CURRENT_ITEM_NAME#"><a class="t4RequiredLabelwithHelp" href="javascript:popupFieldHelp(''#CURRENT_ITEM_ID#'',''&SESSION.'')" tabindex="999">',
  p_template_body2=>' *</a></label>',
  p_on_error_before_label=>'<div class="t4InlineError">',
  p_on_error_after_label=>'<br/>#ERROR_MESSAGE#</div>',
  p_theme_id  => 101,
  p_theme_class_id => 2,
  p_translate_this_template=> 'N',
  p_template_comment=> '');
end;
null;
 
end;
/

prompt  ...breadcrumb templates
--
--application/shared_components/user_interface/templates/breadcrumb/breadcrumb_menu
prompt  ......template 71131009669453394
 
begin
 
begin
wwv_flow_api.create_menu_template (
  p_id=> 71131009669453394 + 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 71131117677453397
 
begin
 
begin
wwv_flow_api.create_menu_template (
  p_id=> 71131117677453397 + 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 71131519566453400
 
begin
 
begin
wwv_flow_api.create_popup_lov_template (
  p_id=> 71131519566453400 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_popup_icon=>'#IMAGE_PREFIX#list_gray.gif',
  p_popup_icon_attr=>'width="13" height="13" alt="Popup Lov"',
  p_popup_icon2=>'',
  p_popup_icon_attr2=>'',
  p_page_name=>'winlov',
  p_page_title=>'Search Dialog',
  p_page_html_head=>'<link rel="stylesheet" href="#IMAGE_PREFIX#themes/theme_4/theme_V2.css" type="text/css">'||chr(10)||
'',
  p_page_body_attr=>'onload="first_field()" style="background-color:#FFFFFF;margin:0;"',
  p_before_field_text=>'<div class="t4PopupHead">',
  p_page_heading_text=>'The % wildcard can be used.',
  p_page_footer_text =>'',
  p_filter_width     =>'20',
  p_filter_max_width =>'100',
  p_filter_text_attr =>'',
  p_find_button_text =>'Search',
  p_find_button_image=>'',
  p_find_button_attr =>'',
  p_close_button_text=>'Close',
  p_close_button_image=>'',
  p_close_button_attr=>'',
  p_next_button_text =>'Next >',
  p_next_button_image=>'',
  p_next_button_attr =>'',
  p_prev_button_text =>'< Previous',
  p_prev_button_image=>'',
  p_prev_button_attr =>'',
  p_after_field_text=>'</div>',
  p_scrollbars=>'1',
  p_resizable=>'1',
  p_width =>'400',
  p_height=>'450',
  p_result_row_x_of_y=>'<br /><div style="padding:2px; font-size:8pt;">Row(s) #FIRST_ROW# - #LAST_ROW#</div>',
  p_result_rows_per_pg=>500,
  p_before_result_set=>'<div class="t4PopupBody">',
  p_theme_id  => 101,
  p_theme_class_id => 1,
  p_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 71131217935453399
 
begin
 
begin
wwv_flow_api.create_calendar_template(
  p_id=> 71131217935453399 + 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 71131314629453400
 
begin
 
begin
wwv_flow_api.create_calendar_template(
  p_id=> 71131314629453400 + 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 71131416867453400
 
begin
 
begin
wwv_flow_api.create_calendar_template(
  p_id=> 71131416867453400 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_cal_template_name=>'Small Calendar',
  p_translate_this_template=> 'Y',
  p_day_of_week_format=> '',
  p_month_title_format=> '<table cellspacing="0" cellpadding="0" border="0" summary="" class="t4SmallCalenderHolder"> '||chr(10)||
' <tr>'||chr(10)||
'   <td class="t4MonthTitle">#IMONTH# #YYYY#</td>'||chr(10)||
' </tr>'||chr(10)||
' <tr>'||chr(10)||
' <td>',
  p_month_open_format=> '<table border="0" cellpadding="0" cellspacing="0" summary="0" class="t4SmallCalender">',
  p_month_close_format=> '</table></td>'||chr(10)||
'</tr>'||chr(10)||
'</table>'||chr(10)||
'',
  p_day_title_format=> '<div class="t4DayTitle">#DD#</div>',
  p_day_open_format=> '<td class="t4Day" valign="top">',
  p_day_close_format=> '</td>',
  p_today_open_format=> '<td valign="top" class="t4Today">',
  p_weekend_title_format=> '<div class="t4WeekendDayTitle">#DD#</div>',
  p_weekend_open_format => '<td valign="top" class="t4WeekendDay">',
  p_weekend_close_format => '</td>',
  p_nonday_title_format => '<div class="t4NonDayTitle">#DD#</div>',
  p_nonday_open_format => '<td class="t4NonDay" valign="top">',
  p_nonday_close_format => '</td>',
  p_week_title_format => '',
  p_week_open_format => '<tr>',
  p_week_close_format => '</tr> ',
  p_daily_title_format => '<th width="14%" class="calheader">#IDAY#</th>',
  p_daily_open_format => '<tr>',
  p_daily_close_format => '</tr>',
  p_weekly_title_format => '<table cellspacing="0" cellpadding="0" border="0" summary="" class="t4SmallWeekCalendarHolder">'||chr(10)||
'<tr>'||chr(10)||
'<td class="t4MonthTitle" id="test">#WTITLE#</td>'||chr(10)||
'</tr>'||chr(10)||
'<tr>'||chr(10)||
'<td>',
  p_weekly_day_of_week_format => '<th class="t4DayOfWeek">#IDAY#<br />#MM#/#DD#</th>',
  p_weekly_month_open_format => '<table border="0" cellpadding="0" cellspacing="0" summary="0" class="t4SmallWeekCalendar">',
  p_weekly_month_close_format => '</table></td></tr></table>',
  p_weekly_day_title_format => '',
  p_weekly_day_open_format => '<td class="t4Day" valign="top">',
  p_weekly_day_close_format => '<br /></td>',
  p_weekly_today_open_format => '<td class="t4Today" valign="top">',
  p_weekly_weekend_title_format => '',
  p_weekly_weekend_open_format => '<td valign="top" class="t4NonDay">',
  p_weekly_weekend_close_format => '<br /></td>',
  p_weekly_time_open_format => '<th class="t4Hour">',
  p_weekly_time_close_format => '<br /></th>',
  p_weekly_time_title_format => '#TIME#',
  p_weekly_hour_open_format => '<tr>',
  p_weekly_hour_close_format => '</tr>',
  p_daily_day_of_week_format => '<th class="t4DayOfWeek">#IDAY# #DD#/#MM#</th>',
  p_daily_month_title_format => '<table cellspacing="0" cellpadding="0" border="0" summary="" class="t4SmallDayCalendarHolder"> <tr> <td class="t4MonthTitle">#IMONTH# #DD#, #YYYY#</td> </tr><tr><td>'||chr(10)||
'',
  p_daily_month_open_format => '<table border="0" cellpadding="2" cellspacing="0" summary="0" class="t4SmallDayCalendar">',
  p_daily_month_close_format => '</table></td></tr></table>',
  p_daily_day_title_format => '',
  p_daily_day_open_format => '<td valign="top" class="t4Day">',
  p_daily_day_close_format => '<br /></td>',
  p_daily_today_open_format => '<td valign="top" class="t4Today">',
  p_daily_time_open_format => '<th class="t4Hour">',
  p_daily_time_close_format => '<br /></th>',
  p_daily_time_title_format => '#TIME#',
  p_daily_hour_open_format => '<tr>',
  p_daily_hour_close_format => '</tr>',
  p_theme_id  => 101,
  p_theme_class_id => 3,
  p_reference_id=> null);
end;
null;
 
end;
/

prompt  ...application themes
--
--application/shared_components/user_interface/themes/national_grid
prompt  ......theme 71131715554453408
begin
wwv_flow_api.create_theme (
  p_id =>71131715554453408 + 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=>71114788560453355 + wwv_flow_api.g_id_offset,
  p_error_template=>85292499999520701 + wwv_flow_api.g_id_offset,
  p_printer_friendly_template=>71116307709453357 + wwv_flow_api.g_id_offset,
  p_breadcrumb_display_point=>'REGION_POSITION_01',
  p_sidebar_display_point=>'REGION_POSITION_02',
  p_login_template=>71114617743453322 + wwv_flow_api.g_id_offset,
  p_default_button_template=>71130218387453389 + wwv_flow_api.g_id_offset,
  p_default_region_template=>71121389039453369 + wwv_flow_api.g_id_offset,
  p_default_chart_template =>71118718898453364 + wwv_flow_api.g_id_offset,
  p_default_form_template  =>71118991564453364 + wwv_flow_api.g_id_offset,
  p_default_reportr_template   =>71121389039453369 + wwv_flow_api.g_id_offset,
  p_default_tabform_template=>71121389039453369 + wwv_flow_api.g_id_offset,
  p_default_wizard_template=>71122912959453369 + wwv_flow_api.g_id_offset,
  p_default_menur_template=>71117787921453364 + wwv_flow_api.g_id_offset,
  p_default_listr_template=>71121389039453369 + wwv_flow_api.g_id_offset,
  p_default_report_template   =>71124395124453374 + wwv_flow_api.g_id_offset,
  p_default_label_template=>71129916045453388 + wwv_flow_api.g_id_offset,
  p_default_menu_template=>71131009669453394 + wwv_flow_api.g_id_offset,
  p_default_calendar_template=>71131217935453399 + wwv_flow_api.g_id_offset,
  p_default_list_template=>71129089840453382 + wwv_flow_api.g_id_offset,
  p_default_option_label=>71129916045453388 + wwv_flow_api.g_id_offset,
  p_default_required_label=>71130096047453389 + wwv_flow_api.g_id_offset);
end;
/
 
begin
wwv_flow_api.g_varchar2_table := wwv_flow_api.empty_varchar2_table;
wwv_flow_api.g_varchar2_table(1) := '474946383961C8002B00F70000126EAA3D88B9F1F6FA4890BECEE0ED0061A2D9E6F1AECDE2D0E2EEF6F9FC0A6BA8B5D1E48DB9D694BDD8458DBDA1C5DD00589DF8FAFCA5C6DE66A1C8A9CAE0297CB2ACCBE13A86B8B0CEE2FBFCFD0568A60A66A579ACCE';
wwv_flow_api.g_varchar2_table(2) := 'DEEAF38AB7D5A5C8DF257AB10968A6F4F8FAEEF4F87EB0D0CADEECD6E5F09AC1DB1D75AE99BFDAE2ECF4005DA05D9CC5005C9E0465A4C9DDEA287BB2DAE8F1FCFDFEF0F6F9F2F7FA6EA4CAE8F0F7BAD4E672A8CC6AA4CAB8D4E60066A5F6FAFC5498C291';
wwv_flow_api.g_varchar2_table(3) := 'BBD7C4DAE9599AC46DA2C84D8EBDDCE8F2F5F8FB87B5D41A74AD4C91BF69A1C985B4D3004C96005099D4E4EF00549A1672AD0F6EAA2278B03182B55496C2619DC6A8C8DFE0EAF380B2D270A7CB0063A42177AF1170ABBCD6E7428CBC83B3D33683B7B8D3';
wwv_flow_api.g_varchar2_table(4) := 'E5EBF3F8F2F6F980ACCE0366A55898C33F8ABB0060A19FC3DCBED6E85E95C2C1D9E8E5EEF574AACE00569B629FC6EDF3F8EAF1F6FDFEFE0C6AA81570ABC6DCEAF0F5F93685B75094C1A6C8DEE7EFF6E9EFF61973AD0461A20364A45E99C35296C2FAFBFD';
wwv_flow_api.g_varchar2_table(5) := '7BAED0E6EEF474A8CC6FA5CB609EC6458BBB2C7DB30262A30F6CA9267CB3F4F9FC317EB380B0D19FC5DDDCE8F19CC2DB2D7FB4629FC7C2D9E9BFD8E8C0D7E85396C1418CBCFCFCFDECF1F82E80B4DCEAF277ABCD6CA5CACCDFECC2D8E9B2CFE34E94C083';
wwv_flow_api.g_varchar2_table(6) := 'B5D33985B83684B80C6CA80B6CA86DA7CB5193C00266A62B7EB31370AB0E6EA90065A50065A40064A40063A3005B9E005EA0005A9EDFE9F30062A3005FA1FFFFFE74AACD5196C2005B9F0064A3DEE9F3FEFEFFC2DAEAFEFEFE0062A2005EA1005A9D0059';
wwv_flow_api.g_varchar2_table(7) := '9D005A9F005FA0F3F8FAFEFFFE005FA2EBF2F7FFFEFEF7F9FC80B2D10165A50064A5DEE9F2FEFFFFFEFEFD649FC75196C1C0D7E7E4EDF5E5EFF60D6EA90265A480AFD0F4F7FADEE8F11774AE6FA8CB5091BF428BBCF8FBFC458FBD0263A3BAD6E600589B';
wwv_flow_api.g_varchar2_table(8) := 'FFFEFF5B9BC598C1DB2578B0699EC6D3E4EFD3E3EEB8D4E580B1D1ABCCE182B1D183B2D20F63A3609CC685B3D3DFE9F2B3D0E41F77AFE7F0F676A9CC0769A75495C1E3ECF30161A20162A3A5C9DFFFFFFF21F90400000000002C00000000C8002B000008';
wwv_flow_api.g_varchar2_table(9) := 'FF00FF091C48B0A0C18308132A5CC8B0A1C38710234A9C48B1A2C58B18336AAC3828D0C68F20438A1C19F1D6BF086E6CAD2044B2A5CB97302972D2F5EA952D7831731E1BF82BA74F911158C87AD5AA15961545A03D34F933E23163758C456B8A314CD49F';
wwv_flow_api.g_varchar2_table(10) := '3238D8C252B49619481065547946EFD9366D4D7B2AB414EF0E53AA14977989D7836A03335860699010518091100A146CC0909640110F1D0E3A68F30DAEC565202084830B6FC50A061267983203AB962D0A547D34D1B5403163C71597C19835C071BB2413';
wwv_flow_api.g_varchar2_table(11) := '673CA9E5CA55010B5453AC78A5E3205BB7A827AA661D3CF61358AD5C99C1DD54376F83BFA08A985A1CE2F0D6D521CAAED5EAD5F2DCBB7B17FF2C375059F687AA63613FDF5036ACDAB711261BF2088E0C87753A18E83062A184DD745044C43EFB85115104';
wwv_flow_api.g_varchar2_table(12) := '2A1850050D0E1121480C31E4114142E9AD57D0085FF8D00E330DFC90C13F323C13C310107E289000230E61800A3DCD604111D9DC3050072F9460630C6F1124C00D3E30C38C0F9F4CE81E7C1644E0811832FE43811089E493CF13A37890C03F390E444403';
wwv_flow_api.g_varchar2_table(13) := '0ECC918F06F9CC61C8198014F44136CC1C51802B2C58A1E62602DDF281180F9867D00B3540A1800621ECA10F066A15748318A2F40746203084A0810246F89124429F4C60A79372C080C33A541674DD41EEA053CB0AC4CCB2421F01A89001378085B04A15';
wwv_flow_api.g_varchar2_table(14) := '03511002601B04F08F0951D8FFA2CB12390C240D1F1A68C0475D06D503032C9C12B382385E9810C771C9DD56C72B4A5C91C104B3B481572DBA10D3C205311C648217BAB4B10216AF14100B042B5C6203415128D1C42C3BEC304C134B3441D83FC704A0C4';
wwv_flow_api.g_varchar2_table(15) := '285566D0880B100C530016D442604B28E71694831266E8F1033A4DC452CB2BC8CC124B3F1E1C244320E24030CBBFB0D832CC30001C60D0A5051561861944B5B2432BBBB410AA167815900F2D037D604B2D58C872411E30B440540BB80C244F2CB0BCD2C2';
wwv_flow_api.g_varchar2_table(16) := '1D06F9C08F19B525E78AD18710E0C47BB65940C313B1E4D0030428B4034A250B300083AC762C53100259CCE2020B0FDC404D3D0D9421EE00130AD485379644018B3301E4FF32CD34040C3400040E140407172BC48242171850B3400301ACD0020C4C1484';
wwv_flow_api.g_varchar2_table(17) := 'CB307350310704A19C704325149CA28119B6544CD0323D48AE0A035FDFF00121F9ACE00273032D530171049D80086D4575F78A2B3BC8C285164461A100CD027D70662B059481842C3BD4A64BD0024DB1822BADC8924B4114F4C1DDCA4F83AB9C3D0AFC5E';
wwv_flow_api.g_varchar2_table(18) := 'F5D50518E1F21A05DD134031B2F84350065CCCD2C707066520852C2B8056906EBB18C740DE32B8C211A413C390C51112439008E0A01FB308C09406828B5828000566288241CE210E5B68A16002C1C00A64818A64186401729845197A71BAD558C8047258';
wwv_flow_api.g_varchar2_table(19) := '5E2B80D58CD1D9C215B570C6CA8C87BC7F280F7BAF008006FF7E073008E06020D62B8AF608A2823998217AD11B8A06B2078BA215255C569BCD0ABC004282BCC005BA08050B05528266ACA01B08E9C01366C12B8200705104292041A8C08F16D00D2145B0';
wwv_flow_api.g_varchar2_table(20) := '05D008820B9FADC00708C9C10A8031AF7FF4A207B340471D101288583CA18B2413C8045A10BD19CA21106828C103BEC1B4E4CCF078352B40CA6A020C5B28801B00C8061257A0C4ED0D0407B1C01ECBB031817A94E006F048043056D69DDBA0AF0F954048';
wwv_flow_api.g_varchar2_table(21) := '0654B10223886020909016A51072895844A26E03718E780A2247814440132D90C3320F1201629A4205146C81194030418298A404636801664E648A25002121EE28402A5E70BA0AA86720E0004101DAA5FF9C07343000B228CA0E60014A81F8439445B10D';
wwv_flow_api.g_varchar2_table(22) := '0A18C00B1AD020024C4962F65C09A228300D7BC1E88298C4B18B84FAF209B288C27D10C2825898A21A03B1801058004D8384231630309B1B57B08B69C6917003F9C12B5670448550A000B6F0A7402A280B0D2284064E2007330692873F08812F08C18019';
wwv_flow_api.g_varchar2_table(23) := '5A318916DE532004D0C07BB2E7803814840989408E2B7838908312C5363060A04124BA44813C430158C09E19344104834CA018D83B1FD6CCA1101CCC4201BC18885214B28939D822A6FF0BCF41AAF98F73C8AE040BA101378671050ACE22156A48080F22';
wwv_flow_api.g_varchar2_table(24) := '5359818C512124A0A42FEA89BB7F9CE186DD3183500BC282EB8DB5A03E44682B56608584FF24D1156DFD070668539B1598AE20E83CEB4787710A85300302B035880C0460821BA4800D8A304301103BD3E71884B1B880803DCA99102E0CA30C2365C33014';
wwv_flow_api.g_varchar2_table(25) := 'F088847413022C494802D640072A24E10F21A8452A465BBBDBADA70BC4A80D2CF26180833CA09304EDE10FBB33861FD89695B8A5A80F5CBB8B021F440428A00D16AF360C3628C40AE3EDE140D6000924D8C1096330C33096B0020D4C57A6D154EC75712A';
wwv_flow_api.g_varchar2_table(26) := '102040C00E2355081084818EBAFE03177F55AB41225001F40E502080D842238E800E05C022164D68C22B9A31DF16961607BA280A2C56C120835062075C097028B1A76584580F7BB915450BB8AC005419041016ED651621403D845801FFB91A1E0227E6A0';
wwv_flow_api.g_varchar2_table(27) := '8B86356315AA70801BCEC085C9A15820D25C2C8BFF7107080460270B91C4308C50E5CB25B7203CF6313E21318A02B4A10D0550803D2E60894624C105ADA0AF4022898331B7A216DC58C4417C910A22C2D6AC9F0CAC975939D181882296AE80052B4C98BF';
wwv_flow_api.g_varchar2_table(28) := '0BD842CD5763F385333C1013EC2116C3D883242440803A80632047100675536C5D6A0E9A0C10B8408C13C2826140C1C68ED630A47B9C5E49B64018B52883076E9007228C140DB411F53F6C575A2BE8227AB5B8461E0E7200DE76F91F0725B3AC0F92C4E0';
wwv_flow_api.g_varchar2_table(29) := '2998D6BBE0EF4132E0858B0EB7CD0779734165408658B82007E05C2C4CFFFC8F40AFD880FFB80204A0C07183F4C201C3FF08C0481D3DF01D937B2012805F246EF059822C20DEA45DCF097EFD34717CE120ED70EDBF95471482B6BC206CA5A8051E569B5A';
wwv_flow_api.g_varchar2_table(30) := '14922034300277F43A0C881B44E2C85BC71862C1D7EE6E3CB1351534C81BD0020D6C13214440C1306A3554622324D2E9CD801D5AB08A21C073AAF28EA427C640941DACA0EBA753C4995E2B60841AFDC0B5C96D0CF2C195D94AE22037281A91286CF58260';
wwv_flow_api.g_varchar2_table(31) := '5D20783819FE1002072714A3021C07A04D0537684AECD4230A010522560096B63FBA812FFFC70CB4100B3220C4241E58C10EF2EEC28124000A83C74208324B9076A0F693852F3A600FDC4A7C56A0005D49049B2AF58F0438A018E07BF885E12C901304A3';
wwv_flow_api.g_varchar2_table(32) := '00224308FF03645100D027B6DA3705790214B18227D85D98A458413ECAEBFAA3C35ED223B8C62CA4911022A8C2164D563B30705502E106A6E60AC030070D600D34400048000BBBD02EC8174ABF43503A8674D76370045108A6D60AC1E000201414BAC74F';
wwv_flow_api.g_varchar2_table(33) := 'DA971097F70F37170B1676106000052B507E61525D5B207604D10092037806F15FB380832C675EB117752B607E07810F2D000BA91020024880FFA0067D801C2A030C66F0044EA001B2B00B293350B04574B9B67CB3063CC1300D04F105FFA232AD600B20';
wwv_flow_api.g_varchar2_table(34) := '9004EE450A28D33413F60415B67D05F50628200B73400906F1058C100276200B4EF00605F100B6200BBF957E04010896403439E08705E10389E04CFBFF4641E37581F7975EBD2009B1600B9D601060D00D2D90050AC00FAB356FBD47100CC019BD736A38';
wwv_flow_api.g_varchar2_table(35) := 'D30AC0900853348106254A5B687FABD47C0421482A031F2FB802C88080B2D4866F6882DC271045300CB690080C450336500F92D0074DC00090100BBB600839C06BFF4000E102004540050DA0568C2510D50002B1100B9AF0001D808CA0300DB2100B7280';
wwv_flow_api.g_varchar2_table(36) := '8490C885DC147BFFB00E89600B05A00F6820000280000C00026D600F37700D66C00D7E107E91341013B00278758ACEB00228E001F9503C59387887376BB43810221005B3F00AE0F334DDB10201000262751B33900A4B90890911084B000BEFF70F343001';
wwv_flow_api.g_varchar2_table(37) := 'E2227F5AA00005D0042E400232500D7BFFF02EB1606620D209BA100BC2302E8554064B700106A1026E500010200BF9B00AA5A094D7025905D10929B99206C10328B00413607300108EB5A0054F900AD1320AFDC502B300014A4002A3969565A05C14E005';
wwv_flow_api.g_varchar2_table(38) := '05D00223A40BB6C00804A0531AF96F8E0001B1706EB560950541064D20974D301903B1131D4006B6100C385345B2D0022C600D5000012D302E54900048900654A010189006139009056101012007D133060070045525109E800FF2100855261032C0000E';
wwv_flow_api.g_varchar2_table(39) := '700830300A9ED0260C90061E502521840A00C0773BA000A3700236664E54E09970901080C001690055C586047B3044AE100215E00102604D293005E94007269101CCB94E23F3051CFF000496100454C020ECF03458A8569E50038440083530088A781012';
wwv_flow_api.g_varchar2_table(40) := '1004EF19049050733067080000290100093D310FEE099F04C09B111107D5400025A00ED4E81011100198F0636D921099C0042580006B305255F21606DA1075600225E00955F06CD4674E16E17DD8F395339011FA491036C0044CB0065E55A2EC51A31F01';
wwv_flow_api.g_varchar2_table(41) := '0814200154400512501A064106B45600516022365AA446CA10340000E45700C1100208C03D21D0772DC076475AA5564A10BFD06735112EF6C00154A00367C00263E084BB600B3F77A5686AA5EEC007FB941C9B020CAEA0121A293D035072697AA7E7F100';
wwv_flow_api.g_varchar2_table(42) := '2EF02D09B5A540246247709D783AA8367A0086100272890C0500548F2B090B30C001AF49A8925A1C72B20E0C000417500187100052F00E3760631D3AA9A20A1732F0A0336AA40101003B';
end;
/
begin
wwv_flow_api.create_theme_image(
  p_id =>71131715554453408 + wwv_flow_api.g_id_offset,
  p_flow_id =>wwv_flow.g_flow_id,
  p_theme_id  => 101,
  p_varchar2_table=> wwv_flow_api.g_varchar2_table,
  p_mimetype=> '');
end;
/
prompt  ...build options used by application 155
--
 
begin
 
null;
 
end;
/

--application/shared_components/globalization/messages
prompt  ...messages used by application: 155
--
--application/shared_components/globalization/dyntranslations
prompt  ...dynamic translations used by application: 155
--
--application/shared_components/globalization/language
prompt  ...Language Maps for Application 155
--
 
begin
 
null;
 
end;
/

prompt  ...Shortcuts
--
--application/shared_components/user_interface/shortcuts/anvl
 
begin
 
declare
  c1 varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
c1:=c1||'DECLARE'||chr(10)||
'l_value := V(#CURRENT_ITEM_NAME#);'||chr(10)||
'IF  l_value = ''%null'' || ''%'' THEN'||chr(10)||
'  RETURN NULL;'||chr(10)||
'ELSE'||chr(10)||
' RETURN l_value;'||chr(10)||
'END IF;'||chr(10)||
'END;';

wwv_flow_api.create_shortcut (
 p_id=> 49585475337482134 + wwv_flow_api.g_id_offset,
 p_flow_id=> wwv_flow.g_flow_id,
 p_shortcut_name=> 'ANVL',
 p_shortcut_type=> 'FUNCTION_BODY',
 p_shortcut=> c1);
end;
null;
 
end;
/

--application/shared_components/user_interface/shortcuts/p32_label
 
begin
 
declare
  c1 varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
c1:=c1||'RETURN ('||chr(10)||
'mip_enquiries_helper.label_condition(p_field_name=>substr(''#CURRENT_ITEM_NAME#'',5) , p_enty_code=>:P32_ENTY_CODE)'||chr(10)||
');'||chr(10)||
''||chr(10)||
'';

wwv_flow_api.create_shortcut (
 p_id=> 53637297205802815 + wwv_flow_api.g_id_offset,
 p_flow_id=> wwv_flow.g_flow_id,
 p_shortcut_name=> 'P32_LABEL',
 p_shortcut_type=> 'FUNCTION_BODY',
 p_shortcut=> c1);
end;
null;
 
end;
/

--application/shared_components/user_interface/shortcuts/delete_confirm_msg
 
begin
 
declare
  c1 varchar2(32767) := null;
  l_clob clob;
  l_length number := 1;
begin
c1:=c1||'Would you like to perform this delete action?';

wwv_flow_api.create_shortcut (
 p_id=> 55851980330447105 + 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 => 60539275750281209 + 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 => 60540572071298036 + 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 54130897433606412
 
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=> 54130897433606412 + 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 54130980603606414
 
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=> 54130980603606414 + 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 54131098499606414
 
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=> 54131098499606414 + 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 56772791679388739
 
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=> 56772791679388739 + wwv_flow_api.g_id_offset,
  p_flow_id=> wwv_flow.g_flow_id,
  p_name=> 'MIP_SECURITY',
  p_description=>'The WebMIP authentication scheme.',
  p_page_sentry_function=> s1,
  p_sess_verify_function=> s2,
  p_pre_auth_process=> s3,
  p_auth_function=> s4,
  p_post_auth_process=> s5,
  p_invalid_session_page=>'101',
  p_invalid_session_url=>'',
  p_cookie_name=>'',
  p_cookie_path=>'',
  p_cookie_domain=>'',
  p_ldap_host=>'',
  p_ldap_port=>'',
  p_ldap_string=>'',
  p_attribute_01=>'',
  p_attribute_02=>'wwv_flow_custom_auth_std.logout?p_this_flow=&FLOW_ID.&p_next_flow_page_sess=&FLOW_ID.:500',
  p_attribute_03=>'',
  p_attribute_04=>'',
  p_attribute_05=>'',
  p_attribute_06=>'',
  p_attribute_07=>'',
  p_attribute_08=>'',
  p_required_patch=>'');
end;
null;
 
end;
/

--application/end_environment
commit;
commit;
begin 
execute immediate 'alter session set nls_numeric_characters='''||wwv_flow_api.g_nls_numeric_chars||'''';
end;
/
set verify on
set feedback on
prompt  ...done
