DBA Data[Home] [Help]

APPS.JAI_RGM_THHOLD_PROC_PKG dependencies on JAI_RGM_REFS_ALL

Line 132: ,p_transaction_id in jai_rgm_refs_all.transaction_id%type

128: -- code ported from BL12.1.3 by zhiwei.xin on 15-MAR-2013 end.
129:
130: procedure generate_consolidated_doc
131: (p_threshold_id in jai_rgm_thresholds.threshold_id%type
132: ,p_transaction_id in jai_rgm_refs_all.transaction_id%type
133: ,p_org_id in jai_rgm_refs_all.org_id%type
134: ,p_process_flag out nocopy varchar2
135: ,p_process_message out nocopy varchar2
136: )

Line 133: ,p_org_id in jai_rgm_refs_all.org_id%type

129:
130: procedure generate_consolidated_doc
131: (p_threshold_id in jai_rgm_thresholds.threshold_id%type
132: ,p_transaction_id in jai_rgm_refs_all.transaction_id%type
133: ,p_org_id in jai_rgm_refs_all.org_id%type
134: ,p_process_flag out nocopy varchar2
135: ,p_process_message out nocopy varchar2
136: )
137: is

Line 155: ln_trx_ref_id jai_rgm_refs_all.trx_ref_id%type;

151: ln_surcharge_cess_tax_id jai_rgm_taxes.tax_id%type;
152: ln_surcharge_tax_rate jai_rgm_taxes.tax_rate%type;
153: ln_surcharge_cess_tax_rate jai_rgm_taxes.tax_rate%type;
154:
155: ln_trx_ref_id jai_rgm_refs_all.trx_ref_id%type;
156: ln_currency_code jai_rgm_taxes.currency_code%type;
157:
158: ln_user_id fnd_user.user_id%type := fnd_global.user_id;
159: ln_login_id fnd_logins.login_id%type := fnd_global.login_id;

Line 185: cursor c_curr_code (cp_org_id jai_rgm_refs_all.org_id%type)

181: ,jai_rgm_thresholds hdr
182: where hdr.threshold_id = p_threshold_id
183: and dtls.threshold_id = hdr.threshold_id ;
184:
185: cursor c_curr_code (cp_org_id jai_rgm_refs_all.org_id%type)
186: is
187: select currency_code
188: from gl_sets_of_books gsb
189: , hr_operating_units hou

Line 193: cursor c_get_ref_dtls (cp_transaction_id jai_rgm_refs_all.transaction_id%type default null

189: , hr_operating_units hou
190: where gsb.set_of_books_id = hou.set_of_books_id
191: and hou.organization_id = cp_org_id;
192:
193: cursor c_get_ref_dtls (cp_transaction_id jai_rgm_refs_all.transaction_id%type default null
194: ,cp_trx_ref_id jai_rgm_refs_all.trx_ref_id%type default null
195: )
196: is
197: select *

Line 194: ,cp_trx_ref_id jai_rgm_refs_all.trx_ref_id%type default null

190: where gsb.set_of_books_id = hou.set_of_books_id
191: and hou.organization_id = cp_org_id;
192:
193: cursor c_get_ref_dtls (cp_transaction_id jai_rgm_refs_all.transaction_id%type default null
194: ,cp_trx_ref_id jai_rgm_refs_all.trx_ref_id%type default null
195: )
196: is
197: select *
198: from jai_rgm_refs_all

Line 198: from jai_rgm_refs_all

194: ,cp_trx_ref_id jai_rgm_refs_all.trx_ref_id%type default null
195: )
196: is
197: select *
198: from jai_rgm_refs_all
199: where ( (cp_transaction_id is not null and transaction_id = cp_transaction_id)
200: or (cp_trx_ref_id is not null and trx_ref_id = cp_trx_ref_id)
201: );
202:

Line 203: cursor c_get_taxes_for_last_doc ( cp_org_tan_no jai_rgm_refs_all.org_tan_no%type

199: where ( (cp_transaction_id is not null and transaction_id = cp_transaction_id)
200: or (cp_trx_ref_id is not null and trx_ref_id = cp_trx_ref_id)
201: );
202:
203: cursor c_get_taxes_for_last_doc ( cp_org_tan_no jai_rgm_refs_all.org_tan_no%type
204: , cp_party_id jai_rgm_refs_all.party_id%type
205: , cp_fin_year jai_rgm_refs_all.fin_year%type
206: , cp_item_classification jai_rgm_refs_all.item_classification%type
207: )

Line 204: , cp_party_id jai_rgm_refs_all.party_id%type

200: or (cp_trx_ref_id is not null and trx_ref_id = cp_trx_ref_id)
201: );
202:
203: cursor c_get_taxes_for_last_doc ( cp_org_tan_no jai_rgm_refs_all.org_tan_no%type
204: , cp_party_id jai_rgm_refs_all.party_id%type
205: , cp_fin_year jai_rgm_refs_all.fin_year%type
206: , cp_item_classification jai_rgm_refs_all.item_classification%type
207: )
208: is

Line 205: , cp_fin_year jai_rgm_refs_all.fin_year%type

201: );
202:
203: cursor c_get_taxes_for_last_doc ( cp_org_tan_no jai_rgm_refs_all.org_tan_no%type
204: , cp_party_id jai_rgm_refs_all.party_id%type
205: , cp_fin_year jai_rgm_refs_all.fin_year%type
206: , cp_item_classification jai_rgm_refs_all.item_classification%type
207: )
208: is
209: select tax_id

Line 206: , cp_item_classification jai_rgm_refs_all.item_classification%type

202:
203: cursor c_get_taxes_for_last_doc ( cp_org_tan_no jai_rgm_refs_all.org_tan_no%type
204: , cp_party_id jai_rgm_refs_all.party_id%type
205: , cp_fin_year jai_rgm_refs_all.fin_year%type
206: , cp_item_classification jai_rgm_refs_all.item_classification%type
207: )
208: is
209: select tax_id
210: ,tax_type

Line 214: from jai_rgm_refs_all

210: ,tax_type
211: ,tax_rate
212: from jai_rgm_taxes
213: where trx_ref_id = ( select max(trx_ref_id)
214: from jai_rgm_refs_all
215: where source_document_id = jai_constants.tcs_surcharge_id
216: and org_tan_no = cp_org_tan_no
217: and fin_year = cp_fin_year
218: and party_id = cp_party_id

Line 225: ln_transaction_id JAI_RGM_REFS_ALL.TRANSACTION_ID%TYPE;

221: );
222:
223:
224: r_ref_dtls c_get_ref_dtls%rowtype;
225: ln_transaction_id JAI_RGM_REFS_ALL.TRANSACTION_ID%TYPE;
226:
227: /*
228: || Generate the transaction_id from the sequence
229: */

Line 233: jai_rgm_refs_all_s2.nextval

229: */
230: CURSOR cur_get_transaction_id
231: IS
232: SELECT
233: jai_rgm_refs_all_s2.nextval
234: FROM
235: dual;
236:
237:

Line 1445: ( p_transaction_id in jai_rgm_refs_all.transaction_id%type

1441: end default_thhold_taxes;
1442:
1443: /*------------------------------------------------------------------------------------------------------------*/
1444: procedure maintain_threshold
1445: ( p_transaction_id in jai_rgm_refs_all.transaction_id%type
1446: , p_last_line_flag in varchar2 default jai_constants.yes
1447: , p_process_flag out nocopy varchar2
1448: , p_process_message out nocopy varchar2
1449: )

Line 1466: from jai_rgm_refs_all trxref

1462: , source_document_type
1463: , sum(nvl(source_document_amt,0)) source_document_amt
1464: , source_document_date
1465: , org_id
1466: from jai_rgm_refs_all trxref
1467: where trxref.transaction_id = p_transaction_id
1468: group by
1469: regime_id
1470: , org_tan_no

Line 1525: , jai_rgm_refs_all refs

1521: cursor c_get_ref_thhold_base_amt (cp_base_tax_type jai_rgm_taxes.tax_type%type)
1522: is
1523: select sum(rtax.func_tax_amt)
1524: from jai_rgm_taxes rtax
1525: , jai_rgm_refs_all refs
1526: where rtax.trx_ref_id = refs.trx_ref_id
1527: and refs.transaction_id = p_transaction_id
1528: and rtax.tax_type = cp_base_tax_type;
1529:

Line 1536: , jai_rgm_refs_all refs

1532: )
1533: is
1534: select sum(rtax.func_tax_amt)
1535: from jai_rgm_taxes rtax
1536: , jai_rgm_refs_all refs
1537: where rtax.trx_ref_id = refs.trx_ref_id
1538: and rtax.tax_type = cp_tax_type
1539: and refs.transaction_id = p_transaction_id
1540: and rtax.tax_modified_by = nvl(cp_tax_modified_by,rtax.tax_modified_by);

Line 1553: , jai_rgm_refs_all refs

1549: cursor c_get_surcharge_cess (cp_thhold_tax_cat_id jai_ap_tds_thhold_taxes.tax_category_id%type)
1550: is
1551: select sum(rtax.func_tax_amt)
1552: from jai_rgm_taxes rtax
1553: , jai_rgm_refs_all refs
1554: , JAI_CMN_TAX_CTG_LINES srch
1555: , JAI_CMN_TAX_CTG_LINES srchcess
1556: , JAI_CMN_TAXES_ALL tax
1557: where rtax.trx_ref_id = refs.trx_ref_id

Line 1573: , jai_rgm_refs_all refs

1569: cursor c_get_surcharge_sh_cess (cp_thhold_tax_cat_id jai_ap_tds_thhold_taxes.tax_category_id%type)
1570: is
1571: select sum(rtax.func_tax_amt)
1572: from jai_rgm_taxes rtax
1573: , jai_rgm_refs_all refs
1574: , JAI_CMN_TAX_CTG_LINES srch
1575: , JAI_CMN_TAX_CTG_LINES srchcess
1576: , JAI_CMN_TAXES_ALL tax
1577: where rtax.trx_ref_id = refs.trx_ref_id

Line 2039: /** Update jai_rgm_refs_all to punch the threshold_slab_id against all the transaction lines */

2035: if p_process_flag <> jai_constants.successful then
2036: return;
2037: end if;
2038:
2039: /** Update jai_rgm_refs_all to punch the threshold_slab_id against all the transaction lines */
2040:
2041: if ln_new_thhold_slab_id is not null then
2042: update jai_rgm_refs_all
2043: set threshold_slab_id = ln_new_thhold_slab_id

Line 2042: update jai_rgm_refs_all

2038:
2039: /** Update jai_rgm_refs_all to punch the threshold_slab_id against all the transaction lines */
2040:
2041: if ln_new_thhold_slab_id is not null then
2042: update jai_rgm_refs_all
2043: set threshold_slab_id = ln_new_thhold_slab_id
2044: where transaction_id = p_transaction_id;
2045: end if;
2046: