594: -- bug3668978
595: -- We should pass the current login user to eRecord API rather than
596: -- the buyer because the notification may have been routed to
597: -- somebody else
598: l_user_name := FND_GLOBAL.user_name;
599:
600: l_requester := PO_WF_UTIL_PKG.GetItemAttrText (itemtype => itemtype,
601: itemkey => itemkey,
602: aname => 'SUPPLIER_USER_NAME');
858: INTO l_role
859: FROM FND_USER FU,
860: HZ_PARTIES HP
861: WHERE HP.party_id = FU.customer_id
862: AND FU.user_id = fnd_global.user_id;
863: EXCEPTION
864: WHEN NO_DATA_FOUND THEN
865: l_role := Null;
866: END;
868:
869: -- bug3668978
870: -- employee id should reflect the person who responds to the notification rather
871: -- then the buyer on the document.
872: l_employee_id := FND_GLOBAL.employee_id;
873:
874: /*
875: l_employee_id := PO_WF_UTIL_PKG.GetItemAttrNumber (itemtype => itemtype,
876: itemkey => itemkey,
934: WHEN NO_DATA_FOUND THEN
935: RAISE l_binding_exception;
936: END;
937:
938: l_user_id := FND_GLOBAL.USER_ID;
939:
940: -- Default Promised date with Need-by-Date only when the profile option is set
941: IF( g_default_promise_date = 'Y') THEN
942: IF(l_supplier_response = 'ACCEPTED' AND l_buyer_response = 'ACCEPTED') THEN
948: PO_ACCEPTANCES_INS_PVT.insert_row(
949: x_rowid => l_rowid,
950: x_acceptance_id => l_acceptance_id,
951: p_creation_date => sysdate,
952: p_created_by => fnd_global.user_id,
953: p_po_header_id => l_document_id,
954: p_po_release_id => Null,
955: p_action => l_response_code,
956: p_action_date => l_acceptance_date,-- CONTERMS FPJ
2404:
2405: UPDATE PO_LINE_LOCATIONS_ALL
2406: SET approved_flag = 'Y',
2407: approved_date = sysdate,
2408: last_updated_by = fnd_global.user_id,
2409: last_update_login = fnd_global.login_id,
2410: last_update_date = sysdate
2411: WHERE po_header_id = p_po_header_id
2412: AND NVL(cancel_flag,'N') = 'N'
2405: UPDATE PO_LINE_LOCATIONS_ALL
2406: SET approved_flag = 'Y',
2407: approved_date = sysdate,
2408: last_updated_by = fnd_global.user_id,
2409: last_update_login = fnd_global.login_id,
2410: last_update_date = sysdate
2411: WHERE po_header_id = p_po_header_id
2412: AND NVL(cancel_flag,'N') = 'N'
2413: AND NVL(closed_code,'OPEN') <> 'FINALLY CLOSED'
2445: approved_flag = l_approved_flag,
2446: pending_signature_flag = 'N',
2447: acceptance_required_flag = 'N',
2448: acceptance_due_date = Null,
2449: last_updated_by = FND_GLOBAL.user_id,
2450: last_update_login = FND_GLOBAL.login_id,
2451: last_update_date = sysdate
2452: WHERE po_header_id = p_po_header_id;
2453:
2446: pending_signature_flag = 'N',
2447: acceptance_required_flag = 'N',
2448: acceptance_due_date = Null,
2449: last_updated_by = FND_GLOBAL.user_id,
2450: last_update_login = FND_GLOBAL.login_id,
2451: last_update_date = sysdate
2452: WHERE po_header_id = p_po_header_id;
2453:
2454: -- Insert a record in the PO_ACTION_HISTORY table with the Signature details
3046: WHEN NO_DATA_FOUND THEN
3047: RAISE l_binding_exception;
3048: END;
3049:
3050: l_employee_id := FND_GLOBAL.employee_id; -- bug3738420
3051:
3052: -- If either Supplier or Buyer rejected the document then the PO status
3053: -- should be set to REJECTED from PRE-APPROVED
3054: