274 lines
9.8 KiB
Plaintext
274 lines
9.8 KiB
Plaintext
create or replace package body efnow110$js$cuin is
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
-- Name: efnow110$js$cuin.CreateViewJavaScript
|
|
--
|
|
-- Description:
|
|
--
|
|
-- Parameters:
|
|
--
|
|
--------------------------------------------------------------------------------
|
|
procedure CreateViewJavaScript(
|
|
VF_ROWS_UPDATED in integer,
|
|
VF_ROWS_DELETED in integer,
|
|
VF_ROWS_ERROR in integer,
|
|
VF_BODY_ATTRIBUTES in varchar2,
|
|
IF_ROWS_INSERTED in integer,
|
|
IF_ROWS_ERROR in integer,
|
|
RL_REQUERY_BUT_ACTION in varchar2,
|
|
LOV_FRAME in varchar2) is
|
|
begin
|
|
if not caco_security.security_check('efnow110$cuin') then
|
|
return;
|
|
end if;
|
|
|
|
htp.p(WSGJSL.OpenScript);
|
|
htp.p('var index = 0;');
|
|
if IF_ROWS_INSERTED > 0 then
|
|
htp.p( 'var DataChange = true;' );
|
|
else
|
|
htp.p( 'var DataChange = false;' );
|
|
end if;
|
|
if IF_ROWS_ERROR > 0 then
|
|
htp.p( 'var DataChangeErrors = true;' );
|
|
else
|
|
htp.p( 'var DataChangeErrors = false;' );
|
|
end if;
|
|
|
|
if to_char(efnow110$cust.CURR_VAL.CUST_ID) is not null then
|
|
htp.p( 'var P_CUST_ID = new Array();' );
|
|
htp.p( 'P_CUST_ID[0] = "' || WSGL.EscapeURLParam(to_char(efnow110$cust.CURR_VAL.CUST_ID)) || '";' );
|
|
end if;
|
|
htp.p( 'var P_2 = new Array();' );
|
|
htp.p( 'P_2[0] = "' || WSGL.EscapeURLParam(nvl(to_char(efnow110$cust.CURR_VAL.CUST_ID), '')) || '";' );
|
|
htp.p( 'var CUIN_CHK_VALUE = new Array();' );
|
|
htp.p( 'CUIN_CHK_VALUE[0] = ' || to_char(WSGL.Checksum(''|| to_char(efnow110$cust.CURR_VAL.CUST_ID)|| to_char(efnow110$cust.CURR_VAL.CUST_ID))) || ';' );
|
|
|
|
htp.p( 'var P_23 = new Array();' );
|
|
htp.p( 'P_23[0] = "' || WSGL.EscapeURLParam(to_char(efnow110$cuin.CURR_VAL.CUST_ID)) || '";' );
|
|
htp.p( 'var P_24 = new Array();' );
|
|
htp.p( 'P_24[0] = "' || WSGL.EscapeURLParam(to_char(efnow110$cuin.CURR_VAL.INTE_ID)) || '";' );
|
|
|
|
htp.p(WSGJSL.RtnCheckModified);
|
|
htp.p(WSGJSL.RtnRevertForm);
|
|
htp.p(WSGJSL.RtnFlagRow);
|
|
htp.p(WSGJSL.OpenEvent('CUIN','OnLoad'));
|
|
htp.p('
|
|
if ( FormType != "PostDelete")
|
|
{
|
|
form_num=0;
|
|
do
|
|
{
|
|
elem_num=0;
|
|
len = document.forms[form_num].elements.length;
|
|
if (len > 0)
|
|
{
|
|
while (elem_num < len &&
|
|
document.forms[form_num].elements[elem_num].type != "text" &&
|
|
document.forms[form_num].elements[elem_num].type != "textarea")
|
|
{
|
|
elem_num++;
|
|
}
|
|
if (elem_num < len)
|
|
{
|
|
document.forms[form_num].elements[elem_num].focus();
|
|
break;
|
|
}
|
|
}
|
|
form_num++;
|
|
} while ( form_num < document.forms.length );
|
|
}
|
|
');
|
|
htp.p(WSGJSL.CloseEvent);
|
|
htp.p(WSGJSL.OpenEvent('btnVFU','OnClick'));
|
|
htp.p(WSGJSL.StandardSubmit(false));
|
|
|
|
htp.p(WSGJSL.CloseEvent);
|
|
htp.p(WSGJSL.OpenEvent('btnVFD','OnClick'));
|
|
htp.p(WSGJSL.VerifyDelete(WSGL.MsgGetText(118, WSGLM.DSP118_CONFIRM_DELETE)));
|
|
htp.p(WSGJSL.CloseEvent);
|
|
htp.p(WSGJSL.OpenEvent('btnVFR','OnClick'));
|
|
htp.p(WSGJSL.StandardSubmit(false));
|
|
|
|
htp.p(WSGJSL.CloseEvent);
|
|
htp.p(WSGJSL.OpenEvent('btnVFI','OnClick'));
|
|
htp.p(WSGJSL.StandardSubmit(false));
|
|
|
|
htp.p(WSGJSL.CloseEvent);
|
|
htp.p(WSGJSL.CloseScript);
|
|
exception
|
|
when others then
|
|
WSGL.DisplayMessage(WSGL.MESS_EXCEPTION, SQLERRM, ''||' : '||'#Intermediaries#1059#',
|
|
VF_BODY_ATTRIBUTES, 'efnow110$js$cuin.CreateViewJavaScript');
|
|
end;
|
|
|
|
--------------------------------------------------------------------------------
|
|
-- Name: efnow110$js$cuin.CreateInsertJavaScript
|
|
--
|
|
-- Description:
|
|
--
|
|
-- Parameters:
|
|
--
|
|
--------------------------------------------------------------------------------
|
|
procedure CreateInsertJavaScript(
|
|
IF_ROWS_INSERTED in integer,
|
|
IF_ROWS_ERROR in integer,
|
|
IF_BODY_ATTRIBUTES in varchar2,
|
|
RL_REQUERY_BUT_ACTION in varchar2,
|
|
LOV_FRAME in varchar2) is
|
|
begin
|
|
if not caco_security.security_check('efnow110$cuin') then
|
|
return;
|
|
end if;
|
|
|
|
htp.p(WSGJSL.OpenScript);
|
|
htp.p('var FormType = "Insert";');
|
|
htp.p('var index = 0;');
|
|
if IF_ROWS_INSERTED > 0 then
|
|
htp.p( 'var DataChange = true;' );
|
|
else
|
|
htp.p( 'var DataChange = false;' );
|
|
end if;
|
|
if IF_ROWS_ERROR > 0 then
|
|
htp.p( 'var DataChangeErrors = true;' );
|
|
else
|
|
htp.p( 'var DataChangeErrors = false;' );
|
|
end if;
|
|
|
|
if to_char(efnow110$cust.CURR_VAL.CUST_ID) is not null then
|
|
htp.p( 'var P_CUST_ID = new Array();' );
|
|
htp.p( 'P_CUST_ID[0] = "' || WSGL.EscapeURLParam(to_char(efnow110$cust.CURR_VAL.CUST_ID)) || '";' );
|
|
end if;
|
|
htp.p( 'var P_2 = new Array();' );
|
|
htp.p( 'P_2[0] = "' || WSGL.EscapeURLParam(nvl(to_char(efnow110$cust.CURR_VAL.CUST_ID), '')) || '";' );
|
|
if (to_char(efnow110$cust.CURR_VAL.CUST_ID) is not null ) then
|
|
htp.p( 'var CUIN_CHK_VALUE = new Array();' );
|
|
htp.p( 'CUIN_CHK_VALUE[0] = ' || to_char(WSGL.Checksum(''|| to_char(efnow110$cust.CURR_VAL.CUST_ID)|| to_char(efnow110$cust.CURR_VAL.CUST_ID))) || ';' );
|
|
end if;
|
|
|
|
htp.p(WSGJSL.RtnCheckModified);
|
|
htp.p(WSGJSL.RtnRevertForm);
|
|
htp.p(WSGJSL.RtnFlagRow);
|
|
htp.p(WSGJSL.OpenEvent('L_INTERMEDIARIES_NAME2','LOV')); htp.p('
|
|
var depStr = "";
|
|
var modeStr = ""
|
|
if (index == null)
|
|
index = 0;
|
|
if (ctl[index].form.name.search(/VForm$/) == -1)
|
|
{
|
|
modeStr = "INS";
|
|
}
|
|
else
|
|
{
|
|
modeStr = "UPD";
|
|
}
|
|
depStr = depStr + "&P_2=" + escape(ctl[index].form.P_2.value);
|
|
');
|
|
|
|
if LOV_FRAME is not null then
|
|
htp.p(' var lovFra = "'||LOV_FRAME||'";');
|
|
htp.p(' var winpar = "";');
|
|
else
|
|
htp.p(' var lovFra = "winLOV";');
|
|
htp.p(' var winpar = "scrollbars=yes,resizable=yes,width=400,height=400";');
|
|
end if;
|
|
htp.p(' var filterprompt = "";');
|
|
htp.p('
|
|
|
|
var lovTitle = "'||replace('','"','\"')||'";
|
|
window.current_lov_title = lovTitle;
|
|
|
|
JSLOpenLOV( ctl[index], index, modeStr, "efnow110$cuin.l_intermediaries_name2_lov", depStr, lovFra, winpar, filterprompt );
|
|
|
|
');
|
|
|
|
htp.p(WSGJSL.CloseEvent);
|
|
WSGJSL.Output_Invoke_CAL_JS ('efnow110$cuin', 'scrollbars=no,resizable=no,width=320,height=350');
|
|
|
|
|
|
htp.p(WSGJSL.OpenEvent('CUIN','OnLoad'));
|
|
htp.p('
|
|
if ( FormType != "PostDelete")
|
|
{
|
|
form_num=0;
|
|
do
|
|
{
|
|
elem_num=0;
|
|
len = document.forms[form_num].elements.length;
|
|
if (len > 0)
|
|
{
|
|
while (elem_num < len &&
|
|
document.forms[form_num].elements[elem_num].type != "text" &&
|
|
document.forms[form_num].elements[elem_num].type != "textarea")
|
|
{
|
|
elem_num++;
|
|
}
|
|
if (elem_num < len)
|
|
{
|
|
document.forms[form_num].elements[elem_num].focus();
|
|
break;
|
|
}
|
|
}
|
|
form_num++;
|
|
} while ( form_num < document.forms.length );
|
|
}
|
|
');
|
|
htp.p(WSGJSL.CloseEvent);
|
|
htp.p(WSGJSL.OpenEvent('btnIFI','OnClick'));
|
|
htp.p(WSGJSL.StandardSubmit(false));
|
|
|
|
htp.p(WSGJSL.CloseEvent);
|
|
htp.p(WSGJSL.OpenEvent('btnIFR','OnClick'));
|
|
htp.p(WSGJSL.StandardSubmit(false));
|
|
|
|
htp.p(WSGJSL.CloseEvent);
|
|
htp.p(WSGJSL.CloseScript);
|
|
exception
|
|
when others then
|
|
WSGL.DisplayMessage(WSGL.MESS_EXCEPTION, SQLERRM, ''||' : '||'#Intermediaries#1059#',
|
|
IF_BODY_ATTRIBUTES, 'efnow110$js$cuin.CreateInsertJavaScript');
|
|
end;
|
|
|
|
--------------------------------------------------------------------------------
|
|
-- Name: efnow110$js$cuin.CreateListJavaScript
|
|
--
|
|
-- Description:
|
|
--
|
|
-- Parameters:
|
|
--
|
|
--------------------------------------------------------------------------------
|
|
procedure CreateListJavaScript (
|
|
RL_BODY_ATTRIBUTES in varchar2)
|
|
is
|
|
begin
|
|
if not caco_security.security_check('efnow110$cuin') then
|
|
return;
|
|
end if;
|
|
|
|
htp.p(WSGJSL.OpenScript);
|
|
htp.p('var FormType = "List";');
|
|
|
|
if to_char(efnow110$cust.CURR_VAL.CUST_ID) is not null then
|
|
htp.p( 'var P_CUST_ID = new Array();' );
|
|
htp.p( 'P_CUST_ID[0] = "' || WSGL.EscapeURLParam(to_char(efnow110$cust.CURR_VAL.CUST_ID)) || '";' );
|
|
end if;
|
|
htp.p( 'var P_2 = new Array();' );
|
|
htp.p( 'P_2[0] = "' || WSGL.EscapeURLParam(nvl(to_char(efnow110$cust.CURR_VAL.CUST_ID), '')) || '";' );
|
|
if (to_char(efnow110$cust.CURR_VAL.CUST_ID) is not null ) then
|
|
htp.p( 'var CUIN_CHK_VALUE = new Array();' );
|
|
htp.p( 'CUIN_CHK_VALUE[0] = ' || to_char(WSGL.Checksum(''|| to_char(efnow110$cust.CURR_VAL.CUST_ID)|| to_char(efnow110$cust.CURR_VAL.CUST_ID))) || ';' );
|
|
end if;
|
|
|
|
htp.p( 'var P_23 = new Array();' );
|
|
htp.p( 'var P_24 = new Array();' );
|
|
|
|
htp.p(WSGJSL.CloseScript);
|
|
exception
|
|
when others then
|
|
WSGL.DisplayMessage(WSGL.MESS_EXCEPTION, SQLERRM, ''||' : '||'#Intermediaries#1059#',
|
|
RL_BODY_ATTRIBUTES, 'efnow110$js$cuin.CreateListJavaScript');
|
|
end;
|
|
end;
|
|
/
|