DBA Data[Home] [Help]

APPS.AP_CANCEL_PKG dependencies on AP_INVOICE_DISTRIBUTIONS

Line 65: FROM ap_invoice_distributions AID,

61:
62: -- Bug5497058
63: CURSOR qty_per_dist_negtive_count_cur IS
64: SELECT count(*)
65: FROM ap_invoice_distributions AID,
66: po_distributions_ap_v POD,
67: po_line_locations PLL,
68: po_lines PL,
69: ap_invoices AIV

Line 102: FROM ap_invoice_distributions AID

98:
99:
100: CURSOR dist_gl_date_cur IS
101: SELECT accounting_date
102: FROM ap_invoice_distributions AID
103: WHERE AID.invoice_id = P_invoice_id
104: AND NVL(AID.reversal_flag, 'N') <> 'Y';
105:
106: TYPE date_tab is TABLE OF DATE INDEX BY BINARY_INTEGER;

Line 305: FROM ap_invoice_distributions AID,

301: BEGIN
302:
303: SELECT 'N'
304: INTO l_allow_cancel
305: FROM ap_invoice_distributions AID,
306: po_distributions PD,
307: po_line_locations pll
308: WHERE aid.invoice_id = p_invoice_id
309: --AND aid.final_match_flag in ('N','Y') For Bug 3489536

Line 327: FROM ap_invoice_distributions aid,

323: WHEN NO_DATA_FOUND THEN
324:
325: SELECT count(distinct pll.line_location_id)
326: INTO l_final_closed_shipment_count
327: FROM ap_invoice_distributions aid,
328: po_line_locations pll,
329: po_distributions pd
330: WHERE aid.invoice_id = p_invoice_id
331: AND aid.po_distribution_id = pd.po_distribution_id

Line 393: from ap_invoice_distributions AIL

389: FROM ap_invoices AI
390: WHERE AI.invoice_id = P_invoice_id
391: AND (AI.project_id is not null OR
392: exists (select 'X'
393: from ap_invoice_distributions AIL
394: where AIL.invoice_id = AI.invoice_id
395: and project_id is not null) OR
396: exists (select 'X'
397: from ap_invoice_distributions AID

Line 397: from ap_invoice_distributions AID

393: from ap_invoice_distributions AIL
394: where AIL.invoice_id = AI.invoice_id
395: and project_id is not null) OR
396: exists (select 'X'
397: from ap_invoice_distributions AID
398: where AID.invoice_id = AI.invoice_id
399: and project_id is not null));
400:
401: IF (l_project_related_count <> 0) THEN

Line 453: ap_invoice_distributions AID,

449: select 'Y'
450: into l_po_not_approved
451: from po_headers POH,
452: po_distributions POD,
453: ap_invoice_distributions AID,
454: ap_invoices AI
455: where AI.invoice_id = AID.invoice_id
456: and AI.invoice_id = P_invoice_id
457: and AID.po_distribution_id = POD.po_distribution_id

Line 595: FROM ap_invoice_distributions_all aid

591: AND APR.Registration_Event_Type = 'INVOICE_CANCELLED';
592:
593: cursor dist_debug_cur is
594: Select *
595: FROM ap_invoice_distributions_all aid
596: WHERE aid.invoice_id = p_invoice_id;
597:
598: l_inv_line_rec_list Inv_Line_Tab_Type;
599: l_ok_to_cancel BOOLEAN := FALSE;

Line 629: l_Accounting_event_ID AP_INVOICE_DISTRIBUTIONS_ALL.accounting_event_id%TYPE;

625: l_self_assess_tax_count NUMBER := 0 ; -- Bug 6694536
626: l_tax_dist_count NUMBER := 0; -- Bug 6815172
627:
628: -- Bug 4748638
629: l_Accounting_event_ID AP_INVOICE_DISTRIBUTIONS_ALL.accounting_event_id%TYPE;
630: l_cancel_dist_exists NUMBER := 0;
631: l_open_gl_date AP_INVOICES_ALL.gl_date%type;
632: l_funds_return_code VARCHAR2(30); -- 4276409 (3462325)
633:

Line 854: ap_invoice_distributions ap_dist

850:
851: SELECT count(*)
852: INTO l_tax_dist_count
853: FROM zx_rec_nrec_dist zx_dist,
854: ap_invoice_distributions ap_dist
855: WHERE ap_dist.invoice_id = p_invoice_id
856: AND ap_dist.detail_tax_dist_id = zx_dist.rec_nrec_tax_dist_id
857: AND nvl(zx_dist.reverse_flag, 'N') <> 'Y'
858: AND nvl(zx_dist.inclusive_flag, 'N') = 'Y'

Line 1002: FROM ap_invoice_distributions_all

998:
999: ---7428195 starts
1000: SELECT 1
1001: INTO l_check_encumbrance
1002: FROM ap_invoice_distributions_all
1003: WHERE invoice_id = P_invoice_id
1004: AND encumbered_flag = 'Y'
1005: AND rownum < 2;
1006:

Line 1125: FROM ap_invoice_distributions

1121: -- Start Bug fix 4748638 (4881719)
1122: --Bug#3574680, determine if cancelled distributions exists
1123: SELECT COUNT(invoice_distribution_id)
1124: INTO l_cancel_dist_exists
1125: FROM ap_invoice_distributions
1126: WHERE invoice_id=p_invoice_id
1127: AND cancellation_flag='Y'
1128: AND rownum=1;
1129: