[Home] [Help]
31: -- fnd_file.put_line(FND_FILE.LOG, text);
32: arp_debug.debug(text);
33: END;
34:
35: /* Private Procedure - Inserts headers into ZX_TRX_HEADERS_GT
36:
37: 11-MAR-2009 MRAYMOND 8274204 Added document_sub_type,
38: default_taxation_country,
39: tax_invoice_date, and
47: IF PG_DEBUG in ('Y', 'C') THEN
48: debug('arp_etax_autoinv_util.insert_headers()+');
49: END IF;
50:
51: INSERT INTO ZX_TRX_HEADERS_GT
52: (
53: internal_organization_id,
54: internal_org_location_id,
55: legal_entity_id,
171: g_headers_inserted := SQL%ROWCOUNT;
172:
173: /* 6033706 - set document_sub_type and default_taxaction_country */
174: /* also set tax_reporting_flag when necessary */
175: UPDATE ZX_TRX_HEADERS_GT HGT
176: SET (document_sub_type, default_taxation_country,
177: tax_reporting_flag,
178: tax_invoice_date,
179: tax_invoice_number) =
409: FROM
410: RA_CUSTOMER_TRX_LINES TL,
411: RA_CUSTOMER_TRX T,
412: RA_INTERFACE_LINES RIL,
413: ZX_TRX_HEADERS_GT ZTH,
414: HZ_CUST_ACCOUNTS STCA,
415: HZ_CUST_ACCT_SITES STPS,
416: HZ_CUST_SITE_USES STCSU,
417: RA_CUSTOMER_TRX IT,
534: debug('arp_etax_autoinv_util.insert_tax_lines()+');
535: END IF;
536:
537: /* Note that this code does not directly use p_phase
538: However, it does join to ZX_TRX_HEADERS_GT which
539: would implicitly restrict the appearance of
540: INV rows in CM phase. */
541:
542: INSERT INTO ZX_IMPORT_TAX_LINES_GT
588: 'N', -- no rows in zx_trx_tax_link_gt
589: RIL.interface_line_id -- 4698302
590: FROM
591: RA_INTERFACE_LINES RIL, -- tax lines
592: ZX_TRX_HEADERS_GT ZTH
593: WHERE
594: RIL.line_type = 'TAX'
595: AND RIL.request_id = p_request_id
596: AND RIL.customer_trx_id = ZTH.trx_id;
777: g_ebt_gt_populated := FALSE;
778: g_tax_detected := FALSE ; -- Bug6731444 retest for manual tax
779: END IF;
780:
781: /* Insert lines into ZX_TRX_HEADERS_GT */
782: insert_headers(p_request_id, p_phase);
783:
784: /* Insert lines into ZX_TRANSACTION_LINES_GT */
785: insert_lines(p_request_id, p_phase);