1 package pay_bf_bal_upload AUTHID CURRENT_USER as
2 /* $Header: pybfupld.pkh 115.1 2003/09/19 03:05 thabara ship $ */
3 /*
4 Copyright (c) Oracle Corporation 1995 All rights reserved
5 PRODUCT
6 Oracle*Payroll
7 NAME
8 pybfupld.pkb
9 DESCRIPTION
10 Provides support for the upload of balances based on BF dimensions.
11 EXTERNAL
12 expiry_date
13 get_tax_unit
14 include_adjustment
15 is_supported
16 validate_batch_lines
17 INTERNAL
18 MODIFIED (DD-MON-YYYY)
19 115.1 T.Habara 18-Sep-2003 Added p_source_id and p_source_text
20 params to include_adjustment.
21 40.2 J.ALLOUN 30-JUL-1996 Added error handling.
22 40.1 N.Bristow 08-May-1996 Bug 359005. Tax Unit Id is now passed
23 to expiry date and include
24 adjustment.
25 40.0 N.Bristow 16-May-1995 created.
26 */
27 --
28 -----------------------------------------------------------------------------
29 -- NAME
30 -- get_tax_unit
31 -- PURPOSE
32 -- Returns the legal company an assignment is associated with at
33 -- particular point in time.
34 -- ARGUMENTS
35 -- p_assignment_id - the assignment
36 -- p_effective_date - the date on which the information is required.
37 -- USES
38 -- NOTES
39 -----------------------------------------------------------------------------
40 --
41 function get_tax_unit
42 (
43 p_assignment_id number
44 ,p_effective_date date
45 ) return number;
46 --
47 -----------------------------------------------------------------------------
48 -- NAME
49 -- expiry_date
50 -- PURPOSE
51 -- Returns the expiry date of a given dimension relative to a date.
52 -- ARGUMENTS
53 -- p_upload_date - the date on which the balance should be correct.
54 -- p_dimension_name - the dimension being set.
55 -- p_assignment_id - the assignment involved.
56 -- p_original_entry_id - ORIGINAL_ENTRY_ID context.
57 -- USES
58 -- NOTES
59 -- This is used by pay_balance_upload.dim_expiry_date.
60 -----------------------------------------------------------------------------
61 --
62 function expiry_date
63 (
64 p_upload_date date
65 ,p_dimension_name varchar2
66 ,p_assignment_id number
67 ,p_tax_unit_id number
68 ,p_jurisdiction_code varchar2
69 ,p_original_entry_id number
70 ) return date;
71 --
72 pragma restrict_references(expiry_date, WNDS, WNPS);
73 --
74 -----------------------------------------------------------------------------
75 -- NAME
76 -- is_supported
77 -- PURPOSE
78 -- Checks if the dimension is supported by the upload process.
79 -- ARGUMENTS
80 -- p_dimension_name - the balance dimension to be checked.
81 -- USES
82 -- NOTES
83 -- Only a subset of the BF dimensions are supported and these have been
84 -- picked to allow effective migration to release 10.
85 -- This is used by pay_balance_upload.validate_dimension.
86 -----------------------------------------------------------------------------
87 --
88 function is_supported
89 (
90 p_dimension_name varchar2
91 ) return boolean;
92 --
93 -----------------------------------------------------------------------------
94 -- NAME
95 -- include_adjustment
96 -- PURPOSE
97 -- Given a dimension, and relevant contexts and details of an existing
98 -- balanmce adjustment, it will find out if the balance adjustment effects
99 -- the dimension to be set. Both the dimension to be set and the adjustment
100 -- are for the same assignment and balance. The adjustment also lies between
101 -- the expiry date of the new balance and the date on which it is to set.
102 -- ARGUMENTS
103 -- p_balance_type_id - the balance to be set.
104 -- p_dimension_name - the balance dimension to be set.
105 -- p_tax_unit_id - TAX_UNIT_ID context.
106 -- p_jurisdiction_code - JURISDICTION_CODE context.
107 -- p_original_entry_id - ORIGINAL_ENTRY_ID context.
108 -- p_bal_adjustment_rec - details of an existing balance adjustment.
109 -- USES
110 -- NOTES
111 -- All the BF dimensions affect each other when they share the same context
112 -- values so there is no special support required for individual dimensions.
113 -- This is used by pay_balance_upload.get_current_value.
114 -----------------------------------------------------------------------------
115 --
116 function include_adjustment
117 (
118 p_balance_type_id number
119 ,p_dimension_name varchar2
120 ,p_jurisdiction_code varchar2
121 ,p_original_entry_id number
122 ,p_tax_unit_id number
123 ,p_assignment_id number
124 ,p_upload_date date
125 ,p_source_id number
126 ,p_source_text varchar2
127 ,p_bal_adjustment_rec pay_balance_upload.csr_balance_adjustment%rowtype
128 ) return boolean;
129 --
130 -----------------------------------------------------------------------------
131 -- NAME
132 -- validate_batch_lines
133 -- PURPOSE
134 -- Applies BF specific validation to the batch.
135 -- ARGUMENTS
136 -- p_batch_id - the batch to be validate_batch_linesd.
137 -- USES
138 -- NOTES
139 -- This is used by pay_balance_upload.validate_batch_lines.
140 -----------------------------------------------------------------------------
141 --
142 procedure validate_batch_lines
143 (
144 p_batch_id number
145 );
146 --
147 end pay_bf_bal_upload;