DBA Data[Home] [Help]

APPS.AP_INVOICES_UTILITY_PKG dependencies on AP_INVOICE_LINES_ALL

Line 114: ap_invoice_lines_all ail

110: -- distributions created for prepayment applications
111: SELECT SUM(NVL(aid.amount,0))
112: INTO distribution_total
113: FROM ap_invoice_distributions_all aid,
114: ap_invoice_lines_all ail
115: WHERE ail.invoice_id = l_invoice_id
116: AND aid.invoice_id = ail.invoice_id
117: AND aid.invoice_line_number = ail.line_number
118: AND ((aid.line_type_lookup_code NOT IN ('PREPAY', 'AWT')

Line 722: FROM ap_invoice_lines_all ail

718: BEGIN
719:
720: SELECT 'N'
721: INTO invoice_approval_flag
722: FROM ap_invoice_lines_all ail
723: WHERE ail.invoice_id = l_invoice_id
724: AND ail.amount <>
725: ( SELECT NVL(SUM(NVL(aid.amount,0)),0)
726: FROM ap_invoice_distributions_all aid

Line 762: FROM ap_invoice_lines_all AIL, ap_invoices_all A

758: BEGIN
759:
760: SELECT 'N'
761: INTO invoice_approval_flag
762: FROM ap_invoice_lines_all AIL, ap_invoices_all A
763: WHERE AIL.invoice_id = A.invoice_id
764: AND AIL.invoice_id = l_invoice_id
765: AND ((AIL.line_type_lookup_code <> 'TAX'
766: and (AIL.line_type_lookup_code NOT IN ('AWT','PREPAY')

Line 800: -- Y. Included ap_invoice_lines_all in select since the flag

796: -- eTax Uptake. Use of prepay_distribution_id to determine
797: -- if the REC_TAX and NONREC_TAX distribution are related
798: -- to the prepayment application and should be included in the
799: -- total of the distributions if the invoice_includes_prepay_flag is
800: -- Y. Included ap_invoice_lines_all in select since the flag
801: -- at the dist level is obsolete.
802:
803: IF (encumbrance_flag = 'Y') AND (invoice_approval_flag = 'A') THEN
804:

Line 808: ap_invoice_lines_all ail

804:
805: SELECT NVL(SUM(nvl(aid.amount,0)), 0)
806: INTO sum_distributions
807: FROM ap_invoice_distributions_all aid,
808: ap_invoice_lines_all ail
809: WHERE ail.invoice_id = l_invoice_id
810: AND aid.invoice_id = ail.invoice_id
811: AND aid.invoice_line_number = ail.line_number
812: AND (aid.line_type_lookup_code <> 'RETAINAGE'

Line 931: FROM ap_invoice_lines_all L,

927: /* Bug 4669905. Modified the Cursor */
928: CURSOR po_number_cursor IS
929: SELECT DISTINCT ph.segment1, ph.po_header_id,
930: NVL(SUM(L.amount),0)
931: FROM ap_invoice_lines_all L,
932: po_headers PH
933: WHERE L.invoice_id = l_invoice_id
934: AND L.po_header_id = PH.po_header_id
935: AND L.match_type IN ( 'PRICE_CORRECTION', 'QTY_CORRECTION',

Line 959: FROM ap_invoice_lines_all AIL

955: EXIT;
956: ELSE /* Bug 4669905 */
957: SELECT NVL(SUM(AIL.amount), 0)
958: INTO l_corrected_amount
959: FROM ap_invoice_lines_all AIL
960: WHERE corrected_inv_id = l_invoice_id
961: AND po_header_id = l_po_header_id
962: AND NVL( AIL.discarded_flag, 'N' ) <> 'Y'
963: AND NVL( AIL.cancelled_flag, 'N' ) <> 'Y' ;

Line 2958: FROM ap_invoice_lines_all il

2954: FROM ap_invoices_all i
2955: WHERE i.invoice_id = P_Invoice_Id
2956: AND EXISTS
2957: (SELECT il.invoice_id
2958: FROM ap_invoice_lines_all il
2959: WHERE il.invoice_id = i.invoice_id
2960: AND NVL(il.discarded_flag, 'N') <> 'Y'
2961: AND NVL(il.cancelled_flag, 'N') <> 'Y'
2962: AND il.match_type IN ('PRICE_CORRECTION',

Line 3046: FROM ap_invoice_lines_all il

3042: FROM ap_invoices_all i
3043: WHERE i.invoice_id = P_Invoice_Id
3044: AND EXISTS
3045: (SELECT il.invoice_id
3046: FROM ap_invoice_lines_all il
3047: WHERE il.invoice_id = i.invoice_id
3048: AND il.line_type_lookup_code = 'PREPAY'
3049: AND NVL(il.discarded_flag, 'N') <> 'Y'
3050: AND NVL(il.cancelled_flag, 'N') <> 'Y');

Line 3133: FROM ap_invoice_lines_all il

3129: FROM ap_invoices_all i
3130: WHERE i.invoice_id = P_Invoice_Id
3131: AND EXISTS
3132: (SELECT il.invoice_id
3133: FROM ap_invoice_lines_all il
3134: WHERE il.invoice_id = i.invoice_id
3135: AND il.line_type_lookup_code = 'AWT'
3136: AND NVL(il.discarded_flag, 'N') <> 'Y'
3137: AND NVL(il.cancelled_flag, 'N') <> 'Y');

Line 3219: FROM ap_invoice_lines_all ail,

3215: FROM ap_invoices_all i
3216: WHERE i.invoice_id = P_Invoice_Id
3217: AND EXISTS
3218: (SELECT ail.invoice_id
3219: FROM ap_invoice_lines_all ail,
3220: po_line_locations_all pll
3221: WHERE ail.invoice_id = i.invoice_id
3222: AND ail.po_line_location_id = pll.line_location_id
3223: AND ail.org_id = pll.org_id

Line 3349: (SELECT 'X' FROM ap_invoice_lines_all ail

3345: FROM ap_invoice_distributions_all aid
3346: WHERE aid.invoice_id = p_invoice_id
3347: AND aid.line_type_lookup_code = 'RETAINAGE'
3348: AND EXISTS
3349: (SELECT 'X' FROM ap_invoice_lines_all ail
3350: WHERE ail.invoice_id = p_invoice_id
3351: AND ail.line_number = aid.invoice_line_number
3352: AND ail.line_type_lookup_code <> 'RETAINAGE RELEASE');
3353:

Line 3382: from ap_invoice_lines_all

3378: BEGIN
3379:
3380: select sum(nvl(amount,0)) - sum(nvl(included_tax_amount,0))
3381: into item_total
3382: from ap_invoice_lines_all
3383: where invoice_id = p_invoice_id
3384: and line_type_lookup_code IN ('ITEM','RETAINAGE RELEASE');
3385:
3386: return(item_total);

Line 3414: from ap_invoice_lines_all

3410: BEGIN
3411:
3412: select sum(nvl(amount,0)) - sum(nvl(included_tax_amount,0))
3413: into freight_total
3414: from ap_invoice_lines_all
3415: where invoice_id = p_invoice_id
3416: and org_id = p_org_id
3417: and line_type_lookup_code = 'FREIGHT';
3418:

Line 3448: from ap_invoice_lines_all

3444: BEGIN
3445:
3446: select sum(nvl(amount,0)) - sum(nvl(included_tax_amount,0))
3447: into misc_total
3448: from ap_invoice_lines_all
3449: where invoice_id = p_invoice_id
3450: and org_id = p_org_id
3451: and line_type_lookup_code = 'MISCELLANEOUS';
3452: