DBA Data[Home] [Help]

APPS.JAI_AR_RGM_PROCESSING_PKG dependencies on JAI_RGM_TRX_RECORDS

Line 672: ln_repository_id JAI_RGM_TRX_RECORDS.REPOSITORY_ID%TYPE ;

668: ,p_organization_id JAI_RGM_PARTIES.ORGANIZATION_ID%TYPE DEFAULT NULL)
669: IS
670:
671: ln_eff_cm_tax_amount AR_RECEIVABLE_APPLICATIONS_ALL.TAX_APPLIED%TYPE ;
672: ln_repository_id JAI_RGM_TRX_RECORDS.REPOSITORY_ID%TYPE ;
673: ln_amount JAI_RGM_TRX_RECORDS.DEBIT_AMOUNT%TYPE ;
674: ln_discounted_amount JAI_RGM_TRX_REFS.DISCOUNTED_AMOUNT%TYPE ;
675: ln_err_cm_customer_trx_id JAI_RGM_TRX_REFS.INVOICE_ID%TYPE ;
676: ln_set_save_point JAI_RGM_TRX_REFS.INVOICE_ID%TYPE ;

Line 673: ln_amount JAI_RGM_TRX_RECORDS.DEBIT_AMOUNT%TYPE ;

669: IS
670:
671: ln_eff_cm_tax_amount AR_RECEIVABLE_APPLICATIONS_ALL.TAX_APPLIED%TYPE ;
672: ln_repository_id JAI_RGM_TRX_RECORDS.REPOSITORY_ID%TYPE ;
673: ln_amount JAI_RGM_TRX_RECORDS.DEBIT_AMOUNT%TYPE ;
674: ln_discounted_amount JAI_RGM_TRX_REFS.DISCOUNTED_AMOUNT%TYPE ;
675: ln_err_cm_customer_trx_id JAI_RGM_TRX_REFS.INVOICE_ID%TYPE ;
676: ln_set_save_point JAI_RGM_TRX_REFS.INVOICE_ID%TYPE ;
677: lv_process_flag VARCHAR2(2) ;

Line 681: lv_attribute_context jai_rgm_trx_records.attribute_context%TYPE ; --rchandan for bug#4428980

677: lv_process_flag VARCHAR2(2) ;
678: lv_process_message VARCHAR2(1996) ;
679: lv_source_trx_type VARCHAR2(50) ;
680: ln_uncommitted_transactions NUMBER(10) := 0 ;
681: lv_attribute_context jai_rgm_trx_records.attribute_context%TYPE ; --rchandan for bug#4428980
682: lv_source_table jai_rgm_trx_records.source_table_name%TYPE ; --rchandan for bug#4428980
683:
684: /* Added by Ramananda for bug#4407165 */
685: lv_object_name CONSTANT VARCHAR2(61) := 'jai_ar_rgm_processing_pkg.delete_non_existant_cm';

Line 682: lv_source_table jai_rgm_trx_records.source_table_name%TYPE ; --rchandan for bug#4428980

678: lv_process_message VARCHAR2(1996) ;
679: lv_source_trx_type VARCHAR2(50) ;
680: ln_uncommitted_transactions NUMBER(10) := 0 ;
681: lv_attribute_context jai_rgm_trx_records.attribute_context%TYPE ; --rchandan for bug#4428980
682: lv_source_table jai_rgm_trx_records.source_table_name%TYPE ; --rchandan for bug#4428980
683:
684: /* Added by Ramananda for bug#4407165 */
685: lv_object_name CONSTANT VARCHAR2(61) := 'jai_ar_rgm_processing_pkg.delete_non_existant_cm';
686:

Line 722: CURSOR c_get_cm_cm_app_rec ( /*cp_cm_reference_id JAI_RGM_TRX_RECORDS.REFERENCE_ID%TYPE ,*/

718: /*
719: || Get all the data of the incompleted CM from the
720: || repository, so that the same record with an exactly opposite amount can be passed. This would be the CM-CM-REV record
721: */
722: CURSOR c_get_cm_cm_app_rec ( /*cp_cm_reference_id JAI_RGM_TRX_RECORDS.REFERENCE_ID%TYPE ,*/
723: cp_cm_customer_trx_id JAI_RGM_TRX_REFS.INVOICE_ID%TYPE,
724: cp_attribute_context jai_rgm_trx_records.attribute_context%TYPE --rchandan for bug#4428980
725: )
726: IS

Line 724: cp_attribute_context jai_rgm_trx_records.attribute_context%TYPE --rchandan for bug#4428980

720: || repository, so that the same record with an exactly opposite amount can be passed. This would be the CM-CM-REV record
721: */
722: CURSOR c_get_cm_cm_app_rec ( /*cp_cm_reference_id JAI_RGM_TRX_RECORDS.REFERENCE_ID%TYPE ,*/
723: cp_cm_customer_trx_id JAI_RGM_TRX_REFS.INVOICE_ID%TYPE,
724: cp_attribute_context jai_rgm_trx_records.attribute_context%TYPE --rchandan for bug#4428980
725: )
726: IS
727: SELECT
728: *

Line 730: jai_rgm_trx_records

726: IS
727: SELECT
728: *
729: FROM
730: jai_rgm_trx_records
731: WHERE
732: attribute_context = cp_attribute_context AND
733: attribute2 = cp_cm_customer_trx_id /* AND
734: reference_id = cp_cm_reference_id */;

Line 754: cp_attribute_context jai_rgm_trx_records.attribute_context%TYPE ) --rchandan for bug#4428980

750: || Get all the data of the CM applied to invoices (i.e CM-INV-APP) from the repository.
751: || So that the same record with an exactly opposite amount can be passed. This would be the new CM-INV-REV record
752: */
753: CURSOR c_get_cm_inv_app_rec ( cp_cm_customer_trx_id JAI_RGM_TRX_REFS.INVOICE_ID%TYPE,
754: cp_attribute_context jai_rgm_trx_records.attribute_context%TYPE ) --rchandan for bug#4428980
755: IS
756: SELECT
757: *
758: FROM

Line 759: jai_rgm_trx_records

755: IS
756: SELECT
757: *
758: FROM
759: jai_rgm_trx_records
760: WHERE
761: attribute_context = cp_attribute_context AND
762: attribute2 = cp_cm_customer_trx_id ;
763:

Line 1010: lv_source_table := 'JAI_RGM_TRX_RECORDS'; --rchandan for bug#4428980

1006:
1007: /*csahoo for bug#5879769...end*/
1008:
1009: lv_attribute_context := 'CM-INV-REV'; --rchandan for bug#4428980
1010: lv_source_table := 'JAI_RGM_TRX_RECORDS'; --rchandan for bug#4428980
1011: jai_cmn_rgm_recording_pkg.insert_repository_entry (
1012: p_repository_id => ln_repository_id ,
1013: p_regime_id => p_regime_id ,
1014: p_tax_type => rec_c_get_cm_inv_app_rec.tax_type ,

Line 1144: ln_repository_id JAI_RGM_TRX_RECORDS.REPOSITORY_ID%TYPE ;

1140:
1141: ln_eff_cm_tax_amount AR_RECEIVABLE_APPLICATIONS_ALL.TAX_APPLIED%TYPE ;
1142: ln_discounted_amount JAI_RGM_TRX_REFS.DISCOUNTED_AMOUNT%TYPE ;
1143: ln_cm_ref_upd JAI_RGM_TRX_REFS.RECOVERED_AMOUNT%TYPE ;
1144: ln_repository_id JAI_RGM_TRX_RECORDS.REPOSITORY_ID%TYPE ;
1145: lv_source_trx_type VARCHAR2(50) ;
1146: ln_eff_cm_tottax_amt JAI_RGM_TRX_REFS.RECOVERABLE_AMOUNT%TYPE ;
1147: ln_tot_effcm_rb_amt JAI_RGM_TRX_REFS.RECOVERABLE_AMOUNT%TYPE ;
1148: ln_inv_tot_tax_amt JAI_AR_TRX_TAX_LINES.TAX_AMOUNT%TYPE ;

Line 1151: ln_amount JAI_RGM_TRX_RECORDS.DEBIT_AMOUNT%TYPE ;

1147: ln_tot_effcm_rb_amt JAI_RGM_TRX_REFS.RECOVERABLE_AMOUNT%TYPE ;
1148: ln_inv_tot_tax_amt JAI_AR_TRX_TAX_LINES.TAX_AMOUNT%TYPE ;
1149: ln_sign_of_credit_memo NUMBER ;
1150: ln_cm_ref_ratio NUMBER ;
1151: ln_amount JAI_RGM_TRX_RECORDS.DEBIT_AMOUNT%TYPE ;
1152: ln_receivable_application_id AR_RECEIVABLE_APPLICATIONS_ALL.RECEIVABLE_APPLICATION_ID%TYPE := -1 ;
1153: lv_process_flag VARCHAR2(2) ;
1154: lv_process_message VARCHAR2(1996) ;
1155: ln_uncommitted_transactions NUMBER(10) := 0 ;

Line 1160: lv_source_table CONSTANT jai_rgm_trx_records.source_table_name%TYPE := 'AR_RECEIVABLE_APPLICATIONS_ALL';--rchandan for bug#4428980

1156: lv_service_type_code JAI_AR_TRX_LINES.service_type_code%TYPE ;/*5879769*/
1157: lv_application_type ar_receivable_applications_all.application_type%TYPE ;--rchandan for bug#4428980
1158: lv_status ar_receivable_applications_all.status%TYPE ;--rchandan for bug#4428980
1159: lv_type ra_cust_trx_types_all.type%TYPE ;--rchandan for bug#4428980
1160: lv_source_table CONSTANT jai_rgm_trx_records.source_table_name%TYPE := 'AR_RECEIVABLE_APPLICATIONS_ALL';--rchandan for bug#4428980
1161: lv_called_from CONSTANT varchar2(100) := 'jai_ar_rgm_processing_pkg.POPULATE_CM_APP';--rchandan for bug#4428980
1162: lv_attribute_context jai_rgm_trx_records.attribute_context%TYPE ;--rchandan for bug#4428980
1163:
1164: ln_total_tax_applied NUMBER; --added by walton for inclusive tax 29-Nov-07

Line 1162: lv_attribute_context jai_rgm_trx_records.attribute_context%TYPE ;--rchandan for bug#4428980

1158: lv_status ar_receivable_applications_all.status%TYPE ;--rchandan for bug#4428980
1159: lv_type ra_cust_trx_types_all.type%TYPE ;--rchandan for bug#4428980
1160: lv_source_table CONSTANT jai_rgm_trx_records.source_table_name%TYPE := 'AR_RECEIVABLE_APPLICATIONS_ALL';--rchandan for bug#4428980
1161: lv_called_from CONSTANT varchar2(100) := 'jai_ar_rgm_processing_pkg.POPULATE_CM_APP';--rchandan for bug#4428980
1162: lv_attribute_context jai_rgm_trx_records.attribute_context%TYPE ;--rchandan for bug#4428980
1163:
1164: ln_total_tax_applied NUMBER; --added by walton for inclusive tax 29-Nov-07
1165: ln_line_total_amt NUMBER; --added by walton for inclusive tax 29-Nov-07
1166: ln_inclusive_total_amt NUMBER; --added by walton for inclusive tax 29-Nov-07

Line 1172: || 2. The cash receipt tax line does not already exist in the repository i.e jai_rgm_trx_records.

1168: /*
1169: || Get the credit memo applications to invoices and the total invoice tax amount .
1170: || Consider only those credit memo applications which follow the following conditions:-
1171: || 1. Invoice tax line reference exists in the jai_rgm_trx_refs table for the invoice against which the cash receipt is being applied
1172: || 2. The cash receipt tax line does not already exist in the repository i.e jai_rgm_trx_records.
1173: || 3. Consider cash receipt application against an invoice only
1174: || 4. Invoice tax line has not been fully recovered i.e recovered_amount < recoverable_amount - discounted_amount in references table
1175: */
1176:

Line 1222: jai_rgm_trx_records rgtr

1218: inv_jtrx.organization_id = p_organization_id AND/*5879769*/
1219: NOT EXISTS ( SELECT /*A credit memo application does not exist in repository */
1220: 1
1221: FROM
1222: jai_rgm_trx_records rgtr
1223: WHERE
1224: rgtr.source = cp_source_ar AND
1225: rgtr.organization_id = p_organization_id AND -- Date 05/06/2007 by sacsethi for bug 6109941
1226: rgtr.source_table_name = lv_source_table AND--rchandan for bug#4428980

Line 1454: || This info would go into the source_trx_type in the repository table jai_rgm_trx_records .

1450:
1451: /*
1452: || If the CM tax amount is +ve then it is CREDIT MEMO REVERSAL/UNAPPLICATION
1453: || IF the CM tax receipt amount is -ve then it is CREDIT MEMO APPLICATION
1454: || This info would go into the source_trx_type in the repository table jai_rgm_trx_records .
1455: || This would help distinctly identify a CM application, CREDIT MEMO reversal
1456: || IF sign = 0 i.e CM amount = 0 then skip the cm application and proceed to the next
1457: */
1458:

Line 1862: ln_repository_id JAI_RGM_TRX_RECORDS.REPOSITORY_ID%TYPE ;

1858:
1859: ln_receivable_application_id AR_RECEIVABLE_APPLICATIONS_ALL.RECEIVABLE_APPLICATION_ID%TYPE ;
1860: ln_eff_cr_tax_amount AR_RECEIVABLE_APPLICATIONS_ALL.TAX_APPLIED%TYPE ;
1861: ln_eff_cr_disc_amount AR_RECEIVABLE_APPLICATIONS_ALL.TAX_EDISCOUNTED%TYPE ;
1862: ln_repository_id JAI_RGM_TRX_RECORDS.REPOSITORY_ID%TYPE ;
1863: ln_inv_tot_tax_amt JAI_AR_TRX_TAX_LINES.TAX_AMOUNT%TYPE ;
1864: lv_process_flag VARCHAR2(2) ;
1865: lv_process_message VARCHAR2(1996) ;
1866: lv_source_trx_type VARCHAR2(50) ;

Line 1871: lv_source_table CONSTANT jai_rgm_trx_records.source_table_name%TYPE := 'AR_RECEIVABLE_APPLICATIONS_ALL';--rchandan for bug#4428980

1867: lv_attribute_context VARCHAR2(50) ;
1868: ln_uncommitted_transactions NUMBER(10) := 0 ;
1869: lv_service_type_code JAI_AR_TRX_LINES.service_type_code%TYPE ;/*5879769*/
1870: ln_location_id NUMBER(15);/*5879769*/
1871: lv_source_table CONSTANT jai_rgm_trx_records.source_table_name%TYPE := 'AR_RECEIVABLE_APPLICATIONS_ALL';--rchandan for bug#4428980
1872: lv_called_from CONSTANT varchar2(100) := 'jai_ar_rgm_processing_pkg.POPULATE_RECEIPT_RECORDS';--rchandan for bug#4428980
1873:
1874: ln_total_tax_applied NUMBER; --added by walton for inclusive tax 29-Nov-07
1875: ln_line_total_amt NUMBER; --added by walton for inclusive tax 29-Nov-07

Line 1881: || 2. The cash receipt tax line does not already exist in the repository i.e jai_rgm_trx_records.

1877: /*
1878: || Get the cash receipt, Invoice and Total Effective Invoice Recoverable Amount for them.
1879: || Consider only those cash receipts which follow the conditions as given below:-
1880: || 1. Invoice tax line reference exists in the jai_rgm_trx_refs table for the invoice against which the cash receipt is being applied
1881: || 2. The cash receipt tax line does not already exist in the repository i.e jai_rgm_trx_records.
1882: || 3. Consider cash receipt application against an invoice only
1883: || 4. Invoice tax line has not been fully recovered i.e recovered_amount < recoverable_amount in references table
1884: */
1885:

Line 1929: jai_rgm_trx_records rgtr

1925: trx.customer_trx_id = jtrx.customer_trx_id AND
1926: NOT EXISTS ( SELECT /*A receipt application does not exist in repository */
1927: 1
1928: FROM
1929: jai_rgm_trx_records rgtr
1930: WHERE
1931: rgtr.source = cp_source_ar AND
1932: rgtr.organization_id = p_organization_id AND/*5879769*/
1933: rgtr.source_table_name = lv_source_table AND

Line 2094: || This info would go into the source_trx_type in the repository table jai_rgm_trx_records .

2090:
2091: /*
2092: || If the cash receipt tax amount is -ve then it is RECEIPT REVERSAL/UNAPPLICATION
2093: || IF the cash receipt tax receipt amount is +ve then it is RECEIPT APPLICATION
2094: || This info would go into the source_trx_type in the repository table jai_rgm_trx_records .
2095: || This would help distinctly identify a receipt application, receipt reversal and a credit memo
2096: || IF sign = 0 i.e cash receipt amount = 0 then proceed exit the current loop and proceed with the next receivable application.
2097: */
2098: IF rec_c_get_rec_app.sign_of_cash_receipt > 0 or ln_total_tax_applied >0 THEN --modified by walton for inclusive tax 29-Nov-07