126:
127: BEGIN
128: IF pg_debug IN ('Y','C')
129: THEN
130: arp_debug.debug('ar_deferral_reasons_grp.record_acceptance()+');
131: END IF;
132:
133: -- Standard Start of API savepoint
134: SAVEPOINT record_acceptance_grp;
158: /* Parent or target lines */
159: FOR p_line_rec IN parent_lines LOOP
160: IF pg_debug IN ('Y','C')
161: THEN
162: arp_debug.debug('accepting parent line : ' || p_line_rec.customer_trx_line_id);
163: arp_debug.debug(' so_line_id : ' ||
164: p_order_line.interface_line_attribute6);
165: END IF;
166:
159: FOR p_line_rec IN parent_lines LOOP
160: IF pg_debug IN ('Y','C')
161: THEN
162: arp_debug.debug('accepting parent line : ' || p_line_rec.customer_trx_line_id);
163: arp_debug.debug(' so_line_id : ' ||
164: p_order_line.interface_line_attribute6);
165: END IF;
166:
167: /* 5501735 - found the target here, no need to sweep interface
185: IF l_adjustable_amount = 0
186: THEN
187: IF pg_debug IN ('Y','C')
188: THEN
189: arp_debug.debug(' skipping parent adj, amount is zero');
190: arp_debug.debug('ar_deferral_reasons_grp.record_acceptance()-');
191: END IF;
192: GOTO skip_parent_adj;
193: END IF;
186: THEN
187: IF pg_debug IN ('Y','C')
188: THEN
189: arp_debug.debug(' skipping parent adj, amount is zero');
190: arp_debug.debug('ar_deferral_reasons_grp.record_acceptance()-');
191: END IF;
192: GOTO skip_parent_adj;
193: END IF;
194: /* End - 5283886 */
202: /* 5279702 - process child lines as well */
203: FOR c_line_rec IN child_lines(p_line_rec.customer_trx_line_id) LOOP
204: IF pg_debug IN ('Y','C')
205: THEN
206: arp_debug.debug('accepting child line : ' ||
207: c_line_rec.customer_trx_line_id);
208: END IF;
209:
210: /* 5283886 - Prevent calls into revenue adjustment API
224: IF nvl(l_adjustable_amount,0) = 0
225: THEN
226: IF pg_debug IN ('Y','C')
227: THEN
228: arp_debug.debug(' skipping child adj, amount is zero');
229: arp_debug.debug('ar_deferral_reasons_grp.record_acceptance()-');
230: END IF;
231: ELSE
232: /* Do the adjustment as usual */
225: THEN
226: IF pg_debug IN ('Y','C')
227: THEN
228: arp_debug.debug(' skipping child adj, amount is zero');
229: arp_debug.debug('ar_deferral_reasons_grp.record_acceptance()-');
230: END IF;
231: ELSE
232: /* Do the adjustment as usual */
233: ar_revenue_management_pvt.process_event(
263:
264: IF pg_debug IN ('Y','C')
265: THEN
266: l_rows := SQL%ROWCOUNT;
267: arp_debug.debug(' parent interface lines updated : ' || l_rows);
268: END IF;
269: END IF;
270:
271: /* This updates any child lines in interface table */
292:
293: IF pg_debug IN ('Y','C')
294: THEN
295: l_rows := SQL%ROWCOUNT;
296: arp_debug.debug(' child interface lines updated : ' || l_rows);
297: arp_debug.debug('ar_deferral_reasons_grp.record_acceptance()-');
298: END IF;
299:
300: EXCEPTION
293: IF pg_debug IN ('Y','C')
294: THEN
295: l_rows := SQL%ROWCOUNT;
296: arp_debug.debug(' child interface lines updated : ' || l_rows);
297: arp_debug.debug('ar_deferral_reasons_grp.record_acceptance()-');
298: END IF;
299:
300: EXCEPTION
301: WHEN fnd_api.g_exc_error THEN
298: END IF;
299:
300: EXCEPTION
301: WHEN fnd_api.g_exc_error THEN
302: arp_debug.debug('EXCEPTION: fnd_api.g_exc_error');
303: ROLLBACK TO record_acceptance_grp;
304: x_return_status := FND_API.G_RET_STS_ERROR ;
305: fnd_msg_pub.count_and_get (
306: p_encoded => fnd_api.g_false,
307: p_count => x_msg_count,
308: p_data => x_msg_data);
309:
310: WHEN fnd_api.g_exc_unexpected_error THEN
311: arp_debug.debug('EXCEPTION: fnd_api.g_exc_unexpected_error');
312: ROLLBACK TO record_acceptance_grp;
313: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
314: fnd_msg_pub.count_and_get (
315: p_encoded => fnd_api.g_false,
316: p_count => x_msg_count,
317: p_data => x_msg_data);
318:
319: WHEN OTHERS THEN
320: arp_debug.debug('EXCEPTION: Others');
321: ROLLBACK TO record_acceptance_grp;
322: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
323: fnd_msg_pub.count_and_get (
324: p_encoded => fnd_api.g_false,