DBA Data[Home] [Help]

PACKAGE: APPS.PY_ZA_TX_UTL_01082000

Source


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