DBA Data[Home] [Help]

APPS.AP_MATCHING_UTILS_PKG dependencies on AP_INVOICES

Line 54: -- select all the out variables from the view ap_invoices_v

50: P_release_amount_net_of_tax IN OUT NOCOPY NUMBER)
51: IS
52: debug_info varchar2(100);
53: BEGIN
54: -- select all the out variables from the view ap_invoices_v
55:
56: debug_info := 'select out variables from ap_invoices_v';
57: --bug 5056082 Replacing the view with base tables
58: SELECT ai.invoice_num,

Line 56: debug_info := 'select out variables from ap_invoices_v';

52: debug_info varchar2(100);
53: BEGIN
54: -- select all the out variables from the view ap_invoices_v
55:
56: debug_info := 'select out variables from ap_invoices_v';
57: --bug 5056082 Replacing the view with base tables
58: SELECT ai.invoice_num,
59: ai.invoice_amount,
60: ai.invoice_date,

Line 77: AP_INVOICES_PKG.GET_PERIOD_NAME( AI.GL_DATE, NULL, AI.ORG_ID) PERIOD_NAME,

73: ai.batch_id,
74: ai.gl_date,
75: ai.terms_id,
76: AT.NAME TERMS_NAME ,
77: AP_INVOICES_PKG.GET_PERIOD_NAME( AI.GL_DATE, NULL, AI.ORG_ID) PERIOD_NAME,
78: FC.MINIMUM_ACCOUNTABLE_UNIT,
79: FC.PRECISION PRECISION,
80: ai.release_amount_net_of_tax
81: INTO

Line 105: ap_invoices_all ai,

101: P_minimum_accountable_unit,
102: P_precision,
103: P_release_amount_net_of_tax
104: FROM
105: ap_invoices_all ai,
106: FND_CURRENCIES FC,
107: HZ_PARTIES HP,
108: ap_suppliers pv,
109: ap_supplier_sites_all pvs,

Line 307: * bug 7118571 - added ap_invoices_all to the query to consider non-cancelled invoices only

303:
304: Begin
305:
306: /*
307: * bug 7118571 - added ap_invoices_all to the query to consider non-cancelled invoices only
308: */
309: Select Nvl(Sum(ail.quantity_invoiced), 0)
310: Into l_existing_corr_qty
311: From ap_invoice_lines_all ail

Line 312: ,ap_invoices_all ai

308: */
309: Select Nvl(Sum(ail.quantity_invoiced), 0)
310: Into l_existing_corr_qty
311: From ap_invoice_lines_all ail
312: ,ap_invoices_all ai
313: Where ail.corrected_inv_id = p_invoice_id
314: And ail.corrected_line_number = p_line_number
315: And ail.match_type = 'QTY_CORRECTION'
316: And ail.invoice_id = ai.invoice_id

Line 338: * bug 7118571 - added ap_invoices_all to the query to consider non-cancelled invoices only

334:
335: Begin
336:
337: /*
338: * bug 7118571 - added ap_invoices_all to the query to consider non-cancelled invoices only
339: */
340:
341: --Commented below code and introduced new call to find l_correction_amount
342: /* Select Nvl(Sum(ail.unit_price * ail.quantity_invoiced), 0)

Line 345: ,ap_invoices_all ai

341: --Commented below code and introduced new call to find l_correction_amount
342: /* Select Nvl(Sum(ail.unit_price * ail.quantity_invoiced), 0)
343: Into l_correction_amount
344: From ap_invoice_lines_all ail
345: ,ap_invoices_all ai
346: Where ail.corrected_inv_id = p_invoice_id
347: And ail.corrected_line_number = p_line_number
348: And ail.match_type = 'PRICE_CORRECTION'
349: And ai.invoice_id = ail.invoice_id

Line 435: * bug 7118571 - added ap_invoices_all to the query to consider non-cancelled invoices only

431:
432: Begin
433:
434: /*
435: * bug 7118571 - added ap_invoices_all to the query to consider non-cancelled invoices only
436: */
437:
438: Select Nvl(Sum(ail.amount), 0)
439: Into l_existing_corr_amt

Line 441: ,ap_invoices_all ai

437:
438: Select Nvl(Sum(ail.amount), 0)
439: Into l_existing_corr_amt
440: From ap_invoice_lines_all ail
441: ,ap_invoices_all ai
442: Where ail.corrected_inv_id = p_invoice_id
443: And ail.corrected_line_number = p_line_number
444: And ail.match_type In ( 'QTY_CORRECTION', 'PRICE_CORRECTION',
445: 'AMOUNT_CORRECTION')

Line 1131: ap_invoices ai,

1127: decode(pll.matching_basis,'QUANTITY',sum(nvl(aid.quantity_invoiced,0))),
1128: decode(pll.matching_basis,'AMOUNT',sum(nvl(aid.amount,0))),
1129: pll.matching_basis
1130: FROM ap_invoice_distributions_v aid,
1131: ap_invoices ai,
1132: po_line_locations pll
1133: WHERE pll.line_location_id = P_Po_Line_Location_Id
1134: AND pll.shipment_type <> 'PREPAYMENT'
1135: AND aid.line_location_id =pll.line_location_id

Line 1323: FROM ap_invoices ai,

1319: decode(pll.payment_type,'ADVANCE',2,1) prepayment_order_number,
1320: AP_Prepay_Utils_Pkg.Get_Ln_Prep_Amt_Remain_Recoup(
1321: ai.invoice_id,ail.line_number) prepay_amount_remaining,
1322: max(aip.accounting_date) prepayment_payment_date
1323: FROM ap_invoices ai,
1324: ap_invoice_lines ail,
1325: po_line_locations pll,
1326: ap_invoice_payments aip
1327: WHERE ai.invoice_id = ail.invoice_id

Line 1358: FROM AP_Invoices

1354: exchange_rate_type,
1355: payment_currency_code,
1356: payment_cross_rate_date,
1357: payment_cross_rate_type
1358: FROM AP_Invoices
1359: WHERE invoice_id = CV_Invoice_ID;
1360:
1361: CURSOR C_Prepay_dists IS
1362: SELECT prepay_distribution_id,

Line 1395: l_inv_curr_code ap_invoices_all.invoice_currency_code%TYPE;

1391:
1392: --bugfix:5496603
1393: l_recouped_tax_amt_in_pay_curr NUMBER;
1394: l_recouped_tax_amount NUMBER;
1395: l_inv_curr_code ap_invoices_all.invoice_currency_code%TYPE;
1396: l_inv_xrate ap_invoices_all.exchange_rate%TYPE;
1397: l_inv_xdate ap_invoices_all.exchange_date%TYPE;
1398: l_inv_xrate_type ap_invoices_all.exchange_rate_type%TYPE;
1399: l_inv_pay_curr_code ap_invoices_all.payment_currency_code%TYPE;

Line 1396: l_inv_xrate ap_invoices_all.exchange_rate%TYPE;

1392: --bugfix:5496603
1393: l_recouped_tax_amt_in_pay_curr NUMBER;
1394: l_recouped_tax_amount NUMBER;
1395: l_inv_curr_code ap_invoices_all.invoice_currency_code%TYPE;
1396: l_inv_xrate ap_invoices_all.exchange_rate%TYPE;
1397: l_inv_xdate ap_invoices_all.exchange_date%TYPE;
1398: l_inv_xrate_type ap_invoices_all.exchange_rate_type%TYPE;
1399: l_inv_pay_curr_code ap_invoices_all.payment_currency_code%TYPE;
1400: l_inv_pay_cross_rate_date ap_invoices_all.payment_cross_rate_date%TYPE;

Line 1397: l_inv_xdate ap_invoices_all.exchange_date%TYPE;

1393: l_recouped_tax_amt_in_pay_curr NUMBER;
1394: l_recouped_tax_amount NUMBER;
1395: l_inv_curr_code ap_invoices_all.invoice_currency_code%TYPE;
1396: l_inv_xrate ap_invoices_all.exchange_rate%TYPE;
1397: l_inv_xdate ap_invoices_all.exchange_date%TYPE;
1398: l_inv_xrate_type ap_invoices_all.exchange_rate_type%TYPE;
1399: l_inv_pay_curr_code ap_invoices_all.payment_currency_code%TYPE;
1400: l_inv_pay_cross_rate_date ap_invoices_all.payment_cross_rate_date%TYPE;
1401: l_inv_pay_cross_rate_type ap_invoices_all.payment_cross_rate_type%TYPE;

Line 1398: l_inv_xrate_type ap_invoices_all.exchange_rate_type%TYPE;

1394: l_recouped_tax_amount NUMBER;
1395: l_inv_curr_code ap_invoices_all.invoice_currency_code%TYPE;
1396: l_inv_xrate ap_invoices_all.exchange_rate%TYPE;
1397: l_inv_xdate ap_invoices_all.exchange_date%TYPE;
1398: l_inv_xrate_type ap_invoices_all.exchange_rate_type%TYPE;
1399: l_inv_pay_curr_code ap_invoices_all.payment_currency_code%TYPE;
1400: l_inv_pay_cross_rate_date ap_invoices_all.payment_cross_rate_date%TYPE;
1401: l_inv_pay_cross_rate_type ap_invoices_all.payment_cross_rate_type%TYPE;
1402: TYPE PREPAY_DIST_ID_LIST IS TABLE OF AP_INVOICE_DISTRIBUTIONS_ALL.PREPAY_DISTRIBUTION_ID%TYPE INDEX BY PLS_INTEGER;

Line 1399: l_inv_pay_curr_code ap_invoices_all.payment_currency_code%TYPE;

1395: l_inv_curr_code ap_invoices_all.invoice_currency_code%TYPE;
1396: l_inv_xrate ap_invoices_all.exchange_rate%TYPE;
1397: l_inv_xdate ap_invoices_all.exchange_date%TYPE;
1398: l_inv_xrate_type ap_invoices_all.exchange_rate_type%TYPE;
1399: l_inv_pay_curr_code ap_invoices_all.payment_currency_code%TYPE;
1400: l_inv_pay_cross_rate_date ap_invoices_all.payment_cross_rate_date%TYPE;
1401: l_inv_pay_cross_rate_type ap_invoices_all.payment_cross_rate_type%TYPE;
1402: TYPE PREPAY_DIST_ID_LIST IS TABLE OF AP_INVOICE_DISTRIBUTIONS_ALL.PREPAY_DISTRIBUTION_ID%TYPE INDEX BY PLS_INTEGER;
1403: TYPE RECOUP_AMOUNT_LIST IS TABLE OF AP_INVOICE_DISTRIBUTIONS_ALL.AMOUNT%TYPE INDEX BY PLS_INTEGER;

Line 1400: l_inv_pay_cross_rate_date ap_invoices_all.payment_cross_rate_date%TYPE;

1396: l_inv_xrate ap_invoices_all.exchange_rate%TYPE;
1397: l_inv_xdate ap_invoices_all.exchange_date%TYPE;
1398: l_inv_xrate_type ap_invoices_all.exchange_rate_type%TYPE;
1399: l_inv_pay_curr_code ap_invoices_all.payment_currency_code%TYPE;
1400: l_inv_pay_cross_rate_date ap_invoices_all.payment_cross_rate_date%TYPE;
1401: l_inv_pay_cross_rate_type ap_invoices_all.payment_cross_rate_type%TYPE;
1402: TYPE PREPAY_DIST_ID_LIST IS TABLE OF AP_INVOICE_DISTRIBUTIONS_ALL.PREPAY_DISTRIBUTION_ID%TYPE INDEX BY PLS_INTEGER;
1403: TYPE RECOUP_AMOUNT_LIST IS TABLE OF AP_INVOICE_DISTRIBUTIONS_ALL.AMOUNT%TYPE INDEX BY PLS_INTEGER;
1404: l_prepay_dist_id_list prepay_dist_id_list;

Line 1401: l_inv_pay_cross_rate_type ap_invoices_all.payment_cross_rate_type%TYPE;

1397: l_inv_xdate ap_invoices_all.exchange_date%TYPE;
1398: l_inv_xrate_type ap_invoices_all.exchange_rate_type%TYPE;
1399: l_inv_pay_curr_code ap_invoices_all.payment_currency_code%TYPE;
1400: l_inv_pay_cross_rate_date ap_invoices_all.payment_cross_rate_date%TYPE;
1401: l_inv_pay_cross_rate_type ap_invoices_all.payment_cross_rate_type%TYPE;
1402: TYPE PREPAY_DIST_ID_LIST IS TABLE OF AP_INVOICE_DISTRIBUTIONS_ALL.PREPAY_DISTRIBUTION_ID%TYPE INDEX BY PLS_INTEGER;
1403: TYPE RECOUP_AMOUNT_LIST IS TABLE OF AP_INVOICE_DISTRIBUTIONS_ALL.AMOUNT%TYPE INDEX BY PLS_INTEGER;
1404: l_prepay_dist_id_list prepay_dist_id_list;
1405: l_recoup_amount_list recoup_amount_list;

Line 1823: l_invoice_currency_code AP_INVOICES.INVOICE_CURRENCY_CODE%TYPE;

1819: l_match_quantity NUMBER;
1820: l_match_amount NUMBER;
1821: l_rcv_transaction_id RCV_TRANSACTIONS.TRANSACTION_ID%TYPE;
1822: l_matching_basis PO_LINE_LOCATIONS.MATCHING_BASIS%TYPE;
1823: l_invoice_currency_code AP_INVOICES.INVOICE_CURRENCY_CODE%TYPE;
1824: l_invoice_type_lookup_code AP_INVOICES.INVOICE_TYPE_LOOKUP_CODE%TYPE;
1825: l_unit_meas_lookup_code AP_INVOICE_LINES.UNIT_MEAS_LOOKUP_CODE%TYPE;
1826: l_retained_amount AP_INVOICE_LINES.RETAINED_AMOUNT%TYPE;
1827: l_match_type AP_INVOICE_LINES.MATCH_TYPE%TYPE;

Line 1824: l_invoice_type_lookup_code AP_INVOICES.INVOICE_TYPE_LOOKUP_CODE%TYPE;

1820: l_match_amount NUMBER;
1821: l_rcv_transaction_id RCV_TRANSACTIONS.TRANSACTION_ID%TYPE;
1822: l_matching_basis PO_LINE_LOCATIONS.MATCHING_BASIS%TYPE;
1823: l_invoice_currency_code AP_INVOICES.INVOICE_CURRENCY_CODE%TYPE;
1824: l_invoice_type_lookup_code AP_INVOICES.INVOICE_TYPE_LOOKUP_CODE%TYPE;
1825: l_unit_meas_lookup_code AP_INVOICE_LINES.UNIT_MEAS_LOOKUP_CODE%TYPE;
1826: l_retained_amount AP_INVOICE_LINES.RETAINED_AMOUNT%TYPE;
1827: l_match_type AP_INVOICE_LINES.MATCH_TYPE%TYPE;
1828: l_po_distribution_id PO_DISTRIBUTIONS.PO_DISTRIBUTION_ID%TYPE;

Line 1893: ap_invoices ai

1889: l_retained_amount,
1890: l_match_type,
1891: l_po_distribution_id
1892: FROM ap_invoice_lines_all ail,
1893: ap_invoices ai
1894: WHERE ai.invoice_id = p_invoice_id
1895: AND ail.invoice_id = ai.invoice_id
1896: AND ail.line_number = p_invoice_line_number;
1897: