[Home] [Help]
450: IF (l_skip_pf_for_batch = 'N') THEN
451:
452: -- Insert missing SUPPLIER price factors only if they exist
453: IF (p_has_pe_flag = 'Y') THEN
454: INSERT INTO pon_bid_price_elements
455: (
456: BID_NUMBER,
457: LINE_NUMBER,
458: PRICE_ELEMENT_TYPE_ID,
482: AND apf.pf_type = 'SUPPLIER' -- only supplier price factors
483: AND apf.line_number BETWEEN p_batch_start AND p_batch_end
484: AND NOT EXISTS
485: (SELECT pbpe.price_element_type_id
486: FROM pon_bid_price_elements pbpe
487: WHERE pbpe.bid_number = p_bid_number
488: AND pbpe.line_number = apf.line_number
489: AND pbpe.price_element_type_id = apf.price_element_type_id));
490:
500:
501: -- Insert missing BUYER price factors if applicable
502: IF (p_supp_seq_number IS NOT null) THEN
503:
504: INSERT INTO pon_bid_price_elements
505: (
506: BID_NUMBER,
507: LINE_NUMBER,
508: PRICE_ELEMENT_TYPE_ID,
550: AND nvl(pf.value, 0) <> 0
551: AND apf.line_number BETWEEN p_batch_start AND p_batch_end
552: AND NOT EXISTS
553: (SELECT pbpe.price_element_type_id
554: FROM pon_bid_price_elements pbpe
555: WHERE pbpe.bid_number = p_bid_number
556: AND pbpe.line_number = apf.line_number
557: AND pbpe.price_element_type_id = apf.price_element_type_id));
558:
737: WHERE ba.bid_number = p_bid_number
738: AND ba.line_number BETWEEN p_batch_start AND p_batch_end;
739:
740: -- Update SUPPLIER price factor old value columns
741: UPDATE pon_bid_price_elements bpf
742: SET bpf.old_bid_currency_value =
743: (SELECT old_bpf.bid_currency_value
744: FROM pon_bid_price_elements old_bpf
745: WHERE old_bpf.bid_number = p_source_bid_num
740: -- Update SUPPLIER price factor old value columns
741: UPDATE pon_bid_price_elements bpf
742: SET bpf.old_bid_currency_value =
743: (SELECT old_bpf.bid_currency_value
744: FROM pon_bid_price_elements old_bpf
745: WHERE old_bpf.bid_number = p_source_bid_num
746: AND old_bpf.line_number = bpf.line_number
747: AND old_bpf.price_element_type_id = bpf.price_element_type_id)
748: WHERE bpf.bid_number = p_bid_number
1723: -- copy over all supplier price factors, including line price
1724: -- do not copy line price pf for lines with display_price_factors_flag = N
1725: IF (l_supplier_view <> 'UNTRANSFORMED') THEN
1726:
1727: INSERT INTO pon_bid_price_elements
1728: (
1729: BID_NUMBER,
1730: LINE_NUMBER,
1731: PRICE_ELEMENT_TYPE_ID,
1758: p_userid, -- LAST_UPDATED_BY
1759: apf.pf_type, -- PF_TYPE
1760: decode(p_rebid_flag, 'Y', bpf.bid_currency_value, null) -- OLD_BID_CURRENCY_VALUE
1761: FROM pon_price_elements apf,
1762: pon_bid_price_elements bpf,
1763: pon_bid_item_prices bl
1764: WHERE apf.auction_header_id = p_auc_header_id
1765: AND apf.pf_type = 'SUPPLIER' -- only for supplier price factors
1766: AND bl.bid_number = p_bid_number
1776: -- display flag checked and have nonzero value
1777: -- need to populate bid_currency_value, rounding as necessary
1778: IF (p_supp_seq_number IS NOT null AND l_pf_type <> 'SUPPLIER') THEN
1779:
1780: INSERT INTO pon_bid_price_elements
1781: (
1782: BID_NUMBER,
1783: LINE_NUMBER,
1784: PRICE_ELEMENT_TYPE_ID,
2549: OR EXISTS
2550:
2551: -- Check price factors
2552: (SELECT bpf.line_number
2553: FROM pon_bid_price_elements bpf
2554: WHERE bpf.bid_number = bl.bid_number
2555: AND bpf.line_number = bl.line_number
2556: AND bpf.pf_type = 'SUPPLIER'
2557: AND bpf.bid_currency_value IS NOT null
4591: )
4592: )
4593: ,0)
4594: INTO l_bid_line_pf_unit_price
4595: FROM pon_bid_price_elements spf,
4596: pon_auction_item_prices_all aip
4597: WHERE spf.bid_number = p_prev_auc_active_bid_number
4598: AND spf.line_number = p_line_number
4599: AND spf.sequence_number <> -10