DBA Data[Home] [Help]

APPS.JAI_TAX_PROCESSING_PKG dependencies on AP_INVOICES_ALL

Line 81: cursor c_get_inv_dists(cp_trx_id ap_invoices_all.INVOICE_ID%TYPE)

77: -- added by zhiwei.xin for ZX integration of OM part on 2-AUG-2012 end.
78:
79:
80: --get distribution lines in one invoice
81: cursor c_get_inv_dists(cp_trx_id ap_invoices_all.INVOICE_ID%TYPE)
82: is
83: select *
84: from ap_invoice_distributions_all
85: where invoice_id = cp_trx_id;

Line 88: cursor c_get_inv_dist_line(cp_trx_id ap_invoices_all.INVOICE_ID%TYPE)

84: from ap_invoice_distributions_all
85: where invoice_id = cp_trx_id;
86:
87: -- cursor to get prepay distribution lines for unapplication
88: cursor c_get_inv_dist_line(cp_trx_id ap_invoices_all.INVOICE_ID%TYPE)
89: is
90: select aida.*
91: from ap_invoice_distributions_all aida
92: where aida.invoice_id = cp_trx_id

Line 105: cursor c_get_inv_dist(cp_trx_id ap_invoices_all.INVOICE_ID%TYPE)

101:
102: --Added by Cholei for bug#14189751 begin
103: ------------------------------------------------------------------------------------
104: -- cursor to get invoice distribution line with match status flag
105: cursor c_get_inv_dist(cp_trx_id ap_invoices_all.INVOICE_ID%TYPE)
106: is
107: select invoice_id
108: ,invoice_distribution_id
109: ,match_status_flag

Line 613: cursor c_get_inv_dist(cp_trx_id ap_invoices_all.INVOICE_ID%TYPE)

609: le_error EXCEPTION;
610: l_api_name CONSTANT VARCHAR2(30) := 'DETERMINE_RECOVERY()';
611:
612: -- cursor to get invoice distribution line with match status flag
613: cursor c_get_inv_dist(cp_trx_id ap_invoices_all.INVOICE_ID%TYPE)
614: is
615: select *
616: from ap_invoice_distributions_all
617: where invoice_id = cp_trx_id

Line 622: cursor c_get_inv_dist_prepay(cp_trx_id ap_invoices_all.INVOICE_ID%TYPE)

618: and match_status_flag is not null
619: and line_type_lookup_code <> 'PREPAY'; --Added by Chong for bug#13802244, sync flag should exclude prepayements line
620:
621: -- cursor to get invoice distribution line for prepay
622: cursor c_get_inv_dist_prepay(cp_trx_id ap_invoices_all.INVOICE_ID%TYPE)
623: is
624: select aida.*
625: from ap_invoice_distributions_all aida
626: where aida.invoice_id = cp_trx_id

Line 747: cursor c_get_ledger_id(cp_trx_id ap_invoices_all.INVOICE_ID%TYPE)

743: pv_entity_code VARCHAR2 DEFAULT NULL, --Added by Wenqiong for PO integration
744: pn_trx_id NUMBER DEFAULT NULL --Added by Cholei for bug#14189751
745: )return boolean
746: is
747: cursor c_get_ledger_id(cp_trx_id ap_invoices_all.INVOICE_ID%TYPE)
748: is
749: select set_of_books_id
750: from ap_invoices_all
751: where invoice_id = cp_trx_id;

Line 750: from ap_invoices_all

746: is
747: cursor c_get_ledger_id(cp_trx_id ap_invoices_all.INVOICE_ID%TYPE)
748: is
749: select set_of_books_id
750: from ap_invoices_all
751: where invoice_id = cp_trx_id;
752:
753: cursor c_get_ledger_id_ar(cp_trx_id ra_customer_trx_all.customer_trx_id%TYPE) is
754: select set_of_books_id

Line 1326: FROM ap_invoices_all aia

1322: IS
1323: SELECT aia.invoice_id
1324: , aia.source
1325: , aia.vendor_id
1326: FROM ap_invoices_all aia
1327: WHERE aia.invoice_id = cp_invoice_id;
1328:
1329: CURSOR c_chk_tds_vendor(cp_vendor_id NUMBER)
1330: IS

Line 1345: FROM ap_invoices_all

1341:
1342: CURSOR c_payment_status(cp_invoice_id NUMBER)
1343: IS
1344: SELECT payment_status_flag
1345: FROM ap_invoices_all
1346: WHERE invoice_id = cp_invoice_id;
1347:
1348: r_invoice_info c_get_invoice_info%ROWTYPE;
1349: r_tds_invoice_id c_tds_invoice_id%ROWTYPE;

Line 1421: cursor c_get_inv_dists(cp_trx_id ap_invoices_all.INVOICE_ID%TYPE)

1417: ---------------------------------------------------------------------------------------------------------------------------------*/
1418: PROCEDURE CREATE_ACCOUNTING(pv_return_status OUT NOCOPY VARCHAR2) IS
1419:
1420: -- cursor to get invoice distributions
1421: cursor c_get_inv_dists(cp_trx_id ap_invoices_all.INVOICE_ID%TYPE)
1422: is
1423: select aida.*
1424: from ap_invoice_distributions_all aida
1425: where aida.invoice_id = cp_trx_id;

Line 1525: FROM ap_invoices_all

1521: ln_request_id Number;
1522:
1523: CURSOR get_invoice_type_cur IS
1524: SELECT invoice_type_lookup_code
1525: FROM ap_invoices_all
1526: WHERE invoice_id = pr_rec.invoice_id;
1527:
1528: CURSOR get_tax_type_cur IS
1529: SELECT jcta.tax_type

Line 1580: FROM ap_invoices_all

1576: , exchange_rate
1577: , exchange_rate_type
1578: , invoice_date
1579: , invoice_currency_code
1580: FROM ap_invoices_all
1581: WHERE invoice_id = pr_rec.invoice_id ;
1582:
1583: CURSOR get_regime_id_cur IS
1584: SELECT regime_id

Line 1642: FROM ap_invoices_all

1638: );
1639:
1640: CURSOR get_cancell_date_cur IS
1641: SELECT cancelled_date
1642: FROM ap_invoices_all
1643: WHERE invoice_id = pr_rec.invoice_id;
1644:
1645: cursor get_posted_flag( P_INVOICE_DISTRIBUTION_ID NUMBER ) IS
1646: select 'Y'

Line 1985: cursor c_get_invs(cp_trx_id ap_invoices_all.INVOICE_ID%TYPE)

1981: pv_return_status OUT NOCOPY VARCHAR2
1982: ) IS
1983:
1984: -- cursor to get invoice detail
1985: cursor c_get_invs(cp_trx_id ap_invoices_all.INVOICE_ID%TYPE)
1986: IS
1987: select ai.*
1988: from ap_invoices_all ai
1989: where ai.invoice_id = cp_trx_id;

Line 1988: from ap_invoices_all ai

1984: -- cursor to get invoice detail
1985: cursor c_get_invs(cp_trx_id ap_invoices_all.INVOICE_ID%TYPE)
1986: IS
1987: select ai.*
1988: from ap_invoices_all ai
1989: where ai.invoice_id = cp_trx_id;
1990:
1991: -- cursor to get PO/RCV match invoice line detail
1992: cursor c_get_inv_lines(cp_invoice_id ap_invoices_all.INVOICE_ID%TYPE)

Line 1992: cursor c_get_inv_lines(cp_invoice_id ap_invoices_all.INVOICE_ID%TYPE)

1988: from ap_invoices_all ai
1989: where ai.invoice_id = cp_trx_id;
1990:
1991: -- cursor to get PO/RCV match invoice line detail
1992: cursor c_get_inv_lines(cp_invoice_id ap_invoices_all.INVOICE_ID%TYPE)
1993: IS
1994: select ail.*
1995: from ap_invoice_lines_all ail
1996: where ail.invoice_id = cp_invoice_id

Line 2001: cursor c_get_inv_pss(cp_trx_id ap_invoices_all.INVOICE_ID%TYPE)

1997: and ail.match_type in ('ITEM_TO_RECEIPT', 'ITEM_TO_PO', 'PO_PRICE_ADJUSTMENT')
1998: and ail.discarded_flag = 'N';
1999:
2000: -- cursor to get invoice payment schedules
2001: cursor c_get_inv_pss(cp_trx_id ap_invoices_all.INVOICE_ID%TYPE)
2002: IS
2003: select apsa.*
2004: from ap_payment_schedules_all apsa
2005: where apsa.invoice_id = cp_trx_id;

Line 2022: cursor c_get_total_line_amount(cp_trx_id ap_invoices_all.INVOICE_ID%TYPE) is

2018: where jpr.match_type = cp_match_type
2019: and jpr.trx_id = cp_trx_id
2020: and jpr.vendor_id = cp_vendor_id;
2021:
2022: cursor c_get_total_line_amount(cp_trx_id ap_invoices_all.INVOICE_ID%TYPE) is
2023: select sum(nvl(amount,0))
2024: from ap_invoice_lines_all
2025: where invoice_id=cp_trx_id
2026: and line_type_lookup_code in ('ITEM', 'MISCELLANEOUS', 'FREIGHT') --Added by Chong for bug#16743694 2013/05/07

Line 2030: inv_rec AP_INVOICES_ALL%ROWTYPE;

2026: and line_type_lookup_code in ('ITEM', 'MISCELLANEOUS', 'FREIGHT') --Added by Chong for bug#16743694 2013/05/07
2027: ;
2028:
2029: ln_parent_inv_payment_priority jai_ap_tds_thhold_trxs.parent_inv_payment_priority%type;
2030: inv_rec AP_INVOICES_ALL%ROWTYPE;
2031: inv_line_rec AP_INVOICE_LINES_ALL%ROWTYPE;
2032: inv_dist_rec AP_INVOICE_DISTRIBUTIONS_ALL%ROWTYPE;
2033: inv_ps_rec AP_PAYMENT_SCHEDULES%ROWTYPE;
2034: lv_action VARCHAR2(100);

Line 2138: update ap_invoices_all

2134: OPEN c_get_total_line_amount(p_event_class_rec.trx_id);
2135: FETCH c_get_total_line_amount into l_total_line_amount;
2136: CLOSE c_get_total_line_amount;
2137:
2138: update ap_invoices_all
2139: set invoice_amount = nvl(l_total_line_amount,0)
2140: where invoice_id= p_event_class_rec.trx_id;
2141:
2142: END IF;