DBA Data[Home] [Help]

PACKAGE: APPS.JAI_RGM_THHOLD_PROC_PKG

Source


1 package jai_rgm_thhold_proc_pkg AS
2 /*$Header: jai_rgm_thld_prc.pls 120.2.12020000.2 2012/10/19 09:40:28 cholei ship $*/
3   /**
4 
5 
6   /* ----------------------------------------------------------------------------
7 
8    CHANGE HISTORY:
9 	 -------------------------------------------------------------------------------
10 	 S.No      Date         Author and Details
11 	 -------------------------------------------------------------------------------
12 	  1.       01/02/2007    Created by Bgowrava for forward porting bug#5631784. Version#120.0.
13 	                        This was Directly created from 11i version 115.2
14 
15 	  2.       10/09/2010   Jia for GST Bug#10091373
16 
17 	  3.       10/19/2012   Chong for revert GST Bug#10091373 changes
18 
19     ----------------------------------------------------------------------------
20      get_threshold_slab_id - returns identifier for current threshold slab as out parameter
21      IN
22           p_regime_id         - A valid regime_id from jai_rgm_thresholds.
23           p_org_tan_no       - Organiztion TAN as defined in the regime setup
24           p_organization_id   - Inventory organization defined in the regime setup
25           p_party_type        - Party type.  Can be either CUSTOMER or VENDOR.  Currently only CUSTOMER is valid.
26           p_party_id          - Party identifier.
27           p_fin_year          - Financial year
28           p_org_id            - Optional parameter.  If fin_year is not given, operating unit is used to derive the fin_year
29           p_source_trx_date   - Optional parameter.  If fin_year is not given, transaction date is used to derive the fin_year
30           p_called_from       - This will always be null if the call is external.  For all the external call the API will simply
31                                 look return value of column JAI_RGM_THRESHOLD.THRESHOLD_SLAB_ID for the given parameters.
32                                 Only when the call is internal it will look into the setup to derrive the threshold_slab_id
33       OUT
34           p_threshold_slab_id - Current threshold slab identifier
35           p_process_flag      - Flag indicates the process status, can be either
36                                    Successful        (SS)
37                                    Expected Error    (EE)
38                                    Unexpected Error  (UE)
39           p_process_message   - Message to be passed to caller of the api.  It can be null in case of p_process_flag = 'SS'
40   */
41 
42   procedure get_threshold_slab_id
43             (
44               p_regime_id               in            jai_rgm_thresholds.regime_id%type
45             , p_org_tan_no              in            JAI_RGM_REGISTRATIONS.attribute_value%type default null
46             , p_organization_id         in            hr_organization_units.organization_id%type default null
47             , p_party_type              in            jai_rgm_thresholds.party_type%type
48             , p_party_id                in            jai_rgm_thresholds.party_id%type
49             , p_fin_year                in            jai_rgm_thresholds.fin_year%type default null
50             , p_org_id                  in            jai_ap_tds_thhold_taxes.operating_unit_id%type default null
51             , p_source_trx_date         in            date    default null
52             , p_called_from             in            varchar2 default null
53             , p_threshold_slab_id  		  out  nocopy   jai_rgm_thresholds.threshold_slab_id%type
54             , p_process_flag            out  nocopy   varchar2
55             , p_process_message         out  nocopy   varchar2
56             );
57   /*
58       get_threshold_tax_cat_id    - returns tax category defined in the threshold setup as out parameter
59       IN
60           p_threshold_slab_id     - Threshold slab identifier
61           p_org_id                - Operating unit
62       OUT
63           p_threshold_tax_cat_id  - Tax category identifier
64           p_process_flag          - Flag indicates the process status, can be either
65                                       Successful        (SS)
66                                       Expected Error    (EE)
67                                       Unexpected Error  (UE)
68           p_process_message       - Message to be passed to caller of the api.  It can be null in case of p_process_flag = 'SS'
69   */
70 
71   procedure get_threshold_tax_cat_id
72             (
73                p_threshold_slab_id       in           jai_rgm_thresholds.threshold_slab_id%type
74             ,  p_org_id                  in           jai_ap_tds_thhold_taxes.operating_unit_id%type
75             ,  p_threshold_tax_cat_id 	 out  nocopy  jai_ap_tds_thhold_taxes.tax_category_id%type
76             ,  p_process_flag            out  nocopy  varchar2
77             ,  p_process_message         out  nocopy  varchar2
78             );
79   /*
80       default_thhold_taxes       - defaults threshold taxes defined by the tax category
81       IN
82           p_source_trx_id        -   transaction identifier
83           p_source_trx_line_id   -   transaction line identifier
84           p_source_event         -   Event for which taxes to be defaulted. Currently only 'DELIVERY'
85           p_action               -   Action on which taxes are defaulted.  Currently only 'DEFAULT_TAXES'
86           p_threshold_tax_cat_id -   Tax category identifier for taxes to be defaulted
87           p_tax_base_line_number -   Line number to be used as base line when calculating taxes.  Default is 0
88           p_last_line_number     -   Line number after which threshold taxes to be defaulted
89 
90       OUT
91           p_process_flag         -   Flag indicates the process status, can be either
92                                        Successful        (SS)
93                                        Expected Error    (EE)
94                                        Unexpected Error  (UE)
95           p_process_message      -   Message to be passed to caller of the api.  It can be null in case of p_process_flag = 'SS'
96   */
97 
98   procedure default_thhold_taxes
99             (
100               p_source_trx_id             in            number
101             , p_source_trx_line_id        in            number
102             , p_source_event              in            varchar2
103             , p_action                    in            varchar2
104             , p_threshold_tax_cat_id      in            jai_ap_tds_thhold_taxes.tax_category_id%type
105             , p_tax_base_line_number      in            number   default 0
106             , p_last_line_number          in            number   default 0
107             , p_currency_code             in            varchar2 default null
108             , p_currency_conv_rate        in            number   default null
109             , p_quantity                  in            number   default null
110             , p_base_tax_amt              in            number   default null
111             , p_assessable_value          in            number   default null
112             , p_inventory_item_id         in            number   default null
113             , p_uom_code                  in            varchar2 default null
114             , p_vat_assessable_value      in            number   default null
115             , p_process_flag              out  nocopy   varchar2
116             , p_process_message           out  nocopy   varchar2
117 			--Commented by Chong for revert GST changes 2012/10/19
118             --, pn_gst_assessable_value     in            number    default null -- Added by Jia for GST Bug#10091373 on 2010/09/10
119             );
120 
121   procedure maintain_threshold
122             ( p_transaction_id    in            jai_rgm_refs_all.transaction_id%type
123             , p_last_line_flag    in            varchar2 default jai_constants.yes
124             , p_process_flag      out nocopy    varchar2
125             , p_process_message   out nocopy    varchar2
126             );
127 
128   procedure insert_threshold_dtl
129             ( p_record              in          jai_rgm_threshold_dtls%rowtype
130             , p_threshold_dtl_id    out nocopy  jai_rgm_threshold_dtls.threshold_dtl_id%type
131             , p_row_id              out nocopy  rowid
132             ) ;
133 
134   procedure insert_threshold_hdr
135             ( p_record          in            jai_rgm_thresholds%rowtype
136             , p_threshold_id    out nocopy    jai_rgm_thresholds.threshold_id%type
137             , p_row_id          out nocopy    rowid
138             );
139 
140   procedure sync_threshold_header
141               ( p_threshold_id            in            jai_rgm_thresholds.threshold_id%type
142               , p_source_trx_date         in            date
143               , p_thhold_slab_change_flag out nocopy    varchar2
144               , p_new_thhold_slab_id      out nocopy    jai_rgm_thresholds.threshold_slab_id%type
145               , p_process_flag            out nocopy    varchar2
146               , p_process_message         out nocopy    varchar2
147               ) ;
148 
149 
150 
151 
152 
153 end jai_rgm_thhold_proc_pkg;