62: l_dbg_mod VARCHAR2(100) := G_DEBUG_MODULE || '.eval_factor';
63:
64:
65: begin
66: iby_debug_pub.add('Enter',iby_debug_pub.G_LEVEL_PROCEDURE,l_dbg_mod);
67:
68: /*
69: ** Check if payee has any configuration in
70: ** Transaction amount limit table.
120: if (NOT i_ccNumber IS NULL) then
121: l_ccnum_hash := iby_security_pkg.get_hash(i_ccNumber,'F');
122: l_ccnum_obfs := iby_utility_pvt.encode64(i_ccNumber);
123: end if;
124: iby_debug_pub.add('earliest from date:=' || TO_CHAR(l_fromDate),
125: iby_debug_pub.G_LEVEL_INFO,l_dbg_mod);
126:
127:
128: /*
121: l_ccnum_hash := iby_security_pkg.get_hash(i_ccNumber,'F');
122: l_ccnum_obfs := iby_utility_pvt.encode64(i_ccNumber);
123: end if;
124: iby_debug_pub.add('earliest from date:=' || TO_CHAR(l_fromDate),
125: iby_debug_pub.G_LEVEL_INFO,l_dbg_mod);
126:
127:
128: /*
129: ** get the total amount of purhcases made during that
135: FETCH c_get_fop_instrid into l_purchases_counter;
136: CLOSE c_get_fop_instrid;
137:
138: l_purchases_amount := l_purchases_amount + l_purchases_counter;
139: iby_debug_pub.add('matching instrid amount:=' || l_purchases_counter,
140: iby_debug_pub.G_LEVEL_INFO,l_dbg_mod);
141: END IF;
142:
143: IF (NOT i_ccNumber IS NULL) THEN
136: CLOSE c_get_fop_instrid;
137:
138: l_purchases_amount := l_purchases_amount + l_purchases_counter;
139: iby_debug_pub.add('matching instrid amount:=' || l_purchases_counter,
140: iby_debug_pub.G_LEVEL_INFO,l_dbg_mod);
141: END IF;
142:
143: IF (NOT i_ccNumber IS NULL) THEN
144: OPEN c_get_fop_instrnum(i_payeeid,i_ccNumber,l_ccnum_hash,l_fromdate);
145: FETCH c_get_fop_instrnum into l_purchases_counter;
146: CLOSE c_get_fop_instrnum;
147:
148: l_purchases_amount := l_purchases_amount + l_purchases_counter;
149: iby_debug_pub.add('matching instrnum amount:=' || l_purchases_counter,
150: iby_debug_pub.G_LEVEL_INFO,l_dbg_mod);
151: END IF;
152:
153: iby_debug_pub.add('max purchase amount:=' || l_max_amount,
146: CLOSE c_get_fop_instrnum;
147:
148: l_purchases_amount := l_purchases_amount + l_purchases_counter;
149: iby_debug_pub.add('matching instrnum amount:=' || l_purchases_counter,
150: iby_debug_pub.G_LEVEL_INFO,l_dbg_mod);
151: END IF;
152:
153: iby_debug_pub.add('max purchase amount:=' || l_max_amount,
154: iby_debug_pub.G_LEVEL_INFO,l_dbg_mod);
149: iby_debug_pub.add('matching instrnum amount:=' || l_purchases_counter,
150: iby_debug_pub.G_LEVEL_INFO,l_dbg_mod);
151: END IF;
152:
153: iby_debug_pub.add('max purchase amount:=' || l_max_amount,
154: iby_debug_pub.G_LEVEL_INFO,l_dbg_mod);
155:
156: if ( ( i_amount + l_purchases_amount ) >= l_max_amount ) then
157: /*
150: iby_debug_pub.G_LEVEL_INFO,l_dbg_mod);
151: END IF;
152:
153: iby_debug_pub.add('max purchase amount:=' || l_max_amount,
154: iby_debug_pub.G_LEVEL_INFO,l_dbg_mod);
155:
156: if ( ( i_amount + l_purchases_amount ) >= l_max_amount ) then
157: /*
158: ** get the value for high risk and return