DBA Data[Home] [Help]

APPS.AP_ETAX_SERVICES_PKG dependencies on ZX_TRX_HEADERS_GT

Line 181: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;

177: l_debug_info VARCHAR2(240);
178: l_curr_calling_sequence VARCHAR2(4000);
179:
180: l_inv_header_rec ap_invoices_all%ROWTYPE;
181: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
182: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
183:
184: l_tax_already_calculated VARCHAR2(1);
185:

Line 182: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;

178: l_curr_calling_sequence VARCHAR2(4000);
179:
180: l_inv_header_rec ap_invoices_all%ROWTYPE;
181: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
182: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
183:
184: l_tax_already_calculated VARCHAR2(1);
185:
186: l_return_status_service VARCHAR2(4000);

Line 231: FROM zx_trx_headers_gt

227: l_validation_request_id ap_invoices_all.validation_request_id%TYPE;
228:
229: CURSOR c_selected_invoices IS
230: SELECT trx_id, event_class_code
231: FROM zx_trx_headers_gt
232: WHERE application_id = ap_etax_pkg.ap_application_id
233: AND entity_code = ap_etax_pkg.ap_entity_code
234: AND event_class_code IN (ap_etax_pkg.ap_inv_event_class_code,
235: ap_etax_pkg.ap_pp_event_class_code,

Line 271: FROM zx_trx_headers_gt

267: l_count := 0;
268: UPDATE ap_invoice_lines_all ail
269: SET tax_already_calculated_flag = NULL
270: WHERE ail.invoice_id IN (SELECT DISTINCT(trx_id)
271: FROM zx_trx_headers_gt
272: WHERE application_id = 200
273: AND entity_code = 'AP_INVOICES')
274: AND NVL(ail.tax_already_calculated_flag, 'N') = 'Y'
275: AND NOT EXISTS

Line 300: DELETE FROM ZX_TRX_HEADERS_GT;

296: --Bug 6922266 End
297:
298: ELSE
299:
300: DELETE FROM ZX_TRX_HEADERS_GT;
301:
302: -----------------------------------------------------------------
303: l_debug_info := 'Populating invoice header local record';
304: Print(l_api_name,l_debug_info);

Line 664: DELETE FROM zx_trx_headers_gt

660: -----------------------------------------------------------------
661: l_debug_info := 'No invoice lines to be processed for Invoice Id '||l_inv_header_rec.invoice_id;
662: Print(l_api_name,l_debug_info);
663: -----------------------------------------------------------------
664: DELETE FROM zx_trx_headers_gt
665: WHERE application_id = AP_ETAX_PKG.AP_APPLICATION_ID
666: AND entity_code = AP_ETAX_PKG.AP_ENTITY_CODE
667: AND event_class_code IN
668: (AP_ETAX_PKG.AP_INV_EVENT_CLASS_CODE,

Line 878: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;

874: FROM ap_invoice_lines_all
875: WHERE invoice_id = c_invoice_id
876: AND line_type_lookup_code NOT IN ('TAX', 'AWT');
877:
878: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
879: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
880:
881: l_api_name CONSTANT VARCHAR2(100) := 'Calculate_Import';
882:

Line 879: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;

875: WHERE invoice_id = c_invoice_id
876: AND line_type_lookup_code NOT IN ('TAX', 'AWT');
877:
878: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
879: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
880:
881: l_api_name CONSTANT VARCHAR2(100) := 'Calculate_Import';
882:
883: BEGIN

Line 903: UPDATE zx_trx_headers_gt

899: -----------------------------------------------------------------
900: l_debug_info := 'Step 2: Update trx_id in header';
901: Print(l_api_name, l_debug_info);
902: -----------------------------------------------------------------
903: UPDATE zx_trx_headers_gt
904: SET trx_id = P_Invoice_Id
905: WHERE application_id = AP_ETAX_PKG.AP_APPLICATION_ID
906: AND entity_code = AP_ETAX_PKG.AP_ENTITY_CODE
907: AND event_class_code IN (AP_ETAX_PKG.AP_INV_EVENT_CLASS_CODE,

Line 926: -- zx_trx_headers_gt and zx_transaction_lines_gt for validation of

922: AND ail.line_type_lookup_code NOT IN ('TAX', 'AWT')
923: AND NVL(ail.tax_already_calculated_flag, 'N') = 'Y';
924:
925: -- 1. validate_default_import is called during import. This populates
926: -- zx_trx_headers_gt and zx_transaction_lines_gt for validation of
927: -- the taxable lines.
928: -- 2. During import of invoices matched to complex work purchase orders,
929: -- matching will recoup prepayments and calculate tax on it. This
930: -- would have purged zx_trx_headers_gt and zx_transaction_lines_gt.

Line 930: -- would have purged zx_trx_headers_gt and zx_transaction_lines_gt.

926: -- zx_trx_headers_gt and zx_transaction_lines_gt for validation of
927: -- the taxable lines.
928: -- 2. During import of invoices matched to complex work purchase orders,
929: -- matching will recoup prepayments and calculate tax on it. This
930: -- would have purged zx_trx_headers_gt and zx_transaction_lines_gt.
931: -- 3. In this case, the staging table will need to repopulated.
932: -- Parameter P_eTax_Already_called_flag must be passed as 'Y'
933: -- to ensure document level event type is passed to eTax
934: -- as 'STANDARD UPDATED'.

Line 1157: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;

1153: l_curr_calling_sequence VARCHAR2(4000);
1154: l_api_name CONSTANT VARCHAR2(100) := 'Distribute';
1155:
1156: l_inv_header_rec ap_invoices_all%ROWTYPE;
1157: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
1158: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
1159:
1160: l_return_status_service VARCHAR2(4000);
1161: l_msg_count NUMBER;

Line 1158: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;

1154: l_api_name CONSTANT VARCHAR2(100) := 'Distribute';
1155:
1156: l_inv_header_rec ap_invoices_all%ROWTYPE;
1157: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
1158: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
1159:
1160: l_return_status_service VARCHAR2(4000);
1161: l_msg_count NUMBER;
1162: l_msg_data VARCHAR2(4000);

Line 1249: FROM zx_trx_headers_gt

1245:
1246:
1247: CURSOR c_selected_invoices IS
1248: SELECT trx_id, event_class_code
1249: FROM zx_trx_headers_gt
1250: WHERE application_id = ap_etax_pkg.ap_application_id
1251: AND entity_code = ap_etax_pkg.ap_entity_code
1252: AND event_class_code IN (ap_etax_pkg.ap_inv_event_class_code,
1253: ap_etax_pkg.ap_pp_event_class_code,

Line 1287: DELETE FROM ZX_TRX_HEADERS_GT;

1283: P_calling_sequence;
1284:
1285: IF ap_approval_pkg.g_validation_request_id IS NULL THEN
1286:
1287: DELETE FROM ZX_TRX_HEADERS_GT;
1288:
1289: -----------------------------------------------------------------
1290: l_debug_info := 'Populate invoice header local record';
1291: Print(l_api_name,l_debug_info);

Line 1722: zx_trx_headers_gt.event_class_code%TYPE;

1718:
1719: l_debug_info VARCHAR2(240);
1720: l_curr_calling_sequence VARCHAR2(4000);
1721: l_event_class_code
1722: zx_trx_headers_gt.event_class_code%TYPE;
1723: l_event_type_code
1724: zx_trx_headers_gt.event_type_code%TYPE;
1725:
1726: l_return_status_service VARCHAR2(4000);

Line 1724: zx_trx_headers_gt.event_type_code%TYPE;

1720: l_curr_calling_sequence VARCHAR2(4000);
1721: l_event_class_code
1722: zx_trx_headers_gt.event_class_code%TYPE;
1723: l_event_type_code
1724: zx_trx_headers_gt.event_type_code%TYPE;
1725:
1726: l_return_status_service VARCHAR2(4000);
1727: l_msg_count NUMBER;
1728: l_msg_data VARCHAR2(4000);

Line 1873: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;

1869: l_msg_count NUMBER;
1870: l_msg_data VARCHAR2(4000);
1871: l_msg VARCHAR2(4000);
1872:
1873: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
1874: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
1875:
1876: l_return_status BOOLEAN := TRUE;
1877: l_inv_header_rec ap_invoices_all%ROWTYPE;

Line 1874: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;

1870: l_msg_data VARCHAR2(4000);
1871: l_msg VARCHAR2(4000);
1872:
1873: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
1874: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
1875:
1876: l_return_status BOOLEAN := TRUE;
1877: l_inv_header_rec ap_invoices_all%ROWTYPE;
1878:

Line 1901: UPDATE zx_trx_headers_gt

1897: -----------------------------------------------------------------
1898: l_debug_info := 'Step 2: Update Header';
1899: -----------------------------------------------------------------
1900: BEGIN
1901: UPDATE zx_trx_headers_gt
1902: SET trx_id = P_Invoice_Id
1903: WHERE application_id = AP_ETAX_PKG.AP_APPLICATION_ID
1904: AND entity_code = AP_ETAX_PKG.AP_ENTITY_CODE
1905: AND event_class_code IN (AP_ETAX_PKG.AP_INV_EVENT_CLASS_CODE,

Line 2082: l_event_class_code_crediting zx_trx_headers_gt.event_class_code%TYPE;

2078:
2079: l_inv_header_rec ap_invoices_all%ROWTYPE;
2080: l_credited_inv_rec ap_invoices_all%ROWTYPE;
2081:
2082: l_event_class_code_crediting zx_trx_headers_gt.event_class_code%TYPE;
2083: l_event_class_code_credited zx_trx_headers_gt.event_class_code%TYPE;
2084:
2085: l_tax_already_distributed VARCHAR2(1);
2086: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;

Line 2083: l_event_class_code_credited zx_trx_headers_gt.event_class_code%TYPE;

2079: l_inv_header_rec ap_invoices_all%ROWTYPE;
2080: l_credited_inv_rec ap_invoices_all%ROWTYPE;
2081:
2082: l_event_class_code_crediting zx_trx_headers_gt.event_class_code%TYPE;
2083: l_event_class_code_credited zx_trx_headers_gt.event_class_code%TYPE;
2084:
2085: l_tax_already_distributed VARCHAR2(1);
2086: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
2087: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;

Line 2086: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;

2082: l_event_class_code_crediting zx_trx_headers_gt.event_class_code%TYPE;
2083: l_event_class_code_credited zx_trx_headers_gt.event_class_code%TYPE;
2084:
2085: l_tax_already_distributed VARCHAR2(1);
2086: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
2087: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
2088:
2089: CURSOR Crediting_Inv_Header IS
2090: SELECT *

Line 2087: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;

2083: l_event_class_code_credited zx_trx_headers_gt.event_class_code%TYPE;
2084:
2085: l_tax_already_distributed VARCHAR2(1);
2086: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
2087: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
2088:
2089: CURSOR Crediting_Inv_Header IS
2090: SELECT *
2091: FROM ap_invoices_all

Line 2335: -- Tax distributions insert works off of zx_trx_headers_gt. Since

2331: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name,l_debug_info);
2332: END IF;
2333: -----------------------------------------------------------------
2334:
2335: -- Tax distributions insert works off of zx_trx_headers_gt. Since
2336: -- reverse_document_distribution does not require this table to be
2337: -- populated, we are using this as a proxy to avoid maintaining two
2338: -- code lines.
2339: -------------------------------------------------------------------

Line 2467: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;

2463: l_debug_info VARCHAR2(240);
2464: l_curr_calling_sequence VARCHAR2(4000);
2465:
2466: l_inv_header_rec ap_invoices_all%ROWTYPE;
2467: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
2468: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
2469: l_transaction_rec zx_api_pub.transaction_rec_type;
2470:
2471: CURSOR Invoice_Header IS

Line 2468: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;

2464: l_curr_calling_sequence VARCHAR2(4000);
2465:
2466: l_inv_header_rec ap_invoices_all%ROWTYPE;
2467: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
2468: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
2469: l_transaction_rec zx_api_pub.transaction_rec_type;
2470:
2471: CURSOR Invoice_Header IS
2472: SELECT *

Line 2905: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;

2901: l_debug_info VARCHAR2(240);
2902: l_curr_calling_sequence VARCHAR2(4000);
2903:
2904: l_inv_header_rec ap_invoices_all%ROWTYPE;
2905: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
2906: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
2907:
2908: CURSOR Invoice_Header IS
2909: SELECT *

Line 2906: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;

2902: l_curr_calling_sequence VARCHAR2(4000);
2903:
2904: l_inv_header_rec ap_invoices_all%ROWTYPE;
2905: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
2906: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
2907:
2908: CURSOR Invoice_Header IS
2909: SELECT *
2910: FROM ap_invoices_all

Line 3135: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;

3131: l_debug_info VARCHAR2(240);
3132: l_curr_calling_sequence VARCHAR2(4000);
3133: l_transaction_rec zx_api_pub.transaction_rec_type;
3134:
3135: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
3136:
3137: CURSOR itm_Dist IS
3138: SELECT encumbered_flag,
3139: reversal_flag,

Line 3503: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;

3499: l_debug_info VARCHAR2(240);
3500: l_curr_calling_sequence VARCHAR2(4000);
3501: l_transaction_rec zx_api_pub.transaction_rec_type;
3502:
3503: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
3504:
3505: CURSOR Tax_Dist IS
3506: (SELECT encumbered_flag,
3507: reversal_flag,

Line 3938: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;

3934: l_debug_info VARCHAR2(240);
3935: l_curr_calling_sequence VARCHAR2(4000);
3936:
3937: l_inv_header_rec ap_invoices_all%ROWTYPE;
3938: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
3939: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
3940:
3941: CURSOR Invoice_Header IS
3942: SELECT *

Line 3939: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;

3935: l_curr_calling_sequence VARCHAR2(4000);
3936:
3937: l_inv_header_rec ap_invoices_all%ROWTYPE;
3938: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
3939: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
3940:
3941: CURSOR Invoice_Header IS
3942: SELECT *
3943: FROM ap_invoices_all

Line 4291: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;

4287: l_debug_info VARCHAR2(240);
4288: l_curr_calling_sequence VARCHAR2(4000);
4289:
4290: l_inv_header_rec ap_invoices_all%ROWTYPE;
4291: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
4292: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
4293:
4294: CURSOR Invoice_Header IS
4295: SELECT *

Line 4292: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;

4288: l_curr_calling_sequence VARCHAR2(4000);
4289:
4290: l_inv_header_rec ap_invoices_all%ROWTYPE;
4291: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
4292: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
4293:
4294: CURSOR Invoice_Header IS
4295: SELECT *
4296: FROM ap_invoices_all

Line 4489: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;

4485: l_debug_info VARCHAR2(240);
4486: l_curr_calling_sequence VARCHAR2(4000);
4487:
4488: l_inv_header_rec ap_invoices_all%ROWTYPE;
4489: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
4490: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
4491:
4492: CURSOR Invoice_Header IS
4493: SELECT *

Line 4490: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;

4486: l_curr_calling_sequence VARCHAR2(4000);
4487:
4488: l_inv_header_rec ap_invoices_all%ROWTYPE;
4489: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
4490: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
4491:
4492: CURSOR Invoice_Header IS
4493: SELECT *
4494: FROM ap_invoices_all

Line 4656: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;

4652: l_debug_info VARCHAR2(240);
4653: l_curr_calling_sequence VARCHAR2(4000);
4654:
4655: l_inv_header_rec ap_invoices_all%ROWTYPE;
4656: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
4657: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
4658:
4659: CURSOR Invoice_Header IS
4660: SELECT *

Line 4657: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;

4653: l_curr_calling_sequence VARCHAR2(4000);
4654:
4655: l_inv_header_rec ap_invoices_all%ROWTYPE;
4656: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
4657: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
4658:
4659: CURSOR Invoice_Header IS
4660: SELECT *
4661: FROM ap_invoices_all

Line 4961: zx_trx_headers_gt.event_class_code%TYPE;

4957: l_debug_info VARCHAR2(240);
4958: l_curr_calling_sequence VARCHAR2(4000);
4959:
4960: l_event_class_code
4961: zx_trx_headers_gt.event_class_code%TYPE;
4962: l_event_type_code
4963: zx_trx_headers_gt.event_type_code%TYPE;
4964:
4965: l_return_status_service VARCHAR2(4000);

Line 4963: zx_trx_headers_gt.event_type_code%TYPE;

4959:
4960: l_event_class_code
4961: zx_trx_headers_gt.event_class_code%TYPE;
4962: l_event_type_code
4963: zx_trx_headers_gt.event_type_code%TYPE;
4964:
4965: l_return_status_service VARCHAR2(4000);
4966: l_msg_count NUMBER;
4967: l_msg_data VARCHAR2(4000);

Line 5091: | zx_trx_headers_gt

5087: | FUNCTION - Populate_Headers_GT()
5088: |
5089: | DESCRIPTION
5090: | This function will get additional information required to populate the
5091: | zx_trx_headers_gt
5092: | This function returns TRUE if the insert to the temp table goes
5093: | through successfully. Otherwise, FALSE.
5094: |
5095: | PARAMETERS

Line 5124: l_application_id zx_trx_headers_gt.application_id%TYPE;

5120:
5121: l_debug_info VARCHAR2(240);
5122: l_curr_calling_sequence VARCHAR2(4000);
5123:
5124: l_application_id zx_trx_headers_gt.application_id%TYPE;
5125: l_entity_code zx_trx_headers_gt.entity_code%TYPE;
5126:
5127: l_quote_flag zx_trx_headers_gt.quote_flag%TYPE := 'N';
5128: -- This flag is always N except when the calculate service is called for

Line 5125: l_entity_code zx_trx_headers_gt.entity_code%TYPE;

5121: l_debug_info VARCHAR2(240);
5122: l_curr_calling_sequence VARCHAR2(4000);
5123:
5124: l_application_id zx_trx_headers_gt.application_id%TYPE;
5125: l_entity_code zx_trx_headers_gt.entity_code%TYPE;
5126:
5127: l_quote_flag zx_trx_headers_gt.quote_flag%TYPE := 'N';
5128: -- This flag is always N except when the calculate service is called for
5129: -- quote for the recurring invoices and distributions sets.

Line 5127: l_quote_flag zx_trx_headers_gt.quote_flag%TYPE := 'N';

5123:
5124: l_application_id zx_trx_headers_gt.application_id%TYPE;
5125: l_entity_code zx_trx_headers_gt.entity_code%TYPE;
5126:
5127: l_quote_flag zx_trx_headers_gt.quote_flag%TYPE := 'N';
5128: -- This flag is always N except when the calculate service is called for
5129: -- quote for the recurring invoices and distributions sets.
5130:
5131: CURSOR tax_related_invoice( c_tax_related_invoice_id IN NUMBER) IS

Line 5138: zx_trx_headers_gt.related_doc_application_id%TYPE;

5134: FROM ap_invoices_all
5135: WHERE invoice_id = c_tax_related_invoice_id;
5136:
5137: l_related_inv_application_id
5138: zx_trx_headers_gt.related_doc_application_id%TYPE;
5139: l_related_inv_entity_code
5140: zx_trx_headers_gt.related_doc_entity_code%TYPE;
5141: l_related_event_class_code
5142: zx_trx_headers_gt.related_doc_event_class_code%TYPE;

Line 5140: zx_trx_headers_gt.related_doc_entity_code%TYPE;

5136:
5137: l_related_inv_application_id
5138: zx_trx_headers_gt.related_doc_application_id%TYPE;
5139: l_related_inv_entity_code
5140: zx_trx_headers_gt.related_doc_entity_code%TYPE;
5141: l_related_event_class_code
5142: zx_trx_headers_gt.related_doc_event_class_code%TYPE;
5143: l_related_inv_number ap_invoices_all.invoice_num%TYPE;
5144: l_related_inv_date ap_invoices_all.invoice_date%TYPE;

Line 5142: zx_trx_headers_gt.related_doc_event_class_code%TYPE;

5138: zx_trx_headers_gt.related_doc_application_id%TYPE;
5139: l_related_inv_entity_code
5140: zx_trx_headers_gt.related_doc_entity_code%TYPE;
5141: l_related_event_class_code
5142: zx_trx_headers_gt.related_doc_event_class_code%TYPE;
5143: l_related_inv_number ap_invoices_all.invoice_num%TYPE;
5144: l_related_inv_date ap_invoices_all.invoice_date%TYPE;
5145: l_related_inv_type ap_invoices_all.invoice_type_lookup_code%TYPE;
5146:

Line 5267: l_debug_info := 'Step 9: Populate zx_trx_headers_gt';

5263: END;
5264: END IF;
5265:
5266: -------------------------------------------------------------------
5267: l_debug_info := 'Step 9: Populate zx_trx_headers_gt';
5268: -------------------------------------------------------------------
5269: IF (l_return_status = TRUE) THEN
5270:
5271: DELETE FROM zx_trx_headers_gt

Line 5271: DELETE FROM zx_trx_headers_gt

5267: l_debug_info := 'Step 9: Populate zx_trx_headers_gt';
5268: -------------------------------------------------------------------
5269: IF (l_return_status = TRUE) THEN
5270:
5271: DELETE FROM zx_trx_headers_gt
5272: WHERE application_id = AP_ETAX_PKG.AP_APPLICATION_ID
5273: AND entity_code = AP_ETAX_PKG.AP_ENTITY_CODE
5274: AND event_class_code IN (AP_ETAX_PKG.AP_INV_EVENT_CLASS_CODE,
5275: AP_ETAX_PKG.AP_PP_EVENT_CLASS_CODE,

Line 5279: INSERT INTO zx_trx_headers_gt(

5275: AP_ETAX_PKG.AP_PP_EVENT_CLASS_CODE,
5276: AP_ETAX_PKG.AP_ER_EVENT_CLASS_CODE)
5277: AND trx_id = p_invoice_header_rec.invoice_id;
5278:
5279: INSERT INTO zx_trx_headers_gt(
5280: internal_organization_id,
5281: internal_org_location_id,
5282: application_id,
5283: entity_code,

Line 5451: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'zx_trx_headers_gt values ');

5447: g_invoices_to_process := sql%rowcount;
5448:
5449: -- Added log messages for bug 6321366
5450: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
5451: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'zx_trx_headers_gt values ');
5452: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Application_id: '|| l_application_id);
5453: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Entity_code: ' || l_entity_code);
5454: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'event_class_code: ' || P_event_class_code);
5455: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'event_type_code: ' ||P_event_type_code);

Line 5490: | zx_trx_headers_gt from the import array structure.

5486: | FUNCTION - Populate_Header_Import_GT()
5487: |
5488: | DESCRIPTION
5489: | This function will get additional information required to populate the
5490: | zx_trx_headers_gt from the import array structure.
5491: | This function returns TRUE if the insert to the temp table goes
5492: | through successfully. Otherwise, FALSE.
5493: |
5494: | PARAMETERS

Line 5519: l_application_id zx_trx_headers_gt.application_id%TYPE;

5515:
5516: l_debug_info VARCHAR2(240);
5517: l_curr_calling_sequence VARCHAR2(4000);
5518:
5519: l_application_id zx_trx_headers_gt.application_id%TYPE;
5520: l_entity_code zx_trx_headers_gt.entity_code%TYPE;
5521:
5522: l_quote_flag zx_trx_headers_gt.quote_flag%TYPE
5523: := 'N';

Line 5520: l_entity_code zx_trx_headers_gt.entity_code%TYPE;

5516: l_debug_info VARCHAR2(240);
5517: l_curr_calling_sequence VARCHAR2(4000);
5518:
5519: l_application_id zx_trx_headers_gt.application_id%TYPE;
5520: l_entity_code zx_trx_headers_gt.entity_code%TYPE;
5521:
5522: l_quote_flag zx_trx_headers_gt.quote_flag%TYPE
5523: := 'N';
5524: -- This flag is always N except when the calculate service is called for

Line 5522: l_quote_flag zx_trx_headers_gt.quote_flag%TYPE

5518:
5519: l_application_id zx_trx_headers_gt.application_id%TYPE;
5520: l_entity_code zx_trx_headers_gt.entity_code%TYPE;
5521:
5522: l_quote_flag zx_trx_headers_gt.quote_flag%TYPE
5523: := 'N';
5524: -- This flag is always N except when the calculate service is called for
5525: -- quote for the recurring invoices and distributions sets.
5526:

Line 5534: zx_trx_headers_gt.related_doc_application_id%TYPE;

5530: FROM ap_invoices_all
5531: WHERE invoice_id = c_tax_related_invoice_id;
5532:
5533: l_related_inv_application_id
5534: zx_trx_headers_gt.related_doc_application_id%TYPE;
5535: l_related_inv_entity_code
5536: zx_trx_headers_gt.related_doc_entity_code%TYPE;
5537: l_related_event_class_code
5538: zx_trx_headers_gt.related_doc_event_class_code%TYPE;

Line 5536: zx_trx_headers_gt.related_doc_entity_code%TYPE;

5532:
5533: l_related_inv_application_id
5534: zx_trx_headers_gt.related_doc_application_id%TYPE;
5535: l_related_inv_entity_code
5536: zx_trx_headers_gt.related_doc_entity_code%TYPE;
5537: l_related_event_class_code
5538: zx_trx_headers_gt.related_doc_event_class_code%TYPE;
5539: l_related_inv_number ap_invoices_all.invoice_num%TYPE;
5540: l_related_inv_date ap_invoices_all.invoice_date%TYPE;

Line 5538: zx_trx_headers_gt.related_doc_event_class_code%TYPE;

5534: zx_trx_headers_gt.related_doc_application_id%TYPE;
5535: l_related_inv_entity_code
5536: zx_trx_headers_gt.related_doc_entity_code%TYPE;
5537: l_related_event_class_code
5538: zx_trx_headers_gt.related_doc_event_class_code%TYPE;
5539: l_related_inv_number ap_invoices_all.invoice_num%TYPE;
5540: l_related_inv_date ap_invoices_all.invoice_date%TYPE;
5541: l_related_inv_type ap_invoices_all.invoice_type_lookup_code%TYPE;
5542:

Line 5643: l_debug_info := 'Step 8: Populate zx_trx_headers_gt';

5639: END;
5640: END IF;
5641:
5642: -------------------------------------------------------------------
5643: l_debug_info := 'Step 8: Populate zx_trx_headers_gt';
5644: -------------------------------------------------------------------
5645: IF (l_return_status = TRUE) THEN
5646:
5647: DELETE FROM zx_trx_headers_gt

Line 5647: DELETE FROM zx_trx_headers_gt

5643: l_debug_info := 'Step 8: Populate zx_trx_headers_gt';
5644: -------------------------------------------------------------------
5645: IF (l_return_status = TRUE) THEN
5646:
5647: DELETE FROM zx_trx_headers_gt
5648: WHERE application_id = AP_ETAX_PKG.AP_APPLICATION_ID
5649: AND entity_code = AP_ETAX_PKG.AP_ENTITY_CODE
5650: AND event_class_code IN (AP_ETAX_PKG.AP_INV_EVENT_CLASS_CODE,
5651: AP_ETAX_PKG.AP_PP_EVENT_CLASS_CODE,

Line 5655: INSERT INTO zx_trx_headers_gt(

5651: AP_ETAX_PKG.AP_PP_EVENT_CLASS_CODE,
5652: AP_ETAX_PKG.AP_ER_EVENT_CLASS_CODE)
5653: AND trx_id = p_invoice_header_rec.invoice_id;
5654:
5655: INSERT INTO zx_trx_headers_gt(
5656: internal_organization_id,
5657: internal_org_location_id,
5658: application_id,
5659: entity_code,

Line 5818: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'zx_trx_headers_gt values ');

5814: p_invoice_header_rec.vendor_site_id --ship_third_pty_acct_site_id
5815: );
5816: --Log messages added for bug 6321366
5817: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
5818: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'zx_trx_headers_gt values ');
5819: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Application_id: '|| l_application_id);
5820: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Entity_code: ' || l_entity_code);
5821: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'event_class_code: ' || P_event_class_code);
5822: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'event_type_code: ' ||P_event_type_code);

Line 5895: l_application_id zx_trx_headers_gt.application_id%TYPE;

5891: -- in eTax global temporary table.
5892: TYPE Trans_Lines_Tab_Type IS TABLE OF zx_transaction_lines_gt%ROWTYPE;
5893: trans_lines Trans_Lines_Tab_Type := Trans_Lines_Tab_Type();
5894:
5895: l_application_id zx_trx_headers_gt.application_id%TYPE;
5896: l_ctrl_hdr_tx_appl_flag zx_transaction_lines_gt.ctrl_hdr_tx_appl_flag%TYPE;
5897: l_line_level_action zx_transaction_lines_gt.line_level_action%TYPE;
5898: l_line_class zx_transaction_lines_gt.line_class%TYPE;
5899: l_line_amt_includes_tax_flag zx_transaction_lines_gt.line_amt_includes_tax_flag%TYPE;

Line 9257: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;

9253: l_curr_calling_sequence VARCHAR2(4000);
9254:
9255: l_tax_already_calculated VARCHAR2(1);
9256:
9257: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
9258: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
9259:
9260: l_location_id zx_transaction_lines_gt.ship_from_location_id%type;
9261: l_bill_to_location_id zx_transaction_lines_gt.bill_to_location_id%TYPE;

Line 9258: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;

9254:
9255: l_tax_already_calculated VARCHAR2(1);
9256:
9257: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
9258: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
9259:
9260: l_location_id zx_transaction_lines_gt.ship_from_location_id%type;
9261: l_bill_to_location_id zx_transaction_lines_gt.bill_to_location_id%TYPE;
9262: l_fob_point po_vendor_sites_all.fob_lookup_code%TYPE;

Line 9682: BEGIN DELETE zx_trx_headers_gt;

9678: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
9679: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name,l_debug_info);
9680: END IF;
9681: -----------------------------------------------------------------
9682: BEGIN DELETE zx_trx_headers_gt;
9683: EXCEPTION WHEN NO_DATA_FOUND THEN null;
9684: END;
9685:
9686: BEGIN DELETE zx_transaction_lines_gt;

Line 12353: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;

12349: AND invDist.invoice_id = p_invoice_id
12350: AND invDist.invoice_line_number = p_invoice_line_number;
12351:
12352: l_inv_header_rec ap_invoices_all%ROWTYPE;
12353: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
12354: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
12355:
12356: l_tax_already_calculated VARCHAR2(1);
12357:

Line 12354: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;

12350: AND invDist.invoice_line_number = p_invoice_line_number;
12351:
12352: l_inv_header_rec ap_invoices_all%ROWTYPE;
12353: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
12354: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
12355:
12356: l_tax_already_calculated VARCHAR2(1);
12357:
12358: l_debug_info VARCHAR2(240);

Line 12544: DELETE FROM ZX_TRX_HEADERS_GT;

12540: END IF;
12541: END IF;
12542: END IF;
12543:
12544: DELETE FROM ZX_TRX_HEADERS_GT;
12545: DELETE FROM ZX_TRANSACTION_LINES_GT;
12546:
12547: RETURN l_return_status;
12548:

Line 12566: DELETE FROM ZX_TRX_HEADERS_GT;

12562: ' P_Invoice_Id = '||P_Invoice_Id);
12563: FND_MESSAGE.SET_TOKEN('DEBUG_INFO',l_debug_info);
12564: END IF;
12565:
12566: DELETE FROM ZX_TRX_HEADERS_GT;
12567: DELETE FROM ZX_TRANSACTION_LINES_GT;
12568:
12569: APP_EXCEPTION.RAISE_EXCEPTION;
12570:

Line 12593: l_application_id zx_trx_headers_gt.application_id%TYPE;

12589: And (related_id IS NULL
12590: or related_id = invoice_distribution_id);
12591:
12592: l_invoice_header_rec ap_invoices_all%rowtype;
12593: l_application_id zx_trx_headers_gt.application_id%TYPE;
12594: l_entity_code zx_trx_headers_gt.entity_code%TYPE;
12595: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
12596: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
12597: l_tax_already_calculated VARCHAR2(1);

Line 12594: l_entity_code zx_trx_headers_gt.entity_code%TYPE;

12590: or related_id = invoice_distribution_id);
12591:
12592: l_invoice_header_rec ap_invoices_all%rowtype;
12593: l_application_id zx_trx_headers_gt.application_id%TYPE;
12594: l_entity_code zx_trx_headers_gt.entity_code%TYPE;
12595: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
12596: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
12597: l_tax_already_calculated VARCHAR2(1);
12598:

Line 12595: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;

12591:
12592: l_invoice_header_rec ap_invoices_all%rowtype;
12593: l_application_id zx_trx_headers_gt.application_id%TYPE;
12594: l_entity_code zx_trx_headers_gt.entity_code%TYPE;
12595: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
12596: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
12597: l_tax_already_calculated VARCHAR2(1);
12598:
12599: l_debug_info VARCHAR2(240);

Line 12596: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;

12592: l_invoice_header_rec ap_invoices_all%rowtype;
12593: l_application_id zx_trx_headers_gt.application_id%TYPE;
12594: l_entity_code zx_trx_headers_gt.entity_code%TYPE;
12595: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
12596: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
12597: l_tax_already_calculated VARCHAR2(1);
12598:
12599: l_debug_info VARCHAR2(240);
12600: l_curr_calling_sequence VARCHAR2(4000);

Line 12935: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;

12931: l_debug_info VARCHAR2(240);
12932: l_curr_calling_sequence VARCHAR2(4000);
12933:
12934: l_inv_header_rec ap_invoices_all%ROWTYPE;
12935: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
12936: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
12937:
12938: l_tax_already_calculated VARCHAR2(1);
12939:

Line 12936: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;

12932: l_curr_calling_sequence VARCHAR2(4000);
12933:
12934: l_inv_header_rec ap_invoices_all%ROWTYPE;
12935: l_event_class_code zx_trx_headers_gt.event_class_code%TYPE;
12936: l_event_type_code zx_trx_headers_gt.event_type_code%TYPE;
12937:
12938: l_tax_already_calculated VARCHAR2(1);
12939:
12940: l_return_status_service VARCHAR2(4000);

Line 13520: DELETE FROM zx_trx_headers_gt;

13516:
13517: BEGIN
13518: Print(l_api_name, 'Bulk_Populate_Headers_GT (+)');
13519:
13520: DELETE FROM zx_trx_headers_gt;
13521:
13522: INSERT INTO zx_trx_headers_gt(
13523: internal_organization_id,
13524: application_id,

Line 13522: INSERT INTO zx_trx_headers_gt(

13518: Print(l_api_name, 'Bulk_Populate_Headers_GT (+)');
13519:
13520: DELETE FROM zx_trx_headers_gt;
13521:
13522: INSERT INTO zx_trx_headers_gt(
13523: internal_organization_id,
13524: application_id,
13525: entity_code,
13526: event_class_code,

Line 13706: Print(l_api_name, 'Rows inserted in zx_trx_headers_gt '||g_invoices_to_process);

13702: -- calculate_tax and determine_recovery.
13703:
13704: g_invoices_to_process := sql%rowcount;
13705:
13706: Print(l_api_name, 'Rows inserted in zx_trx_headers_gt '||g_invoices_to_process);
13707: Print(l_api_name, 'Bulk_Populate_Headers_GT (-)');
13708:
13709: RETURN TRUE;
13710: