DBA Data[Home] [Help]

PACKAGE: APPS.PY_ZA_TX_UTL_01032002

Source


1 PACKAGE py_za_tx_utl_01032002 AUTHID CURRENT_USER AS
2 /* $Header: pyzatu04.pkh 115.5 2003/05/09 04:36:57 nragavar 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_01032002.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       NegPtd
20          Boolean function returns true if any current PTD
21          total balance value is negative
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       ValidateTaxOns
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       Nageswara   09/05/2003         115.5     Removed Serveroutput ON - GSCC
110       J.N. Louw   15/04/2002         115.4     Removed SPOOL commands
111       J.N. Louw   31/08/2001         115.3     Bug 2224332
112                                                Directors Remuneration
113       J.N. Louw   10/04/2002         115.2     Added dbdrv / gscc
114       J.N. Louw   31/08/2001         115.1     Corrected Spool File
115       J.N. Louw   29/08/2001         115.0     Next Version of Main ZA Tax
116                                                 Package.
117                                                 For detail history see
118                                                 py_za_tx_utl_01082000
119 */
120 
121 -------------------------------------------------------------------------------
122 --                           PACKAGE GLOBAL AREA                             --
123 -------------------------------------------------------------------------------
124 -- hr_utility wrapper globals
125   g_HrTraceEnabled  BOOLEAN DEFAULT FALSE;
126   g_HrTracePipeName VARCHAR2(30);
127 
128    -- Tax Specific Subtypes
129    SUBTYPE t_balance IS NUMBER(15,2);
130 -------------------------------------------------------------------------------
131 --                           PACKAGE SPECIFICATION                           --
132 -------------------------------------------------------------------------------
133 
134 -- StartHrTrace
135 -- Wrapper for hr_utility.trace_on
136 PROCEDURE StartHrTrace;
137 
138 -- StopHrTrace
139 -- Wrapper for hr_utility.trace_off
140 PROCEDURE StopHrTrace;
141 
142 -- WriteHrTrace
143 -- Wrapper for hr_utility.trace
144 PROCEDURE WriteHrTrace(
145    p_Buffer VARCHAR2
146    );
147 
148 
149 
150 -- Tax Utility Functions
151 --
152 
153 FUNCTION GlbVal
154    (p_GlbNme ff_globals_f.global_name%TYPE
155    ,p_EffDte DATE
156    ) RETURN ff_globals_f.global_value%TYPE;
157 
158 FUNCTION NegPtd RETURN BOOLEAN;
159 
160 FUNCTION LatePayPeriod RETURN BOOLEAN;
161 
162 FUNCTION LstPeriod RETURN BOOLEAN;
163 
164 FUNCTION EmpTermInPeriod RETURN BOOLEAN;
165 
166 FUNCTION EmpTermPrePeriod RETURN BOOLEAN;
167 
168 FUNCTION PreErnPeriod RETURN BOOLEAN;
169 
170 FUNCTION SitePeriod RETURN BOOLEAN;
171 
172 PROCEDURE PeriodFactor;
173 
174 
175 PROCEDURE PossiblePeriodsFactor;
176 
177 
178 FUNCTION Annualise
179    (p_YtdInc IN NUMBER
180    ,p_PtdInc IN NUMBER
181    ) RETURN NUMBER;
182 
183 PROCEDURE SetRebates;
184 
185 PROCEDURE Abatements;
186 
187 PROCEDURE ArrearExcess;
188 
189 FUNCTION TaxLiability
190    (p_Amt  IN NUMBER
191    )RETURN  NUMBER;
192 
193 
194 FUNCTION DeAnnualise
195    (p_Liab IN NUMBER
196    ,p_TxOnYtd IN NUMBER
197    ,p_TxOnPtd IN NUMBER
198    ) RETURN NUMBER;
199 
200 
201 PROCEDURE TrvAll;
202 
203 
204 
205 PROCEDURE ValidateTaxOns(
206    p_Rf IN BOOLEAN DEFAULT FALSE -- Refund Allowed Regardless
207    );
208 
209 
210 -- DaysWorked
211 /*  Returns the number of days that the person has worked
212     This could be a negative number that would indicate
213     a LatePayePeriod
214 */
215 FUNCTION DaysWorked RETURN NUMBER;
216 
217 
218 PROCEDURE SitPaySplit;
219 
220 
221 -- Trace Function
222 --
223 PROCEDURE Trace;
224 
225 PROCEDURE ClearGlobals;
226 
227 END py_za_tx_utl_01032002;
228