DBA Data[Home] [Help]

APPS.PAAPIMP_PKG dependencies on PO_DISTRIBUTIONS

Line 2621: po_distributions_all PO,

2617: AND (
2618: EXISTS (
2619: SELECT NULL
2620: FROM ap_invoices_all inv,
2621: po_distributions_all PO,
2622: ap_invoice_distributions_all dist2
2623: WHERE inv.invoice_id = dist2.invoice_id
2624: AND nvl(po.distribution_type,'XXX') <> 'PREPAYMENT'
2625: AND dist2.invoice_id = DIST.invoice_id

Line 2655: FROM po_distributions_all pod, mtl_system_items si, po_lines_all pol

2651: /* Bug 6353803: Added the following for this bug. */
2652: AND (pa_nl_installed.is_nl_installed = 'N'
2653: OR ( pa_nl_installed.is_nl_installed = 'Y'
2654: AND NOT EXISTS (SELECT 'X'
2655: FROM po_distributions_all pod, mtl_system_items si, po_lines_all pol
2656: WHERE pod.po_distribution_id = dist.po_distribution_id
2657: AND pod.po_line_id = pol.po_line_id
2658: AND si.inventory_item_id = pol.item_id
2659: AND si.comms_nl_trackable_flag = 'Y'

Line 2670: po_distributions pod,

2666: )
2667: AND NOT EXISTS (SELECT 'X'
2668: FROM
2669: ap_invoice_distributions apdist,
2670: po_distributions pod,
2671: mtl_system_items si,
2672: po_lines_all pol
2673: where DIST.CHARGE_APPLICABLE_TO_DIST_ID
2674: = apdist.INVOICE_DISTRIBUTION_ID

Line 2689: po_distributions_all po_dist1

2685: )
2686: )
2687: )/* Start changes for bug#14320909 */
2688: AND NOT EXISTS (select 'X' from rcv_receiving_sub_ledger rcv_sub,
2689: po_distributions_all po_dist1
2690: where po_dist1.CODE_COMBINATION_ID =rcv_sub.CODE_COMBINATION_ID
2691: AND rcv_sub.ACTUAL_FLAG = 'A'
2692: and rcv_sub.pa_addition_flag ='Y'
2693: AND to_char(DIST.po_distribution_id) = rcv_sub.reference3

Line 2747: FROM po_distributions_all pod, mtl_system_items si, po_lines_all pol

2743: /* Bug 6353803: Added the following for this bug. */
2744: AND (pa_nl_installed.is_nl_installed = 'N'
2745: OR ( pa_nl_installed.is_nl_installed = 'Y'
2746: AND NOT EXISTS (SELECT 'X'
2747: FROM po_distributions_all pod, mtl_system_items si, po_lines_all pol
2748: WHERE pod.po_distribution_id = dist.po_distribution_id
2749: AND pod.po_line_id = pol.po_line_id
2750: AND si.inventory_item_id = pol.item_id
2751: AND si.comms_nl_trackable_flag = 'Y'

Line 2762: po_distributions pod,

2758: )
2759: AND NOT EXISTS (SELECT 'X'
2760: FROM
2761: ap_invoice_distributions apdist,
2762: po_distributions pod,
2763: mtl_system_items si,
2764: po_lines_all pol
2765: where DIST.CHARGE_APPLICABLE_TO_DIST_ID
2766: = apdist.INVOICE_DISTRIBUTION_ID

Line 2830: FROM po_distributions_all pod, mtl_system_items si, po_lines_all pol

2826: AND aid.project_id = G_PROJECT_ID)
2827: AND (pa_nl_installed.is_nl_installed = 'N'
2828: OR ( pa_nl_installed.is_nl_installed = 'Y'
2829: AND NOT EXISTS (SELECT 'X'
2830: FROM po_distributions_all pod, mtl_system_items si, po_lines_all pol
2831: WHERE pod.po_distribution_id = dist.po_distribution_id
2832: AND pod.po_line_id = pol.po_line_id
2833: AND si.inventory_item_id = pol.item_id
2834: AND si.comms_nl_trackable_flag = 'Y'

Line 2845: po_distributions pod,

2841: )
2842: AND NOT EXISTS (SELECT 'X'
2843: FROM
2844: AP_SELF_ASSESSED_TAX_DIST_ALL apdist,
2845: po_distributions pod,
2846: mtl_system_items si,
2847: po_lines_all pol
2848: where DIST.CHARGE_APPLICABLE_TO_DIST_ID
2849: = apdist.INVOICE_DISTRIBUTION_ID

Line 2893: po_distributions_all PO,

2889: AND dist.line_type_lookup_code <> 'REC_TAX' -- do not proces recoverable tax
2890: AND EXISTS (
2891: SELECT NULL
2892: FROM ap_invoices_all inv,
2893: po_distributions_all PO,
2894: ap_invoice_distributions_all dist2
2895: WHERE inv.invoice_id = dist2.invoice_id
2896: AND nvl(po.distribution_type,'XXX') <> 'PREPAYMENT'
2897: AND dist2.invoice_id = DIST.invoice_id

Line 2915: FROM po_distributions_all pod, mtl_system_items si, po_lines_all pol

2911: /* Bug 6353803: Added the following for this bug. */
2912: AND (pa_nl_installed.is_nl_installed = 'N'
2913: OR ( pa_nl_installed.is_nl_installed = 'Y'
2914: AND NOT EXISTS (SELECT 'X'
2915: FROM po_distributions_all pod, mtl_system_items si, po_lines_all pol
2916: WHERE pod.po_distribution_id = dist.po_distribution_id
2917: AND pod.po_line_id = pol.po_line_id
2918: AND si.inventory_item_id = pol.item_id
2919: AND si.comms_nl_trackable_flag = 'Y'

Line 2930: po_distributions pod,

2926: )
2927: AND NOT EXISTS (SELECT 'X'
2928: FROM
2929: ap_invoice_distributions apdist,
2930: po_distributions pod,
2931: mtl_system_items si,
2932: po_lines_all pol
2933: where DIST.CHARGE_APPLICABLE_TO_DIST_ID
2934: = apdist.INVOICE_DISTRIBUTION_ID

Line 2975: po_distributions_all PO,

2971: AND dist.line_type_lookup_code <> 'REC_TAX' -- do not proces recoverable tax
2972: AND EXISTS (
2973: SELECT NULL
2974: FROM ap_invoices_all inv,
2975: po_distributions_all PO,
2976: AP_SELF_ASSESSED_TAX_DIST dist2
2977: WHERE inv.invoice_id = dist2.invoice_id
2978: AND nvl(po.distribution_type,'XXX') <> 'PREPAYMENT'
2979: AND dist2.invoice_id = DIST.invoice_id

Line 2996: FROM po_distributions_all pod, mtl_system_items si, po_lines_all pol

2992: )
2993: AND (pa_nl_installed.is_nl_installed = 'N'
2994: OR ( pa_nl_installed.is_nl_installed = 'Y'
2995: AND NOT EXISTS (SELECT 'X'
2996: FROM po_distributions_all pod, mtl_system_items si, po_lines_all pol
2997: WHERE pod.po_distribution_id = dist.po_distribution_id
2998: AND pod.po_line_id = pol.po_line_id
2999: AND si.inventory_item_id = pol.item_id
3000: AND si.comms_nl_trackable_flag = 'Y'

Line 3011: po_distributions pod,

3007: )
3008: AND NOT EXISTS (SELECT 'X'
3009: FROM
3010: AP_SELF_ASSESSED_TAX_DIST apdist,
3011: po_distributions pod,
3012: mtl_system_items si,
3013: po_lines_all pol
3014: where DIST.CHARGE_APPLICABLE_TO_DIST_ID
3015: = apdist.INVOICE_DISTRIBUTION_ID

Line 3066: po_distributions_all PO,

3062: AND (
3063: EXISTS (
3064: SELECT NULL
3065: FROM ap_invoices_all inv,
3066: po_distributions_all PO,
3067: ap_invoice_distributions_all dist2
3068: WHERE inv.invoice_id = dist2.invoice_id
3069: AND nvl(po.distribution_type,'XXX') <> 'PREPAYMENT'
3070: AND dist2.invoice_id = DIST.invoice_id

Line 3099: FROM po_distributions_all pod, mtl_system_items si, po_lines_all pol

3095: /* Bug 6353803: Added the following for this bug. */
3096: AND (pa_nl_installed.is_nl_installed = 'N'
3097: OR ( pa_nl_installed.is_nl_installed = 'Y'
3098: AND NOT EXISTS (SELECT 'X'
3099: FROM po_distributions_all pod, mtl_system_items si, po_lines_all pol
3100: WHERE pod.po_distribution_id = dist.po_distribution_id
3101: AND pod.po_line_id = pol.po_line_id
3102: AND si.inventory_item_id = pol.item_id
3103: AND si.comms_nl_trackable_flag = 'Y'

Line 3114: po_distributions pod,

3110: )
3111: AND NOT EXISTS (SELECT 'X'
3112: FROM
3113: ap_invoice_distributions apdist,
3114: po_distributions pod,
3115: mtl_system_items si,
3116: po_lines_all pol
3117: where DIST.CHARGE_APPLICABLE_TO_DIST_ID
3118: = apdist.INVOICE_DISTRIBUTION_ID

Line 3133: po_distributions_all po_dist1

3129: )
3130: )
3131: )/* Start changes for bug#14320909 */
3132: AND NOT EXISTS (select 'X' from rcv_receiving_sub_ledger rcv_sub,
3133: po_distributions_all po_dist1
3134: where po_dist1.CODE_COMBINATION_ID =rcv_sub.CODE_COMBINATION_ID
3135: AND rcv_sub.ACTUAL_FLAG = 'A'
3136: and rcv_sub.pa_addition_flag ='Y'
3137: AND to_char(DIST.po_distribution_id) = rcv_sub.reference3

Line 3190: FROM po_distributions_all pod, mtl_system_items si, po_lines_all pol

3186: /* Bug 6353803: Added the following for this bug. */
3187: AND (pa_nl_installed.is_nl_installed = 'N'
3188: OR ( pa_nl_installed.is_nl_installed = 'Y'
3189: AND NOT EXISTS (SELECT 'X'
3190: FROM po_distributions_all pod, mtl_system_items si, po_lines_all pol
3191: WHERE pod.po_distribution_id = dist.po_distribution_id
3192: AND pod.po_line_id = pol.po_line_id
3193: AND si.inventory_item_id = pol.item_id
3194: AND si.comms_nl_trackable_flag = 'Y'

Line 3205: po_distributions pod,

3201: )
3202: AND NOT EXISTS (SELECT 'X'
3203: FROM
3204: ap_invoice_distributions apdist,
3205: po_distributions pod,
3206: mtl_system_items si,
3207: po_lines_all pol
3208: where DIST.CHARGE_APPLICABLE_TO_DIST_ID
3209: = apdist.INVOICE_DISTRIBUTION_ID

Line 3271: FROM po_distributions_all pod, mtl_system_items si, po_lines_all pol

3267: AND aid.project_id > 0 )
3268: AND (pa_nl_installed.is_nl_installed = 'N'
3269: OR ( pa_nl_installed.is_nl_installed = 'Y'
3270: AND NOT EXISTS (SELECT 'X'
3271: FROM po_distributions_all pod, mtl_system_items si, po_lines_all pol
3272: WHERE pod.po_distribution_id = dist.po_distribution_id
3273: AND pod.po_line_id = pol.po_line_id
3274: AND si.inventory_item_id = pol.item_id
3275: AND si.comms_nl_trackable_flag = 'Y'

Line 3286: po_distributions pod,

3282: )
3283: AND NOT EXISTS (SELECT 'X'
3284: FROM
3285: AP_SELF_ASSESSED_TAX_DIST_ALL apdist,
3286: po_distributions pod,
3287: mtl_system_items si,
3288: po_lines_all pol
3289: where DIST.CHARGE_APPLICABLE_TO_DIST_ID
3290: = apdist.INVOICE_DISTRIBUTION_ID

Line 3334: po_distributions_all PO,

3330: AND dist.line_type_lookup_code <> 'REC_TAX' -- do not proces recoverable tax
3331: AND EXISTS (
3332: SELECT NULL
3333: FROM ap_invoices_all inv,
3334: po_distributions_all PO,
3335: ap_invoice_distributions_all dist2
3336: WHERE inv.invoice_id = dist2.invoice_id
3337: AND nvl(po.distribution_type,'XXX') <> 'PREPAYMENT'
3338: AND dist2.invoice_id = DIST.invoice_id

Line 3357: FROM po_distributions_all pod, mtl_system_items si, po_lines_all pol

3353: /* Bug 6353803: Added the following for this bug. */
3354: AND (pa_nl_installed.is_nl_installed = 'N'
3355: OR ( pa_nl_installed.is_nl_installed = 'Y'
3356: AND NOT EXISTS (SELECT 'X'
3357: FROM po_distributions_all pod, mtl_system_items si, po_lines_all pol
3358: WHERE pod.po_distribution_id = dist.po_distribution_id
3359: AND dist.po_distribution_id > 0 /*Added for bug#12922795 */
3360: AND pod.po_line_id = pol.po_line_id
3361: AND si.inventory_item_id = pol.item_id

Line 3373: po_distributions pod,

3369: )
3370: AND NOT EXISTS (SELECT 'X'
3371: FROM
3372: ap_invoice_distributions apdist,
3373: po_distributions pod,
3374: mtl_system_items si,
3375: po_lines_all pol
3376: where DIST.CHARGE_APPLICABLE_TO_DIST_ID
3377: = apdist.INVOICE_DISTRIBUTION_ID

Line 3419: po_distributions_all PO,

3415: AND dist.line_type_lookup_code <> 'REC_TAX' -- do not proces recoverable tax
3416: AND EXISTS (
3417: SELECT NULL
3418: FROM ap_invoices_all inv,
3419: po_distributions_all PO,
3420: AP_SELF_ASSESSED_TAX_DIST dist2
3421: WHERE inv.invoice_id = dist2.invoice_id
3422: AND nvl(po.distribution_type,'XXX') <> 'PREPAYMENT'
3423: AND dist2.invoice_id = DIST.invoice_id

Line 3439: FROM po_distributions_all pod, mtl_system_items si, po_lines_all pol

3435: )
3436: AND (pa_nl_installed.is_nl_installed = 'N'
3437: OR ( pa_nl_installed.is_nl_installed = 'Y'
3438: AND NOT EXISTS (SELECT 'X'
3439: FROM po_distributions_all pod, mtl_system_items si, po_lines_all pol
3440: WHERE pod.po_distribution_id = dist.po_distribution_id
3441: AND pod.po_line_id = pol.po_line_id
3442: AND si.inventory_item_id = pol.item_id
3443: AND si.comms_nl_trackable_flag = 'Y'

Line 3454: po_distributions pod,

3450: )
3451: AND NOT EXISTS (SELECT 'X'
3452: FROM
3453: AP_SELF_ASSESSED_TAX_DIST apdist,
3454: po_distributions pod,
3455: mtl_system_items si,
3456: po_lines_all pol
3457: where DIST.CHARGE_APPLICABLE_TO_DIST_ID
3458: = apdist.INVOICE_DISTRIBUTION_ID

Line 5439: select 1 from po_distributions_all pod

5435: UPDATE rcv_receiving_sub_ledger rcv_sub
5436: SET rcv_sub.pa_addition_flag = 'L'
5437: WHERE rcv_sub.pa_addition_flag = 'N'
5438: and reference3 = TO_CHAR(p_po_distribution_id) and exists (
5439: select 1 from po_distributions_all pod
5440: where po_distribution_id = TO_NUMBER(rcv_sub.reference3)
5441: and po_distribution_id = p_po_distribution_id
5442: and code_combination_id = rcv_sub.code_combination_id
5443: and accrue_on_receipt_flag = 'Y');

Line 5653: PO_Distributions_all PO,

5649: and hist.transaction_type in ( 'PAYMENT CREATED','PAYMENT CANCELLED') /* 'PAYMENT CREATED' Added as part of Bug 10626450 ,'PAYMENT CANCELLED' as part of 11703565 */
5650: AND hist.posted_flag = 'Y')
5651: AND exists(SELECT inv.invoice_id -- 11658939 hint del no_unnest
5652: FROM AP_INVOICES_ALL inv,
5653: PO_Distributions_all PO,
5654: AP_Invoice_Distributions_all aid,
5655: ap_invoice_payments_all aip
5656: WHERE inv.invoice_id = aip.invoice_id
5657: AND aid.invoice_id = inv.invoice_id

Line 5712: PO_Distributions_all PO,

5708: and hist.transaction_type not in ( 'PAYMENT CREATED','PAYMENT CANCELLED') /* 'PAYMENT CREATED' Added as part of Bug 10626450 ,'PAYMENT CANCELLED' as part of 11703565 */
5709: AND hist.posted_flag = 'Y')
5710: AND exists(SELECT inv.invoice_id -- 11658939 hint del no_unnest
5711: FROM AP_INVOICES_ALL inv,
5712: PO_Distributions_all PO,
5713: AP_Invoice_Distributions_all aid,
5714: ap_invoice_payments_all aip
5715: WHERE inv.invoice_id = aip.invoice_id
5716: AND aid.invoice_id = inv.invoice_id

Line 5806: PO_Distributions_all PO,

5802: and hist.transaction_type in ( 'PAYMENT CREATED','PAYMENT CANCELLED') /* 'PAYMENT CREATED' Added as part of Bug 10626450 ,'PAYMENT CANCELLED' as part of 11703565 */
5803: AND hist.posted_flag = 'Y')
5804: AND exists(SELECT inv.invoice_id -- 11658939 hint del no_unnest
5805: FROM AP_INVOICES_ALL inv,
5806: PO_Distributions_all PO,
5807: AP_Invoice_Distributions_all aid,
5808: ap_invoice_payments_all aip
5809: WHERE inv.invoice_id = aip.invoice_id
5810: AND aid.invoice_id = inv.invoice_id

Line 5864: PO_Distributions_all PO,

5860: and hist.transaction_type not in ( 'PAYMENT CREATED','PAYMENT CANCELLED') /* 'PAYMENT CREATED' Added as part of Bug 10626450 ,'PAYMENT CANCELLED' as part of 11703565 */
5861: AND hist.posted_flag = 'Y')
5862: AND exists(SELECT inv.invoice_id -- 11658939 hint del no_unnest
5863: FROM AP_INVOICES_ALL inv,
5864: PO_Distributions_all PO,
5865: AP_Invoice_Distributions_all aid,
5866: ap_invoice_payments_all aip
5867: WHERE inv.invoice_id = aip.invoice_id
5868: AND aid.invoice_id = inv.invoice_id

Line 6924: PO_Distributions po_dist,

6920: rcv_sub.program_update_date = SYSDATE
6921: WHERE exists
6922: (SELECT 1 --rcv_sub1.ROWID --Removed /*+ leading(po_dist) */ for Bug5262594
6923: FROM Rcv_Transactions rcv_txn,
6924: PO_Distributions po_dist,
6925: po_lines_all POL
6926: WHERE ((rcv_txn.destination_type_code ='EXPENSE' )
6927: OR (rcv_txn.destination_type_code = 'RECEIVING'
6928: AND (rcv_txn.transaction_type IN ('RETURN TO VENDOR','RETURN TO RECEIVING'))))

Line 7009: PO_Distributions po_dist ,

7005: rcv_sub.program_update_date = SYSDATE
7006: WHERE exists
7007: (SELECT 1 --rcv_sub1.ROWID --Removed /*+ leading(po_dist) */ for Bug5262594
7008: FROM Rcv_Transactions rcv_txn,
7009: PO_Distributions po_dist ,
7010: po_lines_all POL
7011: WHERE
7012: ((rcv_txn.destination_type_code ='EXPENSE' )
7013: OR (rcv_txn.destination_type_code = 'RECEIVING'

Line 7635: FROM po_distributions

7631:
7632: /* Bug 5051103 - replace expnediture_item_date with l_ei_date_tbl(i) */
7633: SELECT pa_utils.getweekending(MAX(l_ei_date_tbl(i)))
7634: INTO G_EXPENDITURE_ENDING_DATE
7635: FROM po_distributions
7636: WHERE po_distribution_id = l_po_dist_id_tbl(i);
7637:
7638: END IF;
7639:

Line 8984: po_distributions_all po_dist1

8980: OR ( pa_nl_installed.is_nl_installed = 'Y' --EIB trackable items
8981: AND EXISTS (SELECT 'X'
8982: FROM mtl_system_items si,
8983: po_lines_all pol,
8984: po_distributions_all po_dist1
8985: WHERE po_dist1.po_line_id = pol.po_line_id
8986: AND po_dist1.po_distribution_id = dist.po_distribution_id
8987: AND si.inventory_item_id = pol.item_id
8988: AND po_dist1.project_id IS NOT NULL

Line 9024: FROM po_distributions PO

9020: AND rcv_sub.pa_addition_flag || '' IN ('Y','I')
9021: AND rcv_sub.rcv_transaction_id = rcv_txn.transaction_id
9022: )
9023: OR EXISTS ( SELECT PO.po_distribution_id
9024: FROM po_distributions PO
9025: WHERE PO.po_distribution_id = dist.po_distribution_id
9026: AND nvl(po.distribution_type,'XXX') <> 'PREPAYMENT' -- bug 7192304, added nvl
9027: AND PO.project_id > 0
9028: AND NVL(PO.destination_type_code, 'EXPENSE') = 'EXPENSE'

Line 9066: po_distributions_all po_dist1

9062: OR ( pa_nl_installed.is_nl_installed = 'Y' --EIB trackable items
9063: AND EXISTS (SELECT 'X'
9064: FROM mtl_system_items si,
9065: po_lines_all pol,
9066: po_distributions_all po_dist1
9067: WHERE po_dist1.po_line_id = pol.po_line_id
9068: AND po_dist1.po_distribution_id = dist.po_distribution_id
9069: AND si.inventory_item_id = pol.item_id
9070: AND po_dist1.project_id IS NOT NULL

Line 9099: FROM po_distributions PO

9095: AND rcv_sub.pa_addition_flag || '' IN ('Y','I')
9096: AND rcv_sub.rcv_transaction_id = rcv_txn.transaction_id
9097: )
9098: OR EXISTS ( SELECT PO.po_distribution_id
9099: FROM po_distributions PO
9100: WHERE PO.po_distribution_id = dist.po_distribution_id
9101: AND nvl(po.distribution_type,'XXX') <> 'PREPAYMENT' -- bug 7192304, added nvl
9102: AND PO.project_id > 0
9103: AND NVL(PO.destination_type_code, 'EXPENSE') = 'EXPENSE'

Line 9140: po_distributions po,

9136: program_update_date=SYSDATE
9137: WHERE rowid in (
9138: SELECT dist.rowid
9139: FROM ap_invoices inv,
9140: po_distributions po,
9141: ap_invoice_distributions_all dist
9142: WHERE inv.invoice_id = dist.invoice_id
9143: AND po.po_distribution_id = dist.po_distribution_id
9144: AND dist.po_distribution_id >0 /*Added the condition for bug#12922795 */

Line 9205: po_distributions_all po_dist1

9201: OR ( pa_nl_installed.is_nl_installed = 'Y' --EIB trackable items
9202: AND EXISTS (SELECT 'X'
9203: FROM mtl_system_items si,
9204: po_lines_all pol,
9205: po_distributions_all po_dist1
9206: WHERE po_dist1.po_line_id = pol.po_line_id
9207: AND po_dist1.po_distribution_id = dist.po_distribution_id
9208: AND si.inventory_item_id = pol.item_id
9209: AND po_dist1.project_id IS NOT NULL

Line 9245: FROM po_distributions PO

9241: AND rcv_sub.pa_addition_flag || '' IN ('Y','I')
9242: AND rcv_sub.rcv_transaction_id = rcv_txn.transaction_id
9243: )
9244: OR EXISTS ( SELECT PO.po_distribution_id
9245: FROM po_distributions PO
9246: WHERE PO.po_distribution_id = dist.po_distribution_id
9247: AND nvl(po.distribution_type,'XXX') <> 'PREPAYMENT' -- bug 7192304, added nvl
9248: AND PO.project_id > 0
9249: AND NVL(PO.destination_type_code, 'EXPENSE') = 'EXPENSE'

Line 9288: po_distributions_all po_dist1

9284: OR ( pa_nl_installed.is_nl_installed = 'Y' --EIB trackable items
9285: AND EXISTS (SELECT 'X'
9286: FROM mtl_system_items si,
9287: po_lines_all pol,
9288: po_distributions_all po_dist1
9289: WHERE po_dist1.po_line_id = pol.po_line_id
9290: AND po_dist1.po_distribution_id = dist.po_distribution_id
9291: AND si.inventory_item_id = pol.item_id
9292: AND po_dist1.project_id IS NOT NULL

Line 9320: FROM po_distributions PO

9316: AND rcv_sub.pa_addition_flag || '' IN ('Y','I')
9317: AND rcv_sub.rcv_transaction_id = rcv_txn.transaction_id
9318: )
9319: OR EXISTS ( SELECT PO.po_distribution_id
9320: FROM po_distributions PO
9321: WHERE PO.po_distribution_id = dist.po_distribution_id
9322: AND nvl(po.distribution_type,'XXX') <> 'PREPAYMENT' -- bug 7192304, added nvl
9323: AND PO.project_id > 0
9324: AND NVL(PO.destination_type_code, 'EXPENSE') = 'EXPENSE'

Line 9361: po_distributions po,

9357: program_update_date=SYSDATE
9358: WHERE rowid in (
9359: SELECT dist.rowid
9360: FROM ap_invoices inv,
9361: po_distributions po,
9362: ap_invoice_distributions_all dist
9363: WHERE inv.invoice_id = dist.invoice_id
9364: AND po.po_distribution_id = dist.po_distribution_id
9365: AND dist.po_distribution_id >0 /*Added the condition for bug#12922795 */

Line 10673: PO_Distributions_all PO,

10669: AND dist.amount <>0
10670: AND exists(SELECT /*+ no_unnest */ inv.invoice_id
10671: FROM AP_INVOICES_ALL inv,
10672: PO_VENDORS vend,
10673: PO_Distributions_all PO,
10674: AP_Invoice_Distributions_all aid, --STD INV DIST LINE
10675: AP_Invoice_Distributions_all aid2 -- PREPAY APPL DIST LINE
10676: WHERE aid.invoice_id = inv.invoice_id
10677: AND inv.vendor_id = vend.vendor_id

Line 10764: PO_Distributions_all PO,

10760: AND dist.amount <>0
10761: AND exists(SELECT /*+ no_unnest */ inv.invoice_id
10762: FROM AP_INVOICES_ALL inv,
10763: PO_VENDORS vend,
10764: PO_Distributions_all PO,
10765: AP_Invoice_Distributions_all aid, --STD INV DIST LINE
10766: AP_Invoice_Distributions_all aid2 -- PREPAY APPL DIST LINE
10767: WHERE aid.invoice_id = inv.invoice_id
10768: AND inv.vendor_id = vend.vendor_id

Line 10827: PO_Distributions_all PO,

10823: WHERE hist.payment_history_id = dist.payment_history_id
10824: AND hist.posted_flag = 'Y')
10825: AND exists(SELECT /*+ no_unnest */ inv.invoice_id
10826: FROM AP_INVOICES_ALL inv,
10827: PO_Distributions_all PO,
10828: AP_Invoice_Distributions_all aid,
10829: ap_invoice_payments_all aip
10830: WHERE inv.invoice_id = aip.invoice_id
10831: AND aid.invoice_id = inv.invoice_id

Line 10874: PO_Distributions_all PO,

10870: WHERE nvl(dist.pa_addition_flag,'N') = 'N'
10871: AND dist.amount <> 0
10872: AND exists(SELECT /*+ no_unnest */ inv.invoice_id
10873: FROM AP_INVOICES_ALL inv,
10874: PO_Distributions_all PO,
10875: AP_Invoice_Distributions_all aid, --STD INV DIST LINE
10876: AP_Invoice_Distributions_all aid2 -- PREPAY APPL DIST LINE
10877: WHERE aid.invoice_id = inv.invoice_id
10878: AND aid.invoice_distribution_id = dist.invoice_distribution_id -- Std inv line

Line 10929: PO_Distributions_all PO,

10925: WHERE hist.payment_history_id = dist.payment_history_id
10926: AND hist.posted_flag = 'Y')
10927: AND exists(SELECT /*+ no_unnest */ inv.invoice_id
10928: FROM AP_INVOICES_ALL inv,
10929: PO_Distributions_all PO,
10930: AP_Invoice_Distributions_all aid,
10931: ap_invoice_payments_all aip
10932: WHERE inv.invoice_id = aip.invoice_id
10933: AND aid.invoice_id = inv.invoice_id

Line 10976: PO_Distributions_all PO,

10972: WHERE nvl(dist.pa_addition_flag,'N') = 'N'
10973: AND dist.amount <> 0
10974: AND exists(SELECT /*+ no_unnest */ inv.invoice_id
10975: FROM AP_INVOICES_ALL inv,
10976: PO_Distributions_all PO,
10977: AP_Invoice_Distributions_all aid, --STD INV DIST LINE
10978: AP_Invoice_Distributions_all aid2 -- PREPAY APPL DIST LINE
10979: WHERE aid.invoice_id = inv.invoice_id
10980: AND inv.org_id = G_ORG_ID