46: return;
47: END IF;
48:
49: IF (funcmode = 'RUN') then
50: OE_STANDARD_WF.Set_Msg_Context(actid);
51: l_line_id := to_number(itemkey);
52:
53:
54:
142:
143: --pnpl should not exit if Installment Options is 'ENABLE_PAY_NOW'
144: IF l_exists_prepay = 'N' AND
145: OE_PREPAYMENT_UTIL.Get_Installment_Options <> 'ENABLE_PAY_NOW' THEN
146: OE_STANDARD_WF.Clear_Msg_Context;
147: resultout := 'COMPLETE:NOT_ELIGIBLE';
148: IF l_debug_level > 0 THEN
149: oe_debug_pub.add('OEXWMPMB: there is no prepayment on this order. ', 3 ) ;
150: END IF;
166: oe_debug_pub.add( 'OEXWMPMB, result_out after calling Check_Holds is: '||l_result_out, 3 ) ;
167: END IF;
168:
169: IF ( l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
170: OE_STANDARD_WF.Save_Messages;
171: OE_STANDARD_WF.Clear_Msg_Context;
172: resultout := 'INCOMPLETE';
173: RETURN;
174: ELSIF (l_result_out = FND_API.G_TRUE ) THEN
167: END IF;
168:
169: IF ( l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
170: OE_STANDARD_WF.Save_Messages;
171: OE_STANDARD_WF.Clear_Msg_Context;
172: resultout := 'INCOMPLETE';
173: RETURN;
174: ELSIF (l_result_out = FND_API.G_TRUE ) THEN
175: resultout := 'ON_HOLD';
185: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
186: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN
187: RAISE FND_API.G_EXC_ERROR;
188: END IF;
189: OE_STANDARD_WF.Clear_Msg_Context;
190: RETURN;
191: END IF;
192:
193: IF l_debug_level > 0 THEN
205: , x_msg_data => l_msg_data
206: );
207:
208: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
209: OE_STANDARD_WF.Clear_Msg_Context;
210: return;
211: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
212: -- start data fix project
213: -- OE_STANDARD_WF.Save_Messages;
209: OE_STANDARD_WF.Clear_Msg_Context;
210: return;
211: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
212: -- start data fix project
213: -- OE_STANDARD_WF.Save_Messages;
214: -- OE_STANDARD_WF.Clear_Msg_Context;
215: -- end data fix project
216: app_exception.raise_exception;
217: END IF;
210: return;
211: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
212: -- start data fix project
213: -- OE_STANDARD_WF.Save_Messages;
214: -- OE_STANDARD_WF.Clear_Msg_Context;
215: -- end data fix project
216: app_exception.raise_exception;
217: END IF;
218:
242: -- in the case of an exception.
243: wf_core.context('OE_Payment_Assurance_WF', 'Payment_Assurance_Act',
244: itemtype, itemkey, to_char(actid), funcmode);
245: -- start data fix project
246: OE_STANDARD_WF.Add_Error_Activity_Msg(p_actid => actid,
247: p_itemtype => itemtype,
248: p_itemkey => itemkey);
249: OE_STANDARD_WF.Save_Messages;
250: OE_STANDARD_WF.Clear_Msg_Context;
245: -- start data fix project
246: OE_STANDARD_WF.Add_Error_Activity_Msg(p_actid => actid,
247: p_itemtype => itemtype,
248: p_itemkey => itemkey);
249: OE_STANDARD_WF.Save_Messages;
250: OE_STANDARD_WF.Clear_Msg_Context;
251: -- end data fix project
252: raise;
253: END Start_Payment_Assurance;
246: OE_STANDARD_WF.Add_Error_Activity_Msg(p_actid => actid,
247: p_itemtype => itemtype,
248: p_itemkey => itemkey);
249: OE_STANDARD_WF.Save_Messages;
250: OE_STANDARD_WF.Clear_Msg_Context;
251: -- end data fix project
252: raise;
253: END Start_Payment_Assurance;
254:
278: --
279: -- RUN mode - normal process execution
280: --
281: IF (funcmode = 'RUN') then
282: OE_STANDARD_WF.Set_Msg_Context(actid);
283: l_header_id := to_number(itemkey);
284: OE_PrePayment_PVT.Print_Payment_Receipt(l_header_id,l_result_out,l_return_status);
285: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
286: -- start data fix project
283: l_header_id := to_number(itemkey);
284: OE_PrePayment_PVT.Print_Payment_Receipt(l_header_id,l_result_out,l_return_status);
285: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
286: -- start data fix project
287: -- OE_STANDARD_WF.Save_Messages;
288: -- OE_STANDARD_WF.Clear_Msg_Context;
289: -- end data fix project
290: -- COMMIT;
291: app_exception.raise_exception;
284: OE_PrePayment_PVT.Print_Payment_Receipt(l_header_id,l_result_out,l_return_status);
285: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
286: -- start data fix project
287: -- OE_STANDARD_WF.Save_Messages;
288: -- OE_STANDARD_WF.Clear_Msg_Context;
289: -- end data fix project
290: -- COMMIT;
291: app_exception.raise_exception;
292: ELSE
289: -- end data fix project
290: -- COMMIT;
291: app_exception.raise_exception;
292: ELSE
293: OE_STANDARD_WF.Save_Messages(p_instance_id => actid);
294: END IF;
295:
296: resultout := l_result_out;
297: OE_STANDARD_WF.Clear_Msg_Context;
293: OE_STANDARD_WF.Save_Messages(p_instance_id => actid);
294: END IF;
295:
296: resultout := l_result_out;
297: OE_STANDARD_WF.Clear_Msg_Context;
298: return;
299:
300: END IF; -- End for 'RUN' mode
301:
305: -- The line below records this function call in the error system
306: -- in the case of an exception.
307: wf_core.context('OE_Payment_Assurance_WF', 'Payment_Receipt',
308: itemtype, itemkey, to_char(actid), funcmode);
309: OE_STANDARD_WF.Add_Error_Activity_Msg(p_actid => actid,
310: p_itemtype => itemtype,
311: p_itemkey => itemkey);
312: OE_STANDARD_WF.Save_Messages;
313: OE_STANDARD_WF.Clear_Msg_Context;
308: itemtype, itemkey, to_char(actid), funcmode);
309: OE_STANDARD_WF.Add_Error_Activity_Msg(p_actid => actid,
310: p_itemtype => itemtype,
311: p_itemkey => itemkey);
312: OE_STANDARD_WF.Save_Messages;
313: OE_STANDARD_WF.Clear_Msg_Context;
314: raise;
315: -- end data fix project
316:
309: OE_STANDARD_WF.Add_Error_Activity_Msg(p_actid => actid,
310: p_itemtype => itemtype,
311: p_itemkey => itemkey);
312: OE_STANDARD_WF.Save_Messages;
313: OE_STANDARD_WF.Clear_Msg_Context;
314: raise;
315: -- end data fix project
316:
317: end Payment_Receipt;