create or replace package body efnow101$ is private_ModuleRef WSGOC.MODULE_REF; procedure CreateStartupJavaScript; PROCEDURE get_nomi ( p_nomi_id IN nominations.nomi_id%TYPE ) IS -- get_nomi -- -- BEGIN -- IF NOT caco_security.security_check('efnow101$') THEN -- RETURN; -- END IF; -- FOR nomi_rec IN ( SELECT NULL FROM nominations nomi ,contracts cont WHERE nomi.nomi_id = p_nomi_id AND nomi.cont_id = cont.cont_id AND cont.cust_id = caco_utilities.get_cust_id ) LOOP -- amfr_excel.download(p_nomi_id => p_nomi_id); -- EXIT; -- END LOOP; -- END; PROCEDURE nomi_css IS -- nomi_css -- -- BEGIN -- IF NOT caco_security.security_check('efnow101$') THEN -- RETURN; -- END IF; -- htp.p(' h2 { color : #FF3030; } .nomiTR { height : 20px; } #nomiTextDiv { width : 95%; white-space : pre; overflow-x : scroll; border : 1px solid; margin-left : 5px; margin-right : 5px; padding : 5px; } '); -- END; PROCEDURE view_details(p_nomi_id IN nominations.nomi_id%TYPE) IS -- view_details -- -- -- CURSOR c_nomi IS SELECT cust.name customer_name ,cont.contract_number contract_number ,nomi.identifier nomi_identifier ,conf.CONFIRMATION_SENT AS tsa_timestamp ,nomi.nomi_id FROM nominations nomi, contracts cont, customers cust, confirmations conf WHERE cust.cust_id = cont.cust_id AND cont.cont_id = nomi.cont_id AND nomi.nomi_id = p_nomi_id AND nomi.nomi_id = conf.nomi_id AND conf.confirmation_type = 'NO'; -- l_nomi_rec c_nomi%ROWTYPE; -- l_nomi_text_clob CLOB; l_nomi_text_temp VARCHAR2(4000); l_text_pos NUMBER := 1; l_text_length NUMBER := 0; -- l_success BOOLEAN := TRUE; -- BEGIN -- IF NOT caco_security.security_check('efnow101$') THEN -- RETURN; -- END IF; -- htp.p(' '); -- wsgl.openpagehead(caco_utilities.get_module_text(2405)); --wsgl.metatag; --htp.p(''); 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(1145) || ': | '); -- Customer Name htp.p('' || l_nomi_rec.customer_name || ' |
| ' || caco_utilities.get_module_text(2013) || ': | '); -- Contract Number htp.p('' || l_nomi_rec.contract_number || ' |
| ' || caco_utilities.get_module_text(2060) || ': | '); -- Nomination Identifier htp.p('' || l_nomi_rec.nomi_identifier || ' |
| ' || caco_utilities.get_module_text(118) || ': | '); -- Created On htp.p('' || EFNOW101$NOMI.FORMATDATETIME(TO_CHAR(l_nomi_rec.tsa_timestamp,'DD/MM/YYYY HH24:MI')) || ' |
' || 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 conf.confirmation_text
INTO l_nomi_text_clob
FROM confirmations conf
WHERE conf.nomi_id = p_nomi_id
AND conf.confirmation_type = 'NO';
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_nomi_text_clob);
--
-- Loop through the clob in chunks of 4000
WHILE l_text_pos <= l_text_length LOOP
--
l_nomi_text_temp := DBMS_LOB.SUBSTR(l_nomi_text_clob,
4000,
l_text_pos);
--
htp.p(l_nomi_text_temp);
--
l_text_pos := l_text_pos + 4000;
--
END LOOP;
--
ELSE
--
-- Error
wsgl.displaymessage(p_type => WSGL.MESS_ERROR
,p_mess => caco_utilities.get_module_text(2330)
);
--
END IF;
-- Close nomiText
htp.p('