DBA Data[Home] [Help]

APPS.AP_RCT_AMT_MATCH_PKG dependencies on PO_DISTRIBUTIONS

Line 238: l_po_distribution_id po_distributions.po_distribution_id%TYPE := NULL;

234: X_retained_amount IN NUMBER DEFAULT NULL,
235: X_calling_sequence IN VARCHAR2)
236: IS
237: l_single_dist_flag varchar2(1) := 'N';
238: l_po_distribution_id po_distributions.po_distribution_id%TYPE := NULL;
239: l_invoice_distribution_id ap_invoice_distributions.invoice_distribution_id%TYPE;
240: l_item_line_number ap_invoice_lines.line_number%TYPE;
241: l_amount_to_recoup ap_invoice_lines_all.amount%TYPE;
242: l_line_amt_net_retainage ap_invoice_lines_all.amount%TYPE;

Line 350: --po distributions of the shipment, for distribution level match we need to

346:
347: END IF;
348:
349: --If shipment level match then we need to prorate the match-amount among the
350: --po distributions of the shipment, for distribution level match we need to
351: --derive the invoice_distribution_id, base_amount, ccid.
352:
353: l_debug_info := 'Get Distribution information';
354:

Line 481: po_distributions pd,

477: --end Bug 7483260
478: l_retained_amount,
479: -1 * l_retained_amount
480: FROM ap_invoice_distributions aid,
481: po_distributions pd,
482: po_line_locations pll,
483: rcv_transactions rtxn -- bug 5443250
484: WHERE aid.invoice_distribution_id = l_invoice_distribution_id
485: AND pd.po_distribution_id = aid.po_distribution_id

Line 603: l_debug_info := 'Update Amount Billed on the PO Distributions';

599: P_Calling_Sequence => current_calling_sequence);
600:
601: END IF;
602:
603: l_debug_info := 'Update Amount Billed on the PO Distributions';
604:
605: Update_PO_Shipments_Dists(X_Dist_Tab => x_dist_tab,
606: X_Po_Line_Location_Id => x_po_line_location_id,
607: X_Match_Amount => x_amount,

Line 910: CURSOR po_distributions_cursor IS

906:
907: --Modified below cursor for bug #7015553 to receive projec_id and task_id
908: --values from receivables tables if these are different in PO and receipt.
909:
910: CURSOR po_distributions_cursor IS
911: SELECT pd.po_distribution_id,
912: X_Match_Quantity,
913: pd.code_combination_id,
914: accrue_on_receipt_flag ,

Line 933: FROM po_distributions_ap_v PD,

929: NULL), --expenditure_organization_id
930: DECODE(PD.destination_type_code,
931: 'EXPENSE', PD.award_id), --award_id
932: ap_invoice_distributions_s.nextval
933: FROM po_distributions_ap_v PD,
934: rcv_transactions RT
935: WHERE PD.line_location_id = x_po_line_location_id
936: and Pd.line_location_id = RT.po_line_location_id
937: and RT.TRANSACTION_ID= X_Rcv_Transaction_Id ;

Line 939: l_po_distribution_id PO_DISTRIBUTIONS_ALL.PO_DISTRIBUTION_ID%TYPE;

935: WHERE PD.line_location_id = x_po_line_location_id
936: and Pd.line_location_id = RT.po_line_location_id
937: and RT.TRANSACTION_ID= X_Rcv_Transaction_Id ;
938:
939: l_po_distribution_id PO_DISTRIBUTIONS_ALL.PO_DISTRIBUTION_ID%TYPE;
940: l_amount_ordered NUMBER;
941: l_amount_cancelled NUMBER;
942: l_amount_delivered NUMBER;
943: l_amount_returned NUMBER;

Line 954: l_po_dist_ccid po_distributions.code_combination_id%TYPE;

950: l_amount_invoiced ap_invoice_distributions_all.amount%TYPE;
951: l_matching_case VARCHAR2(2);
952: l_amount NUMBER;
953: l_quantity_invoiced NUMBER;
954: l_po_dist_ccid po_distributions.code_combination_id%TYPE;
955: l_accrue_on_receipt_flag po_distributions.accrue_on_receipt_flag%TYPE;
956: l_project_id po_distributions.project_id%TYPE;
957: l_task_id po_distributions.task_id%TYPE;
958: l_award_set_id po_distributions_all.award_id%TYPE;

Line 955: l_accrue_on_receipt_flag po_distributions.accrue_on_receipt_flag%TYPE;

951: l_matching_case VARCHAR2(2);
952: l_amount NUMBER;
953: l_quantity_invoiced NUMBER;
954: l_po_dist_ccid po_distributions.code_combination_id%TYPE;
955: l_accrue_on_receipt_flag po_distributions.accrue_on_receipt_flag%TYPE;
956: l_project_id po_distributions.project_id%TYPE;
957: l_task_id po_distributions.task_id%TYPE;
958: l_award_set_id po_distributions_all.award_id%TYPE;
959: l_expenditure_type po_distributions.expenditure_type%TYPE;

Line 956: l_project_id po_distributions.project_id%TYPE;

952: l_amount NUMBER;
953: l_quantity_invoiced NUMBER;
954: l_po_dist_ccid po_distributions.code_combination_id%TYPE;
955: l_accrue_on_receipt_flag po_distributions.accrue_on_receipt_flag%TYPE;
956: l_project_id po_distributions.project_id%TYPE;
957: l_task_id po_distributions.task_id%TYPE;
958: l_award_set_id po_distributions_all.award_id%TYPE;
959: l_expenditure_type po_distributions.expenditure_type%TYPE;
960: l_po_expenditure_item_date po_distributions.expenditure_item_date%TYPE;

Line 957: l_task_id po_distributions.task_id%TYPE;

953: l_quantity_invoiced NUMBER;
954: l_po_dist_ccid po_distributions.code_combination_id%TYPE;
955: l_accrue_on_receipt_flag po_distributions.accrue_on_receipt_flag%TYPE;
956: l_project_id po_distributions.project_id%TYPE;
957: l_task_id po_distributions.task_id%TYPE;
958: l_award_set_id po_distributions_all.award_id%TYPE;
959: l_expenditure_type po_distributions.expenditure_type%TYPE;
960: l_po_expenditure_item_date po_distributions.expenditure_item_date%TYPE;
961: l_expenditure_organization_id po_distributions.expenditure_organization_id%TYPE;

Line 958: l_award_set_id po_distributions_all.award_id%TYPE;

954: l_po_dist_ccid po_distributions.code_combination_id%TYPE;
955: l_accrue_on_receipt_flag po_distributions.accrue_on_receipt_flag%TYPE;
956: l_project_id po_distributions.project_id%TYPE;
957: l_task_id po_distributions.task_id%TYPE;
958: l_award_set_id po_distributions_all.award_id%TYPE;
959: l_expenditure_type po_distributions.expenditure_type%TYPE;
960: l_po_expenditure_item_date po_distributions.expenditure_item_date%TYPE;
961: l_expenditure_organization_id po_distributions.expenditure_organization_id%TYPE;
962: i NUMBER;

Line 959: l_expenditure_type po_distributions.expenditure_type%TYPE;

955: l_accrue_on_receipt_flag po_distributions.accrue_on_receipt_flag%TYPE;
956: l_project_id po_distributions.project_id%TYPE;
957: l_task_id po_distributions.task_id%TYPE;
958: l_award_set_id po_distributions_all.award_id%TYPE;
959: l_expenditure_type po_distributions.expenditure_type%TYPE;
960: l_po_expenditure_item_date po_distributions.expenditure_item_date%TYPE;
961: l_expenditure_organization_id po_distributions.expenditure_organization_id%TYPE;
962: i NUMBER;
963: l_dist_ccid ap_invoice_distributions.dist_code_combination_id%TYPE;

Line 960: l_po_expenditure_item_date po_distributions.expenditure_item_date%TYPE;

956: l_project_id po_distributions.project_id%TYPE;
957: l_task_id po_distributions.task_id%TYPE;
958: l_award_set_id po_distributions_all.award_id%TYPE;
959: l_expenditure_type po_distributions.expenditure_type%TYPE;
960: l_po_expenditure_item_date po_distributions.expenditure_item_date%TYPE;
961: l_expenditure_organization_id po_distributions.expenditure_organization_id%TYPE;
962: i NUMBER;
963: l_dist_ccid ap_invoice_distributions.dist_code_combination_id%TYPE;
964: l_unbuilt_flex VARCHAR2(240):='';

Line 961: l_expenditure_organization_id po_distributions.expenditure_organization_id%TYPE;

957: l_task_id po_distributions.task_id%TYPE;
958: l_award_set_id po_distributions_all.award_id%TYPE;
959: l_expenditure_type po_distributions.expenditure_type%TYPE;
960: l_po_expenditure_item_date po_distributions.expenditure_item_date%TYPE;
961: l_expenditure_organization_id po_distributions.expenditure_organization_id%TYPE;
962: i NUMBER;
963: l_dist_ccid ap_invoice_distributions.dist_code_combination_id%TYPE;
964: l_unbuilt_flex VARCHAR2(240):='';
965: l_reason_unbuilt_flex VARCHAR2(2000):='';

Line 970: l_rounding_index po_distributions.po_distribution_id%TYPE;

966: l_invoice_distribution_id ap_invoice_distributions.invoice_distribution_id%TYPE;
967: l_sum_prorated_amount ap_invoice_distributions.amount%TYPE := 0;
968: l_sum_dist_base_amount ap_invoice_distributions.base_amount%TYPE := 0;
969: l_max_dist_amount ap_invoice_distributions.amount%TYPE := 0;
970: l_rounding_index po_distributions.po_distribution_id%TYPE;
971: l_base_amount ap_invoice_distributions.base_amount%TYPE;
972: FLEX_OVERLAY_FAILED EXCEPTION;
973: current_calling_sequence VARCHAR2(2000);
974: l_debug_info VARCHAR2(2000);

Line 995: OPEN PO_Distributions_Cursor;

991: X_Total_Amount => l_total_amount,
992: X_Matching_Case => l_matching_case,
993: X_Calling_Sequence => current_calling_sequence);
994:
995: OPEN PO_Distributions_Cursor;
996:
997: LOOP
998:
999: FETCH PO_Distributions_Cursor INTO l_po_distribution_id,

Line 999: FETCH PO_Distributions_Cursor INTO l_po_distribution_id,

995: OPEN PO_Distributions_Cursor;
996:
997: LOOP
998:
999: FETCH PO_Distributions_Cursor INTO l_po_distribution_id,
1000: l_quantity_invoiced,
1001: l_po_dist_ccid,
1002: l_accrue_on_receipt_flag,
1003: l_project_id,

Line 1011: EXIT WHEN PO_Distributions_Cursor%NOTFOUND;

1007: l_expenditure_organization_id,
1008: l_award_set_id,
1009: l_invoice_distribution_id;
1010:
1011: EXIT WHEN PO_Distributions_Cursor%NOTFOUND;
1012:
1013: x_dist_tab(l_po_distribution_id).po_distribution_id := l_po_distribution_id;
1014: x_dist_tab(l_po_distribution_id).invoice_distribution_id := l_invoice_distribution_id;
1015:

Line 1122: CLOSE PO_Distributions_Cursor;

1118: l_sum_prorated_amount := l_sum_prorated_amount + l_amount_invoiced;
1119:
1120: END LOOP;
1121:
1122: CLOSE PO_Distributions_Cursor;
1123:
1124: --Update the PL/SQL table's amount column with the rounding amount due
1125: --to proration, before the base_amounts are calculated.
1126:

Line 1160: FROM po_distributions_ap_v

1156: x_dist_tab(i).expenditure_type,
1157: x_dist_tab(i).expenditure_item_date,
1158: x_dist_tab(i).expenditure_organization_id,
1159: x_dist_tab(i).invoice_distribution_id
1160: FROM po_distributions_ap_v
1161: WHERE po_distribution_id = x_dist_tab(i).po_distribution_id;
1162:
1163: -- Bug 5554493
1164: x_dist_tab(i).pa_quantity := x_dist_tab(i).quantity_invoiced;

Line 1386: --po_distributions_ap_v.code_combination_id is accrual account

1382: --bugfix:4668058 added the following clause
1383: (x_dist_tab(i).project_id IS NOT NULL AND g_allow_pa_override = 'N')
1384: ) THEN
1385:
1386: --po_distributions_ap_v.code_combination_id is accrual account
1387: --if accruing on receipt or else charge account
1388:
1389: x_dist_tab(i).dist_ccid := x_dist_tab(i).po_ccid;
1390:

Line 1601: l_source_distribution_id po_distributions.source_distribution_id%TYPE;

1597: X_Match_Amount IN NUMBER,
1598: X_Uom_Lookup_Code IN VARCHAR2,
1599: X_Calling_Sequence IN VARCHAR2)
1600: IS
1601: l_source_distribution_id po_distributions.source_distribution_id%TYPE;
1602: current_calling_sequence VARCHAR2(2000);
1603: l_debug_info VARCHAR2(2000);
1604: i NUMBER;
1605: l_po_ap_dist_rec PO_AP_DIST_REC_TYPE;

Line 1705: l_debug_info := 'Call the PO_AP_INVOICE_MATCH_GRP to update the Po Distributions and Po Line Locations';

1701: END IF;
1702:
1703: END LOOP;
1704:
1705: l_debug_info := 'Call the PO_AP_INVOICE_MATCH_GRP to update the Po Distributions and Po Line Locations';
1706: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
1707: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name,l_debug_info);
1708: END IF;
1709:

Line 2147: FROM PO_DISTRIBUTIONS_AP_V PD,

2143: G_PRODUCT_CATEGORY, --product_category
2144: G_USER_DEFINED_FISC_CLASS, --user_defined_fisc_class
2145: G_ASSESSABLE_VALUE,
2146: G_dflt_tax_class_code
2147: FROM PO_DISTRIBUTIONS_AP_V PD,
2148: MTL_SYSTEM_ITEMS MSI,
2149: PO_AP_RECEIPT_MATCH_V RCV,
2150: RCV_SHIPMENT_LINES RSL,
2151: RCV_TRANSACTIONS RT --7015553

Line 2809: FROM po_distributions_ap_v pd,

2805: g_intended_use --intended_use
2806: ,'N' --accrual_posted_flag
2807: ,'N' --cash_posted_flag
2808: ,'N' --rcv_charge_addition_flag
2809: FROM po_distributions_ap_v pd,
2810: ap_invoice_lines ail,
2811: po_ap_receipt_match_v rcv,
2812: gl_code_combinations gcc
2813: WHERE ail.invoice_id = x_invoice_id

Line 2986: l_po_distribution_id PO_DISTRIBUTIONS.PO_DISTRIBUTION_ID%TYPE := NULL;

2982: X_Uom_Lookup_Code IN VARCHAR2,
2983: X_Retained_Amount IN NUMBER DEFAULT NULL,
2984: X_Calling_Sequence IN VARCHAR2) IS
2985:
2986: l_po_distribution_id PO_DISTRIBUTIONS.PO_DISTRIBUTION_ID%TYPE := NULL;
2987: l_item_line_number AP_INVOICE_LINES_ALL.LINE_NUMBER%TYPE;
2988: l_amount_to_recoup AP_INVOICE_LINES_ALL.AMOUNT%TYPE;
2989: l_line_amt_net_retainage ap_invoice_lines_all.amount%TYPE;
2990: l_max_amount_to_recoup ap_invoice_lines_all.amount%TYPE;

Line 3397: FND_LOG.STRING(G_LEVEL_PROCEDURE,G_MODULE_NAME||l_api_name,'AP_PO_AMT_MATCH_PKG.Update_Corr_Po_Distributions(+)');

3393:
3394: l_api_name := 'Update_Corr_Po_Shipments_Dists';
3395:
3396: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL) THEN
3397: FND_LOG.STRING(G_LEVEL_PROCEDURE,G_MODULE_NAME||l_api_name,'AP_PO_AMT_MATCH_PKG.Update_Corr_Po_Distributions(+)');
3398: END IF;
3399:
3400: l_debug_info := 'Create l_po_ap_dist_rec object';
3401: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN

Line 3445: l_debug_info := 'Call the PO_AP_INVOICE_MATCH_GRP to update the Po Distributions and Po Line Locations';

3441: END IF;
3442:
3443: END LOOP;
3444:
3445: l_debug_info := 'Call the PO_AP_INVOICE_MATCH_GRP to update the Po Distributions and Po Line Locations';
3446: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
3447: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name,l_debug_info);
3448: END IF;
3449:

Line 4183: po_distributions pd

4179: 'N', --cash_posted_flag
4180: 'N' --rcv_charge_addition_flag
4181: FROM ap_invoice_lines ail,
4182: ap_invoice_distributions aid,
4183: po_distributions pd
4184: WHERE ail.invoice_id = x_invoice_id
4185: AND ail.line_number = x_invoice_line_number
4186: AND aid.invoice_id = ail.corrected_inv_id
4187: AND aid.invoice_line_number = ail.corrected_line_number