DBA Data[Home] [Help]

APPS.JAI_AP_STND_TAX_PROCESS dependencies on JAI_CONSTANTS

Line 1189: AND jcdt.source_doc_type = jai_constants.g_ap_standalone_invoice --Added by eric on Jan 29,2008

1185: AND aila.line_number = jail.invoice_line_number
1186: AND jail.parent_invoice_line_number = pn_invoice_item_ln_number
1187: AND jail.line_type_lookup_code = GV_CONSTANT_MISCELLANEOUS
1188: AND jail.invoice_id = ln_invoice_id
1189: AND jcdt.source_doc_type = jai_constants.g_ap_standalone_invoice --Added by eric on Jan 29,2008
1190: ORDER BY jail.invoice_line_number;
1191:
1192: CURSOR get_allocation_numbers_cur (pn_invoice_line_number NUMBER)
1193: IS

Line 1281: IF (NVL (tax_line_rec.modvat_flag, 'N') = jai_constants.no

1277: --get tax definition parameters end
1278:
1279: --for non recoverable tax lines distribution numbers should
1280: --be same as the dist line numbers of its item line
1281: IF (NVL (tax_line_rec.modvat_flag, 'N') = jai_constants.no
1282: OR NVL (tax_rec.mod_cr_percentage, -1) <= 0
1283: )
1284: THEN
1285: -- if item dist line number > dist line numbers of current tax line

Line 1328: IF (NVL (tax_line_rec.modvat_flag, 'N') = jai_constants.no

1324: INTO
1325: tax_rec;
1326: CLOSE get_tax_cur;
1327: /* Bug 14218386 -end */
1328: IF (NVL (tax_line_rec.modvat_flag, 'N') = jai_constants.no
1329: OR NVL (tax_rec.mod_cr_percentage, -1) <= 0
1330: )
1331: THEN
1332: IF (ln_item_allocation_number >1)

Line 1485: WHERE registration_type = jai_constants.regn_type_tax_types

1481: FROM dual
1482: WHERE EXISTS (
1483: SELECT 'X'
1484: FROM jai_rgm_registrations
1485: WHERE registration_type = jai_constants.regn_type_tax_types
1486: AND attribute_code = pv_tax_type
1487: AND regime_id IN ( SELECT regime_id
1488: FROM jai_rgm_definitions
1489: WHERE regime_code = jai_constants.service_regime

Line 1489: WHERE regime_code = jai_constants.service_regime

1485: WHERE registration_type = jai_constants.regn_type_tax_types
1486: AND attribute_code = pv_tax_type
1487: AND regime_id IN ( SELECT regime_id
1488: FROM jai_rgm_definitions
1489: WHERE regime_code = jai_constants.service_regime
1490: )
1491: );
1492:
1493:

Line 1578: IF ( NVL (pv_modvat_flag, 'N') = jai_constants.no

1574: , 'pn_cr_percentage ' || pn_cr_percentage
1575: );
1576: END IF; --(ln_proc_level >= ln_dbg_level)
1577:
1578: IF ( NVL (pv_modvat_flag, 'N') = jai_constants.no
1579: OR NVL (pn_cr_percentage, -1) <= 0
1580: )
1581: THEN
1582: lv_tax_type := 'NR' ; --NON RECOVERABLE

Line 1584: ( NVL (pv_modvat_flag, 'N') = jai_constants.yes

1580: )
1581: THEN
1582: lv_tax_type := 'NR' ; --NON RECOVERABLE
1583: ELSIF
1584: ( NVL (pv_modvat_flag, 'N') = jai_constants.yes
1585: AND NVL (pn_cr_percentage, -1) = 100
1586: )
1587: THEN
1588: lv_tax_type := 'FR' ; --FULLY RECOVERABLE

Line 1590: ( NVL (pv_modvat_flag, 'N') = jai_constants.yes

1586: )
1587: THEN
1588: lv_tax_type := 'FR' ; --FULLY RECOVERABLE
1589: ELSIF
1590: ( NVL (pv_modvat_flag, 'N') = jai_constants.yes
1591: AND NVL (pn_cr_percentage, -1) < 100
1592: )
1593: THEN
1594: lv_tax_type := 'PR' ; --PARTIALLY RECOVERABLE

Line 1595: END IF;--( (pv_modvat_flag, 'N') = jai_constants.no)

1591: AND NVL (pn_cr_percentage, -1) < 100
1592: )
1593: THEN
1594: lv_tax_type := 'PR' ; --PARTIALLY RECOVERABLE
1595: END IF;--( (pv_modvat_flag, 'N') = jai_constants.no)
1596:
1597:
1598: IF ( ln_proc_level >= ln_dbg_level)
1599: THEN

Line 1696: AND registration_type =jai_constants.regn_type_tax_types --tax type

1692: attribute_code tax_type
1693: FROM
1694: jai_rgm_registrations
1695: WHERE regime_id = pn_regime_id
1696: AND registration_type =jai_constants.regn_type_tax_types --tax type
1697: AND attribute_code = pv_tax_type_code;
1698:
1699: CURSOR regime_account_cur
1700: ( pn_regime_id NUMBER

Line 1711: AND tax_types.registration_type = jai_constants.regn_type_tax_types

1707: FROM
1708: jai_rgm_registrations tax_types
1709: , jai_rgm_registrations accnts
1710: WHERE tax_types.regime_id = pn_regime_id
1711: AND tax_types.registration_type = jai_constants.regn_type_tax_types
1712: AND tax_types.attribute_code = pn_tax_type
1713: AND accnts.regime_id = tax_types.regime_id
1714: AND accnts.registration_type = jai_constants.regn_type_accounts
1715: AND accnts.parent_registration_id = tax_types.registration_id

Line 1714: AND accnts.registration_type = jai_constants.regn_type_accounts

1710: WHERE tax_types.regime_id = pn_regime_id
1711: AND tax_types.registration_type = jai_constants.regn_type_tax_types
1712: AND tax_types.attribute_code = pn_tax_type
1713: AND accnts.regime_id = tax_types.regime_id
1714: AND accnts.registration_type = jai_constants.regn_type_accounts
1715: AND accnts.parent_registration_id = tax_types.registration_id
1716: -- AND accnts.attribute_code = jai_constants.recovery_interim; --Comment by Chong.Lei for POT code port
1717: AND accnts.attribute_code = pv_account_name;--Modified by Xiao for POT changes, reg bug#12533434, --Added by Chong.Lei for POT code port
1718:

Line 1716: -- AND accnts.attribute_code = jai_constants.recovery_interim; --Comment by Chong.Lei for POT code port

1712: AND tax_types.attribute_code = pn_tax_type
1713: AND accnts.regime_id = tax_types.regime_id
1714: AND accnts.registration_type = jai_constants.regn_type_accounts
1715: AND accnts.parent_registration_id = tax_types.registration_id
1716: -- AND accnts.attribute_code = jai_constants.recovery_interim; --Comment by Chong.Lei for POT code port
1717: AND accnts.attribute_code = pv_account_name;--Modified by Xiao for POT changes, reg bug#12533434, --Added by Chong.Lei for POT code port
1718:
1719: --start additions for bug#9775984
1720: Cursor get_dflt_ccid IS

Line 1800: OPEN jai_regimes_cur (jai_constants.service_regime);

1796: close get_dflt_ccid;
1797: end if;
1798: --end additions for bug#9775984
1799: ELSE -- recoverable tax
1800: OPEN jai_regimes_cur (jai_constants.service_regime);
1801: FETCH jai_regimes_cur
1802: INTO
1803: service_regimes_rec;
1804: CLOSE jai_regimes_cur;

Line 1806: OPEN jai_regimes_cur (jai_constants.vat_regime);

1802: INTO
1803: service_regimes_rec;
1804: CLOSE jai_regimes_cur;
1805:
1806: OPEN jai_regimes_cur (jai_constants.vat_regime);
1807: FETCH jai_regimes_cur
1808: INTO
1809: vat_regimes_rec;
1810: CLOSE jai_regimes_cur;

Line 1823: lv_regime_code := jai_constants.service_regime;

1819: CLOSE regime_tax_type_cur;
1820:
1821: IF lv_regim_tax_type IS NOT NULL
1822: THEN
1823: lv_regime_code := jai_constants.service_regime;
1824: ELSE -- (r_service_regime_tax is null)
1825:
1826: -- vat taxes
1827: OPEN regime_tax_type_cur ( vat_regimes_rec.regime_id

Line 1839: lv_regime_code := jai_constants.vat_regime;

1835:
1836:
1837: IF lv_regim_tax_type IS NOT NULL
1838: THEN
1839: lv_regime_code := jai_constants.vat_regime;
1840: END IF; --(lv_regim_tax_type IS NOT NULL)
1841:
1842: END IF; --( end of r_service_regime_tax_type level)
1843:

Line 1853: lv_account_name := jai_constants.liability_interim;

1849: CLOSE get_invoice_type_cur;
1850:
1851: IF lv_invoice_type = 'CREDIT' THEN --Xiao for DM/CM Accounting.
1852: --IF lv_invoice_type IN ('CREDIT', 'DEBIT') THEN
1853: lv_account_name := jai_constants.liability_interim;
1854: ELSE
1855: lv_account_name := jai_constants.recovery_interim;
1856: END IF;
1857: --------------------------------------------------------------------

Line 1855: lv_account_name := jai_constants.recovery_interim;

1851: IF lv_invoice_type = 'CREDIT' THEN --Xiao for DM/CM Accounting.
1852: --IF lv_invoice_type IN ('CREDIT', 'DEBIT') THEN
1853: lv_account_name := jai_constants.liability_interim;
1854: ELSE
1855: lv_account_name := jai_constants.recovery_interim;
1856: END IF;
1857: --------------------------------------------------------------------
1858: --Add by Xiao for POT change, reg bug#12533434, end.
1859: -- Added by Chong.Lei for POT code port end

Line 1894: , p_organization_type => jai_constants.orgn_type_io

1890: THEN
1891: ln_dist_acct_ccid :=
1892: jai_cmn_rgm_recording_pkg.get_account
1893: ( p_regime_id => ln_regime_id
1894: , p_organization_type => jai_constants.orgn_type_io
1895: , p_organization_id => pn_organization_id
1896: , p_location_id => pn_location_id
1897: , p_tax_type => pn_tax_type_code
1898: -- , p_account_name => jai_constants.recovery_interim --Comment by Chong.Lei for POT code port

Line 1898: -- , p_account_name => jai_constants.recovery_interim --Comment by Chong.Lei for POT code port

1894: , p_organization_type => jai_constants.orgn_type_io
1895: , p_organization_id => pn_organization_id
1896: , p_location_id => pn_location_id
1897: , p_tax_type => pn_tax_type_code
1898: -- , p_account_name => jai_constants.recovery_interim --Comment by Chong.Lei for POT code port
1899: , p_account_name => lv_account_name--Modified by Xiao for POT changes. reg bug#12533434 --Added by Chong.Lei for POT code port
1900: );
1901:
1902: END IF; --(pn_organization_id IS NULL AND pn_location_id IS NULL )

Line 2065: AND source_doc_type = jai_constants.g_ap_standalone_invoice;

2061: jai_cmn_document_taxes
2062: SET
2063: source_doc_id = pn_invoice_id
2064: WHERE source_doc_id = pn_invoice_id
2065: AND source_doc_type = jai_constants.g_ap_standalone_invoice;
2066:
2067: SELECT
2068: NVL(MAX(source_doc_line_id), 0)
2069: INTO

Line 2074: AND source_doc_type = jai_constants.g_ap_standalone_invoice;

2070: ln_max_line_number
2071: FROM
2072: jai_cmn_document_taxes
2073: WHERE source_doc_id = pn_invoice_id
2074: AND source_doc_type = jai_constants.g_ap_standalone_invoice;
2075:
2076:
2077: IF ( ln_proc_level >= ln_dbg_level)
2078: THEN

Line 2159: AND source_doc_type = jai_constants.g_ap_standalone_invoice;

2155: SET
2156: source_doc_parent_line_no = pn_parent_invoice_line_number
2157: WHERE source_doc_id = pn_invoice_id
2158: AND source_doc_parent_line_no = pn_parent_invoice_line_number
2159: AND source_doc_type = jai_constants.g_ap_standalone_invoice;
2160:
2161: SELECT
2162: NVL(MAX(tax_line_no),0)
2163: INTO

Line 2169: AND source_doc_type = jai_constants.g_ap_standalone_invoice;

2165: FROM
2166: jai_cmn_document_taxes
2167: WHERE source_doc_id = pn_invoice_id
2168: AND source_doc_parent_line_no = pn_parent_invoice_line_number
2169: AND source_doc_type = jai_constants.g_ap_standalone_invoice;
2170:
2171: IF ( ln_proc_level >= ln_dbg_level)
2172: THEN
2173: FND_LOG.STRING ( ln_proc_level

Line 2554: AND jcdt.source_doc_type = jai_constants.g_ap_standalone_invoice

2550: DELETE
2551: FROM
2552: jai_cmn_document_taxes jcdt
2553: WHERE jcdt.source_doc_id = ln_invoice_id
2554: AND jcdt.source_doc_type = jai_constants.g_ap_standalone_invoice
2555: --added by eric for inclusive tax
2556: --------------------------------------------------------------------
2557: AND jcdt.source_doc_parent_line_no=
2558: NVL( ln_invoice_line_number, jcdt.source_doc_parent_line_no);

Line 2741: AND jcdt.source_doc_type = jai_constants.g_ap_standalone_invoice

2737: DELETE
2738: FROM
2739: jai_cmn_document_taxes jcdt
2740: WHERE jcdt.source_doc_id = ln_invoice_id
2741: AND jcdt.source_doc_type = jai_constants.g_ap_standalone_invoice
2742: --modified by eric for inclusive taxes
2743: ----------------------------------------------------------------
2744: AND NOT EXISTS
2745: (

Line 3564: AND jcdt.source_doc_type = jai_constants.g_ap_standalone_invoice;

3560: FROM
3561: jai_cmn_document_taxes jcdt
3562: WHERE jcdt.source_doc_id = pn_invoice_id
3563: AND jcdt.source_doc_parent_line_no = pn_line_number
3564: AND jcdt.source_doc_type = jai_constants.g_ap_standalone_invoice;
3565:
3566:
3567: IF ln_tax_line_no > 0
3568: THEN

Line 3901: AND source_doc_type = jai_constants.g_ap_standalone_invoice

3897: tax_amt=0,
3898: --base_tax_amount=0,
3899: func_tax_amt=0
3900: WHERE source_doc_id = ln_std_invoice_id
3901: AND source_doc_type = jai_constants.g_ap_standalone_invoice
3902: AND source_doc_parent_line_no=
3903: NVL( diff_inv_lines_rec.line_number, source_doc_parent_line_no);
3904: /* Added call to Update_Jai_Line_Amount for bug 14650698 */
3905: Update_Jai_Line_Amount

Line 4139: ( transaction_name => jai_constants.g_ap_standalone_invoice

4135: );
4136: END IF; --( ln_proc_level >= ln_dbg_level )
4137:
4138: jai_cmn_tax_defaultation_pkg.ja_in_calc_prec_taxes
4139: ( transaction_name => jai_constants.g_ap_standalone_invoice
4140: , p_tax_category_id => ln_tax_category_id
4141: , p_header_id => ln_invoice_id
4142: , p_line_id => ln_line_number
4143: --, p_assessable_value => 0 modified by eric on Jan 25th,2008

Line 4160: , p_source_trx_type => jai_constants.G_AP_STANDALONE_INVOICE

4156: , p_last_update_login => ln_login_id
4157: , p_operation_flag => NULL
4158: --, p_vat_assessable_value => 0
4159: , p_vat_assessable_value => xn_tax_amount --modified by eric ,replace 0 with line amount
4160: , p_source_trx_type => jai_constants.G_AP_STANDALONE_INVOICE
4161: , p_source_table_name => GV_JAI_AP_INVOICE_LINES --'JAI_AP_INVOICE_LINES'
4162: , p_action => jai_constants.default_taxes
4163: --, pn_gst_assessable_value => xn_tax_amount
4164: );

Line 4162: , p_action => jai_constants.default_taxes

4158: --, p_vat_assessable_value => 0
4159: , p_vat_assessable_value => xn_tax_amount --modified by eric ,replace 0 with line amount
4160: , p_source_trx_type => jai_constants.G_AP_STANDALONE_INVOICE
4161: , p_source_table_name => GV_JAI_AP_INVOICE_LINES --'JAI_AP_INVOICE_LINES'
4162: , p_action => jai_constants.default_taxes
4163: --, pn_gst_assessable_value => xn_tax_amount
4164: );
4165:
4166: --log for debug

Line 4340: AND source_doc_type = jai_constants.g_ap_standalone_invoice;

4336: jai_cmn_document_taxes
4337: WHERE source_doc_id = pn_source_doc_id
4338: AND source_DOC_parent_line_no = pn_source_parent_line_no
4339: AND tax_id = pn_tax_id
4340: AND source_doc_type = jai_constants.g_ap_standalone_invoice;
4341:
4342: IF (ln_count >1)
4343: THEN
4344: lv_pr_processed_flag := jai_constants.yes ;

Line 4344: lv_pr_processed_flag := jai_constants.yes ;

4340: AND source_doc_type = jai_constants.g_ap_standalone_invoice;
4341:
4342: IF (ln_count >1)
4343: THEN
4344: lv_pr_processed_flag := jai_constants.yes ;
4345: ELSE
4346: lv_pr_processed_flag := jai_constants.no ;
4347: END IF;
4348:

Line 4346: lv_pr_processed_flag := jai_constants.no ;

4342: IF (ln_count >1)
4343: THEN
4344: lv_pr_processed_flag := jai_constants.yes ;
4345: ELSE
4346: lv_pr_processed_flag := jai_constants.no ;
4347: END IF;
4348:
4349: IF ( ln_proc_level >= ln_dbg_level)
4350: THEN

Line 4396: -- be jai_constants.recalculate_taxes

4392: -- pn_location_id NUMBER location id
4393: -- pn_invoice_id NUMBER invoice id
4394: -- pn_line_number NUMBER item line number
4395: -- p_action VARCHAR2 normally it is DEFAULT_TAXES, it can
4396: -- be jai_constants.recalculate_taxes
4397: -- pn_tax_category_id NUMBER tax category id
4398: --
4399: --
4400: -- Out:

Line 4449: , pv_action IN VARCHAR2 DEFAULT jai_constants.default_taxes

4445: , pv_currency IN VARCHAR2
4446: , pn_location_id IN NUMBER
4447: , pn_invoice_id IN NUMBER
4448: , pn_line_number IN NUMBER DEFAULT NULL
4449: , pv_action IN VARCHAR2 DEFAULT jai_constants.default_taxes
4450: , pn_tax_category_id IN NUMBER
4451: , pv_tax_modified IN VARCHAR2
4452: )
4453: IS

Line 4544: AND jcdt.source_doc_type = jai_constants.g_ap_standalone_invoice

4540: , jai_cmn_taxes_all jcta --Added by Eric for Inclusive Tax
4541: WHERE jcdt.source_doc_id = pn_invoice_id
4542: AND jcdt.source_doc_parent_line_no = pn_parent_line_number
4543: AND jcdt.tax_id = jcta.tax_id --Added by Eric for Inclusive Tax
4544: AND jcdt.source_doc_type = jai_constants.g_ap_standalone_invoice
4545: --Added by Qiong for reverse charge bug#16001407 Begin
4546: ------------------------------------------------------------------
4547: AND ( NVL(jcta.reverse_charge_flag,'N') = 'N'
4548: OR ( NVL(jcta.reverse_charge_flag,'N') = 'Y'

Line 4605: AND jcdt.source_doc_type = jai_constants.g_ap_standalone_invoice

4601: jai_cmn_document_taxes jcdt
4602: WHERE jcdt.source_doc_id = pn_invoice_id
4603: AND jcdt.source_doc_line_id = pn_line_number
4604: AND jcdt.source_doc_parent_line_no = pn_line_number
4605: AND jcdt.source_doc_type = jai_constants.g_ap_standalone_invoice
4606: ORDER BY jcdt.tax_line_no FOR UPDATE;
4607:
4608: CURSOR get_tax_cur (pn_tax_id NUMBER) IS
4609: SELECT

Line 4926: WHERE regime_code = jai_constants.service_regime;

4922:
4923: CURSOR get_regime_id_cur IS
4924: SELECT regime_id
4925: FROM jai_rgm_definitions
4926: WHERE regime_code = jai_constants.service_regime;
4927:
4928: ln_regime_id number;
4929: ld_accrual_date DATE;
4930: -----------------------------------------------------------------------

Line 5433: IF pv_action = jai_constants.default_taxes

5429: ln_source_doc_line_id := ln_max_inv_line_num ;
5430: END IF;--(lb_inclusive_tax)
5431: ------------------------------------------------------------
5432:
5433: IF pv_action = jai_constants.default_taxes
5434: THEN
5435: OPEN get_tax_cur (jai_default_doc_taxes_rec.tax_id);
5436: FETCH get_tax_cur
5437: INTO

Line 5524: ELSIF ( lv_tax_type='PR' AND lv_pr_processed_flag =JAI_CONSTANTS.no)

5520:
5521: --To fix the bug of processing the PR tax on the splitted Recvoerable portion
5522: --added by eric to fix the bug bug#6784111 on Jan 29,2008 ,begin
5523: ----------------------------------------------------------------------
5524: ELSIF ( lv_tax_type='PR' AND lv_pr_processed_flag =JAI_CONSTANTS.no)
5525: THEN
5526: --------------------------------------------------------------------
5527: --added by eric to fix the bug bug#6784111 on Jan 29,2008 ,end
5528: