DBA Data[Home] [Help]

APPS.JAI_CMN_RGM_PROCESSING_PKG dependencies on JAI_AP_MATCH_INV_TAXES

Line 245: Added the join to jai_ap_match_inv_taxes.

241:
242: 38. 31-Aug-2012 amandali for bug 14507573
243: Description:Service Tax repository not updated for PO matched invoice having multiple distributions
244: Fix:Modified the cursor get_match_item_cur as the po_distribution_id would be null in ap_invoice_lines_all for a PO line having multiple distributions.
245: Added the join to jai_ap_match_inv_taxes.
246: 39. 25-Feb-2013 amandali for bug 16246654
247: Description:Reverse charge service tax not hitting repository for third party invoices.
248: Fix:Modified the cursor c_tp_inv_details. Added union condition to pick the reverse charge liability distribution
249: ---------------------------------------------------------------------------------------------------------------------------*/

Line 561: FROM jai_ap_match_inv_taxes jamt

557: AND jcdt.modvat_flag = 'Y'
558: AND jcdt.tax_type IN ('Service', 'SERVICE_EDUCATION_CESS', 'SERVICE_SH_EDU_CESS')
559: UNION ALL
560: SELECT 'MATCH' match_type, jamt.invoice_distribution_id, jamt.tax_amount tax_amt,jcta.tax_type
561: FROM jai_ap_match_inv_taxes jamt
562: , jai_cmn_taxes_all jcta
563: WHERE jamt.invoice_id = pn_invoice_id
564: --AND jamt.invoice_line_number <> pn_line_number
565: AND jamt.parent_invoice_line_number = pn_line_number

Line 572: FROM jai_ap_match_inv_taxes jamt

568: AND jcta.tax_type IN ('Service', 'SERVICE_EDUCATION_CESS', 'SERVICE_SH_EDU_CESS');
569:
570: CURSOR get_matched_tax_rec_tot_cur IS
571: SELECT sum(jamt.tax_amount)
572: FROM jai_ap_match_inv_taxes jamt
573: , jai_cmn_taxes_all jcta
574: WHERE jamt.invoice_id = pn_invoice_id
575: --Add by Chong for bug#13358557 08-NOV-2011, begin
576: -----------------------------------------------------------------------------------------------

Line 1713: FROM ap_invoice_lines_all line, jai_ap_match_inv_taxes jamt

1709: /* Modified the cursor get_match_item_cur for bug 14507573 */
1710: CURSOR get_match_item_cur IS
1711:
1712: SELECT distinct line.match_type,line.line_number
1713: FROM ap_invoice_lines_all line, jai_ap_match_inv_taxes jamt
1714: WHERE line.invoice_id = p_invoice_id
1715: and jamt.invoice_id=line.invoice_id
1716: and jamt.po_distribution_id=p_po_distribution_id
1717: and line.line_number=jamt.parent_invoice_line_number

Line 1986: FROM JAI_AP_MATCH_INV_TAXES a, JAI_CMN_TAXES_ALL b, JAI_RGM_REGISTRATIONS c

1982: CURSOR c_tax_dist_dtl(cp_regime_id IN NUMBER, cp_invoice_id IN NUMBER, cp_inv_distribution_id IN NUMBER) IS -- cp_dist_line_no IN NUMBER) IS
1983: SELECT 1 chk, a.tax_id, b.tax_rate, a.tax_amount, a.parent_invoice_distribution_id, b.tax_type,
1984: a.invoice_line_number invoice_line_number, /* INVOICE LINES UPTAKE */
1985: nvl(b.mod_cr_percentage,0) recoverable_ptg, a.base_amount
1986: FROM JAI_AP_MATCH_INV_TAXES a, JAI_CMN_TAXES_ALL b, JAI_RGM_REGISTRATIONS c
1987: WHERE a.invoice_id = cp_invoice_id
1988: -- AND a.distribution_line_number = cp_dist_line_no Modified as part of AP INVOICE Lines Uptake project
1989: AND a.invoice_distribution_id = cp_inv_distribution_id
1990: AND a.tax_id = b.tax_id

Line 2002: AP_INVOICE_DISTRIBUTIONS_ALL ap_dist, JAI_AP_MATCH_INV_TAXES match_tax,

1998: SELECT 1 chk, match_tax.tax_id, tax.tax_rate, abs(ap_dist.amount), match_tax.parent_invoice_distribution_id,tax.tax_type,
1999: ap_line.line_number invoice_line_number,
2000: 100 recoverable_ptg, match_tax.base_amount
2001: FROM AP_INVOICE_LINES_ALL ap_line,
2002: AP_INVOICE_DISTRIBUTIONS_ALL ap_dist, JAI_AP_MATCH_INV_TAXES match_tax,
2003: JAI_CMN_TAXES_ALL tax, JAI_RGM_REGISTRATIONS rgm
2004: WHERE ap_dist.invoice_id = cp_invoice_id
2005: AND ap_dist.invoice_distribution_id = cp_inv_distribution_id
2006: AND ap_line.invoice_id = ap_dist.invoice_id

Line 2011: AND ap_line.PRODUCT_TABLE = 'JAI_AP_MATCH_INV_TAXES'

2007: AND ap_dist.invoice_line_number = ap_line.line_number
2008: AND ap_line.line_type_lookup_code = 'MISCELLANEOUS'
2009: AND ap_dist.amount < 0
2010: AND ap_line.application_id = 7000
2011: AND ap_line.PRODUCT_TABLE = 'JAI_AP_MATCH_INV_TAXES'
2012: AND ap_line.REFERENCE_KEY1 = to_char(match_tax.tax_id)
2013: AND ap_line.REFERENCE_KEY2 = to_char(match_tax.parent_invoice_line_number)
2014: AND match_tax.invoice_id = ap_dist.invoice_id
2015: AND match_tax.tax_id = tax.tax_id

Line 2455: || nvl(r_tax_dist_dtl.chk, 0) = 0 means that no records were found in the JAI_AP_MATCH_INV_TAXES table.

2451: /*
2452: || above elsif added by ssumaith - bug# 4284505
2453: || NVL(ap_acc_dist.source,'$$$') = 'INDIA TAX INVOICE' --'RECEIPT' - It means a third party invoice.is being processed. ----Ramanand for bug#4388958
2454:
2455: || nvl(r_tax_dist_dtl.chk, 0) = 0 means that no records were found in the JAI_AP_MATCH_INV_TAXES table.
2456: || For third party invoices , there will be no records in the JAI_AP_MATCH_INV_TAXES table
2457: || For third party invoices , the tax details need to be picked up from the jai_rcv_tp_inv_details table.
2458: || It should be joined to the jai_rcv_tp_.invoices table based on the batch_invoice_id column and
2459: || we arrive at the correct batch_invoice_id based on the invoice_id link between the third party

Line 2456: || For third party invoices , there will be no records in the JAI_AP_MATCH_INV_TAXES table

2452: || above elsif added by ssumaith - bug# 4284505
2453: || NVL(ap_acc_dist.source,'$$$') = 'INDIA TAX INVOICE' --'RECEIPT' - It means a third party invoice.is being processed. ----Ramanand for bug#4388958
2454:
2455: || nvl(r_tax_dist_dtl.chk, 0) = 0 means that no records were found in the JAI_AP_MATCH_INV_TAXES table.
2456: || For third party invoices , there will be no records in the JAI_AP_MATCH_INV_TAXES table
2457: || For third party invoices , the tax details need to be picked up from the jai_rcv_tp_inv_details table.
2458: || It should be joined to the jai_rcv_tp_.invoices table based on the batch_invoice_id column and
2459: || we arrive at the correct batch_invoice_id based on the invoice_id link between the third party
2460: || invoice and jai_rcv_tp_invoices table.

Line 4660: FROM jai_ap_match_inv_taxes jamt,

4656: CURSOR get_matched_tax_rec_tot_cur(pn_invoice_id IN NUMBER, pn_line_number IN NUMBER) IS
4657: ----------------------------------------------------------------------------------------------
4658: --Modified by Chong for bug#13358557 08-NOV-2011, end
4659: SELECT sum(jamt.tax_amount)
4660: FROM jai_ap_match_inv_taxes jamt,
4661: jai_cmn_taxes_all jcta
4662: WHERE jamt.invoice_id = pn_invoice_id
4663: --Add by Chong for bug#13358557 08-NOV-2011, begin
4664: ----------------------------------------------------------------------------------------------

Line 4701: FROM jai_ap_match_inv_taxes jamt

4697: AND rgtf.party_type = 'V')
4698: UNION ALL
4699: SELECT jcta.tax_type, jamt.tax_amount tax_amt, aida.invoice_distribution_id,
4700: aida.accounting_date, aia.invoice_date, aida.po_distribution_id
4701: FROM jai_ap_match_inv_taxes jamt
4702: , jai_cmn_taxes_all jcta
4703: , ap_invoice_distributions_all aida
4704: , ap_invoices_all aia
4705: WHERE jamt.invoice_id = pn_invoice_id

Line 4763: FROM jai_ap_match_inv_taxes jamt

4759: )
4760: UNION ALL
4761: SELECT jcta.tax_type, jamt.tax_amount tax_amt, aida.invoice_distribution_id,
4762: aida.accounting_date, aia.invoice_date, aida.po_distribution_id
4763: FROM jai_ap_match_inv_taxes jamt
4764: , jai_cmn_taxes_all jcta
4765: , ap_invoice_distributions_all aida
4766: , ap_invoices_all aia
4767: WHERE jamt.invoice_id = pn_invoice_id