DBA Data[Home] [Help]

APPS.JAI_AP_STND_TAX_PROCESS dependencies on JAI_CMN_DOCUMENT_TAXES

Line 992: , jai_cmn_document_taxes jcdt

988: , NVL(jcdt.modvat_flag,'N') modvat_flag
989: , aila.base_amount base_amount
990: FROM
991: jai_ap_invoice_lines jail
992: , jai_cmn_document_taxes jcdt
993: , ap_invoice_lines_all aila
994: WHERE jcdt.source_doc_id = jail.invoice_id
995: AND jcdt.source_doc_line_id = jail.invoice_line_number
996: AND aila.invoice_id = jail.invoice_id

Line 1736: jai_cmn_document_taxes

1732: END IF;
1733:
1734: -- add row level lock to the table
1735: UPDATE
1736: jai_cmn_document_taxes
1737: SET
1738: source_doc_id = pn_invoice_id
1739: WHERE source_doc_id = pn_invoice_id
1740: AND source_doc_type = jai_constants.g_ap_standalone_invoice;

Line 1747: jai_cmn_document_taxes

1743: NVL(MAX(source_doc_line_id), 0)
1744: INTO
1745: ln_max_line_number
1746: FROM
1747: jai_cmn_document_taxes
1748: WHERE source_doc_id = pn_invoice_id
1749: AND source_doc_type = jai_constants.g_ap_standalone_invoice;
1750:
1751:

Line 1829: jai_cmn_document_taxes

1825: END IF;
1826:
1827: --add row level lock on the table to avoid data conflication
1828: UPDATE
1829: jai_cmn_document_taxes
1830: SET
1831: source_doc_parent_line_no = pn_parent_invoice_line_number
1832: WHERE source_doc_id = pn_invoice_id
1833: AND source_doc_parent_line_no = pn_parent_invoice_line_number

Line 1841: jai_cmn_document_taxes

1837: NVL(MAX(tax_line_no),0)
1838: INTO
1839: ln_max_tax_line_num
1840: FROM
1841: jai_cmn_document_taxes
1842: WHERE source_doc_id = pn_invoice_id
1843: AND source_doc_parent_line_no = pn_parent_invoice_line_number
1844: AND source_doc_type = jai_constants.g_ap_standalone_invoice;
1845:

Line 2169: -- jai_ap_invoice_line. Besides, all tax lines in jai_cmn_document_taxes

2165: --
2166: -- DESCRIPTION:
2167: --
2168: -- Delete exclusive taxes from ap invoice/dist lines table and
2169: -- jai_ap_invoice_line. Besides, all tax lines in jai_cmn_document_taxes
2170: -- will be deleted in case of pv_modified_only_flag='N'
2171: -- PARAMETERS:
2172: -- In: pn_invoice_id NUMBER invoice id
2173: -- pn_line_number NUMBER invoice item line number

Line 2227: jai_cmn_document_taxes jcdt

2223: --delete all taxes lines for the specified invoice id and invoice item line
2224: --if invoice line number is null, all lines for the invoice will be deleted
2225: DELETE
2226: FROM
2227: jai_cmn_document_taxes jcdt
2228: WHERE jcdt.source_doc_id = ln_invoice_id
2229: AND jcdt.source_doc_type = jai_constants.g_ap_standalone_invoice
2230: --added by eric for inclusive tax
2231: --------------------------------------------------------------------

Line 2255: || '.Delete from jai_cmn_document_taxes'

2251: IF ( ln_proc_level >= ln_dbg_level)
2252: THEN
2253: FND_LOG.STRING( ln_proc_level
2254: , GV_MODULE_PREFIX ||'.'|| lv_proc_name
2255: || '.Delete from jai_cmn_document_taxes'
2256: , SQL%ROWCOUNT||' ROWS DELETED '
2257: );
2258: END IF;
2259: END IF; --(lv_modified_only_flag = 'N')

Line 2411: --table from jai_cmn_document_taxes

2407: -- and the corresoponding item row in jai_ap_invoice_lines need to be erased
2408: -- either
2409:
2410: --delete all tax lines not attached to a item that exists in AP Inv Line
2411: --table from jai_cmn_document_taxes
2412: DELETE
2413: FROM
2414: jai_cmn_document_taxes jcdt
2415: WHERE jcdt.source_doc_id = ln_invoice_id

Line 2414: jai_cmn_document_taxes jcdt

2410: --delete all tax lines not attached to a item that exists in AP Inv Line
2411: --table from jai_cmn_document_taxes
2412: DELETE
2413: FROM
2414: jai_cmn_document_taxes jcdt
2415: WHERE jcdt.source_doc_id = ln_invoice_id
2416: AND jcdt.source_doc_type = jai_constants.g_ap_standalone_invoice
2417: --modified by eric for inclusive taxes
2418: ----------------------------------------------------------------

Line 2992: jai_cmn_document_taxes jcdt

2988: COUNT(*)
2989: INTO
2990: ln_tax_line_no
2991: FROM
2992: jai_cmn_document_taxes jcdt
2993: WHERE jcdt.source_doc_id = pn_invoice_id
2994: AND jcdt.source_doc_parent_line_no = pn_line_number
2995: AND jcdt.source_doc_type = jai_constants.g_ap_standalone_invoice;
2996:

Line 3250: -- DO NOT DELETE lines from jai_cmn_document_taxes

3246:
3247: END IF;
3248:
3249: -- the tax category remains unchanged but the user enters new taxes
3250: -- DO NOT DELETE lines from jai_cmn_document_taxes
3251: -- delte from other tables and then default
3252: IF ( NVL ( ln_std_tax_category_id, -999) =
3253: NVL ( ln_jai_tax_line_ctg_id, -999)
3254: AND NVL (lv_std_tax_modified, 'N') = 'Y'

Line 3400: -- into jai_cmn_document_taxes

3396: --
3397: -- DESCRIPTION:
3398: --
3399: -- This procedure is to invoke standard procedure to insert item information
3400: -- into jai_cmn_document_taxes
3401: --
3402: -- PARAMETERS:
3403: -- In: pn_invoice_id IN NUMBER invoice id
3404: -- pn_line_number IN NUMBER item line number

Line 3681: jai_cmn_document_taxes

3677: COUNT(tax_id)
3678: INTO
3679: ln_count
3680: FROM
3681: jai_cmn_document_taxes
3682: WHERE source_doc_id = pn_source_doc_id
3683: AND source_DOC_parent_line_no = pn_source_parent_line_no
3684: AND tax_id = pn_tax_id
3685: AND source_doc_type = jai_constants.g_ap_standalone_invoice;

Line 3855: jai_cmn_document_taxes jcdt

3851: , jcdt.vendor_id
3852: , jcdt.source_doc_parent_line_no
3853: , jcta.inclusive_tax_flag inc_tax_flag --Added by Eric for Inclusive Tax
3854: FROM
3855: jai_cmn_document_taxes jcdt
3856: , jai_cmn_taxes_all jcta --Added by Eric for Inclusive Tax
3857: WHERE jcdt.source_doc_id = pn_invoice_id
3858: AND jcdt.source_doc_parent_line_no = pn_parent_line_number
3859: AND jcdt.tax_id = jcta.tax_id --Added by Eric for Inclusive Tax

Line 3906: jai_cmn_document_taxes jcdt

3902: , jcdt.object_version_number
3903: , jcdt.vendor_id
3904: , jcdt.source_doc_parent_line_no
3905: FROM
3906: jai_cmn_document_taxes jcdt
3907: WHERE jcdt.source_doc_id = pn_invoice_id
3908: AND jcdt.source_doc_line_id = pn_line_number
3909: AND jcdt.source_doc_parent_line_no = pn_line_number
3910: AND jcdt.source_doc_type = jai_constants.g_ap_standalone_invoice

Line 4143: 'INSERT INTO jai_cmn_document_taxes

4139: , :18
4140: )';
4141:
4142: lv_insert_jai_tax_sql :=
4143: 'INSERT INTO jai_cmn_document_taxes
4144: ( doc_tax_id
4145: , tax_line_no
4146: , tax_id
4147: , tax_type

Line 4476: -- inserts taxes into jai_cmn_document_taxes

4472: --insert into eric_log values (7.3,'ap_invoice_lines_rec.line_number :'||ap_invoice_lines_rec.line_number,sysdate);
4473:
4474: ln_tax_amount := ap_invoice_lines_rec.amount;
4475:
4476: -- inserts taxes into jai_cmn_document_taxes
4477: IF NVL (pv_tax_modified, 'N') = 'N'
4478: THEN
4479: Default_Calculate_Taxes
4480: ( pn_invoice_id => ap_invoice_lines_rec.invoice_id

Line 4533: --jai_cmn_document_taxes.source_doc_line_id

4529: ( ln_invoice_id
4530: , ap_invoice_lines_rec.line_number
4531: );
4532: --update the tax line number for the filed of
4533: --jai_cmn_document_taxes.source_doc_line_id
4534: --and split each PR taxes into to two lines
4535: FOR jai_default_doc_taxes_rec IN
4536: jai_default_doc_taxes_cur
4537: ( pn_invoice_id =>ln_invoice_id

Line 4614: jai_cmn_document_taxes

4610: IF (lv_tax_type='FR' OR lv_tax_type='NR')
4611: THEN
4612: -- update the source_doc_line_id to the real invoice line number
4613: UPDATE
4614: jai_cmn_document_taxes
4615: SET
4616: --modified by eric for inclusive tax
4617: ----------------------------------------------------------------
4618: source_doc_line_id = ln_source_doc_line_id --ln_max_inv_line_num

Line 4638: -- jai_cmn_document_taxes is required to be splited in two lines

4634: --------------------------------------------------------------------
4635: --added by eric to fix the bug bug#6784111 on Jan 29,2008 ,end
4636:
4637: -- if the tax is partially recoverable tax, the tax line of table
4638: -- jai_cmn_document_taxes is required to be splited in two lines
4639: -- recoverable part and non-recoverable part
4640:
4641: ln_recur_tax_amt :=
4642: NVL(ROUND( ln_tax_amount

Line 4697: jai_cmn_document_taxes

4693: IF (i = 1)
4694: THEN
4695: -- update the source_doc_line_id to the invoice line number
4696: UPDATE
4697: jai_cmn_document_taxes
4698: SET
4699: --modified by eric for inclusive tax
4700: ----------------------------------------------------------------
4701: source_doc_line_id = ln_source_doc_line_id --ln_max_inv_line_num

Line 4740: jai_cmn_document_taxes_s.nextval

4736: ------------------------------------------------------
4737: --Eric Ma added for two records shown in Form,end
4738:
4739: SELECT
4740: jai_cmn_document_taxes_s.nextval
4741: INTO
4742: ln_doc_tax_id
4743: FROM DUAL;
4744:

Line 4811: --jai_cmn_document_taxes to other 3 tables

4807: );
4808: END IF; --( ln_proc_level >= ln_dbg_level )
4809:
4810: --The below 2 loops is to synchronize exclusive taxes information from
4811: --jai_cmn_document_taxes to other 3 tables
4812:
4813: --insert into eric_log values (7.8,'prepare to sync data from jai_cmn_document_taxes to other 3 tables ',sysdate);
4814:
4815: --Loop 1, item level: Loop all item lines in the ap_invoice_lines

Line 4813: --insert into eric_log values (7.8,'prepare to sync data from jai_cmn_document_taxes to other 3 tables ',sysdate);

4809:
4810: --The below 2 loops is to synchronize exclusive taxes information from
4811: --jai_cmn_document_taxes to other 3 tables
4812:
4813: --insert into eric_log values (7.8,'prepare to sync data from jai_cmn_document_taxes to other 3 tables ',sysdate);
4814:
4815: --Loop 1, item level: Loop all item lines in the ap_invoice_lines
4816: FOR ap_invoice_lines_rec IN ap_invoice_lines_cur
4817: LOOP

Line 4819: --Loop 2,tax level:Loop all tax lines in jai_cmn_document_taxes

4815: --Loop 1, item level: Loop all item lines in the ap_invoice_lines
4816: FOR ap_invoice_lines_rec IN ap_invoice_lines_cur
4817: LOOP
4818:
4819: --Loop 2,tax level:Loop all tax lines in jai_cmn_document_taxes
4820: FOR jai_doc_taxes_rec IN
4821: jai_doc_taxes_cur
4822: ( pn_invoice_id => ln_invoice_id
4823: , pn_parent_line_number => ap_invoice_lines_rec.line_number

Line 5099: -- Line number got from max jai_cmn_document_taxes.source_doc_line_id

5095:
5096: --insert into eric_log values (7.91,'jai_doc_taxes_rec.inc_tax_flag =''Y'' AND recoverable with project case ',sysdate);
5097:
5098: -- Insert negative line with project info
5099: -- Line number got from max jai_cmn_document_taxes.source_doc_line_id
5100: -- or max ap_invoice_lines_all.line_number
5101: ln_max_inv_line_num := Get_Max_Invoice_Line_Number(ln_invoice_id);
5102:
5103: -- deleted by eric for fixing the bug of bug#6784111 on 29-JAN,2008,begin