DBA Data[Home] [Help]

APPS.AP_RETRO_PRICING_UTIL_PKG dependencies on AP_INVOICE_LINES

Line 12: | retropriced shipments(Records in AP_INVOICE_LINES_INTERFACE) are VALID

8: | DESCRIPTION
9: | This function checks for a particular instruction if all the base
10: | matched Invoices(along with Price Corrections,Qty Corrections and the
11: | previously existing(If Any) Retro Price Adjustments Documents ) for the
12: | retropriced shipments(Records in AP_INVOICE_LINES_INTERFACE) are VALID
13: |
14: | PARAMETERS
15: | p_instruction_id
16: | p_org_id

Line 38: FROM ap_invoice_lines_interface IL,

34:
35: debug_info := 'Are Original Invoices Valid';
36: SELECT count(*)
37: INTO l_count
38: FROM ap_invoice_lines_interface IL,
39: ap_invoice_lines_all L
40: WHERE IL.invoice_id = p_instruction_id
41: AND IL.po_line_location_id = L.po_line_location_id
42: AND L.org_id = p_org_id

Line 39: ap_invoice_lines_all L

35: debug_info := 'Are Original Invoices Valid';
36: SELECT count(*)
37: INTO l_count
38: FROM ap_invoice_lines_interface IL,
39: ap_invoice_lines_all L
40: WHERE IL.invoice_id = p_instruction_id
41: AND IL.po_line_location_id = L.po_line_location_id
42: AND L.org_id = p_org_id
43: AND L.match_type IN ('ITEM_TO_PO', 'ITEM_TO_RECEIPT',

Line 90: | retropriced shipments(Records in AP_INVOICE_LINES_INTERFACE) has any holds

86: | DESCRIPTION
87: | This function checks for a particular instruction if all the base
88: | matched Invoices(along with Price Corrections, Qty Corrections and the
89: | previously existing(If Any) Retro Price Adjustments Documents ) for the
90: | retropriced shipments(Records in AP_INVOICE_LINES_INTERFACE) has any holds
91: | (other than Price Hold)
92: |
93: | PARAMETERS
94: | p_instruction_id

Line 118: FROM ap_invoice_lines_interface IL,

114:
115: debug_info := 'Are Holds OK';
116: SELECT count(*)
117: INTO l_count
118: FROM ap_invoice_lines_interface IL,
119: ap_invoice_lines_all L
120: WHERE IL.invoice_id = p_instruction_id
121: AND L.org_id = p_org_id
122: AND L.po_line_location_id = IL.po_line_location_id

Line 119: ap_invoice_lines_all L

115: debug_info := 'Are Holds OK';
116: SELECT count(*)
117: INTO l_count
118: FROM ap_invoice_lines_interface IL,
119: ap_invoice_lines_all L
120: WHERE IL.invoice_id = p_instruction_id
121: AND L.org_id = p_org_id
122: AND L.po_line_location_id = IL.po_line_location_id
123: AND L.match_type IN ('ITEM_TO_PO', 'ITEM_TO_RECEIPT',

Line 277: FROM ap_invoice_lines_all

273: --
274: debug_info := 'IF ppa_already_Exists';
275: SELECT count(*)
276: INTO l_count
277: FROM ap_invoice_lines_all
278: WHERE corrected_inv_id = p_invoice_id
279: AND corrected_line_number = p_line_number
280: AND line_type_lookup_code IN ('RETROITEM')
281: AND match_type = 'PO_PRICE_ADJUSTMENT';

Line 293: FROM ap_invoice_lines_all

289: FROM ap_invoices_all AI
290: WHERE invoice_type_lookup_code = 'PO PRICE ADJUST'
291: AND source = 'PPA'
292: AND ai.invoice_id = (SELECT MAX(invoice_id)
293: FROM ap_invoice_lines_all
294: WHERE corrected_inv_id = p_invoice_id
295: AND corrected_line_number = p_line_number
296: AND line_type_lookup_code IN ('RETROITEM')
297: AND match_type = 'PO_PRICE_ADJUSTMENT'

Line 466: FROM ap_invoice_lines_all

462: BEGIN
463: debug_info := 'IF Adj Corr Exists';
464: SELECT count(*)
465: INTO l_count
466: FROM ap_invoice_lines_all
467: WHERE invoice_id = p_invoice_id
468: AND corrected_inv_id = p_invoice_id
469: AND corrected_line_number = p_line_number
470: AND line_type_lookup_code IN ('RETROITEM')

Line 670: FROM ap_invoice_lines_all

666: PRODUCT_TABLE,
667: REFERENCE_KEY1,
668: REFERENCE_KEY2,
669: RCV_SHIPMENT_LINE_ID
670: FROM ap_invoice_lines_all
671: WHERE corrected_inv_id = p_invoice_id
672: AND corrected_line_number = p_line_number
673: AND discarded_flag <> 'Y'
674: AND cancelled_flag <> 'Y'

Line 922: FROM ap_invoice_lines AIL,

918: AIL.PRODUCT_TABLE,
919: AIL.REFERENCE_KEY1,
920: AIL.REFERENCE_KEY2,
921: AIL.RCV_SHIPMENT_LINE_ID
922: FROM ap_invoice_lines AIL,
923: ap_allocation_rule_lines ARL
924: WHERE AIL.invoice_id = ARL.invoice_id
925: AND ARL.invoice_id = p_invoice_id
926: AND ARL.to_invoice_line_number = p_invoice_line_number

Line 1150: l_line_type_lookup_code AP_INVOICE_LINES_ALL.line_type_lookup_code%TYPE;

1146: FUNCTION Get_Dist_Type_lookup_code(
1147: p_invoice_distribution_id IN NUMBER)
1148: RETURN VARCHAR2 IS
1149:
1150: l_line_type_lookup_code AP_INVOICE_LINES_ALL.line_type_lookup_code%TYPE;
1151: debug_info VARCHAR2(1000);
1152:
1153: BEGIN
1154: debug_info := 'Get Dist_Type_lookup_code';

Line 1631: AP_INVOICE_LINES_INTERFACE_S.nextval,

1627: p_lines_rec.wfapproval_status,
1628: p_lines_rec.pa_quantity,
1629: p_lines_rec.instruction_id,
1630: p_lines_rec.adj_type,
1631: AP_INVOICE_LINES_INTERFACE_S.nextval,
1632: p_lines_rec.cost_factor_id);
1633:
1634:
1635: --

Line 1848: FROM ap_invoice_lines L,

1844: L.PRODUCT_TABLE,
1845: L.REFERENCE_KEY1,
1846: L.REFERENCE_KEY2,
1847: L.RCV_SHIPMENT_LINE_ID
1848: FROM ap_invoice_lines L,
1849: ap_invoice_lines_interface IL
1850: WHERE L.po_line_location_id = IL.po_line_location_id
1851: AND IL.invoice_id = p_instruction_id
1852: AND IL.invoice_line_id = p_instruction_line_id

Line 1849: ap_invoice_lines_interface IL

1845: L.REFERENCE_KEY1,
1846: L.REFERENCE_KEY2,
1847: L.RCV_SHIPMENT_LINE_ID
1848: FROM ap_invoice_lines L,
1849: ap_invoice_lines_interface IL
1850: WHERE L.po_line_location_id = IL.po_line_location_id
1851: AND IL.invoice_id = p_instruction_id
1852: AND IL.invoice_line_id = p_instruction_line_id
1853: AND L.discarded_flag <> 'Y'

Line 2127: FROM ap_invoice_lines_all L

2123: INTO l_existing_ppa_count
2124: FROM ap_invoices_all I
2125: WHERE I.source = 'PPA'
2126: AND EXISTS (SELECT invoice_id
2127: FROM ap_invoice_lines_all L
2128: WHERE L.invoice_id = I.invoice_id
2129: AND L.corrected_inv_id = p_invoice_id
2130: AND L.corrected_line_number = p_line_number
2131: AND L.match_type = 'PO_PRICE_ADJUSTMENT');