DBA Data[Home] [Help]

APPS.AP_INVOICES_UTILITY_PKG dependencies on AP_INVOICE_LINES_ALL

Line 120: ap_invoice_lines_all ail

116: -- distributions created for prepayment applications
117: SELECT SUM(NVL(aid.amount,0))
118: INTO distribution_total
119: FROM ap_invoice_distributions_all aid,
120: ap_invoice_lines_all ail
121: WHERE ail.invoice_id = l_invoice_id
122: AND aid.invoice_id = ail.invoice_id
123: AND aid.invoice_line_number = ail.line_number
124: AND ((aid.line_type_lookup_code NOT IN ('PREPAY', 'AWT')

Line 771: FROM ap_invoice_lines_all ail

767: BEGIN
768:
769: SELECT 'N'
770: INTO invoice_approval_flag
771: FROM ap_invoice_lines_all ail
772: WHERE ail.invoice_id = l_invoice_id
773: AND ail.amount <>
774: ( SELECT NVL(SUM(NVL(aid.amount,0)),0)
775: FROM ap_invoice_distributions_all aid

Line 811: FROM ap_invoice_lines_all AIL, ap_invoices_all A

807: BEGIN
808:
809: SELECT 'N'
810: INTO invoice_approval_flag
811: FROM ap_invoice_lines_all AIL, ap_invoices_all A
812: WHERE AIL.invoice_id = A.invoice_id
813: AND AIL.invoice_id = l_invoice_id
814: AND ((AIL.line_type_lookup_code <> 'TAX'
815: and (AIL.line_type_lookup_code NOT IN ('AWT','PREPAY')

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

845: -- eTax Uptake. Use of prepay_distribution_id to determine
846: -- if the REC_TAX and NONREC_TAX distribution are related
847: -- to the prepayment application and should be included in the
848: -- total of the distributions if the invoice_includes_prepay_flag is
849: -- Y. Included ap_invoice_lines_all in select since the flag
850: -- at the dist level is obsolete.
851:
852: IF (encumbrance_flag = 'Y') AND (invoice_approval_flag = 'A') THEN
853:

Line 857: ap_invoice_lines_all ail

853:
854: SELECT NVL(SUM(nvl(aid.amount,0)), 0)
855: INTO sum_distributions
856: FROM ap_invoice_distributions_all aid,
857: ap_invoice_lines_all ail
858: WHERE ail.invoice_id = l_invoice_id
859: AND aid.invoice_id = ail.invoice_id
860: AND aid.invoice_line_number = ail.line_number
861: AND (aid.line_type_lookup_code <> 'RETAINAGE'

Line 989: FROM ap_invoice_lines_all L,

985: /* Bug 4669905. Modified the Cursor */
986: CURSOR po_number_cursor IS
987: SELECT DISTINCT NVL(ph.CLM_DOCUMENT_NUMBER , ph.segment1), ph.po_header_id, -- for CLM Bug 9503239
988: NVL(SUM(L.amount),0)
989: FROM ap_invoice_lines_all L,
990: po_headers PH
991: WHERE L.invoice_id = l_invoice_id
992: AND L.po_header_id = PH.po_header_id
993: AND L.match_type IN ( 'PRICE_CORRECTION', 'QTY_CORRECTION',

Line 1025: FROM ap_invoice_lines_all AIL

1021: EXIT;
1022: ELSE /* Bug 4669905 */
1023: SELECT NVL(SUM(AIL.amount), 0)
1024: INTO l_corrected_amount
1025: FROM ap_invoice_lines_all AIL
1026: WHERE corrected_inv_id = l_invoice_id
1027: AND po_header_id = l_po_header_id
1028: AND NVL( AIL.discarded_flag, 'N' ) <> 'Y'
1029: AND NVL( AIL.cancelled_flag, 'N' ) <> 'Y' ;

Line 3031: FROM ap_invoice_lines_all il

3027: FROM ap_invoices_all i
3028: WHERE i.invoice_id = P_Invoice_Id
3029: AND EXISTS
3030: (SELECT il.invoice_id
3031: FROM ap_invoice_lines_all il
3032: WHERE il.invoice_id = i.invoice_id
3033: AND NVL(il.discarded_flag, 'N') <> 'Y'
3034: AND NVL(il.cancelled_flag, 'N') <> 'Y'
3035: AND il.match_type IN ('PRICE_CORRECTION',

Line 3119: FROM ap_invoice_lines_all il

3115: FROM ap_invoices_all i
3116: WHERE i.invoice_id = P_Invoice_Id
3117: AND EXISTS
3118: (SELECT il.invoice_id
3119: FROM ap_invoice_lines_all il
3120: WHERE il.invoice_id = i.invoice_id
3121: AND il.line_type_lookup_code = 'PREPAY'
3122: AND NVL(il.discarded_flag, 'N') <> 'Y'
3123: AND NVL(il.cancelled_flag, 'N') <> 'Y');

Line 3206: FROM ap_invoice_lines_all il

3202: FROM ap_invoices_all i
3203: WHERE i.invoice_id = P_Invoice_Id
3204: AND EXISTS
3205: (SELECT il.invoice_id
3206: FROM ap_invoice_lines_all il
3207: WHERE il.invoice_id = i.invoice_id
3208: AND il.line_type_lookup_code = 'AWT'
3209: AND NVL(il.discarded_flag, 'N') <> 'Y'
3210: AND NVL(il.cancelled_flag, 'N') <> 'Y');

Line 3292: FROM ap_invoice_lines_all ail,

3288: FROM ap_invoices_all i
3289: WHERE i.invoice_id = P_Invoice_Id
3290: AND EXISTS
3291: (SELECT ail.invoice_id
3292: FROM ap_invoice_lines_all ail,
3293: po_line_locations_all pll
3294: WHERE ail.invoice_id = i.invoice_id
3295: AND ail.po_line_location_id = pll.line_location_id
3296: AND ail.org_id = pll.org_id

Line 3422: (SELECT 'X' FROM ap_invoice_lines_all ail

3418: FROM ap_invoice_distributions_all aid
3419: WHERE aid.invoice_id = p_invoice_id
3420: AND aid.line_type_lookup_code = 'RETAINAGE'
3421: AND EXISTS
3422: (SELECT 'X' FROM ap_invoice_lines_all ail
3423: WHERE ail.invoice_id = p_invoice_id
3424: AND ail.line_number = aid.invoice_line_number
3425: AND ail.line_type_lookup_code <> 'RETAINAGE RELEASE');
3426:

Line 3455: from ap_invoice_lines_all

3451: BEGIN
3452:
3453: select sum(nvl(amount,0)) - sum(nvl(included_tax_amount,0))
3454: into item_total
3455: from ap_invoice_lines_all
3456: where invoice_id = p_invoice_id
3457: and line_type_lookup_code IN ('ITEM','RETAINAGE RELEASE');
3458:
3459: return(item_total);

Line 3487: from ap_invoice_lines_all

3483: BEGIN
3484:
3485: select sum(nvl(amount,0)) - sum(nvl(included_tax_amount,0))
3486: into freight_total
3487: from ap_invoice_lines_all
3488: where invoice_id = p_invoice_id
3489: and org_id = p_org_id
3490: and line_type_lookup_code = 'FREIGHT';
3491:

Line 3521: from ap_invoice_lines_all

3517: BEGIN
3518:
3519: select sum(nvl(amount,0)) - sum(nvl(included_tax_amount,0))
3520: into misc_total
3521: from ap_invoice_lines_all
3522: where invoice_id = p_invoice_id
3523: and org_id = p_org_id
3524: and line_type_lookup_code = 'MISCELLANEOUS';
3525: