DBA Data[Home] [Help]

APPS.PON_AWARD_PKG dependencies on PON_BID_HEADERS

Line 233: pon_bid_headers bh

229: bl.order_number,
230: bl.award_quantity
231: from pon_auction_item_prices_all al,
232: pon_bid_item_prices bl,
233: pon_bid_headers bh
234: where al.auction_header_id = p_auction_header_id
235: and bl.auction_header_id = al.auction_header_id
236: and bl.line_number = al.line_number
237: and bh.bid_number = bl.bid_number

Line 249: pon_bid_headers bh

245: CURSOR active_bid_headers(p_auction_header_id NUMBER) IS
246: select nvl(ah.award_status,'NO'),
247: bh.bid_number
248: from pon_auction_headers_all ah,
249: pon_bid_headers bh
250: where bh.auction_header_id = p_auction_header_id
251: and bh.auction_header_id = ah.auction_header_id
252: and nvl(bh.bid_status,'NONE') = 'ACTIVE'
253: and nvl(bh.award_status,'NO') = 'NO';

Line 259: x_bid_number pon_bid_headers.bid_number%type;

255:
256: x_line_number pon_auction_item_prices_all.line_number%type;
257: x_old_line_number pon_auction_item_prices_all.line_number%type;
258: x_line_origination_code pon_auction_item_prices_all.line_origination_code%type;
259: x_bid_number pon_bid_headers.bid_number%type;
260: x_order_number pon_bid_headers.order_number%type;
261: x_award_quantity pon_bid_item_prices.award_quantity%type;
262: x_line_award_status pon_auction_item_prices_all.award_status%type;
263: x_stored_note_to_rejected pon_acceptances.reason%type;

Line 260: x_order_number pon_bid_headers.order_number%type;

256: x_line_number pon_auction_item_prices_all.line_number%type;
257: x_old_line_number pon_auction_item_prices_all.line_number%type;
258: x_line_origination_code pon_auction_item_prices_all.line_origination_code%type;
259: x_bid_number pon_bid_headers.bid_number%type;
260: x_order_number pon_bid_headers.order_number%type;
261: x_award_quantity pon_bid_item_prices.award_quantity%type;
262: x_line_award_status pon_auction_item_prices_all.award_status%type;
263: x_stored_note_to_rejected pon_acceptances.reason%type;
264: x_error_code VARCHAR2(20);

Line 271: x_header_award_status PON_BID_HEADERS.AWARD_STATUS%TYPE;

267: x_bid_number_found BOOLEAN;
268: x_count NUMBER;
269:
270: -- FPK: CPA
271: x_header_award_status PON_BID_HEADERS.AWARD_STATUS%TYPE;
272:
273: BEGIN
274: IF p_neg_has_lines = 'Y' THEN -- FPK: CPA
275: open active_bid_lines(p_auction_header_id);

Line 419: UPDATE PON_BID_HEADERS

415: -- update the award status for the active bids in this auction where no
416: -- award decision made (all bids will be rejected)
417: FORALL k IN 1..x_bid_number_list.COUNT
418:
419: UPDATE PON_BID_HEADERS
420: SET AWARD_STATUS = 'REJECTED',
421: AWARD_DATE = SYSDATE, /* new column created as part of CPA project.
422: It will be updated only when negotiation does
423: not have lines. */

Line 648: x_bid_number pon_bid_headers.bid_number%type;

644: PROCEDURE award_notification (p_auction_header_id_encrypted IN VARCHAR2,
645: p_auction_header_id IN NUMBER,
646: p_shared_award_decision IN VARCHAR2) IS
647:
648: x_bid_number pon_bid_headers.bid_number%type;
649: x_bid_tp_contact_name pon_bid_headers.trading_partner_contact_name%type;
650: x_auction_tp_name pon_auction_headers_all.trading_partner_name%type;
651: x_auction_title pon_auction_headers_all.auction_title%type;
652:

Line 649: x_bid_tp_contact_name pon_bid_headers.trading_partner_contact_name%type;

645: p_auction_header_id IN NUMBER,
646: p_shared_award_decision IN VARCHAR2) IS
647:
648: x_bid_number pon_bid_headers.bid_number%type;
649: x_bid_tp_contact_name pon_bid_headers.trading_partner_contact_name%type;
650: x_auction_tp_name pon_auction_headers_all.trading_partner_name%type;
651: x_auction_title pon_auction_headers_all.auction_title%type;
652:
653: CURSOR all_bidders(p_auction_header_id NUMBER) IS

Line 658: from pon_bid_headers b,

654: select b.bid_number,
655: b.trading_partner_contact_name contact,
656: a.trading_partner_name auctioneer,
657: a.auction_title
658: from pon_bid_headers b,
659: pon_auction_headers_all a
660: where b.auction_header_id = p_auction_header_id
661: and not nvl(b.bid_status,'NONE') in ('ARCHIVED','DISQUALIFIED')
662: and a.auction_header_id = b.auction_header_id;

Line 849: UPDATE pon_bid_headers

845: END IF;
846:
847: --update total agreed amount (if any)
848: IF l_rec.total_agreement_amount is not null THEN
849: UPDATE pon_bid_headers
850: SET po_agreed_amount = l_rec.total_agreement_amount
851: WHERE bid_number = l_rec.bid_number;
852: END IF;
853: END IF; -- IF l_rec.award_outcome = g_AWARD_OUTCOME_WIN

Line 909: UPDATE pon_bid_headers

905: IF (l_current_bid_number <> l_rec.bid_number) THEN
906: update_notes_for_bid(l_rec.bid_number, l_rec.note_to_supplier, l_rec.internal_note, p_auctioneer_id);
907: --update total agreed amount (if any)
908: IF l_rec.total_agreement_amount is not null THEN
909: UPDATE pon_bid_headers
910: SET po_agreed_amount = l_rec.total_agreement_amount
911: WHERE bid_number = l_rec.bid_number;
912: END IF;
913:

Line 1467: FROM pon_bid_headers bh

1463: IS
1464: --
1465: CURSOR c_active_bids (c_auction_id NUMBER) is
1466: SELECT bh.bid_number
1467: FROM pon_bid_headers bh
1468: WHERE bh.auction_header_id = c_auction_id
1469: AND bid_status = 'ACTIVE';
1470:
1471: l_active_bids_rec c_active_bids%ROWTYPE;

Line 1475: l_bid_headers_count PLS_INTEGER :=0; -- generic pon_bid_headers index

1471: l_active_bids_rec c_active_bids%ROWTYPE;
1472:
1473: -- FPK: CPA
1474: l_index PLS_INTEGER;
1475: l_bid_headers_count PLS_INTEGER :=0; -- generic pon_bid_headers index
1476:
1477: -- Declaration of individual elements to avoid ORA-3113 error because
1478: -- FORALL does not allow update of elements using rec(i).field
1479: l_bid_number_tbl Number_tbl_type;

Line 1509: UPDATE PON_BID_HEADERS

1505: END LOOP;
1506: END IF;
1507:
1508: FORALL k IN 1..l_bid_headers_count
1509: UPDATE PON_BID_HEADERS
1510: SET AWARD_STATUS = l_award_status_tbl(k),
1511: AWARD_DATE = l_award_date_tbl(k), /* new column created as part of CPA project.
1512: It will be updated only when negotiation does
1513: not have lines. */

Line 1558: FROM pon_auction_headers_all ah, pon_bid_headers bh

1554: l_total_lines := 0;
1555: l_award_status := null;
1556: --
1557: SELECT ah.contract_type INTO l_contract_type
1558: FROM pon_auction_headers_all ah, pon_bid_headers bh
1559: WHERE bh.bid_number = p_bid_number
1560: AND bh.auction_header_id = ah.auction_header_id;
1561: --
1562: OPEN c_bid_lines (p_bid_number);

Line 1587: UPDATE PON_BID_HEADERS

1583: ELSIF l_awarded_lines > 0 THEN
1584: l_award_status := 'PARTIAL';
1585: END IF;
1586: --
1587: UPDATE PON_BID_HEADERS
1588: SET AWARD_STATUS = l_award_status,
1589: total_award_amount = l_award_amount,
1590: last_update_date = SYSDATE,
1591: last_updated_by = p_auctioneer_id

Line 1693: pon_bid_headers bh,

1689: bi.award_status,
1690: bi.award_quantity,
1691: ai.group_type
1692: FROM pon_bid_item_prices bi,
1693: pon_bid_headers bh,
1694: pon_auction_item_prices_all ai
1695: WHERE bi.auction_header_id = c_auction_id
1696: AND bi.line_number = c_line_number
1697: AND bh.bid_status = 'ACTIVE'

Line 1853: from pon_bid_headers

1849: select 'AWARDED' -- it means an award decision was made
1850: into l_award_status
1851: from dual
1852: where exists (select 1
1853: from pon_bid_headers
1854: where auction_header_id = p_auction_id
1855: and bid_status = 'ACTIVE'
1856: and award_status IN ('AWARDED', 'REJECTED'));
1857: EXCEPTION

Line 1949: FROM pon_bid_item_prices bi, pon_bid_headers bh, pon_auction_item_prices_all ai

1945: p_award_date,
1946: null,
1947: p_award_date,
1948: p_auctioneer_id
1949: FROM pon_bid_item_prices bi, pon_bid_headers bh, pon_auction_item_prices_all ai
1950: WHERE bi.auction_header_id = ai.auction_header_id
1951: AND ai.line_number = bi.line_number
1952: AND (bi.award_status = 'AWARDED'
1953: OR bi.award_status = 'REJECTED')

Line 1989: FROM pon_bid_item_prices bi, pon_bid_headers bh

1985: 'REJECTED', p_note_to_rejected,
1986: null),
1987: SYSDATE,
1988: p_auctioneer_id
1989: FROM pon_bid_item_prices bi, pon_bid_headers bh
1990: WHERE bi.auction_header_id = p_auction_header_id
1991: AND bi.line_number = p_line_number
1992: AND (bi.award_status = 'AWARDED'
1993: OR bi.award_status = 'REJECTED')

Line 2027: FROM pon_bid_item_prices bi, pon_bid_headers bh, pon_auction_item_prices_all ai

2023: 'REJECTED', p_note_to_rejected,
2024: null),
2025: p_award_date,
2026: p_auctioneer_id
2027: FROM pon_bid_item_prices bi, pon_bid_headers bh, pon_auction_item_prices_all ai
2028: WHERE bi.auction_header_id = p_auction_header_id
2029: AND (bi.award_status = 'AWARDED'
2030: OR bi.award_status = 'REJECTED')
2031: AND bi.bid_number = bh.bid_number

Line 2105: FROM pon_bid_item_prices bi, pon_bid_headers bh

2101: p_award_date,
2102: p_note_to_rejected,
2103: p_award_date,
2104: p_auctioneer_id
2105: FROM pon_bid_item_prices bi, pon_bid_headers bh
2106: WHERE bi.auction_header_id = p_auction_header_id
2107: AND bi.line_number = p_line_number
2108: AND nvl(bi.award_status, 'NO') <> 'AWARDED' -- can be REJECTED/ NO
2109: AND bi.bid_number = bh.bid_number

Line 2123: UPDATE pon_bid_headers

2119: p_auctioneer_id IN NUMBER
2120: )
2121: IS
2122: BEGIN
2123: UPDATE pon_bid_headers
2124: SET Internal_note = p_internal_note,
2125: note_to_supplier = p_note_to_supplier
2126: WHERE bid_number = p_bid_number;
2127: END update_notes_for_bid;

Line 2157: FROM pon_bid_headers

2153: award_shipment_number = NULL,
2154: award_price = NULL
2155: WHERE bid_number IN (
2156: SELECT bid_number
2157: FROM pon_bid_headers
2158: WHERE auction_header_id = p_auction_header_id
2159: AND bid_status = 'ACTIVE'
2160: );
2161:

Line 2183: FROM pon_bid_headers

2179: award_shipment_number = NULL,
2180: award_price = NULL
2181: WHERE bid_number IN (
2182: SELECT bid_number
2183: FROM pon_bid_headers
2184: WHERE auction_header_id = p_auction_header_id
2185: AND bid_status = 'ACTIVE'
2186: )
2187: AND line_number IN (SELECT line_number

Line 2209: UPDATE pon_bid_headers

2205: if negotiation has lines or not. Previoulsy award_status was not being updated to REJECTED when
2206: negotiation had lines, but there is no harm in doing so at this point, as award_status will be
2207: updated later in update_single_bid_header procedure. */
2208:
2209: UPDATE pon_bid_headers
2210: SET award_status = 'REJECTED',
2211: note_to_supplier = NULL,
2212: internal_note = NULL,
2213: po_agreed_amount = NULL,

Line 2241: FROM pon_bid_headers

2237: last_updated_by = p_auctioneer_id,
2238: award_price = NULL
2239: WHERE bid_number IN (
2240: SELECT bid_number
2241: FROM pon_bid_headers
2242: WHERE auction_header_id = p_auction_header_id
2243: AND bid_status = 'ACTIVE'
2244: );
2245: --reset notes for all the bids

Line 2246: UPDATE pon_bid_headers

2242: WHERE auction_header_id = p_auction_header_id
2243: AND bid_status = 'ACTIVE'
2244: );
2245: --reset notes for all the bids
2246: UPDATE pon_bid_headers
2247: SET po_agreed_amount = NULL,
2248: last_update_date = SYSDATE,
2249: last_updated_by = p_auctioneer_id
2250: WHERE bid_number IN (

Line 2252: FROM pon_bid_headers

2248: last_update_date = SYSDATE,
2249: last_updated_by = p_auctioneer_id
2250: WHERE bid_number IN (
2251: SELECT bid_number
2252: FROM pon_bid_headers
2253: WHERE auction_header_id = p_auction_header_id
2254: AND bid_status = 'ACTIVE'
2255: );
2256: END clear_awards_recommendation;

Line 2283: FROM pon_optimize_results por, pon_bid_headers pbh

2279: -- retrieve auction header id and batch id
2280: BEGIN
2281: SELECT COUNT(DISTINCT pbh.bid_number)
2282: INTO l_num_of_non_shortlisted_supp
2283: FROM pon_optimize_results por, pon_bid_headers pbh
2284: WHERE por.bid_number = pbh.bid_number
2285: AND pbh.shortlist_flag = 'N'
2286: AND por.scenario_id = p_scenario_id;
2287:

Line 3064: UPDATE PON_BID_HEADERS

3060: FROM FND_USER
3061: WHERE user_id = p_user_id;
3062:
3063: IF (p_event = 'NOT_SHORTLIST') THEN
3064: UPDATE PON_BID_HEADERS
3065: SET SHORTLIST_FLAG = 'N'
3066: , LAST_UPDATE_DATE = SYSDATE
3067: , LAST_UPDATED_BY = p_user_id
3068: , SHORTLIST_TPC_ID = l_person_id

Line 3071: UPDATE PON_BID_HEADERS

3067: , LAST_UPDATED_BY = p_user_id
3068: , SHORTLIST_TPC_ID = l_person_id
3069: WHERE BID_NUMBER = p_bid_number;
3070: ELSIF (p_event = 'SHORTLIST') THEN
3071: UPDATE PON_BID_HEADERS
3072: SET SHORTLIST_FLAG = 'Y'
3073: , LAST_UPDATE_DATE = SYSDATE
3074: , LAST_UPDATED_BY = p_user_id
3075: , SHORTLIST_TPC_ID = l_person_id

Line 3096: pon_bid_headers bh

3092: SELECT SUM(DECODE(ah.contract_type, 'STANDARD', bh.total_award_amount, bh.po_agreed_amount * (1/nvl(bh.rate, 1))))
3093: INTO l_award_amount
3094: FROM
3095: pon_auction_headers_all ah,
3096: pon_bid_headers bh
3097: WHERE
3098: ah.auction_header_id = p_auction_header_id
3099: AND ah.auction_header_id = bh.auction_header_id
3100: AND bh.award_status in ('AWARDED', 'PARTIAL');

Line 3112: p_auction_header_id IN pon_bid_headers.auction_header_id%TYPE,

3108: END get_award_amount;
3109: --
3110: --
3111: PROCEDURE award_bi_subline (
3112: p_auction_header_id IN pon_bid_headers.auction_header_id%TYPE,
3113: p_bid_number IN pon_bid_headers.bid_number%TYPE,
3114: p_parent_line_number IN pon_bid_item_prices.line_number%TYPE,
3115: p_award_status IN pon_bid_item_prices.award_status%TYPE,
3116: p_award_date IN pon_bid_item_prices.award_date%TYPE,

Line 3113: p_bid_number IN pon_bid_headers.bid_number%TYPE,

3109: --
3110: --
3111: PROCEDURE award_bi_subline (
3112: p_auction_header_id IN pon_bid_headers.auction_header_id%TYPE,
3113: p_bid_number IN pon_bid_headers.bid_number%TYPE,
3114: p_parent_line_number IN pon_bid_item_prices.line_number%TYPE,
3115: p_award_status IN pon_bid_item_prices.award_status%TYPE,
3116: p_award_date IN pon_bid_item_prices.award_date%TYPE,
3117: p_auctioneer_id pon_bid_item_prices.LAST_UPDATED_BY%TYPE)

Line 3119: CURSOR c_sublines (c_auction_header_id pon_bid_headers.auction_header_id%TYPE,

3115: p_award_status IN pon_bid_item_prices.award_status%TYPE,
3116: p_award_date IN pon_bid_item_prices.award_date%TYPE,
3117: p_auctioneer_id pon_bid_item_prices.LAST_UPDATED_BY%TYPE)
3118: IS
3119: CURSOR c_sublines (c_auction_header_id pon_bid_headers.auction_header_id%TYPE,
3120: c_bid_number pon_bid_headers.bid_number%TYPE,
3121: c_parent_line_number pon_bid_item_prices.line_number%TYPE) IS
3122: --Query retrives sublines for the given parent line
3123: SELECT

Line 3120: c_bid_number pon_bid_headers.bid_number%TYPE,

3116: p_award_date IN pon_bid_item_prices.award_date%TYPE,
3117: p_auctioneer_id pon_bid_item_prices.LAST_UPDATED_BY%TYPE)
3118: IS
3119: CURSOR c_sublines (c_auction_header_id pon_bid_headers.auction_header_id%TYPE,
3120: c_bid_number pon_bid_headers.bid_number%TYPE,
3121: c_parent_line_number pon_bid_item_prices.line_number%TYPE) IS
3122: --Query retrives sublines for the given parent line
3123: SELECT
3124: bi.line_number,

Line 3166: p_auction_header_id IN pon_bid_headers.auction_header_id%TYPE,

3162: -- gets the parent line
3163: --and sets the award status of parent line by querying up the child lines
3164: ----------------------------------------------------------------
3165: PROCEDURE update_bi_group_award (
3166: p_auction_header_id IN pon_bid_headers.auction_header_id%TYPE,
3167: p_bid_number IN pon_bid_headers.bid_number%TYPE,
3168: p_parent_line_number IN pon_auction_item_prices_all.parent_line_number%TYPE,
3169: p_award_date IN pon_bid_item_prices.award_date%TYPE,
3170: p_auctioneer_id IN pon_bid_item_prices.last_updated_by%TYPE )

Line 3167: p_bid_number IN pon_bid_headers.bid_number%TYPE,

3163: --and sets the award status of parent line by querying up the child lines
3164: ----------------------------------------------------------------
3165: PROCEDURE update_bi_group_award (
3166: p_auction_header_id IN pon_bid_headers.auction_header_id%TYPE,
3167: p_bid_number IN pon_bid_headers.bid_number%TYPE,
3168: p_parent_line_number IN pon_auction_item_prices_all.parent_line_number%TYPE,
3169: p_award_date IN pon_bid_item_prices.award_date%TYPE,
3170: p_auctioneer_id IN pon_bid_item_prices.last_updated_by%TYPE )
3171: IS

Line 3216: p_auction_header_id IN pon_bid_headers.auction_header_id%TYPE,

3212: END update_bi_group_award;
3213: --
3214: --
3215: PROCEDURE update_ai_group_award (
3216: p_auction_header_id IN pon_bid_headers.auction_header_id%TYPE,
3217: p_line_number IN pon_bid_item_prices.line_number%TYPE,
3218: p_award_date IN pon_bid_item_prices.award_date%TYPE,
3219: p_auctioneer_id IN pon_bid_item_prices.last_updated_by%TYPE)
3220: IS

Line 3286: pon_bid_headers PBH,

3282: PAIP.current_price * nvl(PAIP.awarded_quantity, 0),
3283: sum(decode(PBIP.award_status, 'AWARDED', nvl(PBIP.award_quantity, 0), 0) * nvl(PBIP.award_price, 0))))
3284: INTO p_current_total
3285: FROM pon_bid_item_prices PBIP,
3286: pon_bid_headers PBH,
3287: pon_auction_item_prices_all PAIP
3288: WHERE PAIP.auction_header_id = p_auction_header_id
3289: AND PAIP.auction_header_id = PBIP.auction_header_id (+)
3290: AND PAIP.line_number = PBIP.line_number (+)

Line 3300: pon_bid_headers PBH

3296:
3297: SELECT sum(decode(PBIP.award_status, 'AWARDED', nvl(PBIP.award_quantity, 0), 0) * nvl(PBIP.award_price, 0))
3298: INTO p_award_total
3299: FROM pon_bid_item_prices PBIP,
3300: pon_bid_headers PBH
3301: WHERE PBH.auction_header_id = p_auction_header_id
3302: AND PBIP.bid_number = PBH.bid_number (+)
3303: AND PBH.bid_status (+) = 'ACTIVE'
3304: AND NVL(PBH.award_status, 'NONE') IN ('PARTIAL', 'AWARDED');

Line 3336: p_bid_number IN PON_BID_HEADERS.BID_NUMBER%TYPE

3332: FUNCTION does_bid_exist
3333: (
3334: p_scenario_id IN PON_OPTIMIZE_CONSTRAINTS.SCENARIO_ID%TYPE,
3335: p_sequence_number IN PON_OPTIMIZE_CONSTRAINTS.SEQUENCE_NUMBER%TYPE,
3336: p_bid_number IN PON_BID_HEADERS.BID_NUMBER%TYPE
3337: ) RETURN VARCHAR2
3338: IS
3339: l_bid_exists VARCHAR2(1);
3340: BEGIN

Line 4286: pon_bid_headers pbh

4282: pon_auction_item_prices_all ai,
4283: pon_optimize_scenarios pos,
4284: pon_optimize_results por,
4285: pon_bid_shipments pbs,
4286: pon_bid_headers pbh
4287: WHERE
4288: por.scenario_id = pos.scenario_id
4289: AND
4290: por.bid_number = bi.bid_number