1: package body iby_routinginfo_pkg as
2: /*$Header: ibyroutb.pls 115.24 2002/05/17 12:53:32 pkm ship $*/
3:
4: /*-------------------------------------------------------------------+
5: | Function: createRoutingInfo. |
9: i_conditions in t_condtRecVec)
10: is
11: l_count int :=0;
12: l_cntBep int :=0;
13: l_ruleId iby_routinginfo.PAYMENTMETHODID%type;
14: CURSOR c_routingInfo IS
15: SELECT count(1)
16: FROM iby_routinginfo a
17: WHERE
12: l_cntBep int :=0;
13: l_ruleId iby_routinginfo.PAYMENTMETHODID%type;
14: CURSOR c_routingInfo IS
15: SELECT count(1)
16: FROM iby_routinginfo a
17: WHERE
18: i_rules.ruleName=a.paymentmethodName ;
19: BEGIN
20:
44:
45: IF ( l_count = 0 )
46: THEN
47: select IBY_PMTMETHOD_S.NextVal INTO l_ruleId from dual;
48: INSERT INTO iby_routinginfo
49: (payeeid, bepkey, bepid, paymentmethodid, paymentmethodName, instr_type,
50: configured, priority, last_update_date, last_updated_by, creation_date,
51: created_by, last_update_login, hitcounter, object_version_number)
52: VALUES ( i_rules.payeeId, i_rules.merchantAccount, i_rules.bepId, l_ruleId,
85: */
86: procedure modifyRoutingInfo(i_rules in t_rulesRec,
87: i_conditions in t_condtRecVec)
88: is
89: l_ruleId iby_routinginfo.PAYMENTMETHODID%type;
90:
91: CURSOR c_routingInfo IS
92: SELECT *
93: FROM iby_routinginfo a
89: l_ruleId iby_routinginfo.PAYMENTMETHODID%type;
90:
91: CURSOR c_routingInfo IS
92: SELECT *
93: FROM iby_routinginfo a
94: WHERE i_rules.object_version = a.object_version_number AND
95: i_rules.ruleName=a.paymentmethodName AND
96: i_rules.ruleId = a.paymentmethodId
97: FOR UPDATE ;
120: END IF;
121:
122: l_ruleId := i_rules.ruleId;
123: FOR v_routingInfo IN c_routingInfo LOOP
124: UPDATE iby_routinginfo
125: SET payeeid = i_rules.payeeId, bepkey = i_rules.merchantAccount,
126: bepid = i_rules.bepid, configured = i_rules.activeStatus,
127: instr_type = i_rules.bepInstrType, priority = i_rules.priority,
128: last_update_date = sysdate, last_updated_by = fnd_global.user_id,
155: ** Function: deleteRoutingInfo.
156: ** Purpose: deletes the Routing information in the database.
157: */
158: procedure deleteRoutingInfo ( i_paymentmethodId in
159: iby_routinginfo.paymentmethodId%type,
160: i_paymentmethodName in
161: iby_routinginfo.paymentmethodName%type,
162: i_version in
163: iby_routinginfo.object_version_number%type)
157: */
158: procedure deleteRoutingInfo ( i_paymentmethodId in
159: iby_routinginfo.paymentmethodId%type,
160: i_paymentmethodName in
161: iby_routinginfo.paymentmethodName%type,
162: i_version in
163: iby_routinginfo.object_version_number%type)
164: is
165: -- Check whether this method name is already being used
159: iby_routinginfo.paymentmethodId%type,
160: i_paymentmethodName in
161: iby_routinginfo.paymentmethodName%type,
162: i_version in
163: iby_routinginfo.object_version_number%type)
164: is
165: -- Check whether this method name is already being used
166: CURSOR c_routingInfo IS
167: SELECT *
164: is
165: -- Check whether this method name is already being used
166: CURSOR c_routingInfo IS
167: SELECT *
168: FROM iby_routinginfo a
169: WHERE i_version = a.object_version_number AND
170: i_paymentmethodName=a.paymentmethodName AND
171: i_paymentmethodId = a.paymentmethodId
172: FOR UPDATE ;
189: END IF;
190:
191: CLOSE c_routingInfo;
192: FOR v_routingInfo IN c_routingInfo LOOP
193: DELETE FROM iby_routinginfo
194: WHERE CURRENT OF c_routingInfo;
195: END LOOP;
196: IF c_routingInfo%ISOPEN THEN
197: CLOSE c_routingInfo;
227: return false;
228:
229: END isDuplicateCondNames;
230:
231: end iby_routinginfo_pkg;