DBA Data[Home] [Help]

APPS.AP_AUTOSELECT_PKG dependencies on AP_INVOICE_DISTRIBUTIONS_ALL

Line 38: FROM ap_invoice_distributions_all

34: BEGIN
35:
36: SELECT nvl(SUM(amount),0)
37: INTO l_awt_amount
38: FROM ap_invoice_distributions_all
39: WHERE invoice_id = p_invoice_id
40: AND awt_invoice_payment_id IS NULL
41: AND line_type_lookup_code = 'AWT';
42:

Line 3156: FROM ap_invoice_distributions_all D2

3152: ' :p_zero_inv_allowed = ''Y'') '||
3153: --Bug 6342390 Added the clause below.
3154: --Commented the fix for the bug6342390, bug6365720
3155: /* AND NOT EXISTS (SELECT ''Invoice is not fully approved''
3156: FROM ap_invoice_distributions_all D2
3157: WHERE D2.invoice_id = inv.invoice_id
3158: AND NVL(D2.match_status_flag, ''N'') in (''N'', ''S''))*/
3159: --bug6365720
3160: -- Bug 7265013 starts

Line 3181: ' FROM ap_invoice_distributions_all D2 '||

3177: ' WHERE H.invoice_id = ai.invoice_id '||
3178: ' AND H.release_lookup_code is null) '||
3179: /* Added for bug 13901772 */
3180: ' AND NOT EXISTS (SELECT ''Invoice is not fully approved'' '||
3181: ' FROM ap_invoice_distributions_all D2 '||
3182: ' WHERE D2.invoice_id = ai.invoice_id '||
3183: ' AND NVL(D2.match_status_flag, ''N'') in (''N'', ''S'', ''T'')) '||
3184: /* Bug 12799362. Start. */
3185: ' AND NOT EXISTS (SELECT ''Line without distribution'' '||

Line 3190: ' FROM ap_invoice_distributions_all aid '||

3186: ' FROM ap_invoice_lines_all ail '||
3187: ' WHERE ail.invoice_id = ai.invoice_id '||
3188: ' AND ail.amount <> 0 ' ||
3189: ' AND NOT EXISTS (SELECT ''No Distributions'' '||
3190: ' FROM ap_invoice_distributions_all aid '||
3191: ' WHERE ail.invoice_id = aid.invoice_id '||
3192: ' AND ail.line_number = aid.invoice_line_number '||
3193: ' ) '||
3194: ' ) '||

Line 3997: ' FROM ap_invoice_distributions_all D2 '||

3993: ' FROM ap_holds_all H '||
3994: ' WHERE H.invoice_id = ai.invoice_id '||
3995: ' AND H.release_lookup_code is null) '||
3996: ' AND NOT EXISTS (SELECT ''Invoice is not fully approved'' '||
3997: ' FROM ap_invoice_distributions_all D2 '||
3998: ' WHERE D2.invoice_id = ai.invoice_id '||
3999: ' AND NVL(D2.match_status_flag, ''N'') in (''N'', ''S'')) '||
4000: /* Bug 12799362. Start. */
4001: ' AND NOT EXISTS (SELECT ''Line without distribution'' '||

Line 4006: ' FROM ap_invoice_distributions_all aid '||

4002: ' FROM ap_invoice_lines_all ail '||
4003: ' WHERE ail.invoice_id = ai.invoice_id '||
4004: ' AND ail.amount <> 0 ' ||
4005: ' AND NOT EXISTS (SELECT ''No Distributions'' '||
4006: ' FROM ap_invoice_distributions_all aid '||
4007: ' WHERE ail.invoice_id = aid.invoice_id '||
4008: ' AND ail.line_number = aid.invoice_line_number '||
4009: ' ) '||
4010: ' ) '||

Line 4023: ' FROM ap_invoice_distributions_all D4 '||

4019: */
4020:
4021: -- Bug 11816573. Changed hint from push_subq to no_unnest.
4022: ' AND EXISTS (SELECT /*+ no_unnest */ ''Distributions exist'' '||
4023: ' FROM ap_invoice_distributions_all D4 '||
4024: /* Added FOR UPDATE for bug 13321621 */
4025: /* Added SKIP LOCKED for bug 14277979 */
4026: ' WHERE D4.invoice_id = ai.invoice_id) FOR UPDATE OF ps.checkrun_id SKIP LOCKED';
4027: -- bug 6456537

Line 5058: from ap_invoice_distributions_all aid,

5054: update ap_selected_invoices_All asi
5055: set asi.AFFECTS_REJECTION_LEVEL= 'Y'
5056: where asi.checkrun_id = l_checkrun_id
5057: and exists ( select 'ATLEAST ONE RANGE BASED PAY TIME AWT'
5058: from ap_invoice_distributions_all aid,
5059: AP_AWT_GROUP_TAXES_all awtt,
5060: ap_tax_codes_all awtc
5061: where aid.invoice_id = asi.invoice_id
5062: and aid.pay_awt_group_id is not null

Line 5808: from ap_invoice_distributions_all aid,

5804: update ap_selected_invoices_All asi
5805: set asi.AFFECTS_REJECTION_LEVEL= 'Y'
5806: where asi.checkrun_id = p_checkrun_id
5807: and exists ( select 'ATLEAST ONE RANGE BASED PAY TIME AWT'
5808: from ap_invoice_distributions_all aid,
5809: AP_AWT_GROUP_TAXES_all awtt,
5810: ap_tax_codes_all awtc
5811: where aid.invoice_id = asi.invoice_id
5812: and aid.pay_awt_group_id is not null