302:
303: BEGIN
304: IF PG_DEBUG in ('Y','C')
305: THEN
306: arp_debug.debug('arp_etax_services_pkg.record_tax_accounts()+');
307: END IF;
308:
309: OPEN tax_line_and_dist(P_CUSTOMER_TRX_ID);
310: FETCH tax_line_and_dist BULK COLLECT INTO
326: CLOSE tax_line_and_dist;
327:
328: IF PG_DEBUG in ('Y','C')
329: THEN
330: arp_debug.debug(' distribution(s) recorded = ' || l_rows);
331: arp_debug.debug('arp_etax_services_pkg.record_tax_accounts()-');
332: END IF;
333: END record_tax_accounts;
334:
327:
328: IF PG_DEBUG in ('Y','C')
329: THEN
330: arp_debug.debug(' distribution(s) recorded = ' || l_rows);
331: arp_debug.debug('arp_etax_services_pkg.record_tax_accounts()-');
332: END IF;
333: END record_tax_accounts;
334:
335: /* Uses tax account tables to bulk update ra_cust_trx_line_gl_dist with
340: l_rows NUMBER := 0;
341: BEGIN
342: IF PG_DEBUG in ('Y','C')
343: THEN
344: arp_debug.debug('arp_etax_services_pkg.replace_tax_accounts()+');
345:
346: /* Debug Code - start +/
347: -- this code dumps the cached accounting lines so we can
348: -- see what is happening during the caching process.
348: -- see what is happening during the caching process.
349: IF t_customer_trx_id.EXISTS(1)
350: THEN
351: FOR acc in t_customer_trx_id.FIRST .. t_customer_trx_id.LAST LOOP
352: arp_debug.debug(acc || ':' ||
353: t_customer_trx_id(acc) || '~' ||
354: t_customer_trx_line_id(acc) || '~' ||
355: t_cust_trx_line_salesrep_id(acc) || '~' ||
356: t_tax_regime_code(acc) || '~' ||
402:
403:
404: IF PG_DEBUG in ('Y','C')
405: THEN
406: arp_debug.debug(' distribution(s) updated = ' || l_rows);
407: arp_debug.debug('arp_etax_services_pkg.replace_tax_accounts()-');
408: END IF;
409:
410: EXCEPTION
403:
404: IF PG_DEBUG in ('Y','C')
405: THEN
406: arp_debug.debug(' distribution(s) updated = ' || l_rows);
407: arp_debug.debug('arp_etax_services_pkg.replace_tax_accounts()-');
408: END IF;
409:
410: EXCEPTION
411: WHEN NO_DATA_FOUND THEN
409:
410: EXCEPTION
411: WHEN NO_DATA_FOUND THEN
412: IF PG_DEBUG = 'Y' THEN
413: arp_debug.debug( 'no rows in tax account tables');
414: END IF;
415:
416: END replace_tax_accounts;
417:
2903:
2904: BEGIN
2905: IF PG_DEBUG in ('Y', 'C')
2906: THEN
2907: arp_debug.debug('arp_etax_services_pkg.validate_for_tax()+');
2908: END IF;
2909:
2910: /* Set l_trx_rec values before call to API */
2911: select t.customer_trx_id,
2949: THEN
2950: /* Retrieve and log errors */
2951: IF l_msg_count = 1
2952: THEN
2953: arp_debug.debug(l_msg_data);
2954: ELSIF l_msg_count > 1
2955: THEN
2956: LOOP
2957: l_msg := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,
2959: IF l_msg IS NULL
2960: THEN
2961: EXIT;
2962: ELSE
2963: arp_debug.debug(l_msg);
2964: END IF;
2965: END LOOP;
2966: END IF;
2967:
2971: THEN
2972: /* Do nothing, there was no problems with the validation */
2973: IF PG_DEBUG in ('Y','C')
2974: THEN
2975: arp_debug.debug(' transaction is valid');
2976: END IF;
2977:
2978: l_error_count := 0;
2979: ELSE
2981: much back to arp_trx_completion_chk so completion
2982: is not allowed */
2983: IF PG_DEBUG in ('Y','C')
2984: THEN
2985: arp_debug.debug(' transaction is invalid');
2986: END IF;
2987:
2988: FOR errors IN c_errors LOOP
2989:
2986: END IF;
2987:
2988: FOR errors IN c_errors LOOP
2989:
2990: arp_debug.debug(errors.trx_id || '-' || errors.message_text);
2991:
2992: arp_trx_validate.add_to_error_list(
2993: p_error_mode,
2994: l_error_count,
3014: END IF;
3015:
3016: IF PG_DEBUG in ('Y', 'C')
3017: THEN
3018: arp_debug.debug(' validation_status = ' || l_validation_status);
3019: arp_debug.debug('arp_etax_services_pkg.validate_for_tax()-');
3020: END IF;
3021:
3022: END validate_for_tax;
3015:
3016: IF PG_DEBUG in ('Y', 'C')
3017: THEN
3018: arp_debug.debug(' validation_status = ' || l_validation_status);
3019: arp_debug.debug('arp_etax_services_pkg.validate_for_tax()-');
3020: END IF;
3021:
3022: END validate_for_tax;
3023: