DBA Data[Home] [Help]

APPS.AP_ETAX_SERVICES_PKG dependencies on ZX_TRX_TAX_LINK_GT

Line 398: DELETE FROM ZX_TRX_TAX_LINK_GT;

394: Print(l_api_name,l_debug_info);
395: -----------------------------------------------------------------
396: DELETE FROM ZX_TRANSACTION_LINES_GT;
397: DELETE FROM ZX_IMPORT_TAX_LINES_GT;
398: DELETE FROM ZX_TRX_TAX_LINK_GT;
399:
400: AP_ETAX_SERVICES_PKG.G_SITE_ATTRIBUTES.DELETE;
401: AP_ETAX_SERVICES_PKG.G_ORG_ATTRIBUTES.DELETE;
402:

Line 1939: UPDATE zx_trx_tax_link_gt

1935: l_debug_info := 'Step 5: Update trx_id in the allocation structure '||
1936: 'etax table';
1937: -----------------------------------------------------------------
1938: BEGIN
1939: UPDATE zx_trx_tax_link_gt
1940: SET trx_id = P_Invoice_Id
1941: WHERE trx_id = P_Interface_Invoice_Id;
1942: EXCEPTION WHEN NO_DATA_FOUND THEN NULL;
1943: END;

Line 6758: TYPE Link_Lines_Tab_Type IS TABLE OF zx_trx_tax_link_gt%ROWTYPE;

6754: l_curr_calling_sequence VARCHAR2(4000);
6755:
6756: TYPE Trx_Lines_Tab_Type IS TABLE OF zx_transaction_lines_gt%ROWTYPE;
6757: TYPE Tax_Lines_Tab_Type IS TABLE OF zx_import_tax_lines_gt%ROWTYPE;
6758: TYPE Link_Lines_Tab_Type IS TABLE OF zx_trx_tax_link_gt%ROWTYPE;
6759:
6760: trans_lines Trx_Lines_Tab_Type := Trx_Lines_Tab_Type();
6761: tax_lines Tax_Lines_Tab_Type := Tax_Lines_Tab_Type();
6762: link_lines Link_Lines_Tab_Type := Link_Lines_Tab_Type();

Line 6862: -- allocation structure will be store in ZX_TRX_TAX_LINK_GT

6858: FOR i IN P_Inv_Line_List.FIRST..P_Inv_Line_List.LAST LOOP
6859:
6860: -- Invoice is not tax-only. TRX lines will be populated in the
6861: -- ZX_TRANSAXTION_LINES_GT and TAX lines in ZX_IMPORT_TAX_LINES_GT
6862: -- allocation structure will be store in ZX_TRX_TAX_LINK_GT
6863:
6864: IF ( NVL(P_Invoice_Header_Rec.tax_only_flag, 'N') = 'N' ) THEN
6865:
6866: IF (P_inv_line_list(i).line_type_lookup_code <> 'TAX' ) THEN

Line 7276: INSERT INTO zx_trx_tax_link_gt (

7272: l_debug_info := 'Step 14: Populate allocation using taxable_flag if '||
7273: 'source is ISP or ASBN';
7274: -------------------------------------------------------------------
7275:
7276: INSERT INTO zx_trx_tax_link_gt (
7277: application_id,
7278: entity_code,
7279: event_class_code,
7280: trx_id,

Line 7303: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Rows instrted in zx_trx_tax_link_gt: '|| sql%rowcount);

7299: AND aili.line_type_lookup_code <> 'TAX'
7300: AND NVL(aili.taxable_flag, 'N') = 'Y';
7301: -- Debug messages added for 6321366
7302: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
7303: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Rows instrted in zx_trx_tax_link_gt: '|| sql%rowcount);
7304: END IF;
7305: --------------------------------------------------------------
7306: l_debug_info := 'Step 15: Verify if there is any rounding and '||
7307: 'apply it to max of largest.';

Line 7312: FROM zx_trx_tax_link_gt

7308: --------------------------------------------------------------
7309: BEGIN
7310: SELECT SUM(NVL(line_amt,0))
7311: INTO l_total_prorated
7312: FROM zx_trx_tax_link_gt
7313: WHERE trx_id = P_Invoice_Header_Rec.invoice_id
7314: AND summary_tax_line_number = p_inv_line_list(i).line_number;
7315:
7316: IF (NVL(p_inv_line_list(i).amount, 0) <> l_total_prorated) THEN

Line 7317: UPDATE zx_trx_tax_link_gt

7313: WHERE trx_id = P_Invoice_Header_Rec.invoice_id
7314: AND summary_tax_line_number = p_inv_line_list(i).line_number;
7315:
7316: IF (NVL(p_inv_line_list(i).amount, 0) <> l_total_prorated) THEN
7317: UPDATE zx_trx_tax_link_gt
7318: SET line_amt = line_amt + (p_inv_line_list(i).amount - l_total_prorated)
7319: WHERE trx_id = P_Invoice_Header_Rec.invoice_id
7320: AND trx_line_id <> p_inv_line_list(i).line_number
7321: AND trx_line_id =

Line 7368: INSERT INTO zx_trx_tax_link_gt (

7364: --------------------------------------------------------------
7365: l_debug_info := 'Step 18: Get Insert in global temp table';
7366: --------------------------------------------------------------
7367: IF (l_prorating_total <> 0) THEN
7368: INSERT INTO zx_trx_tax_link_gt (
7369: application_id,
7370: entity_code,
7371: event_class_code,
7372: trx_id,

Line 7395: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Rows instrted in zx_trx_tax_link_gt: '|| sql%rowcount);

7391: AND aili.line_type_lookup_code <> 'TAX' --Bug6608702**
7392: AND aili.line_group_number = p_inv_line_list(i).line_group_number;
7393: -- Debug messages added for 6321366
7394: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
7395: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Rows instrted in zx_trx_tax_link_gt: '|| sql%rowcount);
7396: END IF;
7397: --------------------------------------------------------------
7398: l_debug_info := 'Step 19: Verify if there is any rounding and '||
7399: 'apply it to max of largest.';

Line 7404: FROM zx_trx_tax_link_gt

7400: --------------------------------------------------------------
7401: BEGIN
7402: SELECT SUM(NVL(line_amt,0))
7403: INTO l_total_prorated
7404: FROM zx_trx_tax_link_gt
7405: WHERE trx_id = P_Invoice_Header_Rec.invoice_id
7406: AND summary_tax_line_number = p_inv_line_list(i).line_number;
7407:
7408: IF (NVL(p_inv_line_list(i).amount, 0) <> l_total_prorated) THEN

Line 7409: UPDATE zx_trx_tax_link_gt

7405: WHERE trx_id = P_Invoice_Header_Rec.invoice_id
7406: AND summary_tax_line_number = p_inv_line_list(i).line_number;
7407:
7408: IF (NVL(p_inv_line_list(i).amount, 0) <> l_total_prorated) THEN
7409: UPDATE zx_trx_tax_link_gt
7410: SET line_amt = line_amt + (p_inv_line_list(i).amount - l_total_prorated)
7411: WHERE trx_id = P_Invoice_Header_Rec.invoice_id
7412: AND trx_line_id <> p_inv_line_list(i).line_number
7413: AND trx_line_id =

Line 7785: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'zx_trx_tax_link_gt values ');

7781: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'tax_line_allocation_flag: '|| tax_lines(k).tax_line_allocation_flag);
7782: END IF;
7783: -- Debug messages added for 6321366
7784: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
7785: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'zx_trx_tax_link_gt values ');
7786: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'application_id: ' || link_lines(k).application_id);
7787: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'entity_code: ' || link_lines(k).entity_code);
7788: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'event_class_code: ' || link_lines(k).event_class_code);
7789: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'trx_id: ' || link_lines(k).trx_id);

Line 7837: INSERT INTO zx_trx_tax_link_gt

7833: -- This bulk insert will only be effective when the invoice is tax_only
7834: -- and there are tax lines with the tax info to be imported
7835: IF (link_lines.COUNT > 0) THEN
7836: FORALL m IN link_lines.FIRST..link_lines.LAST
7837: INSERT INTO zx_trx_tax_link_gt
7838: VALUES link_lines(m);
7839: END IF;
7840:
7841: END IF;

Line 7869: | There is no need to populate ZX_TRX_TAX_LINK_GT since any tax line

7865: |
7866: | DESCRIPTION
7867: | This function will get additional information required to populate the
7868: | ZX_TRANSACTION_LINES_GT, and ZX_IMPORT_TAX_LINES_GT.
7869: | There is no need to populate ZX_TRX_TAX_LINK_GT since any tax line
7870: | manually created is assume to be allocated to all the ITEM lines in the
7871: | invoice.
7872: | This function returns TRUE if the population of the temp table goes
7873: | through successfully. Otherwise, FALSE.

Line 7905: TYPE Link_Lines_Tab_Type IS TABLE OF zx_trx_tax_link_gt%ROWTYPE;

7901: l_curr_calling_sequence VARCHAR2(4000);
7902:
7903: TYPE Trx_Lines_Tab_Type IS TABLE OF zx_transaction_lines_gt%ROWTYPE;
7904: TYPE Tax_Lines_Tab_Type IS TABLE OF zx_import_tax_lines_gt%ROWTYPE;
7905: TYPE Link_Lines_Tab_Type IS TABLE OF zx_trx_tax_link_gt%ROWTYPE;
7906:
7907: trans_lines Trx_Lines_Tab_Type := Trx_Lines_Tab_Type();
7908: tax_lines Tax_Lines_Tab_Type := Tax_Lines_Tab_Type();
7909: link_lines Link_Lines_Tab_Type := Link_Lines_Tab_Type();

Line 7998: --for the manual tax line then We need to populate zx_trx_tax_link_gt.

7994: tax_lines(i).tax_rate_id := l_inv_tax_list(i).tax_rate_id;
7995:
7996: tax_lines(i).tax_amt_included_flag := 'N';
7997: --Start For bug 6064593 - if there is allocation information provided
7998: --for the manual tax line then We need to populate zx_trx_tax_link_gt.
7999: --ie if line_group_number is provided on the tax line and
8000: --ITEM line then we need to populate the zx_trx_tax_link_gt
8001: --with the allocation info.And we need to pass tax_line_allocation_flag
8002: --as 'Y' in zx_import_tax_lines_gt for the tax line.

Line 8000: --ITEM line then we need to populate the zx_trx_tax_link_gt

7996: tax_lines(i).tax_amt_included_flag := 'N';
7997: --Start For bug 6064593 - if there is allocation information provided
7998: --for the manual tax line then We need to populate zx_trx_tax_link_gt.
7999: --ie if line_group_number is provided on the tax line and
8000: --ITEM line then we need to populate the zx_trx_tax_link_gt
8001: --with the allocation info.And we need to pass tax_line_allocation_flag
8002: --as 'Y' in zx_import_tax_lines_gt for the tax line.
8003:
8004: IF (l_inv_tax_list(i).prorate_across_all_items = 'Y'AND

Line 8044: zx_trx_tax_link_gt for each TAX line to be the sum of line

8040: AND line_group_number = l_inv_tax_list(i).line_group_number;
8041:
8042: /************************************************************
8043: Bug6608702- Ebtax expects the line amount in
8044: zx_trx_tax_link_gt for each TAX line to be the sum of line
8045: amounts of all ITEM lines under same line_group_number.
8046: Here All the things worked fine till there was only one tax
8047: line linked to ITEM line. When a ITEM line is linked to
8048: multiple TAX lines through line_group_number then existing

Line 8062: INSERT INTO zx_trx_tax_link_gt (

8058: l_debug_info := 'Step 18: Get Insert in global temp table';
8059: --------------------------------------------------------------
8060:
8061: IF (l_prorating_total <> 0) THEN
8062: INSERT INTO zx_trx_tax_link_gt (
8063: application_id,
8064: entity_code,
8065: event_class_code,
8066: trx_id,

Line 8089: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Rows instrted in zx_trx_tax_link_gt: '|| sql%rowcount);

8085: AND ail.line_type_lookup_code <> 'TAX' --Bug6608702
8086: AND ail.line_group_number = l_inv_tax_list(i).line_group_number;
8087: -- Debug messages added for 6321366
8088: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
8089: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Rows instrted in zx_trx_tax_link_gt: '|| sql%rowcount);
8090: END IF;
8091: --------------------------------------------------------------
8092: l_debug_info := 'Step 19: Verify if there is any rounding and '||
8093: 'apply it to max of largest.';

Line 8098: FROM zx_trx_tax_link_gt

8094: --------------------------------------------------------------
8095: BEGIN
8096: SELECT SUM(NVL(line_amt,0))
8097: INTO l_total_prorated
8098: FROM zx_trx_tax_link_gt
8099: WHERE trx_id = l_inv_tax_list(i).invoice_id
8100: AND summary_tax_line_number = l_inv_tax_list(i).line_number;
8101:
8102: IF (NVL(l_inv_tax_list(i).amount, 0) <> l_total_prorated) THEN

Line 8103: UPDATE zx_trx_tax_link_gt

8099: WHERE trx_id = l_inv_tax_list(i).invoice_id
8100: AND summary_tax_line_number = l_inv_tax_list(i).line_number;
8101:
8102: IF (NVL(l_inv_tax_list(i).amount, 0) <> l_total_prorated) THEN
8103: UPDATE zx_trx_tax_link_gt
8104: SET line_amt = line_amt + (l_inv_tax_list(i).amount - l_total_prorated)
8105: WHERE trx_id = l_inv_tax_list(i).invoice_id
8106: AND trx_line_id <> l_inv_tax_list(i).line_number
8107: AND trx_line_id =

Line 8153: -- is also required to populate the zx_trx_tax_link_gt with a one to one

8149: -- tax should be. In this case we will populate the
8150: -- zx_transaction_lines_gt GT table.
8151: -- For the second case, where the tax lines are manually created we will
8152: -- populate both zx_transaction_lines_gt and zx_import_tax_lines_gt. It
8153: -- is also required to populate the zx_trx_tax_link_gt with a one to one
8154: -- allocation.
8155:
8156:
8157: -------------------------------------------------------------------

Line 8173: -- populate the zx_import_tax_lines_gt and zx_trx_tax_link_gt GT tables

8169: -- since for the 2 cases we need to populate the trans_lines pl/sql
8170: -- table, we populate it and if the rcv_transaction_id is not null
8171: -- we set the flag P_Inv_Rcv_Matched to Y. If it is not RCV matched, we
8172: -- will not modified the flag since N is the initial value and will
8173: -- populate the zx_import_tax_lines_gt and zx_trx_tax_link_gt GT tables
8174:
8175: -------------------------------------------------------------------
8176: l_debug_info := 'Step 5: Get line_level_action for TAX ONLY line '||
8177: 'number:'||l_inv_tax_list(i).line_number;

Line 8526: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'zx_trx_tax_link_gt values ');

8522: link_lines(k).line_amt := l_inv_tax_list(i).amount;
8523:
8524: -- Debug messages added for 6321366
8525: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
8526: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'zx_trx_tax_link_gt values ');
8527: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'summary_tax_line_number: ' || link_lines(k).summary_tax_line_number);
8528: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'application_id: ' || link_lines(k).application_id);
8529: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'event_class_code: ' || link_lines(k).event_class_code);
8530: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'trx_id: ' || link_lines(k).trx_id);

Line 8576: INSERT INTO zx_trx_tax_link_gt

8572: -- This bulk insert will only be effective when the invoice is tax_only
8573: -- and there are tax lines with the tax info to be imported
8574: IF (link_lines.COUNT > 0) THEN
8575: FORALL m IN link_lines.FIRST..link_lines.LAST
8576: INSERT INTO zx_trx_tax_link_gt
8577: VALUES link_lines(m);
8578: END IF;
8579:
8580: END IF;