DBA Data[Home] [Help]

APPS.JAI_TRX_REPO_EXTRACT_PKG dependencies on JAI_RGM_TRX_RECORDS

Line 113: from JAI_RGM_TRX_RECORDS. Sibtracted the Tax Amount from Payment amount and derived the Line Amount

109: is shown in the Service Tax Repository Review window
110: Fix:
111: + Inserted Line Number of Item into Document Line ID
112: + Fetched the Payment amount from ap_invoice_payments_all. Derived the Repository Amount
113: from JAI_RGM_TRX_RECORDS. Sibtracted the Tax Amount from Payment amount and derived the Line Amount
114: 22. 14-Mar-2011 Bug 11821537
115: Description: Notification # 18/2011 proposes change in Point of Taxation for Service Tax.
116: Service Tax Liability arises on creation of Invoice and not on Receipt of Payment from Customer
117: i.e. Accounting changes to Accrual basis from Cash Basis

Line 215: pv_source_trx_type jai_rgm_trx_records.source_trx_type%TYPE,

211: end set_debug_context;
212: --Add by chong.lei for POT code port begin
213: --Add by Xiao for POT Phase III change, reg bug#12895841, begin
214: FUNCTION get_gl_date( pv_source jai_trx_repo_extract_gt.transaction_source%TYPE,
215: pv_source_trx_type jai_rgm_trx_records.source_trx_type%TYPE,
216: pn_document_id jai_trx_repo_extract_gt.document_id%TYPE,
217: pn_source_document_id jai_rgm_trx_records.source_document_id%TYPE,
218: pn_organization_id NUMBER,
219: pn_location_id NUMBER,

Line 217: pn_source_document_id jai_rgm_trx_records.source_document_id%TYPE,

213: --Add by Xiao for POT Phase III change, reg bug#12895841, begin
214: FUNCTION get_gl_date( pv_source jai_trx_repo_extract_gt.transaction_source%TYPE,
215: pv_source_trx_type jai_rgm_trx_records.source_trx_type%TYPE,
216: pn_document_id jai_trx_repo_extract_gt.document_id%TYPE,
217: pn_source_document_id jai_rgm_trx_records.source_document_id%TYPE,
218: pn_organization_id NUMBER,
219: pn_location_id NUMBER,
220: pv_source_table_name jai_rgm_trx_records.source_table_name%TYPE default NULL,
221: pv_document_line_id VARCHAR2 default NULL) RETURN DATE IS

Line 220: pv_source_table_name jai_rgm_trx_records.source_table_name%TYPE default NULL,

216: pn_document_id jai_trx_repo_extract_gt.document_id%TYPE,
217: pn_source_document_id jai_rgm_trx_records.source_document_id%TYPE,
218: pn_organization_id NUMBER,
219: pn_location_id NUMBER,
220: pv_source_table_name jai_rgm_trx_records.source_table_name%TYPE default NULL,
221: pv_document_line_id VARCHAR2 default NULL) RETURN DATE IS
222: --Added by Qinglei 21-Dec-2011 for bug#13405591
223: CURSOR get_reversal_date_cur IS
224: SELECT date_of_reversal

Line 451: ( p_regime_code jai_rgm_trx_records.regime_code%type

447: --Add by Xiao for POT Phase III change, reg bug#12895841, end
448: --Add by chong.lei for POT code port end
449: /*------------------------------------------------------------------------------------------------------------*/
450: procedure extract_rgm_trxs
451: ( p_regime_code jai_rgm_trx_records.regime_code%type
452: , p_organization_id jai_rgm_trx_records.organization_id%type default null
453: , p_location_id jai_rgm_trx_records.location_id%type default null
454: , p_from_trx_date date default null
455: , p_to_trx_date date default null

Line 452: , p_organization_id jai_rgm_trx_records.organization_id%type default null

448: --Add by chong.lei for POT code port end
449: /*------------------------------------------------------------------------------------------------------------*/
450: procedure extract_rgm_trxs
451: ( p_regime_code jai_rgm_trx_records.regime_code%type
452: , p_organization_id jai_rgm_trx_records.organization_id%type default null
453: , p_location_id jai_rgm_trx_records.location_id%type default null
454: , p_from_trx_date date default null
455: , p_to_trx_date date default null
456: , p_source jai_rgm_trx_records.source%type default null

Line 453: , p_location_id jai_rgm_trx_records.location_id%type default null

449: /*------------------------------------------------------------------------------------------------------------*/
450: procedure extract_rgm_trxs
451: ( p_regime_code jai_rgm_trx_records.regime_code%type
452: , p_organization_id jai_rgm_trx_records.organization_id%type default null
453: , p_location_id jai_rgm_trx_records.location_id%type default null
454: , p_from_trx_date date default null
455: , p_to_trx_date date default null
456: , p_source jai_rgm_trx_records.source%type default null
457: , p_query_settled_flag varchar2 default 'N'

Line 456: , p_source jai_rgm_trx_records.source%type default null

452: , p_organization_id jai_rgm_trx_records.organization_id%type default null
453: , p_location_id jai_rgm_trx_records.location_id%type default null
454: , p_from_trx_date date default null
455: , p_to_trx_date date default null
456: , p_source jai_rgm_trx_records.source%type default null
457: , p_query_settled_flag varchar2 default 'N'
458: , p_query_only_null_srvtype varchar2 default 'N'
459: , p_process_message OUT NOCOPY varchar
460: , p_process_flag OUT NOCOPY varchar2

Line 481: , jai_rgm_trx_records recs

477: , recs.source_document_id
478: , recs.invoice_no --Added by Qiong for Advanced Receipts
479: , recs.source_table_name --Added by Qiong for bug#13456083
480: from jai_rgm_trx_refs refs
481: , jai_rgm_trx_records recs
482: where recs.reference_id = refs.reference_id (+)
483: and ( p_organization_id is null
484: or (recs.organization_id = p_organization_id)
485: )

Line 518: from jai_rgm_trx_records recs,

514: ,pn_invoice_id NUMBER)
515: is
516: select
517: sum((nvl(credit_amount,0) + nvl(debit_amount,0))) repository_tax_amt -- modified for the bug 14341945
518: from jai_rgm_trx_records recs,
519: jai_rgm_trx_refs refs
520: where recs.reference_id = refs.reference_id (+)
521: and recs.SOURCE_TRX_TYPE = pv_source_trx_type
522: and refs.item_line_id = pv_item_line_id

Line 533: from jai_rgm_trx_records recs,

529: )
530: is
531: select
532: sum((nvl(credit_amount,0) + nvl(debit_amount,0))) repository_tax_amt--Modified by Junjian for bug#14341945 on 2-Aug-2012
533: from jai_rgm_trx_records recs,
534: jai_rgm_trx_refs refs
535: where recs.reference_id = refs.reference_id (+)
536: and recs.SOURCE_TRX_TYPE = pv_source_trx_type
537: and refs.item_line_id = pv_item_line_id

Line 575: from jai_rgm_trx_records recs, jai_rgm_trx_refs refs

571: ,cp_line_id jai_rgm_trx_refs.line_id%type
572: )
573: is
574: select recs.service_type_code
575: from jai_rgm_trx_records recs, jai_rgm_trx_refs refs
576: where recs.reference_id = refs.reference_id
577: and refs.invoice_id = cp_invoice_id
578: and refs.line_id = cp_line_id
579: and refs.source = cp_source

Line 674: lv_service_type_code jai_rgm_trx_records.service_type_code%type;

670: lv_party_name hz_parties.party_name%type;
671:
672: rec_st_transprt_inv_details c_st_transprt_inv_details%rowtype;/* Changes by nprashar , Forward porting from bug 7172723 */
673: rec_st_transprt_party_details c_st_transprt_party_details%rowtype;/* Changes by nprashar , Forward porting from bug 7172723 */
674: lv_service_type_code jai_rgm_trx_records.service_type_code%type;
675:
676: lr_trx_repo_extract jai_trx_repo_extract_gt%rowtype;
677: lv_organization_name hr_organization_units.name%type;
678: lv_location_name hr_locations_all.description%type;

Line 1656: , jai_rgm_trx_records jrec --Add by Xiao for POT Phase III, reg bug#12895841.

1652: from JAI_AR_TRX_LINES jrctl
1653: ,JAI_AR_TRX_TAX_LINES jrcttl
1654: ,jai_cmn_taxes_all jtc
1655: --Added by Chong.Lei for POT code port begin
1656: , jai_rgm_trx_records jrec --Add by Xiao for POT Phase III, reg bug#12895841.
1657: , jai_rgm_trx_refs jref --Add by Xiao for POT Phase III, reg bug#12895841.
1658: --Added by Chong.Lei for POT code port end
1659: where jrctl.customer_trx_line_id = cp_customer_trx_line_id
1660: and jrcttl.link_to_cust_trx_line_id = jrctl.customer_trx_line_id

Line 1682: FROM jai_rgm_trx_refs jref, jai_rgm_trx_records jrec

1678:
1679: --Added below cursor for bug#9298508 by JMEENA
1680: CURSOR c_get_ra_tax_amt_applied(cp_customer_trx_id NUMBER, cp_cust_trx_line_id NUMBER) IS
1681: SELECT Sum(Nvl(jrec.DEBIT_AMOUNT,0))+Sum(Nvl(jrec.CREDIT_AMOUNT,0)) -- modified for the bug 14341945
1682: FROM jai_rgm_trx_refs jref, jai_rgm_trx_records jrec
1683: WHERE jref.invoice_id= cp_customer_trx_id
1684: AND jref.item_line_id = cp_cust_trx_line_id
1685: AND jrec.source_trx_type = p_source_trx_type--Added by Qinglei on 28-Feb-2012 for bug#13741544
1686: AND jrec.reference_id=jref.reference_id

Line 1698: FROM AR_RECEIVABLE_APPLICATIONS_ALL araa,jai_rgm_trx_records jrtr

1694: (SELECT line_amount
1695: FROM jai_ar_trxs
1696: WHERE customer_trx_id = cp_customer_trx_id
1697: )))
1698: FROM AR_RECEIVABLE_APPLICATIONS_ALL araa,jai_rgm_trx_records jrtr
1699: WHERE araa.APPLIED_CUSTOMER_TRX_ID = cp_customer_trx_id
1700: /*Added by Qinglei for bug#13741544 begin*/
1701: AND araa.receivable_application_id = jrtr.source_document_id
1702: AND jrtr.repository_id = p_repository_id

Line 1807: jai_rgm_trx_records jrec

1803: CURSOR c_get_claim_amount (pv_document_source VARCHAR2) --Add pv_document_source by Xiao for POT Phase III reg bug#12895841. --Modified by Chong.Lei for POT code port
1804: IS
1805: SELECT abs(SUM(NVL(jrec.DEBIT_AMOUNT,0))-SUM(NVL(jrec.CREDIT_AMOUNT,0))) --Modified by Qiong for reverse charge bug#16001407
1806: FROM jai_rgm_trx_refs jref,
1807: jai_rgm_trx_records jrec
1808: WHERE jref.invoice_id = p_document_id
1809: AND jref.item_line_id = p_document_line_id
1810: AND jrec.source_document_id = p_taxline_no
1811: AND jrec.reference_id = jref.reference_id

Line 1878: jai_rgm_trx_records jrec

1874: CURSOR c_get_claim_paid_amount IS
1875: SELECT SUM(aip.amount)
1876: FROM ap_invoice_payments_all aip
1877: WHERE EXISTS (SELECT 1 FROM jai_rgm_trx_refs jref,
1878: jai_rgm_trx_records jrec
1879: WHERE jref.invoice_id = p_document_id
1880: AND jref.item_line_id = p_document_line_id
1881: AND jrec.reference_id = jref.reference_id
1882: AND jrec.source = 'AP_CLAIM'

Line 1893: jai_rgm_trx_records jrec

1889: IS
1890: SELECT abs(SUM(NVL(jrec.DEBIT_AMOUNT,0))-SUM(NVL(jrec.CREDIT_AMOUNT,0)))--add abs, change '+' to '-' by Xiao for POT, reg bug#12533434
1891: --Modified by Qiong for reverse charge bug#16001407
1892: FROM jai_rgm_trx_refs jref,
1893: jai_rgm_trx_records jrec
1894: WHERE jref.invoice_id = p_document_id
1895: AND jref.item_line_id = p_document_line_id --Add by Xiao fro POT Phase III, reg bug#12895841. --Modified by Chong.Lei for POT code port
1896: AND jrec.reference_id = jref.reference_id
1897: AND jrec.source = decode(pv_document_source, 'STANDALONE_INVOICE', 'AP','RECEIVING','AP','PURCHASING','AP',pv_document_source)--Add pv_document_source by Xiao for POT Phase III, reg bug#12895841.

Line 1969: jai_rgm_trx_records jrec

1965:
1966: CURSOR get_rcpt_amt_cur IS
1967: SELECT SUM(nvl(jrec.trx_debit_amount,0)) + SUM(nvl(jrec.trx_credit_amount,0))
1968: FROM jai_rgm_trx_refs jref,
1969: jai_rgm_trx_records jrec
1970: WHERE jrec.source_document_id = p_document_id
1971: AND jref.reference_id = jrec.reference_id
1972: AND jrec.source_table_name = 'AR_CASH_RECEIPTS_ALL'
1973: AND jrec.source = 'AR'

Line 1980: jai_rgm_trx_records jrec

1976:
1977: CURSOR get_rcpt_app_amt_cur IS
1978: SELECT SUM(nvl(jrec.trx_debit_amount,0)) + SUM(nvl(jrec.trx_credit_amount,0))
1979: FROM jai_rgm_trx_refs jref,
1980: jai_rgm_trx_records jrec
1981: WHERE jrec.source_document_id = p_document_id
1982: AND jref.reference_id = jrec.reference_id
1983: AND jrec.source_table_name = 'AR_RECEIVABLE_APPLICATIONS_ALL'
1984: AND jrec.source = 'AR'

Line 2041: lv_service_type jai_rgm_trx_records.service_type_code%type;

2037: r_ra_trx_details c_get_ra_trx_details%rowtype;
2038: r_pa_details c_get_pa_details%rowtype; -- Bug 5876390, 6012570
2039: r_rcv_details c_get_receipt_details%rowtype; /*Bug 12902363*/
2040:
2041: lv_service_type jai_rgm_trx_records.service_type_code%type;
2042:
2043: --Add by Xiao for POT change, reg bug#12533434 on 18-May-2011, begin
2044: --------------------------------------------------------------------------
2045: --Commented by Chong.Lei for POT code port begin

Line 2064: jai_rgm_trx_records jrec

2060: --Add by Xiao for POT Phase III changes, reg bug#12895841.
2061: CURSOR get_claim_amt_cur IS
2062: SELECT SUM(nvl(jrec.debit_amount,0)) + SUM(nvl(jrec.credit_amount,0)) --Modified by Qiong for reverse charge bug#16001407
2063: FROM jai_rgm_trx_refs jref,
2064: jai_rgm_trx_records jrec
2065: WHERE jref.invoice_id = p_document_id
2066: AND jref.reference_id = jrec.reference_id
2067: AND jref.item_line_id = p_document_line_id
2068: --AND jrec.source_document_id = p_trx_repo_extract.document_line_num

Line 2982: lr_service_type jai_rgm_trx_records.service_type_code%type;

2978: jai_cmn_vendor_sites
2979: where vendor_id= p_vendor_id
2980: and vendor_site_id=p_vendor_site_id;
2981:
2982: lr_service_type jai_rgm_trx_records.service_type_code%type;
2983: lr_called_from varchar2(20) default null;
2984:
2985: /*Addition Ends for bug 7172723*/
2986:

Line 2990: lv_trx_src jai_rgm_trx_records.source%type;

2986:
2987: lr_refs_rec c_get_refs_rec%rowtype;
2988: ln_doc_id number;
2989: ln_doc_line_id number;
2990: lv_trx_src jai_rgm_trx_records.source%type;
2991: lr_source_type ap_invoices_all.source%type;
2992: lr_doc_details c_get_doc_details%rowtype;
2993:
2994: begin

Line 3233: update jai_rgm_trx_records

3229: --
3230: -- Update service type code for SERVICE_DISTRIBUTE_IN type of trx with the same service type
3231: -- code as give in the source (SERVICE_DISTRIBUTE_OUT) --
3232:
3233: update jai_rgm_trx_records
3234: set service_type_code = rec.service_type_code
3235: , last_update_date = sysdate
3236: , last_updated_by = lv_user_id
3237: , last_update_login = lv_login_id

Line 3289: update jai_rgm_trx_records

3285: --
3286: -- Update repository records with service type code
3287: --
3288:
3289: update jai_rgm_trx_records
3290: set service_type_code = rec.service_type_code
3291: , last_update_date = sysdate
3292: , last_updated_by = lv_user_id
3293: where repository_id = rec.transaction_repository_id;

Line 3296: ,'No of rows updated in jai_rgm_trx_records table='||sql%rowcount

3292: , last_updated_by = lv_user_id
3293: where repository_id = rec.transaction_repository_id;
3294:
3295: jai_cmn_debug_contexts_pkg.print (ln_reg_id
3296: ,'No of rows updated in jai_rgm_trx_records table='||sql%rowcount
3297: );
3298: --
3299: -- Mark record in global temp table as PROCESSED
3300: --

Line 3329: , p_source_trx_type in jai_rgm_trx_records.source_trx_type%type default NULL

3325: /*------------------------------------------------------------------------------------------------------------*/
3326:
3327: procedure derrive_doc_from_ref
3328: ( p_reference_source in jai_rgm_trx_refs.source%type
3329: , p_source_trx_type in jai_rgm_trx_records.source_trx_type%type default NULL
3330: , p_reference_invoice_id in jai_rgm_trx_refs.invoice_id%type
3331: , p_reference_item_line_id in jai_rgm_trx_refs.item_line_id%type
3332: , p_trx_repo_extract_rec out nocopy jai_trx_repo_extract_gt%rowtype
3333: , p_process_message out nocopy varchar2

Line 3576: lv_service_type_code jai_rgm_trx_records.service_type_code%type;

3572: return varchar2
3573: is
3574: lv_organization_id number;
3575: lv_location_id number;
3576: lv_service_type_code jai_rgm_trx_records.service_type_code%type;
3577: lv_process_flag varchar2 (2);
3578: lv_process_message varchar2 (2000);
3579:
3580: begin

Line 3604: lv_service_type jai_rgm_trx_records.service_type_code%type;

3600: , p_document_line_id jai_trx_repo_extract_gt.document_line_id%type
3601: )
3602: return varchar2 is
3603:
3604: lv_service_type jai_rgm_trx_records.service_type_code%type;
3605:
3606: cursor c_get_so_settled_srvtyp
3607: is
3608: select recs.service_type_code

Line 3609: from jai_rgm_trx_records recs

3605:
3606: cursor c_get_so_settled_srvtyp
3607: is
3608: select recs.service_type_code
3609: from jai_rgm_trx_records recs
3610: ,jai_rgm_trx_refs refs
3611: ,ra_customer_trx_lines_all ractl
3612: where ractl.interface_line_attribute6 = p_document_line_id
3613: and ractl.interface_line_context = 'ORDER ENTRY'

Line 3625: from jai_rgm_trx_records recs

3621:
3622: cursor c_get_ar_settled_srvtyp
3623: is
3624: select recs.service_type_code
3625: from jai_rgm_trx_records recs
3626: ,jai_rgm_trx_refs refs
3627: where refs.item_line_id = p_document_line_id
3628: and recs.reference_id = refs.reference_id
3629: and recs.settlement_id is not null

Line 3637: from jai_rgm_trx_records recs

3633:
3634: cursor c_get_po_settled_srvtyp
3635: is
3636: select recs.service_type_code
3637: from jai_rgm_trx_records recs
3638: ,jai_rgm_trx_refs refs
3639: ,po_distributions_all pod
3640: ,ap_invoice_distributions_all apd
3641: where pod.po_line_id = p_document_line_id