CREATE OR REPLACE PACKAGE BODY efnow099$ IS c_bin_mime CONSTANT VARCHAR2(100) := 'application/octet-stream'; PROCEDURE conf_css IS BEGIN htp.p(' h2 { color : #FF3030; } .confTR { height : 20px; } #confTextDiv { width : 95%; white-space : pre; overflow-x : scroll; border : 1px solid; margin-left : 5px; margin-right : 5px; padding : 5px; } '); END conf_css; FUNCTION check_customer_conf ( p_cust_id customers.cust_id%TYPE , p_conf_id confirmations.conf_id%TYPE ) RETURN BOOLEAN IS -- l_return BOOLEAN := TRUE; l_count NUMBER := NULL; -- BEGIN -- SELECT count(*) INTO l_count FROM confirmations conf ,contracts cont WHERE conf.conf_id = p_conf_id AND conf.cont_id = cont.cont_id AND cont.cust_id = p_cust_id; -- IF l_count < 1 THEN -- l_return := FALSE; -- END IF; -- RETURN l_return; -- END check_customer_conf; PROCEDURE startup( p_conf_id IN NUMBER , p_approved IN VARCHAR2 DEFAULT 'Y' ) IS -- Cursor to grab most of the confirmation details required CURSOR c_conf IS SELECT cust.name customer_name , cont.contract_number contract_number , nomi.identifier nomi_identifier , conf.confirmation_sent confirmation_sent , conf.conf_id FROM confirmations conf , nominations nomi , contracts cont , customers cust WHERE cust.cust_id = cont.cust_id AND cont.cont_id = conf.cont_id (+) AND nomi.nomi_id (+)= conf.nomi_id AND conf.conf_id = p_conf_id AND NVL(conf.approved,'N') = p_approved; -- l_conf_rec c_conf%ROWTYPE; -- l_conf_text_clob CLOB; l_conf_text_temp VARCHAR2(4000); l_text_pos NUMBER := 1; l_text_length NUMBER := 0; -- l_success BOOLEAN := TRUE; -- BEGIN -- g_package_name := 'efnow120$'; -- IF NOT caco_security.security_check(p_package_name => g_package_name) THEN -- RETURN; -- END IF; -- g_package_name := 'efnow099$'; -- htp.p(' '); -- wsgl.openpagehead(g_title); -- caco_system.content_type; -- htp.p(''); htp.p(''); -- wsgl.closepagehead; wsgl.openpagebody(FALSE); htp.p(caco_system.menu); -- htp.p('
| '||caco_utilities.get_module_text(2517)||' | '); -- Confirmation ID htp.p(''||l_conf_rec.conf_id||' |
| '||caco_utilities.get_module_text(1145)||' | '); -- Customer Name htp.p(''||l_conf_rec.customer_name||' |
| '||caco_utilities.get_module_text(2013)||' | '); -- Contract Number htp.p(''||l_conf_rec.contract_number||' |
| '||caco_utilities.get_module_text(2060)||' | '); -- Nomination Identifier htp.p(''||NVL(l_conf_rec.nomi_identifier, caco_utilities.get_module_text(2037))||' |
| '||caco_utilities.get_module_text(2061)||' | '); -- Confirmation Sent htp.p(''||TO_CHAR(l_conf_rec.confirmation_sent, cout_system_configuration.get_configuration_item('G_DATE_FORMAT')||' HH24:MI:SS')||' |
'||caco_utilities.get_module_text(2065)||'
'); -- Confirmation Text -- -- Loop through all of the clob and display it in chunks...... -- Create a width limmited dive for putting it in htp.p('');
--
-- Get the CLOB
BEGIN
SELECT confirmation_text
INTO l_conf_text_clob
FROM confirmations
WHERE conf_id = p_conf_id;
EXCEPTION
WHEN others THEN
l_success := FALSE;
END;
--
IF l_success THEN
-- Get the length of the Confirmation text CLOB
l_text_length := DBMS_LOB.GETLENGTH(l_conf_text_clob);
--
-- Loop through the clob in chunks of 4000
WHILE l_text_pos <= l_text_length LOOP
--
l_conf_text_temp := DBMS_LOB.SUBSTR( l_conf_text_clob, 4000, l_text_pos );
--
htp.p( l_conf_text_temp );
--
l_text_pos := l_text_pos + 4000;
--
END LOOP;
--
ELSE
-- error - display a message?
htp.p(caco_utilities.get_module_text(2258)); -- Error reading confirmation text. Please contact support
--
END IF;
-- Close confText
htp.p('
'||REPLACE(caco_utilities.get_module_text(3854),'