DBA Data[Home] [Help]

APPS.AP_ETAX_SERVICES_PKG dependencies on ZX_TRX_TAX_LINK_GT

Line 541: DELETE FROM ZX_TRX_TAX_LINK_GT;

537: --Print(l_api_name,l_debug_info);
538: -----------------------------------------------------------------
539: DELETE FROM ZX_TRANSACTION_LINES_GT;
540: DELETE FROM ZX_IMPORT_TAX_LINES_GT;
541: DELETE FROM ZX_TRX_TAX_LINK_GT;
542:
543: AP_ETAX_SERVICES_PKG.G_SITE_ATTRIBUTES.DELETE;
544: AP_ETAX_SERVICES_PKG.G_ORG_ATTRIBUTES.DELETE;
545:

Line 1221: DELETE FROM ZX_TRX_TAX_LINK_GT;

1217: -----------------------------------------------------------------
1218: DELETE FROM ZX_TRX_HEADERS_GT;
1219: DELETE FROM ZX_TRANSACTION_LINES_GT;
1220: DELETE FROM ZX_IMPORT_TAX_LINES_GT;
1221: DELETE FROM ZX_TRX_TAX_LINK_GT;
1222:
1223: /*
1224: -----------------------------------------------------------------
1225: l_debug_info := 'Step 2: Update trx_id in header';

Line 2460: DELETE FROM ZX_TRX_TAX_LINK_GT;

2456: -----------------------------------------------------------------
2457: DELETE FROM ZX_TRX_HEADERS_GT;
2458: DELETE FROM ZX_TRANSACTION_LINES_GT;
2459: DELETE FROM ZX_IMPORT_TAX_LINES_GT;
2460: DELETE FROM ZX_TRX_TAX_LINK_GT;
2461:
2462: -----------------------------------------------------------------
2463: --bug 16656238 ends
2464:

Line 2602: UPDATE zx_trx_tax_link_gt

2598: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name,l_debug_info);
2599: END IF;
2600: -----------------------------------------------------------------
2601: BEGIN
2602: UPDATE zx_trx_tax_link_gt
2603: SET trx_id = P_Invoice_Id
2604: WHERE trx_id = P_Interface_Invoice_Id;
2605: EXCEPTION WHEN NO_DATA_FOUND THEN NULL;
2606: END;

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

8177: l_curr_calling_sequence VARCHAR2(4000);
8178:
8179: TYPE Trx_Lines_Tab_Type IS TABLE OF zx_transaction_lines_gt%ROWTYPE;
8180: TYPE Tax_Lines_Tab_Type IS TABLE OF zx_import_tax_lines_gt%ROWTYPE;
8181: TYPE Link_Lines_Tab_Type IS TABLE OF zx_trx_tax_link_gt%ROWTYPE;
8182:
8183: trans_lines Trx_Lines_Tab_Type := Trx_Lines_Tab_Type();
8184: tax_lines Tax_Lines_Tab_Type := Tax_Lines_Tab_Type();
8185: link_lines Link_Lines_Tab_Type := Link_Lines_Tab_Type();

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

8300: FOR i IN P_Inv_Line_List.FIRST..P_Inv_Line_List.LAST LOOP
8301:
8302: -- Invoice is not tax-only. TRX lines will be populated in the
8303: -- ZX_TRANSAXTION_LINES_GT and TAX lines in ZX_IMPORT_TAX_LINES_GT
8304: -- allocation structure will be store in ZX_TRX_TAX_LINK_GT
8305:
8306: IF ( NVL(P_Invoice_Header_Rec.tax_only_flag, 'N') = 'N' ) THEN
8307:
8308: IF (P_inv_line_list(i).line_type_lookup_code <> 'TAX' ) THEN

Line 9061: INSERT INTO zx_trx_tax_link_gt (

9057: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name,l_debug_info);
9058: END IF;
9059: -------------------------------------------------------------------
9060:
9061: INSERT INTO zx_trx_tax_link_gt (
9062: application_id,
9063: entity_code,
9064: event_class_code,
9065: trx_id,

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

9085: AND NVL(aili.taxable_flag, 'N') = 'Y';
9086: -- Debug messages added for 6321366
9087:
9088: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
9089: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Rows instrted in zx_trx_tax_link_gt: '|| sql%rowcount);
9090: END IF;
9091: --------------------------------------------------------------
9092: l_debug_info := 'Step 15: Verify if there is any rounding and '||
9093: 'apply it to max of largest.';

Line 9101: FROM zx_trx_tax_link_gt

9097: --------------------------------------------------------------
9098: BEGIN
9099: SELECT SUM(NVL(line_amt,0))
9100: INTO l_total_prorated
9101: FROM zx_trx_tax_link_gt
9102: WHERE trx_id = P_Invoice_Header_Rec.invoice_id
9103: AND summary_tax_line_number = p_inv_line_list(i).line_number;
9104:
9105: IF (NVL(p_inv_line_list(i).amount, 0) <> l_total_prorated) THEN

Line 9106: UPDATE zx_trx_tax_link_gt

9102: WHERE trx_id = P_Invoice_Header_Rec.invoice_id
9103: AND summary_tax_line_number = p_inv_line_list(i).line_number;
9104:
9105: IF (NVL(p_inv_line_list(i).amount, 0) <> l_total_prorated) THEN
9106: UPDATE zx_trx_tax_link_gt
9107: SET line_amt = line_amt + (p_inv_line_list(i).amount - l_total_prorated)
9108: WHERE trx_id = P_Invoice_Header_Rec.invoice_id
9109: AND trx_line_id <> p_inv_line_list(i).line_number
9110: AND trx_line_id =

Line 9166: INSERT INTO zx_trx_tax_link_gt (

9162: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name,l_debug_info);
9163: END IF;
9164: --------------------------------------------------------------
9165: IF (l_prorating_total <> 0) THEN
9166: INSERT INTO zx_trx_tax_link_gt (
9167: application_id,
9168: entity_code,
9169: event_class_code,
9170: trx_id,

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

9189: AND aili.line_type_lookup_code <> 'TAX' --Bug6608702**
9190: AND aili.line_group_number = p_inv_line_list(i).line_group_number;
9191: -- Debug messages added for 6321366
9192: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
9193: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Rows instrted in zx_trx_tax_link_gt: '|| sql%rowcount);
9194: END IF;
9195: --------------------------------------------------------------
9196: l_debug_info := 'Step 19: Verify if there is any rounding and '||
9197: 'apply it to max of largest.';

Line 9205: FROM zx_trx_tax_link_gt

9201: --------------------------------------------------------------
9202: BEGIN
9203: SELECT SUM(NVL(line_amt,0))
9204: INTO l_total_prorated
9205: FROM zx_trx_tax_link_gt
9206: WHERE trx_id = P_Invoice_Header_Rec.invoice_id
9207: AND summary_tax_line_number = p_inv_line_list(i).line_number;
9208:
9209: IF (NVL(p_inv_line_list(i).amount, 0) <> l_total_prorated) THEN

Line 9210: UPDATE zx_trx_tax_link_gt

9206: WHERE trx_id = P_Invoice_Header_Rec.invoice_id
9207: AND summary_tax_line_number = p_inv_line_list(i).line_number;
9208:
9209: IF (NVL(p_inv_line_list(i).amount, 0) <> l_total_prorated) THEN
9210: UPDATE zx_trx_tax_link_gt
9211: SET line_amt = line_amt + (p_inv_line_list(i).amount - l_total_prorated)
9212: WHERE trx_id = P_Invoice_Header_Rec.invoice_id
9213: AND trx_line_id <> p_inv_line_list(i).line_number
9214: AND trx_line_id =

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

9366: link_lines(l_pseudo2).summary_tax_line_number:= p_inv_line_list(i).line_number;
9367: link_lines(l_pseudo2).line_amt:= p_inv_line_list(i).amount;
9368:
9369: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
9370: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'zx_trx_tax_link_gt values ');
9371: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'summary_tax_line_number: ' || link_lines(l_pseudo2).summary_tax_line_number);
9372: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'application_id: ' || link_lines(l_pseudo2).application_id);
9373: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'event_class_code: ' || link_lines(l_pseudo2).event_class_code);
9374: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'trx_id: ' || link_lines(l_pseudo2).trx_id);

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

9824: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'tax_line_allocation_flag: '|| tax_lines(k).tax_line_allocation_flag);
9825: END IF;
9826: -- Debug messages added for 6321366
9827: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
9828: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'zx_trx_tax_link_gt values ');
9829: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'application_id: ' || link_lines(k).application_id);
9830: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'entity_code: ' || link_lines(k).entity_code);
9831: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'event_class_code: ' || link_lines(k).event_class_code);
9832: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'trx_id: ' || link_lines(k).trx_id);

Line 9940: INSERT INTO zx_trx_tax_link_gt

9936: -- This bulk insert will only be effective when the invoice is tax_only
9937: -- and there are tax lines with the tax info to be imported
9938: IF (link_lines.COUNT > 0) THEN
9939: FORALL m IN link_lines.FIRST..link_lines.LAST
9940: INSERT INTO zx_trx_tax_link_gt
9941: VALUES link_lines(m);
9942: END IF;
9943:
9944: END IF;

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

9968: |
9969: | DESCRIPTION
9970: | This function will get additional information required to populate the
9971: | ZX_TRANSACTION_LINES_GT, and ZX_IMPORT_TAX_LINES_GT.
9972: | There is no need to populate ZX_TRX_TAX_LINK_GT since any tax line
9973: | manually created is assume to be allocated to all the ITEM lines in the
9974: | invoice.
9975: | This function returns TRUE if the population of the temp table goes
9976: | through successfully. Otherwise, FALSE.

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

10004: l_curr_calling_sequence VARCHAR2(4000);
10005:
10006: TYPE Trx_Lines_Tab_Type IS TABLE OF zx_transaction_lines_gt%ROWTYPE;
10007: TYPE Tax_Lines_Tab_Type IS TABLE OF zx_import_tax_lines_gt%ROWTYPE;
10008: TYPE Link_Lines_Tab_Type IS TABLE OF zx_trx_tax_link_gt%ROWTYPE;
10009:
10010: trans_lines Trx_Lines_Tab_Type := Trx_Lines_Tab_Type();
10011: tax_lines Tax_Lines_Tab_Type := Tax_Lines_Tab_Type();
10012: link_lines Link_Lines_Tab_Type := Link_Lines_Tab_Type();

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

10128: END IF;
10129: --Bug9819170
10130:
10131: --Start For bug 6064593 - if there is allocation information provided
10132: --for the manual tax line then We need to populate zx_trx_tax_link_gt.
10133: --ie if line_group_number is provided on the tax line and
10134: --ITEM line then we need to populate the zx_trx_tax_link_gt
10135: --with the allocation info.And we need to pass tax_line_allocation_flag
10136: --as 'Y' in zx_import_tax_lines_gt for the tax line.

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

10130:
10131: --Start For bug 6064593 - if there is allocation information provided
10132: --for the manual tax line then We need to populate zx_trx_tax_link_gt.
10133: --ie if line_group_number is provided on the tax line and
10134: --ITEM line then we need to populate the zx_trx_tax_link_gt
10135: --with the allocation info.And we need to pass tax_line_allocation_flag
10136: --as 'Y' in zx_import_tax_lines_gt for the tax line.
10137:
10138: IF (l_inv_tax_list(i).prorate_across_all_items = 'Y'AND

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

10180: AND line_group_number = l_inv_tax_list(i).line_group_number;
10181:
10182: /************************************************************
10183: Bug6608702- Ebtax expects the line amount in
10184: zx_trx_tax_link_gt for each TAX line to be the sum of line
10185: amounts of all ITEM lines under same line_group_number.
10186: Here All the things worked fine till there was only one tax
10187: line linked to ITEM line. When a ITEM line is linked to
10188: multiple TAX lines through line_group_number then existing

Line 10205: INSERT INTO zx_trx_tax_link_gt (

10201: END IF;
10202: --------------------------------------------------------------
10203:
10204: IF (l_prorating_total <> 0) THEN
10205: INSERT INTO zx_trx_tax_link_gt (
10206: application_id,
10207: entity_code,
10208: event_class_code,
10209: trx_id,

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

10228: AND ail.line_type_lookup_code <> 'TAX' --Bug6608702
10229: AND ail.line_group_number = l_inv_tax_list(i).line_group_number;
10230: -- Debug messages added for 6321366
10231: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
10232: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'Rows instrted in zx_trx_tax_link_gt: '|| sql%rowcount);
10233: END IF;
10234: --------------------------------------------------------------
10235: l_debug_info := 'Step 19: Verify if there is any rounding and '||
10236: 'apply it to max of largest.';

Line 10244: FROM zx_trx_tax_link_gt

10240: --------------------------------------------------------------
10241: BEGIN
10242: SELECT SUM(NVL(line_amt,0))
10243: INTO l_total_prorated
10244: FROM zx_trx_tax_link_gt
10245: WHERE trx_id = l_inv_tax_list(i).invoice_id
10246: AND summary_tax_line_number = l_inv_tax_list(i).line_number;
10247:
10248: IF (NVL(l_inv_tax_list(i).amount, 0) <> l_total_prorated) THEN

Line 10249: UPDATE zx_trx_tax_link_gt

10245: WHERE trx_id = l_inv_tax_list(i).invoice_id
10246: AND summary_tax_line_number = l_inv_tax_list(i).line_number;
10247:
10248: IF (NVL(l_inv_tax_list(i).amount, 0) <> l_total_prorated) THEN
10249: UPDATE zx_trx_tax_link_gt
10250: SET line_amt = line_amt + (l_inv_tax_list(i).amount - l_total_prorated)
10251: WHERE trx_id = l_inv_tax_list(i).invoice_id
10252: AND trx_line_id <> l_inv_tax_list(i).line_number
10253: AND trx_line_id =

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

10398: link_lines(l_pseudo).summary_tax_line_number:= l_inv_tax_list(i).line_number;
10399: link_lines(l_pseudo).line_amt:= l_inv_tax_list(i).amount;
10400:
10401: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
10402: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'zx_trx_tax_link_gt values ');
10403: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'summary_tax_line_number: ' || link_lines(l_pseudo).summary_tax_line_number);
10404: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'application_id: ' || link_lines(l_pseudo).application_id);
10405: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'event_class_code: ' || link_lines(l_pseudo).event_class_code);
10406: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'trx_id: ' || link_lines(l_pseudo).trx_id);

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

10432: -- tax should be. In this case we will populate the
10433: -- zx_transaction_lines_gt GT table.
10434: -- For the second case, where the tax lines are manually created we will
10435: -- populate both zx_transaction_lines_gt and zx_import_tax_lines_gt. It
10436: -- is also required to populate the zx_trx_tax_link_gt with a one to one
10437: -- allocation.
10438:
10439:
10440: -------------------------------------------------------------------

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

10452: -- since for the 2 cases we need to populate the trans_lines pl/sql
10453: -- table, we populate it and if the rcv_transaction_id is not null
10454: -- we set the flag P_Inv_Rcv_Matched to Y. If it is not RCV matched, we
10455: -- will not modified the flag since N is the initial value and will
10456: -- populate the zx_import_tax_lines_gt and zx_trx_tax_link_gt GT tables
10457:
10458: -------------------------------------------------------------------
10459: l_debug_info := 'Step 5: Get line_level_action for TAX ONLY line '||
10460: 'number:'||l_inv_tax_list(i).line_number;

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

10841: link_lines(k).line_amt := l_inv_tax_list(i).amount;
10842:
10843: -- Debug messages added for 6321366
10844: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
10845: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'zx_trx_tax_link_gt values ');
10846: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'summary_tax_line_number: ' || link_lines(k).summary_tax_line_number);
10847: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'application_id: ' || link_lines(k).application_id);
10848: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'event_class_code: ' || link_lines(k).event_class_code);
10849: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||l_api_name, 'trx_id: ' || link_lines(k).trx_id);

Line 10949: INSERT INTO zx_trx_tax_link_gt

10945: -- This bulk insert will only be effective when the invoice is tax_only
10946: -- and there are tax lines with the tax info to be imported
10947: IF (link_lines.COUNT > 0) THEN
10948: FORALL m IN link_lines.FIRST..link_lines.LAST
10949: INSERT INTO zx_trx_tax_link_gt
10950: VALUES link_lines(m);
10951: END IF;
10952:
10953: END IF;

Line 13462: DELETE zx_trx_tax_link_gt;

13458:
13459:
13460: DELETE zx_transaction_lines_gt;
13461: DELETE zx_import_tax_lines_gt;
13462: DELETE zx_trx_tax_link_gt;
13463: DELETE zx_reverse_dist_gt;
13464:
13465: AP_ETAX_SERVICES_PKG.G_SITE_ATTRIBUTES.DELETE;
13466: AP_ETAX_SERVICES_PKG.G_ORG_ATTRIBUTES.DELETE;

Line 14036: DELETE zx_trx_tax_link_gt;

14032: NULL;
14033: END IF;
14034: DELETE zx_transaction_lines_gt;
14035: DELETE zx_import_tax_lines_gt;
14036: DELETE zx_trx_tax_link_gt;
14037: DELETE zx_reverse_dist_gt;
14038: RETURN l_return_status;
14039: ELSE -- update the tax only line amount to 0
14040: -----------------------------------------------------------------