1: PACKAGE BODY ARP_ETAX_RECURR_UTIL AS
2: /* $Header: AREBTICB.pls 120.20.12010000.6 2008/12/22 17:50:15 mraymond ship $ */
3:
4: /*=======================================================================+
5: | Package Globals
32: PROCEDURE insert_header(p_customer_trx_id IN NUMBER) IS
33:
34: BEGIN
35: IF PG_DEBUG in ('Y', 'C') THEN
36: debug('arp_etax_recurr_util.insert_header()+');
37: END IF;
38:
39: INSERT INTO ZX_TRX_HEADERS_GT
40: (
150: g_headers_inserted := SQL%ROWCOUNT;
151:
152: IF PG_DEBUG in ('Y', 'C') THEN
153: debug(' headers inserted : ' || g_headers_inserted);
154: debug('arp_etax_recurr_util.insert_header()-');
155: END IF;
156:
157: EXCEPTION
158: WHEN NO_DATA_FOUND
156:
157: EXCEPTION
158: WHEN NO_DATA_FOUND
159: THEN
160: debug('arp_etax_recurr_util.insert_header()- No transaction headers to process.');
161: RETURN;
162: WHEN OTHERS
163: THEN
164: debug('EXCEPTION: ARP_ETAX_RECURR_UTIL.insert_header()-');
160: debug('arp_etax_recurr_util.insert_header()- No transaction headers to process.');
161: RETURN;
162: WHEN OTHERS
163: THEN
164: debug('EXCEPTION: ARP_ETAX_RECURR_UTIL.insert_header()-');
165: RAISE;
166:
167: END insert_header;
168:
189: l_so_org_id VARCHAR2(20);
190: l_lines_updated NUMBER;
191: BEGIN
192: IF PG_DEBUG in ('Y', 'C') THEN
193: debug('arp_etax_recurr_util.insert_line()+');
194: END IF;
195:
196: l_so_org_id := oe_profile.value('SO_ORGANIZATION_ID',
197: arp_global.sysparam.org_id);
387:
388: IF PG_DEBUG in ('Y', 'C') THEN
389: l_lines_updated := SQL%ROWCOUNT;
390: debug('lines update (poo columns) = ' || l_lines_updated);
391: debug('arp_etax_recurr_util.insert_line()-');
392: END IF;
393:
394:
395: EXCEPTION
394:
395: EXCEPTION
396: WHEN OTHERS
397: THEN
398: debug('EXCEPTION: ARP_ETAX_RECURR_UTIL.insert_line()- ' ||
399: SQLERRM);
400: RAISE;
401: END insert_line;
402:
425: p_new_line_id IN NUMBER,
426: p_request_id IN NUMBER) IS
427: BEGIN
428: IF PG_DEBUG in ('Y', 'C') THEN
429: debug('arp_etax_recurr_util.insert_tax_lines()+');
430: END IF;
431:
432: /* NOTE: We are passing the line_id of the original tax line
433: into this table. That means that we can get that same line
497:
498: g_tax_lines_inserted := SQL%ROWCOUNT;
499:
500: IF PG_DEBUG in ('Y', 'C') THEN
501: debug('arp_etax_recurr_util.insert_tax_lines()-');
502: END IF;
503:
504: EXCEPTION
505: WHEN OTHERS
503:
504: EXCEPTION
505: WHEN OTHERS
506: THEN
507: debug('EXCEPTION: ARP_ETAX_RECURR_UTIL.insert_tax_lines()-');
508: RAISE;
509:
510: END insert_tax_lines;
511:
518: l_rows NUMBER;
519:
520: BEGIN
521: IF PG_DEBUG in ('Y', 'C') THEN
522: debug('arp_etax_recurr_util.build_ar_tax_lines()+');
523: END IF;
524:
525: /* Dev Notes:
526:
604: arp_etax_util.set_recoverable(null, p_request_id, 'INV');
605:
606: IF PG_DEBUG in ('Y', 'C') THEN
607: debug(' Number of tax lines retrieved = ' || l_rows);
608: debug('arp_etax_recurr_util.build_ar_tax_lines()-');
609: END IF;
610: END build_ar_tax_lines;
611:
612: /* Procedure to extract error/validation messages from ZX
621:
622: BEGIN
623:
624: IF PG_DEBUG in ('Y', 'C') THEN
625: debug('arp_etax_recurr_util.retrieve_tax_validation_errors()+');
626: END IF;
627:
628: /* Dev Notes:
629:
647: p_error_count := l_errors;
648:
649: IF PG_DEBUG in ('Y', 'C') THEN
650: debug('Validation errors: ' || l_errors);
651: debug('arp_etax_recurr_util.retrieve_tax_validation_errors()-');
652: END IF;
653:
654: END retrieve_tax_validation_errors;
655:
717: l_return_status NUMBER := 0;
718: BEGIN
719: IF PG_DEBUG in ('Y', 'C')
720: THEN
721: debug('arp_etax_recurr_util.calculate_tax()+');
722: debug('request_id = ' || p_request_id);
723: END IF;
724:
725: /* Call validate_and_default_tax_attr */
741: /* 4904679 - removed detect_missing_tax_lines */
742:
743: IF PG_DEBUG in ('Y', 'C')
744: THEN
745: debug('arp_etax_recurr_util.calculate_tax()-');
746: END IF;
747: END calculate_tax;
748:
749:
769: NULL;
770:
771: EXCEPTION
772: WHEN OTHERS THEN
773: debug('EXCEPTION: ARP_ETAX_RECURR_UTIL.INITIALIZE()');
774: RAISE;
775:
776: END ARP_ETAX_RECURR_UTIL;
772: WHEN OTHERS THEN
773: debug('EXCEPTION: ARP_ETAX_RECURR_UTIL.INITIALIZE()');
774: RAISE;
775:
776: END ARP_ETAX_RECURR_UTIL;