DBA Data[Home] [Help]

PACKAGE: APPS.JG_ZZ_VAT_ALLOC_PRC_PKG

Source


1 PACKAGE JG_ZZ_VAT_ALLOC_PRC_PKG AS
2 /* $Header: jgzzvatallocprcs.pls 120.2 2006/07/26 14:10:26 brathod ship $*/
3 
4   g_period_type_periodic    constant varchar2(30) := 'PERIODIC';
5   g_period_type_annual      constant varchar2(30) := 'ANNUAL';
6   g_fresh_allocation        constant varchar2(30) := 'FRESH ALLOCATION';
7   g_error_allocation        constant varchar2(30) := 'ERROR ALLOCATION';
8 
9   g_source_ap constant varchar2(2) := 'AP';
10   g_source_ar constant varchar2(2) := 'AR';
11   g_source_gl constant varchar2(2) := 'GL';
12   g_source_all constant varchar2(15) := 'ALL';
13   g_ar_entitycode_receipts      constant varchar2(30) := 'RECEIPTS';
14   g_ar_entitycode_transactions  constant varchar2(30) := 'TRANSACTIONS';
15 
16   g_yes constant varchar2(1) := 'Y';
17   g_no constant varchar2(1) := 'N';
18   g_alloc_errcode_rule_not_found  constant varchar2(30) := 'JG_ZZ_NO_RULE_APPLICABLE';
19   g_alloc_errcode_vtt_not_found   constant varchar2(30) := 'JG_ZZ_NO_VTT_IN_RATE';
20   /* g_alloc_errcode_cannot_create   constant varchar2(30) := 'JG_ZZ_NO_RULE_APPLICABLE'; */
21   g_alloc_errcode_nrb_not_def     constant varchar2(30) := 'JG_ZZ_NO_NREC_BOX_IN_RULE';  -- IMPL
22 
23   /* API to flush the data */
24   PROCEDURE purge_allocation_data(
25     pn_reporting_status_id        number,           /* Primarykey Indicator for repEntity, tax_calerdar and source */
26     pv_reallocate_flag            varchar2,
27     xv_return_status     out  nocopy  varchar2,
28     xv_return_message    out  nocopy  varchar2
29   );
30 
31   PROCEDURE insert_allocation_error (
32     pn_vat_transaction_id      number,
33     pv_allocation_error_code   varchar2,
34     pv_period_type             varchar2,
35     pn_created_by              number,
36     pn_last_updated_by         number,
37     pn_last_update_login       number,
38     xv_return_status     out  nocopy  varchar2,
39     xv_return_message    out  nocopy  varchar2
40   );
41 
42   PROCEDURE update_allocation_error (
43     pn_vat_transaction_id      number,
44     pv_allocation_error_code   varchar2,
45     pv_period_type             varchar2,
46     pn_last_updated_by         number,
47     pn_last_update_login       number,
48     xv_return_status     out  nocopy  varchar2,
49     xv_return_message    out  nocopy  varchar2
50   );
51 
52   PROCEDURE delete_allocation_error (
53     pn_vat_transaction_id      number,
54     pv_allocation_error_code   varchar2,
55     pv_period_type             varchar2,
56     xv_return_status     out  nocopy  varchar2,
57     xv_return_message    out  nocopy  varchar2
58   );
59 
60   /* Main procedure that performs the allocation */
61   PROCEDURE run_allocation (
62     xv_errbuf                   OUT nocopy varchar2,       /*Out parameter for conc. program*/
63     xv_retcode                  OUT nocopy varchar2,     /*Out parameter for conc. program*/
64     pn_vat_reporting_entity_id      number,       /*this contains TRN, tax_calerdar etc. */
65     pv_tax_calendar_period          varchar2,     /* calendar period for which allocation should run*/
66     pv_source                       varchar2,     /*one of AP, AR, GL, ALL */
67     pv_reallocate_flag              varchar2      /*'Y'- to reallocate all the previous allocation again*/
68   );
69 
70   PROCEDURE allocate_box(
71     pn_vat_reporting_entity_id    number,
72     pv_period_type                VARCHAR2,
73     pv_source                     VARCHAR2,
74     pv_event_class_code           VARCHAR2,
75     pv_tax                        VARCHAR2,
76     pv_tax_status                 VARCHAR2,
77     pv_tax_jurisdiction           VARCHAR2,
78     pv_tax_rate_code              VARCHAR2,
79     pv_tax_recoverable_flag       VARCHAR2,
80     xv_tax_box                OUT nocopy VARCHAR2,
81     xv_taxable_box            OUT nocopy VARCHAR2,
82     xn_allocation_rule_id     OUT nocopy VARCHAR2,
83     xv_error_code             OUT nocopy VARCHAR2,
84     xv_return_status     out  nocopy  varchar2,
85     xv_return_message    out  nocopy  varchar2
86   );
87 
88   FUNCTION get_allocation_status(
89       pn_reporting_status_id NUMBER
90   ) return varchar2;
91 
92 END JG_ZZ_VAT_ALLOC_PRC_PKG;