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:
129: -- Invoice id of the Invoice that is being validated.
130: --
131: -- OUT PARAMETERS
132: -- x_return_status
133: -- FND_API.G_RET_STS_SUCCESS if API succeeds
134: -- FND_API.G_RET_STS_ERROR if API fails
135: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
136: -- x_msg_count
137: -- x_msg_data
130: --
131: -- OUT PARAMETERS
132: -- x_return_status
133: -- FND_API.G_RET_STS_SUCCESS if API succeeds
134: -- FND_API.G_RET_STS_ERROR if API fails
135: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
136: -- x_msg_count
137: -- x_msg_data
138: --
131: -- OUT PARAMETERS
132: -- x_return_status
133: -- FND_API.G_RET_STS_SUCCESS if API succeeds
134: -- FND_API.G_RET_STS_ERROR if API fails
135: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
136: -- x_msg_count
137: -- x_msg_data
138: --
139: -- IN OUT PARAMETERS
163: d_module VARCHAR2(70) := 'po.plsql.PO_INVOICE_HOLD_CHECK.deliverable_overdue_check';
164: BEGIN
165:
166: -- Check for the API version
167: IF (NOT fnd_api.compatible_api_call(l_api_version,p_api_version,l_api_name,g_pkg_name)) THEN
168: x_return_status := fnd_api.g_ret_sts_unexp_error;
169: RETURN;
170: END IF;
171:
164: BEGIN
165:
166: -- Check for the API version
167: IF (NOT fnd_api.compatible_api_call(l_api_version,p_api_version,l_api_name,g_pkg_name)) THEN
168: x_return_status := fnd_api.g_ret_sts_unexp_error;
169: RETURN;
170: END IF;
171:
172: d_progress := '001';
174: PO_LOG.stmt(d_module, d_progress, 'API Compatible call success');
175: END IF;
176:
177: -- Initialize API return status to success
178: x_return_status := FND_API.G_RET_STS_SUCCESS;
179:
180: d_progress := '002';
181:
182: /* Bug 8204164 - The below query was initially checking for the document type = 'STANDARD'.
196:
197:
198: IF l_type_lookup_code <> 'STANDARD'
199: THEN
200: x_return_status := FND_API.G_RET_STS_SUCCESS;
201: X_HOLD_REQUIRED := 'N';
202: END IF;
203:
204: IF (PO_LOG.d_stmt) THEN
225: d_progress := '004';
226: IF (PO_LOG.d_stmt) THEN
227: PO_LOG.stmt(d_module, d_progress, 'After Calling OKC code to find contract deliverable hold info');
228: END IF;
229: IF l_return_status_okc = fnd_api.g_true THEN
230: x_hold_required := 'Y';
231: x_return_status := fnd_api.g_ret_sts_success;
232: ELSIF l_return_status_okc = fnd_api.g_false THEN
233: x_hold_required := 'N';
227: PO_LOG.stmt(d_module, d_progress, 'After Calling OKC code to find contract deliverable hold info');
228: END IF;
229: IF l_return_status_okc = fnd_api.g_true THEN
230: x_hold_required := 'Y';
231: x_return_status := fnd_api.g_ret_sts_success;
232: ELSIF l_return_status_okc = fnd_api.g_false THEN
233: x_hold_required := 'N';
234: x_return_status := fnd_api.g_ret_sts_success;
235: ELSIF l_return_status_okc = fnd_api.g_ret_sts_error THEN
228: END IF;
229: IF l_return_status_okc = fnd_api.g_true THEN
230: x_hold_required := 'Y';
231: x_return_status := fnd_api.g_ret_sts_success;
232: ELSIF l_return_status_okc = fnd_api.g_false THEN
233: x_hold_required := 'N';
234: x_return_status := fnd_api.g_ret_sts_success;
235: ELSIF l_return_status_okc = fnd_api.g_ret_sts_error THEN
236: x_return_status := fnd_api.g_ret_sts_error;
230: x_hold_required := 'Y';
231: x_return_status := fnd_api.g_ret_sts_success;
232: ELSIF l_return_status_okc = fnd_api.g_false THEN
233: x_hold_required := 'N';
234: x_return_status := fnd_api.g_ret_sts_success;
235: ELSIF l_return_status_okc = fnd_api.g_ret_sts_error THEN
236: x_return_status := fnd_api.g_ret_sts_error;
237: ELSE
238: x_return_status := fnd_api.g_ret_sts_unexp_error;
231: x_return_status := fnd_api.g_ret_sts_success;
232: ELSIF l_return_status_okc = fnd_api.g_false THEN
233: x_hold_required := 'N';
234: x_return_status := fnd_api.g_ret_sts_success;
235: ELSIF l_return_status_okc = fnd_api.g_ret_sts_error THEN
236: x_return_status := fnd_api.g_ret_sts_error;
237: ELSE
238: x_return_status := fnd_api.g_ret_sts_unexp_error;
239: END IF;
232: ELSIF l_return_status_okc = fnd_api.g_false THEN
233: x_hold_required := 'N';
234: x_return_status := fnd_api.g_ret_sts_success;
235: ELSIF l_return_status_okc = fnd_api.g_ret_sts_error THEN
236: x_return_status := fnd_api.g_ret_sts_error;
237: ELSE
238: x_return_status := fnd_api.g_ret_sts_unexp_error;
239: END IF;
240: ELSE
234: x_return_status := fnd_api.g_ret_sts_success;
235: ELSIF l_return_status_okc = fnd_api.g_ret_sts_error THEN
236: x_return_status := fnd_api.g_ret_sts_error;
237: ELSE
238: x_return_status := fnd_api.g_ret_sts_unexp_error;
239: END IF;
240: ELSE
241: d_progress := '005';
242: -- No need to call OKC. This PO does not have 'Pay when Paid' term marked.
247: END IF;
248:
249: EXCEPTION
250: WHEN OTHERS THEN
251: x_return_status := fnd_api.g_ret_sts_unexp_error;
252: fnd_msg_pub.count_and_get(p_count => x_msg_count,p_data => x_msg_data);
253: END deliverable_overdue_check;
254: END po_invoice_hold_check;