DBA Data[Home] [Help]

APPS.JAI_CMN_RGM_PROCESSING_PKG dependencies on JAI_RGM_TRX_REFS

Line 165: Fix: Item Line ID in JAI_RGM_TRX_REFS should refer to the Item Line to which Service Tax is attached

161:
162: 25. Jul 22, 2010 Bug 9854974
163: Issue: CESS and SHE CESS amounts are not shown in Service Tax Pending Recovery Report
164: for Standalone Invoices
165: Fix: Item Line ID in JAI_RGM_TRX_REFS should refer to the Item Line to which Service Tax is attached
166: and not the Line Number of the Service Tax.
167: 26. 29-OCT-2010 vkaranam for bug#10085619
168: Issue: India Service Tax Processing Concurrent not processing taxes applied on third party invoice.
169: Fix: Modified the cursor c_tp_inv_details of Procedure Process_payments to include the taxes on thirdparty invoice.

Line 272: FROM jai_rgm_trx_refs

268:
269: CURSOR c_reference(cp_source IN VARCHAR2, cp_invoice_id IN NUMBER, cp_invoice_distribution_id IN NUMBER) IS
270: SELECT reference_id, parent_reference_id, item_line_id, reversal_flag, nvl(recovered_amount, 0) recovered_amount,
271: tax_type, recoverable_amount, nvl(discounted_amount,0) discounted_amount
272: FROM jai_rgm_trx_refs
273: WHERE source = cp_source
274: AND invoice_id = cp_invoice_id
275: AND line_id = cp_invoice_distribution_id;
276:

Line 280: FROM jai_rgm_trx_refs

276:
277: CURSOR c_reference_using_id(cp_reference_id IN NUMBER) IS
278: SELECT reference_id, parent_reference_id, item_line_id, reversal_flag, recovered_amount, tax_type,
279: recoverable_amount
280: FROM jai_rgm_trx_refs
281: WHERE reference_id = cp_reference_id;
282:
283: CURSOR c_invoice_distribution(cp_invoice_distribution_id IN NUMBER) IS
284: SELECT a.invoice_id, a.invoice_distribution_id,

Line 620: FROM jai_rgm_trx_refs rgtf

616: WHERE regime_code = jai_constants.service_regime;
617:
618: CURSOR c_ar_ref_records(cp_source_document_id NUMBER, cp_source_ar VARCHAR2) IS
619: SELECT *
620: FROM jai_rgm_trx_refs rgtf
621: WHERE line_id = cp_source_document_id
622: AND party_type = 'C'
623: AND SOURCE = cp_source_ar;
624:

Line 651: lr_ref_records jai_rgm_trx_refs%ROWTYPE;

647: ln_invoice_dist_id NUMBER;
648: lv_account_name VARCHAR2(30);
649: lv_source_trx_type VARCHAR2(30);
650:
651: lr_ref_records jai_rgm_trx_refs%ROWTYPE;
652: lv_match_type VARCHAR2(20);
653: ln_total_amount NUMBER;
654: ln_total_rec_amount NUMBER;
655:

Line 1290: UPDATE jai_rgm_trx_refs

1286: OPEN c_reference(p_source, p_invoice_id, r_dist.parent_reversal_id);
1287: FETCH c_reference INTO r_parent_ref;
1288: CLOSE c_reference;
1289:
1290: UPDATE jai_rgm_trx_refs
1291: SET reversal_flag = 'Y',
1292: last_update_date = sysdate
1293: WHERE source = p_source
1294: AND invoice_id = p_invoice_id

Line 1968: FROM ap_invoice_distributions_all a, jai_rgm_trx_refs b /* second table is used for join just to take IL records */

1964: SELECT a.invoice_id, a.invoice_distribution_id, a.distribution_line_number, a.dist_match_type,
1965: a.invoicE_line_number, /* INVOICE LINES UPTAKE */
1966: a.parent_reversal_id, a.reversal_flag, a.rcv_transaction_id, a.po_distribution_id
1967: , a.accounting_date ----Add by Xiao for POT change, reg bug#12533434 on 29-May-2011
1968: FROM ap_invoice_distributions_all a, jai_rgm_trx_refs b /* second table is used for join just to take IL records */
1969: WHERE a.invoice_id = cp_invoice_id
1970: /*Added the below or condition for bug#11666653*/
1971: AND (
1972: (a.line_type_lookup_code <> 'PREPAY' And exists (select '1' from jai_rcv_tp_invoices where invoice_id=a.invoice_id))

Line 2024: /*Bug 9854974 - Item Line ID in JAI_RGM_TRX_REFS should refer to the Item Line to which Service Tax is attached

2020: and rgm.registration_type = jai_constants.regn_type_tax_types
2021: -- Added by Qiong for Reverse Charge code port begin
2022: UNION --Added this union for bug#8943349 by JMEENA
2023: SELECT 2 chk, a.tax_id, b.tax_rate, a.tax_amt,null, b.tax_type,
2024: /*Bug 9854974 - Item Line ID in JAI_RGM_TRX_REFS should refer to the Item Line to which Service Tax is attached
2025: and not the Line Number of the Service Tax*/
2026: a.source_doc_parent_line_no invoice_line_number, /* INVOICE LINES UPTAKE */
2027: nvl(b.mod_cr_percentage,0) recoverable_ptg, d.base_amount
2028: FROM JAI_CMN_DOCUMENT_TAXES a, JAI_CMN_TAXES_ALL b, JAI_RGM_REGISTRATIONS c,

Line 2144: FROM jai_rgm_trx_refs

2140: AND a.po_line_id = b.po_line_id;
2141:
2142: CURSOR c_batch_references(cp_batch_id IN NUMBER, cp_source IN VARCHAR2) IS
2143: SELECT distinct invoice_id
2144: FROM jai_rgm_trx_refs
2145: WHERE batch_id = cp_batch_id
2146: AND source = cp_source;
2147:
2148: CURSOR c_previous_payments_of_inv(cp_invoice_id IN NUMBER, cp_start_date IN DATE) IS

Line 2199: jai_rgm_trx_refs jrtr /* second table is used for join just to take IL records */

2195: FROM
2196: ap_invoice_payments_all apinvp,
2197: ap_checks_all apc ,
2198: ap_invoice_distributions_all ainvd ,
2199: jai_rgm_trx_refs jrtr /* second table is used for join just to take IL records */
2200: WHERE
2201: apinvp.org_id = p_org_id
2202: AND apinvp.check_id = apc.check_id
2203: AND nvl(apc.future_pay_due_date, v_today) <= v_today

Line 2249: FROM jai_rgm_trx_refs

2245: ainvd.invoice_distribution_id;
2246:
2247: CURSOR c_invoice_batch_refs(cp_source IN VARCHAR2, cp_batch_id IN NUMBER, cp_invoice_id IN NUMBER) IS
2248: SELECT *
2249: FROM jai_rgm_trx_refs
2250: WHERE source = cp_source
2251: AND batch_id = cp_batch_id
2252: AND invoice_id = cp_invoice_id
2253: AND reversal_flag IS NULL

Line 2279: ln_reference_id JAI_RGM_TRX_REFS.reference_id%TYPE;

2275: r_tax_dist_dtl c_tax_dist_dtl%ROWTYPE;
2276:
2277: ln_item_line_id NUMBER(15); -- Incase of AP -> AP_INVOICE_DISTRIBUTIONS_ALL.invoice_distribution_id%TYPE;
2278: ln_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
2279: ln_reference_id JAI_RGM_TRX_REFS.reference_id%TYPE;
2280: ln_parent_reference_id JAI_RGM_TRX_REFS.parent_reference_id%TYPE;
2281: ln_taxable_basis NUMBER;
2282:
2283: ln_rgm_reposotory_id JAI_RGM_TRX_RECORDS.repository_id%TYPE;

Line 2280: ln_parent_reference_id JAI_RGM_TRX_REFS.parent_reference_id%TYPE;

2276:
2277: ln_item_line_id NUMBER(15); -- Incase of AP -> AP_INVOICE_DISTRIBUTIONS_ALL.invoice_distribution_id%TYPE;
2278: ln_item_id MTL_SYSTEM_ITEMS.inventory_item_id%TYPE;
2279: ln_reference_id JAI_RGM_TRX_REFS.reference_id%TYPE;
2280: ln_parent_reference_id JAI_RGM_TRX_REFS.parent_reference_id%TYPE;
2281: ln_taxable_basis NUMBER;
2282:
2283: ln_rgm_reposotory_id JAI_RGM_TRX_RECORDS.repository_id%TYPE;
2284: ln_recovered_amount JAI_RGM_TRX_REFS.recovered_amount%TYPE;

Line 2284: ln_recovered_amount JAI_RGM_TRX_REFS.recovered_amount%TYPE;

2280: ln_parent_reference_id JAI_RGM_TRX_REFS.parent_reference_id%TYPE;
2281: ln_taxable_basis NUMBER;
2282:
2283: ln_rgm_reposotory_id JAI_RGM_TRX_RECORDS.repository_id%TYPE;
2284: ln_recovered_amount JAI_RGM_TRX_REFS.recovered_amount%TYPE;
2285: ln_recoverable_amount JAI_RGM_TRX_REFS.recoverable_amount%TYPE;
2286:
2287: ln_sob_id GL_SETS_OF_BOOKS.set_of_books_id%TYPE;
2288: lv_src_trx_type JAI_RGM_TRX_RECORDS.source_trx_type%TYPE;

Line 2285: ln_recoverable_amount JAI_RGM_TRX_REFS.recoverable_amount%TYPE;

2281: ln_taxable_basis NUMBER;
2282:
2283: ln_rgm_reposotory_id JAI_RGM_TRX_RECORDS.repository_id%TYPE;
2284: ln_recovered_amount JAI_RGM_TRX_REFS.recovered_amount%TYPE;
2285: ln_recoverable_amount JAI_RGM_TRX_REFS.recoverable_amount%TYPE;
2286:
2287: ln_sob_id GL_SETS_OF_BOOKS.set_of_books_id%TYPE;
2288: lv_src_trx_type JAI_RGM_TRX_RECORDS.source_trx_type%TYPE;
2289: lv_process_flag VARCHAR2(2);

Line 2439: -- ~~~~~~~~~~~~~~~~~~~~~~~~~ POPULATION Logic for Data Entry into JAI_RGM_TRX_REFS ~~~~~~~~~~~~~~~~~~~~~~~~

2435: END IF;
2436: GOTO end_of_reference_insertion;
2437: END IF;
2438:
2439: -- ~~~~~~~~~~~~~~~~~~~~~~~~~ POPULATION Logic for Data Entry into JAI_RGM_TRX_REFS ~~~~~~~~~~~~~~~~~~~~~~~~
2440: -- following condition is satisfied for REVERSAL lines
2441: IF ap_acc_dist.reversal_flag = 'Y' AND ap_acc_dist.parent_reversal_id IS NOT NULL THEN
2442: OPEN c_invoice_distribution(ap_acc_dist.parent_reversal_id);
2443: FETCH c_invoice_distribution INTO r_parent_dist;

Line 4477: FROM jai_rgm_trx_refs rgtf

4473: AND rgtr.organization_id = p_organization_id
4474: AND rgtr.source_table_name = 'AP_INVOICE_DISTRIBUTIONS_ALL'
4475: AND rgtr.source_document_id = aid.invoice_distribution_id)
4476: AND EXISTS(SELECT 1
4477: FROM jai_rgm_trx_refs rgtf
4478: WHERE rgtf.source = 'AP'
4479: AND rgtf.invoice_id = aid.invoice_id
4480: AND rgtf.organization_id = p_organization_id --Added by zhiwei for POT Bug#12970828 on 20110915
4481: AND rgtf.party_type = 'V');

Line 4536: FROM jai_rgm_trx_refs rgtf

4532: AND rgtr.organization_id = p_organization_id
4533: AND rgtr.source_table_name = 'AP_INVOICE_DISTRIBUTIONS_ALL'
4534: AND rgtr.source_document_id = aid.invoice_distribution_id )
4535: AND EXISTS(SELECT 1
4536: FROM jai_rgm_trx_refs rgtf
4537: WHERE rgtf.source = 'AP'
4538: AND rgtf.invoice_id = aid.invoice_id
4539: AND rgtf.organization_id = p_organization_id--Added by zhiwei for POT Bug#12970828 on 20110915
4540: AND rgtf.party_type = 'V');

Line 4557: FROM jai_rgm_trx_refs rgtf

4553: ln_sob_id GL_SETS_OF_BOOKS.set_of_books_id%TYPE;
4554:
4555: CURSOR get_ap_ref_records_cur(pn_invoice_distribution_id NUMBER)IS
4556: SELECT *
4557: FROM jai_rgm_trx_refs rgtf
4558: WHERE line_id = pn_invoice_distribution_id
4559: AND party_type = 'V'
4560: AND SOURCE = 'AP';
4561:

Line 4694: FROM jai_rgm_trx_refs rgtf

4690: WHERE SOURCE = 'AP_REVERSAL'
4691: AND source_table_name = 'AP_INVOICE_DISTRIBUTIONS_ALL'
4692: AND source_document_id = aida.invoice_distribution_id)
4693: AND EXISTS(SELECT 1
4694: FROM jai_rgm_trx_refs rgtf
4695: WHERE rgtf.source = 'AP'
4696: AND rgtf.invoice_id = pn_invoice_id
4697: AND rgtf.party_type = 'V')
4698: UNION ALL

Line 4721: FROM jai_rgm_trx_refs rgtf

4717: WHERE SOURCE = 'AP_REVERSAL'
4718: AND source_table_name = 'AP_INVOICE_DISTRIBUTIONS_ALL'
4719: AND source_document_id = aida.invoice_distribution_id)
4720: AND EXISTS(SELECT 1
4721: FROM jai_rgm_trx_refs rgtf
4722: WHERE rgtf.source = 'AP'
4723: AND rgtf.invoice_id = pn_invoice_id
4724: AND rgtf.party_type = 'V');
4725:

Line 4749: jai_rgm_trx_refs jrtf --Added by Qiong for bug13439861

4745: AND source_table_name = 'AP_INVOICE_DISTRIBUTIONS_ALL'
4746: AND source_document_id = aida.invoice_distribution_id)
4747: AND NOT EXISTS (SELECT 1
4748: FROM jai_rgm_trx_records jrtr,
4749: jai_rgm_trx_refs jrtf --Added by Qiong for bug13439861
4750: WHERE jrtr.SOURCE = 'AP_CLAIM'
4751: AND jrtr.source_table_name = 'AP_INVOICE_PAYMENTS_ALL'
4752: AND jrtr.source_document_id = pn_invoice_payment_id
4753: --Added by Qiong for bug13439861 begin

Line 4784: jai_rgm_trx_refs jrtf--Added by Qiong for bug13439861

4780: AND source_table_name = 'AP_INVOICE_DISTRIBUTIONS_ALL'
4781: AND source_document_id = aida.invoice_distribution_id)
4782: AND NOT EXISTS (SELECT 1
4783: FROM jai_rgm_trx_records jrtr,
4784: jai_rgm_trx_refs jrtf--Added by Qiong for bug13439861
4785: WHERE jrtr.SOURCE = 'AP_CLAIM'
4786: AND jrtr.source_table_name = 'AP_INVOICE_PAYMENTS_ALL'
4787: AND jrtr.source_document_id = pn_invoice_payment_id
4788: --Added by Qiong for bug13439861 begin

Line 4827: jai_rgm_trx_refs jrtf--Added by Qiong for bug13439861

4823: AND aipa.accounting_date <= p_to_date
4824: -- AND aipa.invoice_payment_id > nvl(pn_max_payment_id, 0) Commented by Chong for bug#13259755 on 27-OCT-2011
4825: AND NOT EXISTS (SELECT 1
4826: FROM jai_rgm_trx_records jrtr,
4827: jai_rgm_trx_refs jrtf--Added by Qiong for bug13439861
4828: WHERE jrtr.source_table_name = 'AP_INVOICE_PAYMENTS_ALL'
4829: AND jrtr.source_trx_type = 'CLAIM_ACCOUNTING'
4830: AND jrtr.source = 'AP_CLAIM'
4831: AND jrtr.source_document_id = aipa.invoice_payment_id

Line 4866: jai_rgm_trx_refs jrtf--Added by Qiong for bug13439861

4862: AND jrtr.source_document_id = aipa.invoice_payment_id)))
4863: Commented by Chong for bug#13259755 on 09-NOV-2011 End*/
4864: AND NOT EXISTS (SELECT 1
4865: FROM jai_rgm_trx_records jrtr,
4866: jai_rgm_trx_refs jrtf--Added by Qiong for bug13439861
4867: WHERE jrtr.source_table_name = 'AP_INVOICE_PAYMENTS_ALL'
4868: AND jrtr.source_trx_type = 'CLAIM_ACCOUNTING'
4869: AND jrtr.source = 'AP_CLAIM'
4870: AND jrtr.source_document_id = aipa.invoice_payment_id

Line 4893: lr_trx_refs jai_rgm_trx_refs%ROWTYPE;

4889: WHERE invoice_id = pn_invoice_id
4890: AND invoice_line_number = pn_invoice_line_number
4891: AND parent_invoice_line_number IS NULL;
4892:
4893: lr_trx_refs jai_rgm_trx_refs%ROWTYPE;
4894:
4895: ln_reversal_amount NUMBER;
4896: ln_tax_amount NUMBER;
4897: ln_rec_total_tax_amount NUMBER;