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 300: * bug 7118571 - added ap_invoices_all to the query to consider non-cancelled invoices only

296:
297: Begin
298:
299: /*
300: * bug 7118571 - added ap_invoices_all to the query to consider non-cancelled invoices only
301: */
302: Select Nvl(Sum(ail.quantity_invoiced), 0)
303: Into l_existing_corr_qty
304: From ap_invoice_lines_all ail

Line 305: ,ap_invoices_all ai

301: */
302: Select Nvl(Sum(ail.quantity_invoiced), 0)
303: Into l_existing_corr_qty
304: From ap_invoice_lines_all ail
305: ,ap_invoices_all ai
306: Where ail.corrected_inv_id = p_invoice_id
307: And ail.corrected_line_number = p_line_number
308: And ail.match_type = 'QTY_CORRECTION'
309: And ail.invoice_id = ai.invoice_id

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

326:
327: Begin
328:
329: /*
330: * bug 7118571 - added ap_invoices_all to the query to consider non-cancelled invoices only
331: */
332: Select Nvl(Sum(ail.unit_price * ail.quantity_invoiced), 0)
333: Into l_correction_amount
334: From ap_invoice_lines_all ail

Line 335: ,ap_invoices_all ai

331: */
332: Select Nvl(Sum(ail.unit_price * ail.quantity_invoiced), 0)
333: Into l_correction_amount
334: From ap_invoice_lines_all ail
335: ,ap_invoices_all ai
336: Where ail.corrected_inv_id = p_invoice_id
337: And ail.corrected_line_number = p_line_number
338: And ail.match_type = 'PRICE_CORRECTION'
339: And ai.invoice_id = ail.invoice_id

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

391:
392: Begin
393:
394: /*
395: * bug 7118571 - added ap_invoices_all to the query to consider non-cancelled invoices only
396: */
397:
398: Select Nvl(Sum(ail.amount), 0)
399: Into l_existing_corr_amt

Line 401: ,ap_invoices_all ai

397:
398: Select Nvl(Sum(ail.amount), 0)
399: Into l_existing_corr_amt
400: From ap_invoice_lines_all ail
401: ,ap_invoices_all ai
402: Where ail.corrected_inv_id = p_invoice_id
403: And ail.corrected_line_number = p_line_number
404: And ail.match_type In ( 'QTY_CORRECTION', 'PRICE_CORRECTION',
405: 'AMOUNT_CORRECTION')

Line 1066: ap_invoices ai,

1062: decode(pll.matching_basis,'QUANTITY',sum(nvl(aid.quantity_invoiced,0))),
1063: decode(pll.matching_basis,'AMOUNT',sum(nvl(aid.amount,0))),
1064: pll.matching_basis
1065: FROM ap_invoice_distributions_v aid,
1066: ap_invoices ai,
1067: po_line_locations pll
1068: WHERE pll.line_location_id = P_Po_Line_Location_Id
1069: AND pll.shipment_type <> 'PREPAYMENT'
1070: AND aid.line_location_id =pll.line_location_id

Line 1258: FROM ap_invoices ai,

1254: decode(pll.payment_type,'ADVANCE',2,1) prepayment_order_number,
1255: AP_Prepay_Utils_Pkg.Get_Ln_Prep_Amt_Remain_Recoup(
1256: ai.invoice_id,ail.line_number) prepay_amount_remaining,
1257: max(aip.accounting_date) prepayment_payment_date
1258: FROM ap_invoices ai,
1259: ap_invoice_lines ail,
1260: po_line_locations pll,
1261: ap_invoice_payments aip
1262: WHERE ai.invoice_id = ail.invoice_id

Line 1292: FROM AP_Invoices

1288: exchange_rate_type,
1289: payment_currency_code,
1290: payment_cross_rate_date,
1291: payment_cross_rate_type
1292: FROM AP_Invoices
1293: WHERE invoice_id = CV_Invoice_ID;
1294:
1295: CURSOR C_Prepay_dists IS
1296: SELECT prepay_distribution_id,

Line 1329: l_inv_curr_code ap_invoices_all.invoice_currency_code%TYPE;

1325:
1326: --bugfix:5496603
1327: l_recouped_tax_amt_in_pay_curr NUMBER;
1328: l_recouped_tax_amount NUMBER;
1329: l_inv_curr_code ap_invoices_all.invoice_currency_code%TYPE;
1330: l_inv_xrate ap_invoices_all.exchange_rate%TYPE;
1331: l_inv_xdate ap_invoices_all.exchange_date%TYPE;
1332: l_inv_xrate_type ap_invoices_all.exchange_rate_type%TYPE;
1333: l_inv_pay_curr_code ap_invoices_all.payment_currency_code%TYPE;

Line 1330: l_inv_xrate ap_invoices_all.exchange_rate%TYPE;

1326: --bugfix:5496603
1327: l_recouped_tax_amt_in_pay_curr NUMBER;
1328: l_recouped_tax_amount NUMBER;
1329: l_inv_curr_code ap_invoices_all.invoice_currency_code%TYPE;
1330: l_inv_xrate ap_invoices_all.exchange_rate%TYPE;
1331: l_inv_xdate ap_invoices_all.exchange_date%TYPE;
1332: l_inv_xrate_type ap_invoices_all.exchange_rate_type%TYPE;
1333: l_inv_pay_curr_code ap_invoices_all.payment_currency_code%TYPE;
1334: l_inv_pay_cross_rate_date ap_invoices_all.payment_cross_rate_date%TYPE;

Line 1331: l_inv_xdate ap_invoices_all.exchange_date%TYPE;

1327: l_recouped_tax_amt_in_pay_curr NUMBER;
1328: l_recouped_tax_amount NUMBER;
1329: l_inv_curr_code ap_invoices_all.invoice_currency_code%TYPE;
1330: l_inv_xrate ap_invoices_all.exchange_rate%TYPE;
1331: l_inv_xdate ap_invoices_all.exchange_date%TYPE;
1332: l_inv_xrate_type ap_invoices_all.exchange_rate_type%TYPE;
1333: l_inv_pay_curr_code ap_invoices_all.payment_currency_code%TYPE;
1334: l_inv_pay_cross_rate_date ap_invoices_all.payment_cross_rate_date%TYPE;
1335: l_inv_pay_cross_rate_type ap_invoices_all.payment_cross_rate_type%TYPE;

Line 1332: l_inv_xrate_type ap_invoices_all.exchange_rate_type%TYPE;

1328: l_recouped_tax_amount NUMBER;
1329: l_inv_curr_code ap_invoices_all.invoice_currency_code%TYPE;
1330: l_inv_xrate ap_invoices_all.exchange_rate%TYPE;
1331: l_inv_xdate ap_invoices_all.exchange_date%TYPE;
1332: l_inv_xrate_type ap_invoices_all.exchange_rate_type%TYPE;
1333: l_inv_pay_curr_code ap_invoices_all.payment_currency_code%TYPE;
1334: l_inv_pay_cross_rate_date ap_invoices_all.payment_cross_rate_date%TYPE;
1335: l_inv_pay_cross_rate_type ap_invoices_all.payment_cross_rate_type%TYPE;
1336: TYPE PREPAY_DIST_ID_LIST IS TABLE OF AP_INVOICE_DISTRIBUTIONS_ALL.PREPAY_DISTRIBUTION_ID%TYPE INDEX BY PLS_INTEGER;

Line 1333: l_inv_pay_curr_code ap_invoices_all.payment_currency_code%TYPE;

1329: l_inv_curr_code ap_invoices_all.invoice_currency_code%TYPE;
1330: l_inv_xrate ap_invoices_all.exchange_rate%TYPE;
1331: l_inv_xdate ap_invoices_all.exchange_date%TYPE;
1332: l_inv_xrate_type ap_invoices_all.exchange_rate_type%TYPE;
1333: l_inv_pay_curr_code ap_invoices_all.payment_currency_code%TYPE;
1334: l_inv_pay_cross_rate_date ap_invoices_all.payment_cross_rate_date%TYPE;
1335: l_inv_pay_cross_rate_type ap_invoices_all.payment_cross_rate_type%TYPE;
1336: TYPE PREPAY_DIST_ID_LIST IS TABLE OF AP_INVOICE_DISTRIBUTIONS_ALL.PREPAY_DISTRIBUTION_ID%TYPE INDEX BY PLS_INTEGER;
1337: TYPE RECOUP_AMOUNT_LIST IS TABLE OF AP_INVOICE_DISTRIBUTIONS_ALL.AMOUNT%TYPE INDEX BY PLS_INTEGER;

Line 1334: l_inv_pay_cross_rate_date ap_invoices_all.payment_cross_rate_date%TYPE;

1330: l_inv_xrate ap_invoices_all.exchange_rate%TYPE;
1331: l_inv_xdate ap_invoices_all.exchange_date%TYPE;
1332: l_inv_xrate_type ap_invoices_all.exchange_rate_type%TYPE;
1333: l_inv_pay_curr_code ap_invoices_all.payment_currency_code%TYPE;
1334: l_inv_pay_cross_rate_date ap_invoices_all.payment_cross_rate_date%TYPE;
1335: l_inv_pay_cross_rate_type ap_invoices_all.payment_cross_rate_type%TYPE;
1336: TYPE PREPAY_DIST_ID_LIST IS TABLE OF AP_INVOICE_DISTRIBUTIONS_ALL.PREPAY_DISTRIBUTION_ID%TYPE INDEX BY PLS_INTEGER;
1337: TYPE RECOUP_AMOUNT_LIST IS TABLE OF AP_INVOICE_DISTRIBUTIONS_ALL.AMOUNT%TYPE INDEX BY PLS_INTEGER;
1338: l_prepay_dist_id_list prepay_dist_id_list;

Line 1335: l_inv_pay_cross_rate_type ap_invoices_all.payment_cross_rate_type%TYPE;

1331: l_inv_xdate ap_invoices_all.exchange_date%TYPE;
1332: l_inv_xrate_type ap_invoices_all.exchange_rate_type%TYPE;
1333: l_inv_pay_curr_code ap_invoices_all.payment_currency_code%TYPE;
1334: l_inv_pay_cross_rate_date ap_invoices_all.payment_cross_rate_date%TYPE;
1335: l_inv_pay_cross_rate_type ap_invoices_all.payment_cross_rate_type%TYPE;
1336: TYPE PREPAY_DIST_ID_LIST IS TABLE OF AP_INVOICE_DISTRIBUTIONS_ALL.PREPAY_DISTRIBUTION_ID%TYPE INDEX BY PLS_INTEGER;
1337: TYPE RECOUP_AMOUNT_LIST IS TABLE OF AP_INVOICE_DISTRIBUTIONS_ALL.AMOUNT%TYPE INDEX BY PLS_INTEGER;
1338: l_prepay_dist_id_list prepay_dist_id_list;
1339: l_recoup_amount_list recoup_amount_list;

Line 1755: l_invoice_currency_code AP_INVOICES.INVOICE_CURRENCY_CODE%TYPE;

1751: l_match_quantity NUMBER;
1752: l_match_amount NUMBER;
1753: l_rcv_transaction_id RCV_TRANSACTIONS.TRANSACTION_ID%TYPE;
1754: l_matching_basis PO_LINE_LOCATIONS.MATCHING_BASIS%TYPE;
1755: l_invoice_currency_code AP_INVOICES.INVOICE_CURRENCY_CODE%TYPE;
1756: l_invoice_type_lookup_code AP_INVOICES.INVOICE_TYPE_LOOKUP_CODE%TYPE;
1757: l_unit_meas_lookup_code AP_INVOICE_LINES.UNIT_MEAS_LOOKUP_CODE%TYPE;
1758: l_retained_amount AP_INVOICE_LINES.RETAINED_AMOUNT%TYPE;
1759: l_match_type AP_INVOICE_LINES.MATCH_TYPE%TYPE;

Line 1756: l_invoice_type_lookup_code AP_INVOICES.INVOICE_TYPE_LOOKUP_CODE%TYPE;

1752: l_match_amount NUMBER;
1753: l_rcv_transaction_id RCV_TRANSACTIONS.TRANSACTION_ID%TYPE;
1754: l_matching_basis PO_LINE_LOCATIONS.MATCHING_BASIS%TYPE;
1755: l_invoice_currency_code AP_INVOICES.INVOICE_CURRENCY_CODE%TYPE;
1756: l_invoice_type_lookup_code AP_INVOICES.INVOICE_TYPE_LOOKUP_CODE%TYPE;
1757: l_unit_meas_lookup_code AP_INVOICE_LINES.UNIT_MEAS_LOOKUP_CODE%TYPE;
1758: l_retained_amount AP_INVOICE_LINES.RETAINED_AMOUNT%TYPE;
1759: l_match_type AP_INVOICE_LINES.MATCH_TYPE%TYPE;
1760: l_po_distribution_id PO_DISTRIBUTIONS.PO_DISTRIBUTION_ID%TYPE;

Line 1825: ap_invoices ai

1821: l_retained_amount,
1822: l_match_type,
1823: l_po_distribution_id
1824: FROM ap_invoice_lines_all ail,
1825: ap_invoices ai
1826: WHERE ai.invoice_id = p_invoice_id
1827: AND ail.invoice_id = ai.invoice_id
1828: AND ail.line_number = p_invoice_line_number;
1829: