DBA Data[Home] [Help]

APPS.JAI_OPEN_API_PKG dependencies on RA_CUST_TRX_LINE_GL_DIST_ALL

Line 1100: FROM ra_cust_trx_line_gl_dist_all

1096: CURSOR chk_ar_accted
1097: IS
1098: SELECT
1099: COUNT(1)
1100: FROM ra_cust_trx_line_gl_dist_all
1101: WHERE CUSTOMER_TRX_ID = pn_trx_id
1102: AND CUSTOMER_TRX_LINE_ID = pn_trx_line_id
1103: AND ACCOUNT_CLASS = 'REV'
1104: AND POSTING_CONTROL_ID > 0

Line 1430: RA_CUST_TRX_LINE_GL_DIST_ALL dis

1426: SELECT
1427: trx.set_of_books_id ,
1428: dis.gl_date
1429: FROM RA_CUSTOMER_TRX_ALL trx,
1430: RA_CUST_TRX_LINE_GL_DIST_ALL dis
1431: WHERE trx.customer_trx_id = dis.customer_trx_id
1432: AND trx.CUSTOMER_TRX_ID = pn_trx_id
1433: AND dis.ACCOUNT_CLASS = 'REC'
1434: AND dis.LATEST_REC_FLAG = 'Y';

Line 5410: FROM ra_cust_trx_line_gl_dist_all rda,

5406: IS
5407:
5408: CURSOR get_trx_gl_date_cur IS
5409: SELECT rda.gl_date
5410: FROM ra_cust_trx_line_gl_dist_all rda,
5411: jai_ar_trx_tax_lines rla
5412: WHERE rda.account_class = 'REV'
5413: AND rda.customer_trx_line_id = rla.link_to_cust_trx_line_id
5414: AND rla.customer_trx_line_id = pn_customer_trx_line_id;

Line 5611: FROM RA_CUST_TRX_LINE_GL_DIST_ALL

5607: WHERE customer_trx_id = v_customer_trx_id;
5608:
5609: CURSOR ORG_CUR IS
5610: SELECT ORG_ID
5611: FROM RA_CUST_TRX_LINE_GL_DIST_ALL
5612: WHERE CUSTOMER_TRX_ID = pn_customer_trx_id
5613: AND account_class = 'REC'
5614: AND latest_rec_flag = 'Y';
5615:

Line 5627: FROM RA_CUST_TRX_LINE_GL_DIST_ALL

5623: WHERE B.tax_id = p_tax_id;
5624:
5625: CURSOR GL_DATE_CUR IS
5626: SELECT gl_date
5627: FROM RA_CUST_TRX_LINE_GL_DIST_ALL
5628: WHERE CUSTOMER_TRX_LINE_ID = pn_customer_trx_line_id;
5629:
5630: CURSOR CREATED_FROM_CUR IS
5631: SELECT created_from

Line 6204: --get the sum of amount, acctd_amount and max of acctd_amount from ra_cust_trx_line_gl_dist_all for cp_customer_trx_id

6200: lv_sqlstmt VARCHAR2(2000);
6201: lv_account_class_tax VARCHAR2(10) := 'TAX';
6202: lv_account_class_freight VARCHAR2(10) := 'FREIGHT';
6203:
6204: --get the sum of amount, acctd_amount and max of acctd_amount from ra_cust_trx_line_gl_dist_all for cp_customer_trx_id
6205: --and account_class in ('TAX','FREIGHT')
6206: CURSOR cur_total_amt_gl_dist(cp_customer_trx_id ra_customer_trx_all.customer_trx_id%TYPE) IS
6207: SELECT NVL(SUM(amount), 0) amount,
6208: NVL(SUM(acctd_amount), 0) acctd_amount,

Line 6210: FROM ra_cust_trx_line_gl_dist_all

6206: CURSOR cur_total_amt_gl_dist(cp_customer_trx_id ra_customer_trx_all.customer_trx_id%TYPE) IS
6207: SELECT NVL(SUM(amount), 0) amount,
6208: NVL(SUM(acctd_amount), 0) acctd_amount,
6209: MAX(acctd_amount) max_acctd_amount
6210: FROM ra_cust_trx_line_gl_dist_all
6211: WHERE customer_trx_id = cp_customer_trx_id
6212: AND account_class IN
6213: (lv_account_class_tax, lv_account_class_freight);
6214:

Line 6244: --delete the mrc data from ra_cust_trx_line_gl_dist_all

6240: FETCH c_proc_exists
6241: INTO ln_exists;
6242: CLOSE c_proc_exists;
6243: IF ln_exists = 1 THEN
6244: --delete the mrc data from ra_cust_trx_line_gl_dist_all
6245: FOR rec_mrc IN (SELECT cust_trx_line_gl_dist_id
6246: FROM ra_cust_trx_line_gl_dist_all
6247: WHERE customer_trx_id = p_customer_trx_id
6248: AND account_class IN ('TAX', 'FREIGHT')

Line 6246: FROM ra_cust_trx_line_gl_dist_all

6242: CLOSE c_proc_exists;
6243: IF ln_exists = 1 THEN
6244: --delete the mrc data from ra_cust_trx_line_gl_dist_all
6245: FOR rec_mrc IN (SELECT cust_trx_line_gl_dist_id
6246: FROM ra_cust_trx_line_gl_dist_all
6247: WHERE customer_trx_id = p_customer_trx_id
6248: AND account_class IN ('TAX', 'FREIGHT')
6249: AND customer_trx_line_id IN
6250: (SELECT customer_trx_line_id

Line 6271: --delete the data from ra_cust_trx_line_gl_dist_all

6267: USING rec_mrc.cust_trx_line_gl_dist_id;
6268: END LOOP;
6269: END IF;
6270:
6271: --delete the data from ra_cust_trx_line_gl_dist_all
6272: DELETE ra_cust_trx_line_gl_dist_all
6273: WHERE customer_trx_id = p_customer_trx_id
6274: AND account_class IN ('TAX', 'FREIGHT')
6275: AND customer_trx_line_id IN

Line 6272: DELETE ra_cust_trx_line_gl_dist_all

6268: END LOOP;
6269: END IF;
6270:
6271: --delete the data from ra_cust_trx_line_gl_dist_all
6272: DELETE ra_cust_trx_line_gl_dist_all
6273: WHERE customer_trx_id = p_customer_trx_id
6274: AND account_class IN ('TAX', 'FREIGHT')
6275: AND customer_trx_line_id IN
6276: (SELECT customer_trx_line_id

Line 6794: CURSOR c_gl_posted_date_cur(p_customer_trx_line_id RA_CUST_TRX_LINE_GL_DIST_ALL.customer_trx_line_id%type) IS

6790:
6791:
6792: /* Added by Ramananda for bug#4468353 due to SLA uptake by AR */
6793:
6794: CURSOR c_gl_posted_date_cur(p_customer_trx_line_id RA_CUST_TRX_LINE_GL_DIST_ALL.customer_trx_line_id%type) IS
6795: SELECT gl_posted_date
6796: from RA_CUST_TRX_LINE_GL_DIST_ALL
6797: where customer_trx_line_id = p_customer_trx_line_id
6798: and account_class = 'REC'

Line 6796: from RA_CUST_TRX_LINE_GL_DIST_ALL

6792: /* Added by Ramananda for bug#4468353 due to SLA uptake by AR */
6793:
6794: CURSOR c_gl_posted_date_cur(p_customer_trx_line_id RA_CUST_TRX_LINE_GL_DIST_ALL.customer_trx_line_id%type) IS
6795: SELECT gl_posted_date
6796: from RA_CUST_TRX_LINE_GL_DIST_ALL
6797: where customer_trx_line_id = p_customer_trx_line_id
6798: and account_class = 'REC'
6799: and latest_rec_flag = 'Y';
6800:

Line 6802: ld_gl_posted_date RA_CUST_TRX_LINE_GL_DIST_ALL.gl_posted_date%type;

6798: and account_class = 'REC'
6799: and latest_rec_flag = 'Y';
6800:
6801:
6802: ld_gl_posted_date RA_CUST_TRX_LINE_GL_DIST_ALL.gl_posted_date%type;
6803:
6804: CURSOR GL_DATE_CUR IS
6805: SELECT DISTINCT gl_date
6806: FROM RA_CUST_TRX_LINE_GL_DIST_ALL

Line 6806: FROM RA_CUST_TRX_LINE_GL_DIST_ALL

6802: ld_gl_posted_date RA_CUST_TRX_LINE_GL_DIST_ALL.gl_posted_date%type;
6803:
6804: CURSOR GL_DATE_CUR IS
6805: SELECT DISTINCT gl_date
6806: FROM RA_CUST_TRX_LINE_GL_DIST_ALL
6807: WHERE CUSTOMER_TRX_LINE_ID IN
6808: (SELECT LINK_TO_CUST_TRX_LINE_ID
6809: FROM JAI_AR_TRX_INS_LINES_T
6810: WHERE customer_trx_id = pn_customer_trx_id);

Line 6829: FROM RA_CUST_TRX_LINE_GL_DIST_ALL A,

6825:
6826:
6827: CURSOR PREVIOUS_AMOUNT_CUR IS
6828: SELECT A.AMOUNT, A.ACCTD_AMOUNT
6829: FROM RA_CUST_TRX_LINE_GL_DIST_ALL A,
6830: RA_CUSTOMER_TRX_LINES_ALL B,
6831: JAI_AR_TRX_INS_LINES_T C
6832: WHERE A.CUSTOMER_TRX_LINE_ID = B.CUSTOMER_TRX_LINE_ID
6833: AND B.LINK_TO_CUST_TRX_LINE_ID = C.LINK_TO_CUST_TRX_LINE_ID

Line 7002: lv_event_id RA_CUST_TRX_LINE_GL_DIST_ALL.EVENT_ID%TYPE; --Added by Bo Li

6998: -- end of modification by subbu and Jagdish on 10-jun-01 for discount issue.
6999: ------------------------------------------------------------------------------------------------
7000: --05-Apr-2002
7001:
7002: lv_event_id RA_CUST_TRX_LINE_GL_DIST_ALL.EVENT_ID%TYPE; --Added by Bo Li
7003:
7004: v_rec_ctr Number;
7005: v_PAYMENT_amt Number := 0;
7006: v_FREIGHT_amt Number := 0;

Line 7020: from ra_cust_trx_line_gl_dist_all

7016: -- declaration for mrc starts here bug # 3326394
7017:
7018: cursor c_gl_dist_cur is
7019: select cust_trx_line_gl_dist_id
7020: from ra_cust_trx_line_gl_dist_all
7021: where customer_trx_id = pn_customer_trx_id
7022: and account_class = lv_acc_class_rec --rchandan for bug#4428980
7023: and latest_rec_flag = 'Y';
7024:

Line 7056: FROM ra_cust_trx_line_gl_dist_all

7052:
7053: CURSOR cur_total_amt_gl_dist(cpn_customer_trx_id ra_customer_trx_all.customer_trx_id%TYPE) IS
7054: SELECT NVL(SUM(amount), 0) amount,
7055: NVL(SUM(acctd_amount), 0) acctd_amount
7056: FROM ra_cust_trx_line_gl_dist_all
7057: WHERE customer_trx_id = cpn_customer_trx_id
7058: AND account_class IN (lv_account_class_tax, lv_account_class_freight);
7059:
7060: --Added by zhiwei for POT change bug#13023443 begin

Line 7140: UPDATE ra_cust_trx_line_gl_dist_all

7136: /* Modified for bug#5495711
7137: || acctd_amount = ROUND( (ln_old_acctd_amount + ln_tax_acctd_amount + ln_diff_tax_frt), ln_precision)
7138: */
7139: /*
7140: UPDATE ra_cust_trx_line_gl_dist_all
7141: SET amount = ln_old_amount + ln_tax_amt,
7142: acctd_amount = ROUND((ln_old_amount * ln_exchange_rate +
7143: ln_tax_acctd_amount),
7144: ln_precision)

Line 7156: FROM RA_CUST_TRX_LINE_GL_DIST_ALL

7152: --end addtiions for bug#9177024
7153:
7154: SELECT NVL(SUM(AMOUNT), 0)
7155: INTO V_sum_amt
7156: FROM RA_CUST_TRX_LINE_GL_DIST_ALL
7157: WHERE ACCOUNT_CLASS = lv_acc_class_rev
7158: AND CUSTOMER_TRX_ID = pn_customer_trx_id; --added on 22-Mar-2002 to get the revenue amount for the invoice
7159: v_sql_num := 10;
7160:

Line 7184: -- column in the ra_cust_trx_line_gl_dist_all table. -- bug # 2784431

7180:
7181: -- the following select statement commented and using the next one instead
7182: -- because this is wrong.We need to compare the ra_customer_trx_lines_all table
7183: -- with the link_to_cust_trx_line_id column instead of based on the customer_trx_line_id
7184: -- column in the ra_cust_trx_line_gl_dist_all table. -- bug # 2784431
7185:
7186: /*
7187: SELECT COUNT(Customer_trx_line_id) INTO v_rec_ctr FROM ra_cust_trx_line_gl_dist_all
7188: WHERE customer_trx_line_id = pn_customer_trx_line_id

Line 7187: SELECT COUNT(Customer_trx_line_id) INTO v_rec_ctr FROM ra_cust_trx_line_gl_dist_all

7183: -- with the link_to_cust_trx_line_id column instead of based on the customer_trx_line_id
7184: -- column in the ra_cust_trx_line_gl_dist_all table. -- bug # 2784431
7185:
7186: /*
7187: SELECT COUNT(Customer_trx_line_id) INTO v_rec_ctr FROM ra_cust_trx_line_gl_dist_all
7188: WHERE customer_trx_line_id = pn_customer_trx_line_id
7189: AND Account_class IN ('TAX','FREIGHT'); --Added on 09-Apr-2002 For the BUG#2303830
7190: */
7191:

Line 7204: DELETE RA_CUST_TRX_LINE_GL_DIST_ALL

7200: --Added on 09-Apr-2002 for the BUG#2303830
7201:
7202: v_sql_num := 14;
7203:
7204: DELETE RA_CUST_TRX_LINE_GL_DIST_ALL
7205: WHERE CUSTOMER_TRX_LINE_ID IN
7206: (SELECT CUSTOMER_TRX_LINE_ID
7207: FROM RA_CUSTOMER_TRX_LINES_ALL
7208: WHERE LINK_TO_CUST_TRX_LINE_ID =

Line 7215: FROM RA_CUST_TRX_LINE_GL_DIST_ALL

7211:
7212: -- added for mrc -- sriram - 26/12 -- 3326394
7213:
7214: for mrc_rec in (SELECT CUST_TRX_LINE_GL_DIST_ID
7215: FROM RA_CUST_TRX_LINE_GL_DIST_ALL
7216: WHERE CUSTOMER_TRX_ID = pn_customer_trx_id
7217: AND ACCOUNT_CLASS IN
7218: (lv_tax_const, lv_freight_acc_class) --rchandan for bug#4428980
7219: AND CUSTOMER_TRX_LINE_ID IN

Line 7392: FROM RA_CUST_TRX_LINE_GL_DIST_ALL

7388: --------------------------------------------------------
7389: --Added by Bo Li-------------------
7390: SELECT event_id
7391: INTO lv_event_id
7392: FROM RA_CUST_TRX_LINE_GL_DIST_ALL
7393: WHERE CUSTOMER_TRX_ID = pn_customer_trx_id
7394: AND ACCOUNT_CLASS = lv_acc_class_rec;
7395:
7396: --Commented by zhiwei for POT change bug#13023443 on 20110929 begin

Line 7431: INSERT INTO RA_CUST_TRX_LINE_GL_DIST_ALL

7427: c_conversion_date,
7428: c_conversion_type,
7429: c_conversion_rate);
7430:
7431: INSERT INTO RA_CUST_TRX_LINE_GL_DIST_ALL
7432: (account_class,
7433: account_set_flag,
7434: acctd_amount,
7435: amount,

Line 7483: INSERT INTO RA_CUST_TRX_LINE_GL_DIST_ALL

7479:
7480: -------------------------------------------
7481: --added by zhiwei end
7482:
7483: INSERT INTO RA_CUST_TRX_LINE_GL_DIST_ALL
7484: (account_class,
7485: account_set_flag,
7486: acctd_amount,
7487: amount,

Line 7556: INSERT INTO RA_CUST_TRX_LINE_GL_DIST_ALL

7552: )
7553: )
7554: THEN
7555: --Get Acct from Regime
7556: INSERT INTO RA_CUST_TRX_LINE_GL_DIST_ALL
7557: (account_class,
7558: account_set_flag,
7559: acctd_amount,
7560: amount,

Line 7634: INSERT INTO RA_CUST_TRX_LINE_GL_DIST_ALL

7630: c_conversion_date,
7631: c_conversion_type,
7632: c_conversion_rate);
7633:
7634: INSERT INTO RA_CUST_TRX_LINE_GL_DIST_ALL
7635: (account_class,
7636: account_set_flag,
7637: acctd_amount,
7638: amount,

Line 7731: UPDATE RA_CUST_TRX_LINE_GL_DIST_ALL

7727: WHERE CUSTOMER_TRX_LINE_ID = TEMP_REC.CUSTOMER_TRX_LINE_ID;
7728:
7729: v_sql_num := 26;
7730:
7731: UPDATE RA_CUST_TRX_LINE_GL_DIST_ALL
7732: SET ACCTD_AMOUNT = TEMP_REC.ACCTD_AMOUNT,
7733: AMOUNT = TEMP_REC.EXTENDED_AMOUNT,
7734: LAST_UPDATE_DATE = TEMP_REC.LAST_UPDATE_DATE,
7735: LAST_UPDATED_BY = TEMP_REC.LAST_UPDATED_BY,

Line 7769: From RA_CUST_TRX_LINE_GL_DIST_ALL

7765: v_sql_num := 28;
7766:
7767: Select SUM(amount), SUM(acctd_amount)
7768: into v_old_amount, v_old_acctd_amount
7769: From RA_CUST_TRX_LINE_GL_DIST_ALL
7770: Where customer_trx_id = pn_customer_trx_id
7771: AND ACCOUNT_CLASS = lv_acc_class_rev;
7772: v_sql_num := 29;
7773:

Line 7776: From RA_CUST_TRX_LINE_GL_DIST_ALL

7772: v_sql_num := 29;
7773:
7774: Select SUM(amount)
7775: INTO v_tax_amt
7776: From RA_CUST_TRX_LINE_GL_DIST_ALL
7777: Where customer_trx_id = pn_customer_trx_id
7778: AND ACCOUNT_CLASS IN (lv_tax_const, lv_freight_acc_class);
7779: v_sql_num := 30;
7780:

Line 7781: UPDATE RA_CUST_TRX_LINE_GL_DIST_ALL

7777: Where customer_trx_id = pn_customer_trx_id
7778: AND ACCOUNT_CLASS IN (lv_tax_const, lv_freight_acc_class);
7779: v_sql_num := 30;
7780:
7781: UPDATE RA_CUST_TRX_LINE_GL_DIST_ALL
7782: SET AMOUNT = NVL(v_old_amount, 0) + NVL(v_tax_amt, 0),
7783: ACCTD_AMOUNT = NVL(v_old_acctd_amount, 0) + NVL(v_tax_amt, 0)
7784: WHERE CUSTOMER_TRX_ID = pn_customer_trx_id
7785: AND ACCOUNT_CLASS = lv_acc_class_rec;