DBA Data[Home] [Help]

APPS.JAI_AP_DTC_DEFAULTATION_PKG dependencies on JAI_AP_TDS_DEFAULT

Line 253: FROM JAI_AP_TDS_DEFAULT

249: is
250: SELECT TDS_SECTION_CODE,
251: INVOICE_DISTRIBUTION_ID,
252: SUM(AMOUNT) OVER(ORDER BY TDS_SECTION_CODE, INVOICE_DISTRIBUTION_ID ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS CUMULATIVE_AMT
253: FROM JAI_AP_TDS_DEFAULT
254: WHERE INVOICE_ID = p_inv_id
255: AND TDS_SECTION_CODE = cp_section_code
256: ORDER BY TDS_SECTION_CODE, INVOICE_DISTRIBUTION_ID;
257:

Line 264: FROM JAI_AP_TDS_DEFAULT

260: is
261: SELECT --DISTINCT --commented out by zhiwei.xin for bug 13745243 on 01-Mar-2012
262: TDS_SECTION_CODE,
263: SUM(AMOUNT) SEC_AMOUNT -- added by zhiwei.xin for bug 13745243 on 01-Mar-2012
264: FROM JAI_AP_TDS_DEFAULT
265: WHERE INVOICE_ID = p_inv_id
266: AND TDS_SECTION_CODE IS NOT NULL -- Added by zhiwei.xin for bug 13741805 on 27-Feb-2012.
267: GROUP BY TDS_SECTION_CODE; -- added by zhiwei.xin for bug 13745243 on 01-Mar-2012
268:

Line 278: FROM JAI_AP_TDS_DEFAULT

274: SELECT TDS_SECTION_CODE
275: ,NATURAL_ACCOUNT_VALUE
276: ,ACCOUNTING_DATE
277: ,SUM(AMOUNT) SEC_AMOUNT
278: FROM JAI_AP_TDS_DEFAULT
279: WHERE INVOICE_ID = p_inv_id
280: AND TDS_SECTION_CODE IS NOT NULL
281: AND TDS_SECTION_CODE = cp_section_code
282: GROUP BY TDS_SECTION_CODE

Line 371: -- cursor to get records from JAI_AP_TDS_DEFAULT

367: AND VENDOR_SITE_ID = 0;
368: ----------------------------------------------
369: -- Added by Chong for bug#15939571 on 20121213 End
370:
371: -- cursor to get records from JAI_AP_TDS_DEFAULT
372: cursor c_get_ap_tds_def
373: is
374: SELECT jatd.*
375: FROM JAI_AP_TDS_DEFAULT jatd

Line 375: FROM JAI_AP_TDS_DEFAULT jatd

371: -- cursor to get records from JAI_AP_TDS_DEFAULT
372: cursor c_get_ap_tds_def
373: is
374: SELECT jatd.*
375: FROM JAI_AP_TDS_DEFAULT jatd
376: WHERE jatd.INVOICE_ID = p_inv_id
377: --AND jatd.TDS_SECTION_CODE IS NOT NULL commented out by zhiwei.xin for bug 13731393 on 29-Feb-2012
378: AND NOT EXISTS ( SELECT 1
379: FROM JAI_AP_TDS_INV_TAXES jatit

Line 384: -- cursor to get tax category from JAI_AP_TDS_DEFAULT

380: WHERE jatit.INVOICE_ID = p_inv_id
381: AND jatit.INVOICE_DISTRIBUTION_ID = jatd.INVOICE_DISTRIBUTION_ID
382: AND NVL(jatit.TAX_CATEGORY_OVERRIDEN,'N') = 'Y');
383:
384: -- cursor to get tax category from JAI_AP_TDS_DEFAULT
385: cursor c_get_tax_ctg_id (cp_dist_id number)
386: is
387: SELECT TAX_CATEGORY_ID
388: FROM JAI_AP_TDS_DEFAULT

Line 388: FROM JAI_AP_TDS_DEFAULT

384: -- cursor to get tax category from JAI_AP_TDS_DEFAULT
385: cursor c_get_tax_ctg_id (cp_dist_id number)
386: is
387: SELECT TAX_CATEGORY_ID
388: FROM JAI_AP_TDS_DEFAULT
389: WHERE INVOICE_ID = p_inv_id
390: AND INVOICE_DISTRIBUTION_ID = cp_dist_id;
391:
392: -- cursor to Check if Service Tax exists for Standalone Invoice

Line 575: ,cp_tds_section_code jai_ap_tds_default.TDS_SECTION_CODE%TYPE --Added cp_tds_section_code by Chong for Bug#13802244 2012/09/21

571: cp_amount number,
572: cp_max_accounting_date date,
573: cp_min_accounting_date date
574: ,cp_legal_entity_id JAI_AP_TDS_THHOLD_ACCOUNT.LEGAL_ENTITY_ID%TYPE --Added cp_legal_entity_id by Chong for Bug#13802244 2012/09/21
575: ,cp_tds_section_code jai_ap_tds_default.TDS_SECTION_CODE%TYPE --Added cp_tds_section_code by Chong for Bug#13802244 2012/09/21
576: ,cp_natural_account_value jai_ap_tds_default.natural_account_value%TYPE --Added by Chong for Bug#15939571 2012/12/12
577: ,cp_accounting_date Date --Added by Chong for Bug#15939571 2012/12/12
578: )
579: is

Line 576: ,cp_natural_account_value jai_ap_tds_default.natural_account_value%TYPE --Added by Chong for Bug#15939571 2012/12/12

572: cp_max_accounting_date date,
573: cp_min_accounting_date date
574: ,cp_legal_entity_id JAI_AP_TDS_THHOLD_ACCOUNT.LEGAL_ENTITY_ID%TYPE --Added cp_legal_entity_id by Chong for Bug#13802244 2012/09/21
575: ,cp_tds_section_code jai_ap_tds_default.TDS_SECTION_CODE%TYPE --Added cp_tds_section_code by Chong for Bug#13802244 2012/09/21
576: ,cp_natural_account_value jai_ap_tds_default.natural_account_value%TYPE --Added by Chong for Bug#15939571 2012/12/12
577: ,cp_accounting_date Date --Added by Chong for Bug#15939571 2012/12/12
578: )
579: is
580: select threshold_slab_id

Line 619: from jai_ap_tds_default jatd

615: where jatta.threshold_hdr_id = jattt.threshold_hdr_id --Added alias (jattt) by Chong for Bug#13802244 2012/09/21
616: and jatta.threshold_type_id = jattt.threshold_type_id
617: and jatta.legal_entity_id = cp_legal_entity_id --Added cp_legal_entity_id by Chong for Bug#13802244 2012/09/21
618: and jatta.NATURAL_ACCOUNT_VALUE in (select distinct natural_account_value
619: from jai_ap_tds_default jatd
620: where jatd.invoice_id = p_inv_id
621: --and jatd.tds_section_code = tds_section_code) --Commented by Chong for Bug#13802244 2012/09/21
622: and jatd.tds_section_code = cp_tds_section_code) --Added by Chong for Bug#13802244 2012/09/21
623: --Commented by Chong for bug#15939571 20121213 End */

Line 640: FROM JAI_AP_TDS_DEFAULT

636: cursor c_sec_accounting_date (cp_sec_code varchar2)
637: is
638: SELECT MAX(ACCOUNTING_DATE) MAX_DATE,
639: MIN(ACCOUNTING_DATE) MIN_DATE
640: FROM JAI_AP_TDS_DEFAULT
641: WHERE INVOICE_ID = p_inv_id
642: AND TDS_SECTION_CODE = cp_sec_code;
643:
644: -- added by zhiwei.xin for bug 13745243 on 01-Mar-2012 end.

Line 705: ,cp_tds_section_code jai_ap_tds_default.TDS_SECTION_CODE%TYPE

701: where invoice_id = p_inv_id
702: and match_type <> 'NOT_MATCHED';
703:
704: cursor c_check_effective_date(cp_legal_entity_id JAI_AP_TDS_THHOLD_ACCOUNT.LEGAL_ENTITY_ID%TYPE
705: ,cp_tds_section_code jai_ap_tds_default.TDS_SECTION_CODE%TYPE
706: ,cp_natural_account_value jai_ap_tds_default.natural_account_value%TYPE
707: ,cp_accounting_date DATE
708: ) is
709: select count(1)

Line 706: ,cp_natural_account_value jai_ap_tds_default.natural_account_value%TYPE

702: and match_type <> 'NOT_MATCHED';
703:
704: cursor c_check_effective_date(cp_legal_entity_id JAI_AP_TDS_THHOLD_ACCOUNT.LEGAL_ENTITY_ID%TYPE
705: ,cp_tds_section_code jai_ap_tds_default.TDS_SECTION_CODE%TYPE
706: ,cp_natural_account_value jai_ap_tds_default.natural_account_value%TYPE
707: ,cp_accounting_date DATE
708: ) is
709: select count(1)
710: from JAI_DTC_SCTN_ACCOUNT_MAPPING jdsam

Line 779: delete from JAI_AP_TDS_DEFAULT where INVOICE_ID = p_inv_id;

775: jai_cmn_utils_pkg.WRITE_FND_LOG(G_LEVEL_PROCEDURE, G_MODULE_NAME||l_api_name||'.Parameters', 'p_call_from: '||p_call_from);
776:
777: -- clear tables
778: if p_redefault_section_code = 'Y' then
779: delete from JAI_AP_TDS_DEFAULT where INVOICE_ID = p_inv_id;
780: delete from JAI_AP_TDS_INV_TAXES where INVOICE_ID = p_inv_id and NVL(TAX_CATEGORY_OVERRIDEN,'N') = 'N'; --Added tax_category_overriden by Chong for bug#16248896
781: end if;
782:
783: -- get vendor type

Line 999: JAI_AP_TDS_DEFAULT (

995:
996: FOR l_index IN 1 .. la_aida_tab.COUNT LOOP
997:
998: INSERT INTO
999: JAI_AP_TDS_DEFAULT (
1000: INVOICE_ID,
1001: INVOICE_LINE_NUMBER,
1002: DISTRIBUTION_LINE_NUMBER,
1003: INVOICE_DISTRIBUTION_ID,

Line 1060: UPDATE JAI_AP_TDS_DEFAULT

1056: end if;
1057:
1058: jai_cmn_utils_pkg.WRITE_FND_LOG(G_LEVEL_STATEMENT, G_MODULE_NAME||l_api_name, 'Default section from vendor site: '||lv_default_section_code);
1059: --If any line missed mapping to any section, default on vendor site default section.
1060: UPDATE JAI_AP_TDS_DEFAULT
1061: SET TDS_SECTION_CODE = lv_default_section_code
1062: WHERE INVOICE_ID = p_inv_id
1063: AND TDS_SECTION_CODE IS NULL;
1064: end if; --NVL(lv_tds_vendor_default_flag, 'N') = 'Y' --Added by Chong for bug#16367707

Line 1075: UPDATE JAI_AP_TDS_DEFAULT

1071: loop
1072: la_cum_amt_tab.DELETE;
1073: fetch c_sectionwise_cum_amt BULK COLLECT INTO la_cum_amt_tab LIMIT LN_ARRAY_SIZE;
1074: forall ln_index IN 1 .. la_cum_amt_tab.COUNT
1075: UPDATE JAI_AP_TDS_DEFAULT
1076: SET CUMULATIVE_AMT = la_cum_amt_tab(ln_index).CUMULATIVE_AMT
1077: WHERE INVOICE_ID = p_inv_id
1078: AND INVOICE_DISTRIBUTION_ID = la_cum_amt_tab(ln_index).INVOICE_DISTRIBUTION_ID;
1079: EXIT WHEN c_sectionwise_cum_amt%NOTFOUND;

Line 1128: UPDATE JAI_AP_TDS_DEFAULT

1124: end if;
1125: -----------------------------------------------------------------------------
1126: --Added by Chong for bug#16274617 End
1127:
1128: UPDATE JAI_AP_TDS_DEFAULT
1129: SET TAX_CATEGORY_ID = ln_tax_ctg_id
1130: WHERE INVOICE_ID = p_inv_id;
1131: jai_cmn_utils_pkg.WRITE_FND_LOG(G_LEVEL_STATEMENT, G_MODULE_NAME||l_api_name, 'NO PAN 1@ln_tax_ctg_id: '||ln_tax_ctg_id);
1132: else

Line 1220: UPDATE JAI_AP_TDS_DEFAULT

1216: -- added by zhiwei.xin for bug 13745243 on 01-MAR-2012 end.
1217: jai_cmn_utils_pkg.WRITE_FND_LOG(G_LEVEL_STATEMENT, G_MODULE_NAME||l_api_name, '1@ln_thr_slab_id_old: '||ln_thr_slab_id_old);
1218: Commented out by Chong for bug#15939571 20121213 End*/
1219:
1220: UPDATE JAI_AP_TDS_DEFAULT
1221: SET CUMULATIVE_AMT = CUMULATIVE_AMT + NVL(ln_effective_amount,0)
1222: WHERE TDS_SECTION_CODE = disnt_sec_code_rec.TDS_SECTION_CODE
1223: AND INVOICE_ID = p_inv_id;
1224:

Line 1312: UPDATE JAI_AP_TDS_DEFAULT

1308: jai_cmn_utils_pkg.WRITE_FND_LOG(G_LEVEL_STATEMENT, G_MODULE_NAME||l_api_name, 'Mult on4@Tax end date issue in tax category: '||thrd_details_rec.TAX_CATEGORY_ID);
1309: return;
1310: end if;
1311:
1312: UPDATE JAI_AP_TDS_DEFAULT
1313: SET TAX_CATEGORY_ID = thrd_details_rec.TAX_CATEGORY_ID
1314: --UPdated by Zhiwei Hou on 20120116 begin
1315: -----------------------------------------------------
1316: --WHERE CUMULATIVE_AMT BETWEEN NVL(thrd_details_rec.FROM_AMOUNT,CUMULATIVE_AMT) AND NVL(thrd_details_rec.TO_AMOUNT,CUMULATIVE_AMT)

Line 1344: and JAI_AP_TDS_DEFAULT.accounting_date between nvl(jdsam.from_date,JAI_AP_TDS_DEFAULT.accounting_date)

1340: and jatta.natural_account_value = jdsam.natural_account_value
1341: and jatta.legal_entity_id = ln_legal_entity_id
1342: and jdsam.dtc_section_code = disnt_sec_code_rec.TDS_SECTION_CODE
1343: and jatta.natural_account_value = get_grp_sec_act_rec.natural_account_value
1344: and JAI_AP_TDS_DEFAULT.accounting_date between nvl(jdsam.from_date,JAI_AP_TDS_DEFAULT.accounting_date)
1345: and nvl(jdsam.to_date, JAI_AP_TDS_DEFAULT.accounting_date)
1346: )
1347: ;
1348: ----------------------------------------------------------------------

Line 1345: and nvl(jdsam.to_date, JAI_AP_TDS_DEFAULT.accounting_date)

1341: and jatta.legal_entity_id = ln_legal_entity_id
1342: and jdsam.dtc_section_code = disnt_sec_code_rec.TDS_SECTION_CODE
1343: and jatta.natural_account_value = get_grp_sec_act_rec.natural_account_value
1344: and JAI_AP_TDS_DEFAULT.accounting_date between nvl(jdsam.from_date,JAI_AP_TDS_DEFAULT.accounting_date)
1345: and nvl(jdsam.to_date, JAI_AP_TDS_DEFAULT.accounting_date)
1346: )
1347: ;
1348: ----------------------------------------------------------------------
1349: --Added by Chong for bug#15939571 20121213 End

Line 1369: UPDATE JAI_AP_TDS_DEFAULT

1365: close c_tax_category_id;
1366:
1367: jai_cmn_utils_pkg.WRITE_FND_LOG(G_LEVEL_STATEMENT, G_MODULE_NAME||l_api_name, 'multi on 5@ln_tax_ctg_id: '||ln_tax_ctg_id);
1368:
1369: UPDATE JAI_AP_TDS_DEFAULT
1370: SET TAX_CATEGORY_ID = ln_tax_ctg_id
1371: WHERE INVOICE_ID = p_inv_id
1372: AND TDS_SECTION_CODE = disnt_sec_code_rec.TDS_SECTION_CODE
1373: AND ACCOUNTING_DATE = get_grp_sec_act_rec.accounting_date

Line 1412: UPDATE JAI_AP_TDS_DEFAULT

1408: if (NVL(lv_end_date_check, '0') = '1') then
1409: jai_cmn_utils_pkg.WRITE_FND_LOG(G_LEVEL_STATEMENT, G_MODULE_NAME||l_api_name, 'multi on/eff off 3@Tax end date issue in tax category: '||thrd_details_rec.TAX_CATEGORY_ID);
1410: return;
1411: end if;
1412: UPDATE JAI_AP_TDS_DEFAULT
1413: SET TAX_CATEGORY_ID = thrd_details_rec.TAX_CATEGORY_ID
1414: --UPdated by Zhiwei Hou on 20120116 begin
1415: -----------------------------------------------------
1416: --WHERE CUMULATIVE_AMT BETWEEN NVL(thrd_details_rec.FROM_AMOUNT,CUMULATIVE_AMT) AND NVL(thrd_details_rec.TO_AMOUNT,CUMULATIVE_AMT)

Line 1442: UPDATE JAI_AP_TDS_DEFAULT

1438: close c_tax_category_id;
1439:
1440: jai_cmn_utils_pkg.WRITE_FND_LOG(G_LEVEL_STATEMENT, G_MODULE_NAME||l_api_name, 'multi on/eff off 4@ln_tax_ctg_id: '||ln_tax_ctg_id);
1441:
1442: UPDATE JAI_AP_TDS_DEFAULT
1443: SET TAX_CATEGORY_ID = ln_tax_ctg_id
1444: WHERE INVOICE_ID = p_inv_id
1445: AND TDS_SECTION_CODE = disnt_sec_code_rec.TDS_SECTION_CODE
1446: AND accounting_date = get_grp_sec_act_rec.accounting_date

Line 1505: UPDATE JAI_AP_TDS_DEFAULT

1501: --if (NVL(lv_end_date_check, '0') = '1') then --Commented by Chong for bug#16274617
1502: jai_cmn_utils_pkg.WRITE_FND_LOG(G_LEVEL_STATEMENT, G_MODULE_NAME||l_api_name, 'Mult off3@Tax end date issue in tax category: '||thrd_details_rec.TAX_CATEGORY_ID);
1503: return;
1504: end if;
1505: UPDATE JAI_AP_TDS_DEFAULT
1506: SET TAX_CATEGORY_ID = thrd_details_rec.TAX_CATEGORY_ID
1507: --UPdated by Zhiwei Hou on 20120116 begin
1508: -----------------------------------------------------
1509: --WHERE CUMULATIVE_AMT BETWEEN NVL(thrd_details_rec.FROM_AMOUNT,CUMULATIVE_AMT) AND NVL(thrd_details_rec.TO_AMOUNT,CUMULATIVE_AMT)

Line 1533: UPDATE JAI_AP_TDS_DEFAULT

1529: close c_tax_category_id;
1530:
1531: jai_cmn_utils_pkg.WRITE_FND_LOG(G_LEVEL_STATEMENT, G_MODULE_NAME||l_api_name, 'Mult off4@ln_tax_ctg_id: '||ln_tax_ctg_id);
1532:
1533: UPDATE JAI_AP_TDS_DEFAULT
1534: SET TAX_CATEGORY_ID = ln_tax_ctg_id
1535: WHERE INVOICE_ID = p_inv_id
1536: AND TDS_SECTION_CODE = disnt_sec_code_rec.TDS_SECTION_CODE
1537: AND TAX_CATEGORY_ID IS NULL;

Line 1543: UPDATE JAI_AP_TDS_DEFAULT

1539: end if;
1540: -- added by zhiwei.xin for bug 13745243 on 01-MAR-2012 end.
1541: end if;
1542:
1543: UPDATE JAI_AP_TDS_DEFAULT
1544: SET CUMULATIVE_AMT = CUMULATIVE_AMT - NVL(ln_effective_amount,0)
1545: WHERE TDS_SECTION_CODE = disnt_sec_code_rec.TDS_SECTION_CODE
1546: AND INVOICE_ID = p_inv_id;
1547:

Line 1582: JAI_AP_TDS_DEFAULT (

1578: p_get_inv_dist(p_inv_id);
1579: for l_index IN 1 .. la_aida_tab.COUNT loop
1580:
1581: INSERT INTO
1582: JAI_AP_TDS_DEFAULT (
1583: INVOICE_ID,
1584: INVOICE_LINE_NUMBER,
1585: DISTRIBUTION_LINE_NUMBER,
1586: INVOICE_DISTRIBUTION_ID,

Line 1628: UPDATE JAI_AP_TDS_DEFAULT

1624: loop
1625: la_cum_amt_tab.DELETE;
1626: fetch c_sectionwise_cum_amt BULK COLLECT INTO la_cum_amt_tab LIMIT LN_ARRAY_SIZE;
1627: forall ln_index IN 1 .. la_cum_amt_tab.COUNT
1628: UPDATE JAI_AP_TDS_DEFAULT
1629: SET CUMULATIVE_AMT = la_cum_amt_tab(ln_index).CUMULATIVE_AMT
1630: WHERE INVOICE_ID = p_inv_id
1631: AND INVOICE_DISTRIBUTION_ID = la_cum_amt_tab(ln_index).INVOICE_DISTRIBUTION_ID;
1632: exit when c_sectionwise_cum_amt%notfound;

Line 1681: UPDATE JAI_AP_TDS_DEFAULT

1677: end if;
1678: -----------------------------------------------------------------------------
1679: --Added by Chong for bug#16274617 End
1680:
1681: UPDATE JAI_AP_TDS_DEFAULT
1682: SET TAX_CATEGORY_ID = ln_tax_ctg_id
1683: WHERE INVOICE_ID = p_inv_id;
1684:
1685: jai_cmn_utils_pkg.WRITE_FND_LOG(G_LEVEL_STATEMENT, G_MODULE_NAME||l_api_name, 'NO PAN 2@ln_tax_ctg_id: '||ln_tax_ctg_id);

Line 1780: UPDATE JAI_AP_TDS_DEFAULT

1776: end if;
1777:
1778: -- added by zhiwei.xin for bug 13745243 on 01-Mar-2012 end.
1779:
1780: UPDATE JAI_AP_TDS_DEFAULT
1781: SET CUMULATIVE_AMT = CUMULATIVE_AMT + NVL(ln_effective_amount,0)
1782: WHERE TDS_SECTION_CODE = disnt_sec_code_rec.TDS_SECTION_CODE
1783: AND INVOICE_ID = p_inv_id;
1784:

Line 1812: UPDATE JAI_AP_TDS_DEFAULT

1808: jai_cmn_utils_pkg.WRITE_FND_LOG(G_LEVEL_STATEMENT, G_MODULE_NAME||l_api_name, 'Vendor site default @Tax end date issue in tax category: '||thrd_details_rec.TAX_CATEGORY_ID);
1809: return;
1810: end if;
1811:
1812: UPDATE JAI_AP_TDS_DEFAULT
1813: SET TAX_CATEGORY_ID = thrd_details_rec.TAX_CATEGORY_ID
1814: --UPdated by Zhiwei Hou on 20120116 begin
1815: -----------------------------------------------------
1816: --WHERE CUMULATIVE_AMT BETWEEN NVL(thrd_details_rec.FROM_AMOUNT,CUMULATIVE_AMT) AND NVL(thrd_details_rec.TO_AMOUNT,CUMULATIVE_AMT)

Line 1830: UPDATE JAI_AP_TDS_DEFAULT

1826: AND TDS_SECTION_CODE = disnt_sec_code_rec.TDS_SECTION_CODE -- added by zhiwei.xin for bug 13745243 on 01-Mar-2012
1827: AND INVOICE_ID = p_inv_id;
1828: end loop;
1829:
1830: UPDATE JAI_AP_TDS_DEFAULT
1831: SET CUMULATIVE_AMT = CUMULATIVE_AMT - NVL(ln_effective_amount,0)
1832: WHERE TDS_SECTION_CODE = disnt_sec_code_rec.TDS_SECTION_CODE
1833: AND INVOICE_ID = p_inv_id;
1834:

Line 1843: UPDATE JAI_AP_TDS_DEFAULT

1839: open c_tax_category_id(ln_thr_slab_id_new, ln_org_id);
1840: fetch c_tax_category_id into ln_tax_ctg_id;
1841: close c_tax_category_id;
1842:
1843: UPDATE JAI_AP_TDS_DEFAULT
1844: SET TAX_CATEGORY_ID = ln_tax_ctg_id
1845: WHERE INVOICE_ID = p_inv_id
1846: AND TDS_SECTION_CODE = disnt_sec_code_rec.TDS_SECTION_CODE
1847: AND TAX_CATEGORY_ID IS NULL;

Line 1922: update JAI_AP_TDS_DEFAULT

1918: close c_get_tds_on_service;
1919: if NVL(lv_tds_on_service_flg, 'N') = 'Y' then
1920:
1921: -- added by zhiwei.xin for bug 13731393 on 29-Feb-2012 begin
1922: update JAI_AP_TDS_DEFAULT
1923: set TDS_SECTION_CODE = JAI_AP_UTILS_PKG.GET_SECTION_CODE(ln_parent_dist_ccid, lv_segment_name, ln_legal_entity_id)
1924: where INVOICE_ID = p_inv_id
1925: and INVOICE_DISTRIBUTION_ID = ap_tds_def_rec.INVOICE_DISTRIBUTION_ID;
1926: ap_tds_def_rec.TDS_SECTION_CODE := JAI_AP_UTILS_PKG.GET_SECTION_CODE(ln_parent_dist_ccid, lv_segment_name, ln_legal_entity_id);