DBA Data[Home] [Help]

PACKAGE: APPS.PY_ZA_TX_UTL_01032000

Source


1 PACKAGE py_za_tx_utl_01032000 AUTHID CURRENT_USER AS
2 /* $Header: pyzatu01.pkh 120.2 2005/06/28 00:12:39 kapalani noship $ */
3 /* Copyright (c) Oracle Corporation 2000. All rights reserved. */
4 /*
5    PRODUCT
6       Oracle Payroll - ZA Localisation Tax Module
7 
8    NAME
9       py_za_tx_utl_01032000.pkh
10 
11    DESCRIPTION
12       This is the ZA Tax Module utility package.  It contains
13       functions and procedures used by the main tax package.
14 
15    PUBLIC FUNCTIONS
16       GlbVal
17          Returns the value of a Oracle Application Global
18          date effectively
19       RetroInPrd
20          Boolean function returns true if a retro action
21          took place in the specified period
22       LatePayPeriod
23          Boolean function returns true if the current period
24          is a Late Payment Period, i.e. a payment over the
25          tax year boundary.
26       LstPeriod
27          Boolean function returns true if current period is the
28          last period in the current tax year.
29       EmpTermInPeriod
30          Boolean function returns true if the assignment was terminated
31          in the current pay period.
32       EmpTermPrePeiod
33          Boolean function returns true if the assignment was terminated
34          before the current period.
35       PreErnPeriod
36          Boolean function returns true if this run is deemed to be
37          a Pre-Earnings Calculation Run.
38          For a complete description see the tax module design document.
39       SitePeriod
40          Boolean function returns true if it is a tax site period.
41          For a complete description see the tax module design document.
42       Annualise
43          Returns annualised value to the calling object.
44          For a complete description see the tax module design document.
45       TaxLiability
46          Returns the gross tax liability on passed value.
47          For a complete description see the tax module design document.
48       DeAnnualise
49          Returns the de-annualised value to the calling object.
50          For a complete description see the tax module design document.
51       DaysWorked
52          Returns the number of days worked for the assignment.
53          For a complete description see the tax module design document.
54 
55    PUBLIC PROCEDURES
56       StartHrTrace
57          Sets package global that determines if extra trace information
58          will be written to file - hr_utility
59       StopHrTrace
60          Stops trace information from being written to file
61       WriteHrTrace
62          Writes extra trace information to file if global
63          has been set
64       PeriodFactor
65          Calculates the period factor for the assignment.
66          For a complete description see the tax module design document.
67       PossiblePeriodsFactor
68          Calculates the possible period factor for the assignment.
69          For a complete description see the tax module design document.
70       SetRebates
71          Calculate tax Rebate and Threshold values.
72          For a complete description see the tax module design document.
73       Abatements
74          Calculates all necessary abatements.
75          For a complete description see the tax module design document.
76       ArrearExcess
77          Calculates the arrear excess figure to 'effectively' update the
78          Asg_Itd dimension of the arrear excess pension and retirement
79          annuity balances.  Will only fire on siteperiod.
80       TrvAll
81          Calculates the taxable travel allowance over a period of
82          time based on the effective global values at the time.
83          For a complete description see the tax module design document.
84       NpVal
85          Validates the calculated category liabilities.
86          For a complete description see the tax module design document.
87       SitPaySplit
88          Calculates the site paye split of tax liabilities.
89          For a complete description see the tax module design document.
90       Trace
91          Traces the tax calculation.
92          For a complete description see the tax module design document.
93       ClearGlobals
94          Clears any set package globals.
95          For a complete description see the tax module design document.
96 
97    PRIVATE FUNCTIONS
98       see package body
99 
100    PRIVATE PROCEDURES
101       see package body
102 
103    NOTES
104       .
105 
106    MODIFICATION HISTORY
107       Person      Date               Version   Comments
108       ---------   ----------------   -------   -----------------------------------
109       J.N. Louw   13/12/2000         110.3     Upped Header Ver for Patch
110       J.N. Louw   28/09/2000         110.2     Added SetRebates procedure
111       J.N. Louw   28/09/2000         110.1     Fixed NpVal Bug
112       J.N. Louw   27/09/2000         110.0     First Created
113 */
114 
115 /* PACKAGE GLOBAL AREA */
116 -- hr_utility wrapper globals
117   g_HrTraceEnabled  BOOLEAN DEFAULT FALSE;
118   g_HrTracePipeName VARCHAR2(30);
119 
120 /* PACKAGE BODY */
121 
122 -- StartHrTrace
123 -- Wrapper for hr_utility.trace_on
124 PROCEDURE StartHrTrace;
125 
126 -- StopHrTrace
127 -- Wrapper for hr_utility.trace_off
128 PROCEDURE StopHrTrace;
129 
130 -- WriteHrTrace
131 -- Wrapper for hr_utility.trace
132 PROCEDURE WriteHrTrace(
133    p_Buffer VARCHAR2
134    );
135 
136 
137 
138 -- Tax Utility Functions
139 --
140 
141 FUNCTION GlbVal
142    (p_GlbNme ff_globals_f.global_name%TYPE
143    ,p_EffDte DATE
144    ) RETURN ff_globals_f.global_value%TYPE;
145 
146 FUNCTION RetroInPrd RETURN BOOLEAN;
147 
148 FUNCTION LatePayPeriod RETURN BOOLEAN;
149 
150 FUNCTION LstPeriod RETURN BOOLEAN;
151 
152 FUNCTION EmpTermInPeriod RETURN BOOLEAN;
153 
154 FUNCTION EmpTermPrePeriod RETURN BOOLEAN;
155 
156 FUNCTION PreErnPeriod RETURN BOOLEAN;
157 
158 FUNCTION SitePeriod RETURN BOOLEAN;
159 
160 PROCEDURE PeriodFactor;
161 
162 
163 PROCEDURE PossiblePeriodsFactor;
164 
165 
166 FUNCTION Annualise
167    (p_YtdInc IN NUMBER
168    ,p_PtdInc IN NUMBER
169    ) RETURN NUMBER;
170 
171 PROCEDURE SetRebates;
172 
173 PROCEDURE Abatements;
174 
175 PROCEDURE ArrearExcess;
176 
177 FUNCTION TaxLiability
178    (p_Amt  IN NUMBER
179    )RETURN  NUMBER;
180 
181 
182 FUNCTION DeAnnualise
183    (p_Liab IN NUMBER
184    ,p_TxOnYtd IN NUMBER
185    ,p_TxOnPtd IN NUMBER
186    ) RETURN NUMBER;
187 
188 
189 PROCEDURE TrvAll;
190 
191 
192 
193 PROCEDURE NpVal(
194    p_Rf IN BOOLEAN DEFAULT FALSE -- Refund Allowed Regardless
195    );
196 
197 
198 -- DaysWorked
199 /*  Returns the number of days that the person has worked
200     This could be a negative number that would indicate
201     a LatePayePeriod
202 */
203 FUNCTION DaysWorked RETURN NUMBER;
204 
205 
206 PROCEDURE SitPaySplit;
207 
208 
209 -- Trace Function
210 --
211 PROCEDURE Trace;
212 
213 PROCEDURE ClearGlobals;
214 
215 END py_za_tx_utl_01032000;
216