git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@50874 248e525c-4dfb-0310-94bc-949c084e9493

This commit is contained in:
andrew.gilmore
2012-03-19 11:57:19 +00:00
parent 2a0f4900c3
commit 0e9ca75d77
1587 changed files with 500863 additions and 0 deletions

View File

@@ -0,0 +1,88 @@
CREATE OR REPLACE PACKAGE efno_confirmations IS
--
-- Author : GL
-- Created : 16/03/2007 16:23:07
-- Purpose : Package to ecapsulate all confirmation processes and procedures
--
-- Notes:
-- For auto-creation of confirmation of non-existant nominations
-- need to add cont_id to confirmations table.
-- Create a stub confirmation (no nomi_id)
-- Then call add_missing_cnpcv with appropriate values
-- NB: You may need to change the call to default the nomi id?
-- plus you need to make nomi_id optional on cnpcv
--
g_package_name CONSTANT VARCHAR2(30) := 'efno_confirmations';
g_header CONSTANT VARCHAR2(160) := '$Header: $';
g_revision CONSTANT VARCHAR2(160) := '$Revision: $ Patch 0.3';
--
g_perc_split_en module_text.text%TYPE := caco_utilities.get_module_text(3921,'EN');
g_perc_split_hu module_text.text%TYPE := caco_utilities.get_module_text(3921,'HU');
--
TYPE nnpcv_rec IS RECORD ( nnpcv_id nom_net_point_cat_vals.nnpcv_id%TYPE
, coca_id contract_categories.coca_id%TYPE
, conp_id cont_network_points.conp_id%TYPE
, coru_id contract_rules.coru_id%TYPE
, value nom_net_point_cat_vals.value%TYPE
, nomi_id nominations.nomi_id%TYPE
, nomi_received nominations.created_on%TYPE
, defaulted VARCHAR2(1)
, missing VARCHAR2(1) DEFAULT 'N'
, gas_day DATE
, in_error BOOLEAN := FALSE
);
--
TYPE nnpcv_tab IS TABLE OF nnpcv_rec INDEX BY BINARY_INTEGER;
--
g_vc_arr owa_util.vc_arr;
g_nnpcv_tab nnpcv_tab;
--
/**
-- PROCEDURE upd_conf_timestamp
-- Autonomous Transaction
-- Updates the confirmation timestamp with the given date
-- Used by the timestamping functions when a RETRY has been required
--
-- %param p_conf_id Unique Identifier of the confirmation to be updated
-- %param p_timestamp Successful timestamp information
--
*/
PROCEDURE upd_conf_timestamp( p_conf_id IN confirmations.conf_id%TYPE
, p_timestamp IN DATE
);
--
PROCEDURE send_comm_conf( p_gas_day IN VARCHAR2
, p_nomi_id IN owa_util.vc_arr DEFAULT g_vc_arr
, p_cont_id IN owa_util.vc_arr DEFAULT g_vc_arr
, p_accept IN owa_util.vc_arr DEFAULT g_vc_arr
, p_force IN owa_util.vc_arr DEFAULT g_vc_arr );
--
PROCEDURE app_or_del_comm_conf( p_conf_id IN owa_util.vc_arr DEFAULT g_vc_arr
, p_approve IN owa_util.vc_arr DEFAULT g_vc_arr
, p_delete IN owa_util.vc_arr DEFAULT g_vc_arr
);
--
/**
-- PROCEDURE auto_gen_confirmations
-- Automatically generate confirmations for the given gas day.
-- and Customer type (if provided otherwaise all customers)
--
-- %param p_gas_day Gas Day that Commercial confirmations shuold be created for
-- %param p_cuty_id Customer Type ID. All customer if excluded
--
*/
PROCEDURE auto_gen_confirmations( p_gas_day IN DATE
, p_cuty_id IN customer_types.cuty_id%TYPE
, p_cnrt_id IN conf_run_times.cnrt_id%TYPE DEFAULT NULL
);
--
--
/**
-- FUNCTION about
--
-- %return A textual description of the version number and VSS header for this package
*/
FUNCTION about RETURN VARCHAR2;
--
END efno_confirmations;
/