DBA Data[Home] [Help]

PACKAGE: APPS.PAY_SG_BAL_UPLOAD

Source


1 package pay_sg_bal_upload as
2 -- /* $Header: pysgupld.pkh 120.0 2005/05/29 08:50:42 appldev noship $ */
3 --
4 -- +======================================================================+
5 -- |              Copyright (c) 1997 Oracle Corporation UK Ltd            |
6 -- |                        Reading, Berkshire, England                   |
7 -- |                           All rights reserved.                       |
8 -- +======================================================================+
9 -- SQL Script File Name : pysgupld.pkh
10 -- Description          : This script delivers balance upload support
11 --                        functions for the Singapore localization (SG).
12 --
13 -- DELIVERS EXTERNAL functions
14 --   expiry_date
15 --   include_adjustment
16 --   is_supported
17 --   validate_batch_lines
18 --
19 -- Change List:
20 -- ------------
21 --
22 -- ======================================================================
23 -- Version  Date         Author    Bug No.  Description of Change
24 -- -------  -----------  --------  -------  -----------------------------
25 -- 115.0    30-JUN-2000  JBailie            Initial Version - based on the
26 --                                          assumption that the pay_balance_upload
27 --                                          package pybalupl.pkb will explicitly
28 --                                          call the function
29 --                                          pay_sg_bal_upload.insert_adjustment
30 --                                          and pass a record of the previously
31 --                                          processed adjustments.
32 --                                          This package needs to be reviewed
33 --                                          if a different approach is adopted
34 -- 115.1    21-JUL-2000  JBailie            Set ship state
35 -- 115.2    06-NOV-2000  jbailie            Changed to use pybalupl.pkb 115.17
36 --                                           removed get_tax_unit
37 --                                           removed tax_unit_id from expiry_date
38 --                                           added p_batch_line_id and
39 --                                                 p_test_batch_line_id to
40 --                                                      include_adjustment
41 -- 115.3    20-NOV-2000  jbailie            include_adjustment now returns number
42 --
43 -- ======================================================================
44 --
45   -----------------------------------------------------------------------------
46   -- FUNCTION NAME
47   --  expiry_date
48   -- PURPOSE
49   --  Returns the expiry date of a given dimension relative to a date.
50   -- ARGUMENTS
51   --  p_upload_date       - the date on which the balance should be correct.
52   --  p_dimension_name    - the dimension being set.
53   --  p_assignment_id     - the assignment involved.
54   --  p_original_entry_id - ORIGINAL_ENTRY_ID context.
55   -- USES
56   -- NOTES
57   --  This is used by pay_balance_upload.dim_expiry_date.
58   -----------------------------------------------------------------------------
59  --
60  function expiry_date
61  (
62   p_upload_date       date
63  ,p_dimension_name    varchar2
64  ,p_assignment_id     number
65  ,p_original_entry_id number
66  ) return date;
67  --
68  pragma restrict_references(expiry_date, WNDS, WNPS);
69  --
70   -----------------------------------------------------------------------------
71   -- NAME
72   --  is_supported
73   -- PURPOSE
74   --  Checks if the dimension is supported by the upload process.
75   -- ARGUMENTS
76   --  p_dimension_name - the balance dimension to be checked.
77   -- USES
78   -- NOTES
79   --  Only a subset of the SG dimensions are supported and these have been
80   --  picked to allow effective migration to release 10.
81   --  This is used by pay_balance_upload.validate_dimension.
82   -----------------------------------------------------------------------------
83  --
84  function is_supported
85  (
86   p_dimension_name varchar2
87  ) return number;
88  --
89   -----------------------------------------------------------------------------
90   -- NAME
91   --  include_adjustment
92   -- PURPOSE
93   --  Given a dimension, and relevant contexts and details of an existing
94   --  balanmce adjustment, it will find out if the balance adjustment effects
95   --  the dimension to be set. Both the dimension to be set and the adjustment
96   --  are for the same assignment and balance. The adjustment also lies between
97   --  the expiry date of the new balance and the date on which it is to set.
98   -- ARGUMENTS
99   --  p_balance_type_id    - the balance to be set.
100   --  p_dimension_name     - the balance dimension to be set.
101   --  p_original_entry_id  - ORIGINAL_ENTRY_ID context.
102   --  p_upload_date        - the date of the upload
103   --  p_batch_line_id      - the batch_line_id from pay_balance_batch_line
104   --  p_test_batch_line_id - the batch_line-id from pay_temp_balance_adjustments
105   -- USES
106   -- NOTES
107   --  All the SG dimensions affect each other when they share the same context
108   --  values so there is no special support required for individual dimensions.
109   --  This is used by pay_balance_upload.get_current_value.
110   -----------------------------------------------------------------------------
111  --
112  function include_adjustment
113  (
114   p_balance_type_id    number
115  ,p_dimension_name     varchar2
116  ,p_original_entry_id  number
117  ,p_upload_date        date
118  ,p_batch_line_id      number
119  ,p_test_batch_line_id number
120 ) return number;
121   --
122   -----------------------------------------------------------------------------
123   -- NAME
124   --  validate_batch_lines
125   -- PURPOSE
126  --   Applies SG specific validation to the batch.
127   -- ARGUMENTS
128   --  p_batch_id - the batch to be validate_batch_linesd.
129   -- USES
130   -- NOTES
131   --  This is used by pay_balance_upload.validate_batch_lines.
132   -----------------------------------------------------------------------------
133  --
134  procedure validate_batch_lines
135  (
136   p_batch_id number
137  );
138  --
139 end pay_sg_bal_upload;