158: l_check_exists NUMBER;
159: l_diff_days NUMBER;
160: found_flag BOOLEAN;
161:
162: l_temp_sys_date pon_auction_headers_all.close_bidding_date%TYPE;
163:
164: CURSOR active_neg_cursor IS
165: SELECT pah.auction_header_id auction_header_id,
166: pah.close_bidding_date close_bidding_date,
165: SELECT pah.auction_header_id auction_header_id,
166: pah.close_bidding_date close_bidding_date,
167: pah.open_bidding_date open_bidding_date,
168: pah.view_by_date preview_date
169: FROM pon_auction_headers_all pah
170: WHERE pah.auction_status = 'ACTIVE'
171: AND pah.close_bidding_date > SYSDATE
172: AND SYSDATE > pah.open_bidding_date;
173:
240: END IF;
241: BEGIN
242: call_wf_process_to_send_notif(c_neg_details.auction_header_id);
243:
244: --update pon_auction_headers_all
245: --increment the value of the no-of-notification-sent column
246: UPDATE pon_auction_headers_all pah
247: SET pah.no_of_notifications_sent = Nvl(pah.no_of_notifications_sent, 0) + 1
248: WHERE auction_header_id = c_neg_details.auction_header_id;
242: call_wf_process_to_send_notif(c_neg_details.auction_header_id);
243:
244: --update pon_auction_headers_all
245: --increment the value of the no-of-notification-sent column
246: UPDATE pon_auction_headers_all pah
247: SET pah.no_of_notifications_sent = Nvl(pah.no_of_notifications_sent, 0) + 1
248: WHERE auction_header_id = c_neg_details.auction_header_id;
249:
250: EXCEPTION WHEN OTHERS THEN
364: );
365:
366:
367:
368: --get the values from the pon_auction_headers_all table
369: SELECT
370: auction_title,
371: trading_partner_name,
372: open_bidding_date,
384: p_wf_item_key,
385: p_notification_no,
386: p_document_number
387:
388: FROM pon_auction_headers_all
389: WHERE auction_header_id = p_auction_header_id;
390:
391:
392: --get the name of the buyer
395: INTO p_person_id
396: FROM per_all_people_f
397: WHERE party_id = (
398: SELECT trading_partner_contact_id
399: FROM pon_auction_headers_all
400: WHERE auction_header_id = p_auction_header_id
401: )
402: AND SYSDATE BETWEEN effective_start_date AND effective_end_date;
403:
796:
797: l_item_key_like VARCHAR2(255);
798: l_exact_item_key VARCHAR2(255);
799:
800: TYPE t_auction_header_id_type IS TABLE OF PON_AUCTION_HEADERS_ALL.auction_header_id%TYPE;
801: TYPE t_wf_item_key_type IS TABLE OF PON_AUCTION_HEADERS_ALL.wf_item_key%TYPE;
802: TYPE t_exact_item_key_type is TABLE OF WF_ITEMS.item_key%TYPE;
803:
804: t_auction_header_id t_auction_header_id_type := t_auction_header_id_type(null);
797: l_item_key_like VARCHAR2(255);
798: l_exact_item_key VARCHAR2(255);
799:
800: TYPE t_auction_header_id_type IS TABLE OF PON_AUCTION_HEADERS_ALL.auction_header_id%TYPE;
801: TYPE t_wf_item_key_type IS TABLE OF PON_AUCTION_HEADERS_ALL.wf_item_key%TYPE;
802: TYPE t_exact_item_key_type is TABLE OF WF_ITEMS.item_key%TYPE;
803:
804: t_auction_header_id t_auction_header_id_type := t_auction_header_id_type(null);
805: t_wf_item_key t_wf_item_key_type := t_wf_item_key_type(null);
823: BULK COLLECT INTO
824: t_auction_header_id,
825: t_wf_item_key
826:
827: FROM pon_auction_headers_all pah
828: WHERE pah.close_bidding_date < SYSDATE
829: AND SYSDATE > pah.open_bidding_date
830: AND Nvl(pah.no_of_notifications_sent, 0) > 0;
831:
882:
883:
884: END LOOP;
885: END IF;
886: --update pon_auction_headers_all
887: --change the value to -1 after purging
888: UPDATE pon_auction_headers_all pah
889: SET pah.no_of_notifications_sent = -1
890: WHERE auction_header_id = t_auction_header_id(i);
884: END LOOP;
885: END IF;
886: --update pon_auction_headers_all
887: --change the value to -1 after purging
888: UPDATE pon_auction_headers_all pah
889: SET pah.no_of_notifications_sent = -1
890: WHERE auction_header_id = t_auction_header_id(i);
891: END LOOP;
892: