32: -- Invoice id of the Invoice that is being validated.
33:
34: -- OUT PARAMETERS
35: -- x_return_status
36: -- FND_API.G_RET_STS_SUCCESS if API succeeds
37: -- FND_API.G_RET_STS_ERROR if API fails
38: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
39: -- x_msg_count
40: -- x_msg_data
33:
34: -- OUT PARAMETERS
35: -- x_return_status
36: -- FND_API.G_RET_STS_SUCCESS if API succeeds
37: -- FND_API.G_RET_STS_ERROR if API fails
38: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
39: -- x_msg_count
40: -- x_msg_data
41: --
34: -- OUT PARAMETERS
35: -- x_return_status
36: -- FND_API.G_RET_STS_SUCCESS if API succeeds
37: -- FND_API.G_RET_STS_ERROR if API fails
38: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
39: -- x_msg_count
40: -- x_msg_data
41: --
42: -- IN OUT PARAMETERS
63:
64: BEGIN
65:
66: -- Check for the API version
67: IF (NOT fnd_api.compatible_api_call(l_api_version,p_api_version,l_api_name,g_pkg_name)) THEN
68: x_return_status := fnd_api.g_ret_sts_unexp_error;
69: END IF;
70:
71: d_progress := '001';
64: BEGIN
65:
66: -- Check for the API version
67: IF (NOT fnd_api.compatible_api_call(l_api_version,p_api_version,l_api_name,g_pkg_name)) THEN
68: x_return_status := fnd_api.g_ret_sts_unexp_error;
69: END IF;
70:
71: d_progress := '001';
72:
74: PO_LOG.stmt(d_module, d_progress, 'API Compatible call success');
75: END IF;
76:
77: -- Initialize API return status to success
78: x_return_status := FND_API.G_RET_STS_SUCCESS;
79:
80: d_progress := '002';
81:
82: SELECT NVL(pay_when_paid, 'N'),
91: END IF;
92:
93: IF l_type_lookup_code <> 'STANDARD'
94: THEN
95: x_return_status := FND_API.G_RET_STS_SUCCESS;
96: x_pay_when_paid := 'N';
97: END IF;
98:
99: EXCEPTION
97: END IF;
98:
99: EXCEPTION
100: WHEN OTHERS THEN
101: x_return_status := fnd_api.g_ret_sts_unexp_error;
102: fnd_msg_pub.count_and_get(p_count => x_msg_count,p_data => x_msg_data);
103: END pay_when_paid;
104:
105:
130: -- Invoice id of the Invoice that is being validated.
131: --
132: -- OUT PARAMETERS
133: -- x_return_status
134: -- FND_API.G_RET_STS_SUCCESS if API succeeds
135: -- FND_API.G_RET_STS_ERROR if API fails
136: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
137: -- x_msg_count
138: -- x_msg_data
131: --
132: -- OUT PARAMETERS
133: -- x_return_status
134: -- FND_API.G_RET_STS_SUCCESS if API succeeds
135: -- FND_API.G_RET_STS_ERROR if API fails
136: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
137: -- x_msg_count
138: -- x_msg_data
139: --
132: -- OUT PARAMETERS
133: -- x_return_status
134: -- FND_API.G_RET_STS_SUCCESS if API succeeds
135: -- FND_API.G_RET_STS_ERROR if API fails
136: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
137: -- x_msg_count
138: -- x_msg_data
139: --
140: -- IN OUT PARAMETERS
165: d_module VARCHAR2(70) := 'po.plsql.PO_INVOICE_HOLD_CHECK.deliverable_overdue_check';
166: BEGIN
167:
168: -- Check for the API version
169: IF (NOT fnd_api.compatible_api_call(l_api_version,p_api_version,l_api_name,g_pkg_name)) THEN
170: x_return_status := fnd_api.g_ret_sts_unexp_error;
171: RETURN;
172: END IF;
173:
166: BEGIN
167:
168: -- Check for the API version
169: IF (NOT fnd_api.compatible_api_call(l_api_version,p_api_version,l_api_name,g_pkg_name)) THEN
170: x_return_status := fnd_api.g_ret_sts_unexp_error;
171: RETURN;
172: END IF;
173:
174: d_progress := '001';
176: PO_LOG.stmt(d_module, d_progress, 'API Compatible call success');
177: END IF;
178:
179: -- Initialize API return status to success
180: x_return_status := FND_API.G_RET_STS_SUCCESS;
181:
182: d_progress := '002';
183:
184: /* Bug 8204164 - The below query was initially checking for the document type = 'STANDARD'.
216:
217:
218: IF l_type_lookup_code <> 'STANDARD'
219: THEN
220: x_return_status := FND_API.G_RET_STS_SUCCESS;
221: X_HOLD_REQUIRED := 'N';
222: END IF;
223:
224: IF (PO_LOG.d_stmt) THEN
249: d_progress := '004';
250: IF (PO_LOG.d_stmt) THEN
251: PO_LOG.stmt(d_module, d_progress, 'After Calling OKC code to find contract deliverable hold info');
252: END IF;
253: IF l_return_status_okc = fnd_api.g_true THEN
254: x_hold_required := 'Y';
255: x_return_status := fnd_api.g_ret_sts_success;
256: ELSIF l_return_status_okc = fnd_api.g_false THEN
257: x_hold_required := 'N';
251: PO_LOG.stmt(d_module, d_progress, 'After Calling OKC code to find contract deliverable hold info');
252: END IF;
253: IF l_return_status_okc = fnd_api.g_true THEN
254: x_hold_required := 'Y';
255: x_return_status := fnd_api.g_ret_sts_success;
256: ELSIF l_return_status_okc = fnd_api.g_false THEN
257: x_hold_required := 'N';
258: x_return_status := fnd_api.g_ret_sts_success;
259: ELSIF l_return_status_okc = fnd_api.g_ret_sts_error THEN
252: END IF;
253: IF l_return_status_okc = fnd_api.g_true THEN
254: x_hold_required := 'Y';
255: x_return_status := fnd_api.g_ret_sts_success;
256: ELSIF l_return_status_okc = fnd_api.g_false THEN
257: x_hold_required := 'N';
258: x_return_status := fnd_api.g_ret_sts_success;
259: ELSIF l_return_status_okc = fnd_api.g_ret_sts_error THEN
260: x_return_status := fnd_api.g_ret_sts_error;
254: x_hold_required := 'Y';
255: x_return_status := fnd_api.g_ret_sts_success;
256: ELSIF l_return_status_okc = fnd_api.g_false THEN
257: x_hold_required := 'N';
258: x_return_status := fnd_api.g_ret_sts_success;
259: ELSIF l_return_status_okc = fnd_api.g_ret_sts_error THEN
260: x_return_status := fnd_api.g_ret_sts_error;
261: ELSE
262: x_return_status := fnd_api.g_ret_sts_unexp_error;
255: x_return_status := fnd_api.g_ret_sts_success;
256: ELSIF l_return_status_okc = fnd_api.g_false THEN
257: x_hold_required := 'N';
258: x_return_status := fnd_api.g_ret_sts_success;
259: ELSIF l_return_status_okc = fnd_api.g_ret_sts_error THEN
260: x_return_status := fnd_api.g_ret_sts_error;
261: ELSE
262: x_return_status := fnd_api.g_ret_sts_unexp_error;
263: END IF;
256: ELSIF l_return_status_okc = fnd_api.g_false THEN
257: x_hold_required := 'N';
258: x_return_status := fnd_api.g_ret_sts_success;
259: ELSIF l_return_status_okc = fnd_api.g_ret_sts_error THEN
260: x_return_status := fnd_api.g_ret_sts_error;
261: ELSE
262: x_return_status := fnd_api.g_ret_sts_unexp_error;
263: END IF;
264: ELSE
258: x_return_status := fnd_api.g_ret_sts_success;
259: ELSIF l_return_status_okc = fnd_api.g_ret_sts_error THEN
260: x_return_status := fnd_api.g_ret_sts_error;
261: ELSE
262: x_return_status := fnd_api.g_ret_sts_unexp_error;
263: END IF;
264: ELSE
265: d_progress := '005';
266: -- No need to call OKC. This PO does not have 'Pay when Paid' or 'Deliverable Hold flag' attribute marked.
271: END IF;
272:
273: EXCEPTION
274: WHEN OTHERS THEN
275: x_return_status := fnd_api.g_ret_sts_unexp_error;
276: fnd_msg_pub.count_and_get(p_count => x_msg_count,p_data => x_msg_data);
277: END deliverable_overdue_check;
278: --------------------------------------------------------------------------------
279: --Start of Comments
298: -- The header id of the Purchase Order.
299:
300: -- OUT PARAMETERS
301: -- x_return_status
302: -- FND_API.G_RET_STS_SUCCESS if API succeeds
303: -- FND_API.G_RET_STS_ERROR if API fails
304: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
305: -- x_msg_count
306: -- x_msg_data
299:
300: -- OUT PARAMETERS
301: -- x_return_status
302: -- FND_API.G_RET_STS_SUCCESS if API succeeds
303: -- FND_API.G_RET_STS_ERROR if API fails
304: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
305: -- x_msg_count
306: -- x_msg_data
307: --
300: -- OUT PARAMETERS
301: -- x_return_status
302: -- FND_API.G_RET_STS_SUCCESS if API succeeds
303: -- FND_API.G_RET_STS_ERROR if API fails
304: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
305: -- x_msg_count
306: -- x_msg_data
307: --
308: -- IN OUT PARAMETERS
327:
328: BEGIN
329:
330: -- Check for the API version
331: IF (NOT fnd_api.compatible_api_call(l_api_version,p_api_version,l_api_name,g_pkg_name)) THEN
332: x_return_status := fnd_api.g_ret_sts_unexp_error;
333: END IF;
334:
335: d_progress := '001';
328: BEGIN
329:
330: -- Check for the API version
331: IF (NOT fnd_api.compatible_api_call(l_api_version,p_api_version,l_api_name,g_pkg_name)) THEN
332: x_return_status := fnd_api.g_ret_sts_unexp_error;
333: END IF;
334:
335: d_progress := '001';
336:
338: PO_LOG.stmt(d_module, d_progress, 'API Compatible call success');
339: END IF;
340:
341: -- Initialize API return status to success
342: x_return_status := FND_API.G_RET_STS_SUCCESS;
343:
344: d_progress := '002';
345:
346: SELECT deliverable_hold_flag
365:
366:
367: EXCEPTION
368: WHEN OTHERS THEN
369: x_return_status := fnd_api.g_ret_sts_unexp_error;
370: fnd_msg_pub.count_and_get(p_count => x_msg_count,p_data => x_msg_data);
371: END DELIVERABLE_HOLD_CONTROL;
372:
373: END po_invoice_hold_check;