This page (revision-13) was last changed on 26-Nov-2021 10:22 by ihowie

This page was created on 26-Nov-2021 10:22 by ihowie

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
13 26-Nov-2021 10:22 4 KB ihowie to previous
12 26-Nov-2021 10:22 4 KB ihowie to previous | to last
11 26-Nov-2021 10:22 4 KB ihowie to previous | to last
10 26-Nov-2021 10:22 3 KB ihowie to previous | to last
9 26-Nov-2021 10:22 3 KB ihowie to previous | to last
8 26-Nov-2021 10:22 3 KB ihowie to previous | to last
7 26-Nov-2021 10:22 3 KB ihowie to previous | to last
6 26-Nov-2021 10:22 3 KB ihowie to previous | to last
5 26-Nov-2021 10:22 3 KB ihowie to previous | to last
4 26-Nov-2021 10:22 3 KB ihowie to previous | to last
3 26-Nov-2021 10:22 3 KB ihowie to previous | to last
2 26-Nov-2021 10:22 3 KB ihowie to previous | to last
1 26-Nov-2021 10:22 3 KB ihowie to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 22 changed 83 lines
-- - current employment.
--Setup - The following set up is requried in the referencing UC
-- - Global variables - setup and initialized
-- - G_EL_BEGIN_DATE - Date
-- - G_EL_END_DATE -Date
-- - G_ELEMENT -Char
--Return - This function will return a NUMBER of hours in the element that
-- -have occured between the begin and end dates.
-- -If the NUMBER returned is negative then an error condition has
-- -occured.
-- - -999 problem wiht the begin date
-- - -998 problem with the end date
-- - -997 problem with the element
-- - -996 problem with the return select
v_fmlahrs NUMBER;
v_begin_id Number;
v_end_id Number;
v_pel_id Number;
v_eid Number;
BEGIN
p2k_smerl(P2K_PMWRKFLW.kmex_id,'P2K_CF_FMLAHRS',1,NULL,NULL,NULL,NULL,'Version: 20140716');
BEGIN
SELECT ID
INTO v_begin_id
FROM p2k_am_user_calc_globals mucg
WHERE GLOBAL_NAME = 'G_EL_BEGIN_DATE';
EXCEPTION
WHEN OTHERS THEN RETURN -999;
END;
BEGIN
SELECT ID
INTO v_end_id
FROM p2k_am_user_calc_globals mucg
WHERE GLOBAL_NAME = 'G_EL_END_DATE';
EXCEPTION
WHEN OTHERS THEN RETURN -998;
END;
BEGIN
SELECT id
INTO v_pel_id
FROM p2k_am_user_calc_globals mucg
WHERE GLOBAL_NAME = 'G_ELEMENT';
EXCEPTION
WHEN OTHERS THEN RETURN -997;
END;
v_eid := p2k_pmucutil.eid.id;
BEGIN
SELECT SUM(ENTERED_VALUE)
INTO v_fmlahrs
FROM P2K_PR_PAY_HEADERS PPH,
P2K_PR_PAY_LINES PPL,
P2K_PR_PAY_LINE_DETAILS PPLD
WHERE PPH.ID = PPL.PPH_ID
AND PPL.ID = PPLD.PPL_ID
AND PPH.EEM_ID in (SELECT EEM.ID FROM P2K_HR_EMPLOYMENTS EEM WHERE EEM.EID_ID = v_eid)
AND PPL.START_DATE BETWEEN p2k_pmucutil.m_global(v_begin_id).date_field and p2k_pmucutil.m_global(v_end_id).date_field
AND PPLD.PPC_ID IN
( SELECT PELD.PPC_ID
FROM P2K_PR_ELEMENTS PEL,
P2K_PR_ELEMENT_DETAILS PELD
WHERE PEL.ID = PELD.PEL_ID
AND PEL.ELEMENT_CODE = p2k_pmucutil.m_global(v_pel_id).char_field);
EXCEPTION
WHEN OTHERS THEN RETURN -996;
END;
RETURN v_fmlahrs;
END P2K_CF_FMLAHRS;
/
\\ -- - current employment.
\\
\\ --Setup - The following set up is requried in the referencing UC
\\ -- - Global variables - setup and initialized
\\ -- - G_EL_BEGIN_DATE - Date
\\ -- - G_EL_END_DATE -Date
\\ -- - G_ELEMENT -Char
\\
\\ --Return - This function will return a NUMBER of hours in the element that
\\ -- -have occured between the begin and end dates.
\\ -- -If the NUMBER returned is negative then an error condition has
\\ -- -occured.
\\ -- - -999 problem wiht the begin date
\\ -- - -998 problem with the end date
\\ -- - -997 problem with the element
\\ -- - -996 problem with the return select
\\
\\ v_fmlahrs NUMBER;
\\ v_begin_id Number;
\\ v_end_id Number;
\\ v_pel_id Number;
\\ v_eid Number;
\\
\\ BEGIN
\\ p2k_smerl(P2K_PMWRKFLW.kmex_id,'P2K_CF_FMLAHRS',1,NULL,NULL,NULL,NULL,'Version: 20140716');\\\\
\\
\\ BEGIN
\\ SELECT ID
\\ INTO v_begin_id
\\ FROM p2k_am_user_calc_globals mucg
\\ WHERE GLOBAL_NAME = 'G_EL_BEGIN_DATE';
\\
\\ EXCEPTION
\\ WHEN OTHERS THEN RETURN -999;
\\ END;
\\
\\ BEGIN
\\ SELECT ID
\\ INTO v_end_id
\\ FROM p2k_am_user_calc_globals mucg
\\ WHERE GLOBAL_NAME = 'G_EL_END_DATE';
\\
\\ EXCEPTION
\\ WHEN OTHERS THEN RETURN -998;
\\ END;
\\
\\ BEGIN
\\ SELECT id
\\ INTO v_pel_id
\\ FROM p2k_am_user_calc_globals mucg
\\ WHERE GLOBAL_NAME = 'G_ELEMENT';
\\ EXCEPTION
\\ WHEN OTHERS THEN RETURN -997;
\\ END;
\\
\\ v_eid := p2k_pmucutil.eid.id;
\\
\\BEGIN
\\ SELECT SUM(ENTERED_VALUE)
\\ INTO v_fmlahrs
\\FROM P2K_PR_PAY_HEADERS PPH,
\\ P2K_PR_PAY_LINES PPL,
\\ P2K_PR_PAY_LINE_DETAILS PPLD
\\WHERE PPH.ID = PPL.PPH_ID
\\AND PPL.ID = PPLD.PPL_ID
\\AND PPH.EEM_ID in (SELECT EEM.ID FROM P2K_HR_EMPLOYMENTS EEM WHERE EEM.EID_ID = v_eid)
\\AND PPL.START_DATE BETWEEN p2k_pmucutil.m_global(v_begin_id).date_field and p2k_pmucutil.m_global(v_end_id).date_field
\\AND PPLD.PPC_ID IN
\\( SELECT PELD.PPC_ID
\\ FROM P2K_PR_ELEMENTS PEL,
\\ P2K_PR_ELEMENT_DETAILS PELD
\\ WHERE PEL.ID = PELD.PEL_ID
\\ AND PEL.ELEMENT_CODE = p2k_pmucutil.m_global(v_pel_id).char_field);
\\
\\ EXCEPTION
\\ WHEN OTHERS THEN RETURN -996;
\\END;
\\
\\ RETURN v_fmlahrs;
\\
\\END P2K_CF_FMLAHRS;
\\
\\/