DBA Data[Home] [Help]

APPS.AP_MATCHING_UTILS_PKG dependencies on PO_DISTRIBUTIONS

Line 171: FROM po_distributions

167: Begin
168:
169: SELECT count(*)
170: INTO p_num_po_dists
171: FROM po_distributions
172: WHERE line_location_id = P_line_location_id;
173:
174: If (p_num_po_dists = 1 ) Then
175: SELECT po_distribution_id

Line 177: FROM po_distributions

173:
174: If (p_num_po_dists = 1 ) Then
175: SELECT po_distribution_id
176: INTO p_po_distribution_id
177: FROM po_distributions
178: WHERE line_location_id = P_line_location_id;
179: Else
180: p_po_distribution_id := null;
181: End if;

Line 509: l_index po_distributions_all.po_distribution_id%TYPE;

505: AND line_number = p_invoice_line_number;
506:
507: l_invoice_line_rec ap_invoice_lines%ROWTYPE;
508: l_match_mode VARCHAR2(8);
509: l_index po_distributions_all.po_distribution_id%TYPE;
510: l_dist_ccid ap_invoice_distributions_all.dist_code_combination_id%TYPE;
511: l_corr_inv_dist_id ap_invoice_distributions_all.invoice_distribution_id%TYPE;
512: l_dist_tab ap_matching_pkg.dist_tab_type;
513: l_othr_chrg_tab ap_othr_chrg_match_pkg.othr_chrg_match_tabtype;

Line 577: FROM po_distributions_ap_v

573: --Bugfix:4699604
574: BEGIN
575: SELECT code_combination_id
576: INTO l_dist_tab(l_index).dist_ccid
577: FROM po_distributions_ap_v
578: WHERE po_distribution_id = l_invoice_line_rec.po_distribution_id;
579: EXCEPTION WHEN OTHERS THEN
580: NULL;
581: END;

Line 1110: (po_distribution_id PO_DISTRIBUTIONS.po_distribution_id%TYPE, --Index Column

1106: l_total_dist_amt_applied NUMBER;
1107: l_po_distribution_id NUMBER;
1108:
1109: TYPE dist_record_type is RECORD
1110: (po_distribution_id PO_DISTRIBUTIONS.po_distribution_id%TYPE, --Index Column
1111: total_dist_qty_invoiced AP_INVOICE_DISTRIBUTIONS.quantity_invoiced%TYPE,
1112: total_dist_qty_applied AP_INVOICE_DISTRIBUTIONS.quantity_invoiced%TYPE,
1113: total_dist_amt_invoiced AP_INVOICE_DISTRIBUTIONS.amount%TYPE,
1114: total_dist_amt_applied AP_INVOICE_DISTRIBUTIONS.amount%TYPE,

Line 1146: po_distributions_all pd,

1142: decode(pll.matching_basis,'QUANTITY',sum(nvl(aid.quantity_invoiced,0))),
1143: decode(pll.matching_basis,'AMOUNT',sum(nvl(aid.amount,0))),
1144: pll.matching_basis
1145: from ap_invoice_distributions aid,
1146: po_distributions_all pd,
1147: po_line_locations pll
1148: where pll.line_location_id = p_po_line_location_id
1149: and pll.shipment_type <> 'PREPAYMENT'
1150: and aid.po_distribution_id = pd.po_distribution_id

Line 1217: l_debug_info := 'Update Po_Distributions';

1213:
1214: CLOSE C_Po_Dists_Financed;
1215:
1216:
1217: l_debug_info := 'Update Po_Distributions';
1218: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
1219: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name,l_debug_info);
1220: END IF;
1221:

Line 1228: UPDATE po_distributions pod

1224: IF (l_dist_tab.exists(i)) THEN
1225:
1226: IF (l_matching_basis = 'QUANTITY') THEN
1227:
1228: UPDATE po_distributions pod
1229: SET quantity_financed = l_dist_tab(i).total_dist_qty_invoiced,
1230: quantity_recouped = l_dist_tab(i).total_dist_qty_applied,
1231: quantity_billed = nvl(quantity_billed,0) - (l_dist_tab(i).total_dist_qty_invoiced -
1232: l_dist_tab(i).total_dist_qty_applied)

Line 1243: UPDATE po_distributions pod

1239: nvl(l_dist_tab(i).total_dist_qty_applied,0);
1240:
1241: ELSIF (l_matching_basis = 'AMOUNT') THEN
1242:
1243: UPDATE po_distributions pod
1244: SET amount_financed = l_total_dist_amt_invoiced,
1245: amount_recouped = l_total_dist_amt_applied,
1246: amount_billed = nvl(amount_billed,0) - (l_dist_tab(i).total_dist_amt_invoiced -
1247: l_dist_tab(i).total_dist_amt_applied)

Line 1828: l_po_distribution_id PO_DISTRIBUTIONS.PO_DISTRIBUTION_ID%TYPE;

1824: l_invoice_type_lookup_code AP_INVOICES.INVOICE_TYPE_LOOKUP_CODE%TYPE;
1825: l_unit_meas_lookup_code AP_INVOICE_LINES.UNIT_MEAS_LOOKUP_CODE%TYPE;
1826: l_retained_amount AP_INVOICE_LINES.RETAINED_AMOUNT%TYPE;
1827: l_match_type AP_INVOICE_LINES.MATCH_TYPE%TYPE;
1828: l_po_distribution_id PO_DISTRIBUTIONS.PO_DISTRIBUTION_ID%TYPE;
1829: l_match_mode VARCHAR2(30);
1830:
1831: l_ordered_po_qty NUMBER;
1832: l_cancelled_po_qty NUMBER;

Line 2324: l_po_distribution_id PO_DISTRIBUTIONS.PO_DISTRIBUTION_ID%TYPE;

2320:
2321: l_po_line_location_id PO_LINE_LOCATIONS.LINE_LOCATION_ID%TYPE;
2322: l_rcv_transaction_id RCV_TRANSACTIONS.TRANSACTION_ID%TYPE;
2323: l_matching_basis PO_LINE_LOCATIONS.MATCHING_BASIS%TYPE;
2324: l_po_distribution_id PO_DISTRIBUTIONS.PO_DISTRIBUTION_ID%TYPE;
2325:
2326: l_ordered_qty NUMBER;
2327: l_cancelled_qty NUMBER;
2328: l_received_qty NUMBER;

Line 2485: FROM po_distributions_all pod,

2481: Begin
2482:
2483: SELECT count(*)
2484: INTO P_num_rect_po_dists
2485: FROM po_distributions_all pod,
2486: rcv_transactions rt
2487: WHERE rt.transaction_id =P_rcv_transaction_id
2488: and rt.po_line_location_id = pod.line_location_id
2489: and (rt.po_distribution_id is null

Line 2535: FROM po_distributions

2531: ) IS
2532:
2533: CURSOR po_dists_cursor IS
2534: SELECT po_distribution_id, project_id
2535: FROM po_distributions
2536: WHERE line_location_id = p_line_location_id
2537: AND project_id IS NOT NULL ;
2538:
2539: l_po_distribution_id po_distributions_all.po_distribution_id%TYPE ;

Line 2539: l_po_distribution_id po_distributions_all.po_distribution_id%TYPE ;

2535: FROM po_distributions
2536: WHERE line_location_id = p_line_location_id
2537: AND project_id IS NOT NULL ;
2538:
2539: l_po_distribution_id po_distributions_all.po_distribution_id%TYPE ;
2540: l_project_id po_distributions_all.project_id%TYPE ;
2541: l_exp_item_date DATE ;
2542: l_is_date_valid VARCHAR2(1) := 'Y' ;
2543: l_pa_message_name FND_NEW_MESSAGES.MESSAGE_NAME%TYPE := NULL ;

Line 2540: l_project_id po_distributions_all.project_id%TYPE ;

2536: WHERE line_location_id = p_line_location_id
2537: AND project_id IS NOT NULL ;
2538:
2539: l_po_distribution_id po_distributions_all.po_distribution_id%TYPE ;
2540: l_project_id po_distributions_all.project_id%TYPE ;
2541: l_exp_item_date DATE ;
2542: l_is_date_valid VARCHAR2(1) := 'Y' ;
2543: l_pa_message_name FND_NEW_MESSAGES.MESSAGE_NAME%TYPE := NULL ;
2544: l_token_value1 FND_NEW_MESSAGES.MESSAGE_TEXT%TYPE; --Bug 14236129 Modified Bug 16089519