DBA Data[Home] [Help]

APPS.JAI_AR_MATCH_TAX_PKG dependencies on JAI_AR_TRX_INS_LINES_T

Line 157: --| Fix: Data was inserted into JAI_AR_TRX_INS_LINES_T |

153: --| 12-Apr-2011 Bug 11936630 |
154: --| Description: Inclusive Taxes are not accounted |
155: --| in GL for Order Imported AR Invoice if the Order |
156: --| has only Inclusive Taxes |
157: --| Fix: Data was inserted into JAI_AR_TRX_INS_LINES_T |
158: --| only if the AR Invoice had an Exclusive Tax. |
159: --| Hence accounting was not happening. |
160: --| Data is now inserted into JAI_AR_TRX_INS_LINES_T |
161: --| via JAI_JAR_TL_TRIGGER_PKG even if AR Invoice has |

Line 160: --| Data is now inserted into JAI_AR_TRX_INS_LINES_T |

156: --| has only Inclusive Taxes |
157: --| Fix: Data was inserted into JAI_AR_TRX_INS_LINES_T |
158: --| only if the AR Invoice had an Exclusive Tax. |
159: --| Hence accounting was not happening. |
160: --| Data is now inserted into JAI_AR_TRX_INS_LINES_T |
161: --| via JAI_JAR_TL_TRIGGER_PKG even if AR Invoice has |
162: --| only Inclusive Tax. As Inclusive Tax should not |
163: --| be part of AR Distributions the cursor in |
164: --| process_from_order_line (cur_temp_lines_insert) |

Line 199: lv_source JAI_AR_TRX_INS_LINES_T.source%TYPE ; --rchandan for bug#4428980

195: var_error_invoice CHAR(1);
196: error_from_called_unit EXCEPTION;
197: var_error_mesg VARCHAR2(1996);
198: v_org_id NUMBER; -- added by sriram - Bug # 2779967
199: lv_source JAI_AR_TRX_INS_LINES_T.source%TYPE ; --rchandan for bug#4428980
200:
201: ln_org_id number ; -- Harshita for Bug 5490479
202: lv_debug varchar2(1) ;
203: lv_process_status VARCHAR2(2);

Line 414: JAI_AR_TRX_INS_LINES_T table . If due to some reason the error message is

410: to write logs from concurrent program.
411: 3 24-May-2002 Sriram. Set the Code so that it works in the batch mode .
412: 4. 09-JAN-2003 Sriram - Bug # 2740546 - File Version is 615.1
413: Added the substr function to the update statement that updates the
414: JAI_AR_TRX_INS_LINES_T table . If due to some reason the error message is
415: very long ,then it can be a potential problem.Because of this the program
416: should not halt.
417: 5. 08/04/2003 Sriram - Bug # 2779967
418: Added logic to see that only records that belong to the current operating unit need

Line 420: JAI_AR_TRX_INS_LINES_T table from various 'India Local Receivables' responsibility

416: should not halt.
417: 5. 08/04/2003 Sriram - Bug # 2779967
418: Added logic to see that only records that belong to the current operating unit need
419: to be picked up for processing.This was done because records are inserted into the
420: JAI_AR_TRX_INS_LINES_T table from various 'India Local Receivables' responsibility
421: attached to various org ids , The concurrent program is not scheduled , but run by
422: the user , it picks up the records not only for the current org id but also for other
423: org ids as well which causes the problem.
424:

Line 617: Description: AR CREATE ACCOUNTING PROGRAM ENDING IN ERROR IN JAI_AR_TRX_INS_LINES_T

613: Fix: Defined cursor c_ex_inv_no_2. Modified cursor c_ex_inv_no. cursor c_ex_inv_no is opened when p_delivery_id is not null and
614: cursor c_ex_inv_no_2 is opened when p_delivery_id is null
615:
616: 28. 17-Jan-2013 mmurtuza for bug 16181417
617: Description: AR CREATE ACCOUNTING PROGRAM ENDING IN ERROR IN JAI_AR_TRX_INS_LINES_T
618: Fix: Added condition adjustment_period_flag = 'N' for fetching next open period if receipt application period is closed.
619: Also added the logic done for bug 14194526 to avoid the charcter to number conversion and also to avoid performance issue
620: in cursors get_rma_flag_cur and inclu_rma_tax.
621:

Line 666: FROM JAI_AR_TRX_INS_LINES_T

662: lv_source := 'RAXTRX';
663: FOR temp_rec IN
664: (
665: SELECT DISTINCT customer_trx_id, org_id
666: FROM JAI_AR_TRX_INS_LINES_T
667: WHERE source = lv_source
668: AND org_id = nvl(ln_org_id, org_id)
669: MINUS
670: SELECT customer_trx_id, org_id

Line 671: FROM JAI_AR_TRX_INS_LINES_T temp_dtl

667: WHERE source = lv_source
668: AND org_id = nvl(ln_org_id, org_id)
669: MINUS
670: SELECT customer_trx_id, org_id
671: FROM JAI_AR_TRX_INS_LINES_T temp_dtl
672: WHERE source = 'RAXTRX'
673: AND org_id = nvl(ln_org_id, org_id)
674: AND error_flag IN ('R','D')
675: )

Line 777: delete from jai_ar_trx_ins_lines_t

773: END IF; -- lv_process_status <> 'SS'
774: -----------------------------------------------------------------------
775: -- Added by Jia Li for Tax Inclusive Computations on 2007/11/30, End
776: /* ssumaith bug# 6685976(6766561) */
777: delete from jai_ar_trx_ins_lines_t
778: WHERE customer_trx_id = temp_rec.customer_trx_id;
779:
780: END IF;
781:

Line 792: UPDATE JAI_AR_TRX_INS_LINES_T

788: END IF;
789:
790: ROLLBACK;
791:
792: UPDATE JAI_AR_TRX_INS_LINES_T
793: SET ERROR_FLAG = 'R' ,
794: ERR_MESG = SUBSTR(ERRBUF,1,230) -- substr added by sriram Bug # 2740546
795: WHERE CUSTOMER_TRX_ID = var_cust_trx_id;
796:

Line 988: UPDATE JAI_AR_TRX_INS_LINES_T

984: EXCEPTION
985: WHEN OTHERS THEN
986: ROLLBACK;
987:
988: UPDATE JAI_AR_TRX_INS_LINES_T
989: SET ERROR_FLAG = 'R' ,
990: ERR_MESG = SUBSTR(ERRBUF,1,230) -- substr added by sriram Bug # 2740546
991: WHERE CUSTOMER_TRX_ID = var_cust_trx_id;
992:

Line 1670: --get the data from JAI_AR_TRX_INS_LINES_T for customer_trx_id and link_to_cust_trx_line_id

1666: FROM ra_cust_trx_line_gl_dist_all
1667: WHERE customer_trx_id = cp_customer_trx_id
1668: AND account_class IN (lv_account_class_tax,lv_account_class_freight);
1669:
1670: --get the data from JAI_AR_TRX_INS_LINES_T for customer_trx_id and link_to_cust_trx_line_id
1671: CURSOR cur_temp_lines_insert( cp_customer_trx_id ra_customer_trx_all.customer_trx_id%TYPE,
1672: cp_link_to_cust_trx_line_id JAI_AR_TRX_INS_LINES_T.link_to_cust_trx_line_id%TYPE DEFAULT NULL)
1673: IS
1674: SELECT *

Line 1672: cp_link_to_cust_trx_line_id JAI_AR_TRX_INS_LINES_T.link_to_cust_trx_line_id%TYPE DEFAULT NULL)

1668: AND account_class IN (lv_account_class_tax,lv_account_class_freight);
1669:
1670: --get the data from JAI_AR_TRX_INS_LINES_T for customer_trx_id and link_to_cust_trx_line_id
1671: CURSOR cur_temp_lines_insert( cp_customer_trx_id ra_customer_trx_all.customer_trx_id%TYPE,
1672: cp_link_to_cust_trx_line_id JAI_AR_TRX_INS_LINES_T.link_to_cust_trx_line_id%TYPE DEFAULT NULL)
1673: IS
1674: SELECT *
1675: FROM JAI_AR_TRX_INS_LINES_T
1676: WHERE customer_trx_id = cp_customer_trx_id

Line 1675: FROM JAI_AR_TRX_INS_LINES_T

1671: CURSOR cur_temp_lines_insert( cp_customer_trx_id ra_customer_trx_all.customer_trx_id%TYPE,
1672: cp_link_to_cust_trx_line_id JAI_AR_TRX_INS_LINES_T.link_to_cust_trx_line_id%TYPE DEFAULT NULL)
1673: IS
1674: SELECT *
1675: FROM JAI_AR_TRX_INS_LINES_T
1676: WHERE customer_trx_id = cp_customer_trx_id
1677: AND link_to_cust_trx_line_id = NVL(cp_link_to_cust_trx_line_id, link_to_cust_trx_line_id)
1678: ORDER BY link_to_cust_trx_line_id,
1679: customer_trx_line_id;

Line 1859: --get the data from JAI_AR_TRX_INS_LINES_T for customer_trx_id and link_to_cust_trx_line_id

1855: FROM ra_cust_trx_line_gl_dist_all
1856: WHERE customer_trx_id = cp_customer_trx_id
1857: AND account_class IN (lv_account_class_tax,lv_account_class_freight);
1858:
1859: --get the data from JAI_AR_TRX_INS_LINES_T for customer_trx_id and link_to_cust_trx_line_id
1860: /*Bug 11936630 - Ensure only Exclusive Tax lines get interfaced to AR*/
1861: CURSOR cur_temp_lines_insert( cp_customer_trx_id ra_customer_trx_all.customer_trx_id%TYPE,
1862: cp_link_to_cust_trx_line_id JAI_AR_TRX_INS_LINES_T.link_to_cust_trx_line_id%TYPE DEFAULT NULL)
1863: IS

Line 1862: cp_link_to_cust_trx_line_id JAI_AR_TRX_INS_LINES_T.link_to_cust_trx_line_id%TYPE DEFAULT NULL)

1858:
1859: --get the data from JAI_AR_TRX_INS_LINES_T for customer_trx_id and link_to_cust_trx_line_id
1860: /*Bug 11936630 - Ensure only Exclusive Tax lines get interfaced to AR*/
1861: CURSOR cur_temp_lines_insert( cp_customer_trx_id ra_customer_trx_all.customer_trx_id%TYPE,
1862: cp_link_to_cust_trx_line_id JAI_AR_TRX_INS_LINES_T.link_to_cust_trx_line_id%TYPE DEFAULT NULL)
1863: IS
1864: SELECT *
1865: FROM JAI_AR_TRX_INS_LINES_T jatilt
1866: WHERE customer_trx_id = cp_customer_trx_id

Line 1865: FROM JAI_AR_TRX_INS_LINES_T jatilt

1861: CURSOR cur_temp_lines_insert( cp_customer_trx_id ra_customer_trx_all.customer_trx_id%TYPE,
1862: cp_link_to_cust_trx_line_id JAI_AR_TRX_INS_LINES_T.link_to_cust_trx_line_id%TYPE DEFAULT NULL)
1863: IS
1864: SELECT *
1865: FROM JAI_AR_TRX_INS_LINES_T jatilt
1866: WHERE customer_trx_id = cp_customer_trx_id
1867: AND link_to_cust_trx_line_id = NVL(cp_link_to_cust_trx_line_id, link_to_cust_trx_line_id)
1868: AND EXISTS (select '1'
1869: from JAI_AR_TRX_TAX_LINES jattl

Line 1950: --Lock all the rows from JAI_AR_TRX_INS_LINES_T for a customer_trx_id, which are to be processed

1946: FROM ra_customer_trx_all
1947: WHERE customer_trx_id = cp_customer_trx_id;
1948:
1949:
1950: --Lock all the rows from JAI_AR_TRX_INS_LINES_T for a customer_trx_id, which are to be processed
1951: CURSOR cur_lock_temp(cp_customer_trx_id JAI_AR_TRX_INS_LINES_T.customer_trx_id%TYPE)
1952: IS
1953: SELECT *
1954: FROM JAI_AR_TRX_INS_LINES_T

Line 1951: CURSOR cur_lock_temp(cp_customer_trx_id JAI_AR_TRX_INS_LINES_T.customer_trx_id%TYPE)

1947: WHERE customer_trx_id = cp_customer_trx_id;
1948:
1949:
1950: --Lock all the rows from JAI_AR_TRX_INS_LINES_T for a customer_trx_id, which are to be processed
1951: CURSOR cur_lock_temp(cp_customer_trx_id JAI_AR_TRX_INS_LINES_T.customer_trx_id%TYPE)
1952: IS
1953: SELECT *
1954: FROM JAI_AR_TRX_INS_LINES_T
1955: WHERE customer_trx_id = cp_customer_trx_id

Line 1954: FROM JAI_AR_TRX_INS_LINES_T

1950: --Lock all the rows from JAI_AR_TRX_INS_LINES_T for a customer_trx_id, which are to be processed
1951: CURSOR cur_lock_temp(cp_customer_trx_id JAI_AR_TRX_INS_LINES_T.customer_trx_id%TYPE)
1952: IS
1953: SELECT *
1954: FROM JAI_AR_TRX_INS_LINES_T
1955: WHERE customer_trx_id = cp_customer_trx_id
1956: FOR UPDATE NOWAIT;
1957:
1958:

Line 2185: --Lock all the rows from JAI_AR_TRX_INS_LINES_T for a customer_trx_id, which are to be processed

2181: BEGIN
2182:
2183: fnd_file.put_line(FND_FILE.LOG, 'START process_imported_invoice');
2184:
2185: --Lock all the rows from JAI_AR_TRX_INS_LINES_T for a customer_trx_id, which are to be processed
2186: FOR i IN cur_lock_temp(p_customer_trx_id)
2187: LOOP
2188: EXIT;
2189: END LOOP;

Line 3196: UPDATE JAI_AR_TRX_INS_LINES_T

3192: fnd_file.put_line(FND_FILE.LOG,sqlerrm);
3193: p_process_status := jai_constants.unexpected_error;
3194: p_process_message :=SUBSTR(SQLERRM,1,120);
3195:
3196: UPDATE JAI_AR_TRX_INS_LINES_T
3197: SET error_flag = 'R',
3198: err_mesg = p_process_message
3199: WHERE customer_trx_id = p_customer_trx_id;
3200: END process_from_order_line;

Line 3232: SELECT count(customer_trx_line_id) FROM JAI_AR_TRX_INS_LINES_T jatilt

3228: lv_acc_class_rec CONSTANT varchar2(10) := 'REC';--rchandan for bug#4428980
3229:
3230: /*Bug 11936630*/
3231: CURSOR count_cur IS
3232: SELECT count(customer_trx_line_id) FROM JAI_AR_TRX_INS_LINES_T jatilt
3233: WHERE customer_trx_id = P_CUSTOMER_TRX_ID
3234: AND EXISTS (select '1'
3235: from JAI_AR_TRX_TAX_LINES jattl
3236: where jattl.link_to_cust_trx_line_id = jatilt.link_to_cust_trx_line_id

Line 3255: FROM JAI_AR_TRX_INS_LINES_T jatilt

3251: SELECT EXTENDED_AMOUNT,CUSTOMER_TRX_LINE_ID,CUSTOMER_TRX_ID ,SET_OF_BOOKS_ID,
3252: LINK_TO_CUST_TRX_LINE_ID,LINE_TYPE ,UOM_CODE,VAT_TAX_ID,ACCTD_AMOUNT,AMOUNT,
3253: CODE_COMBINATION_ID,CUST_TRX_LINE_SALES_REP_ID,LAST_UPDATE_DATE,LAST_UPDATED_BY,
3254: CREATION_DATE,CREATED_BY,LAST_UPDATE_LOGIN,INSERT_UPDATE_FLAG
3255: FROM JAI_AR_TRX_INS_LINES_T jatilt
3256: WHERE customer_trx_id = P_CUSTOMER_TRX_ID and
3257: link_to_cust_trx_line_id = p_link_line_id
3258: AND EXISTS (select '1'
3259: from JAI_AR_TRX_TAX_LINES jattl

Line 3282: WHERE CUSTOMER_TRX_LINE_ID IN (SELECT LINK_TO_CUST_TRX_LINE_ID FROM JAI_AR_TRX_INS_LINES_T jatilt

3278: /*Bug 11936630*/
3279: CURSOR GL_DATE_CUR IS
3280: SELECT DISTINCT gl_date
3281: FROM RA_CUST_TRX_LINE_GL_DIST_ALL
3282: WHERE CUSTOMER_TRX_LINE_ID IN (SELECT LINK_TO_CUST_TRX_LINE_ID FROM JAI_AR_TRX_INS_LINES_T jatilt
3283: WHERE customer_trx_id = P_CUSTOMER_TRX_ID
3284: AND EXISTS (select '1'
3285: from JAI_AR_TRX_TAX_LINES jattl
3286: where jattl.link_to_cust_trx_line_id = jatilt.link_to_cust_trx_line_id

Line 3303: FROM JAI_AR_TRX_INS_LINES_T jatilt

3299:
3300: /*Bug 11936630*/
3301: CURSOR LINK_LINE_CUR IS
3302: SELECT LINK_TO_CUST_TRX_LINE_ID,ERROR_FLAG --added the error_flag condition to process the records,which got stuck up
3303: FROM JAI_AR_TRX_INS_LINES_T jatilt
3304: WHERE customer_trx_id = P_CUSTOMER_TRX_ID AND LINK_TO_CUST_TRX_LINE_ID = p_link_line_id
3305: AND EXISTS (select '1'
3306: from JAI_AR_TRX_TAX_LINES jattl
3307: where jattl.link_to_cust_trx_line_id = jatilt.link_to_cust_trx_line_id

Line 3316: FROM RA_CUST_TRX_LINE_GL_DIST_ALL A, RA_CUSTOMER_TRX_LINES_ALL B, JAI_AR_TRX_INS_LINES_T C

3312: and NVL(inclusive_tax_flag,'N') = 'N'));
3313: /*Bug 11936630*/
3314: CURSOR PREVIOUS_AMOUNT_CUR IS
3315: SELECT A.AMOUNT , A.ACCTD_AMOUNT
3316: FROM RA_CUST_TRX_LINE_GL_DIST_ALL A, RA_CUSTOMER_TRX_LINES_ALL B, JAI_AR_TRX_INS_LINES_T C
3317: WHERE A.CUSTOMER_TRX_LINE_ID = B.CUSTOMER_TRX_LINE_ID
3318: AND B.LINK_TO_CUST_TRX_LINE_ID = C.LINK_TO_CUST_TRX_LINE_ID
3319: AND C.CUSTOMER_TRX_ID = P_CUSTOMER_TRX_ID
3320: AND A.ACCOUNT_CLASS IN (lv_tax_const,lv_freight_acc_class)

Line 3639: process_manual_invoice will fetch the transactions from temp table (jai_ar_trx_ins_lines_t)

3635: then the modifications for the second concurrent will be lost and will
3636: not be processed.
3637:
3638:
3639: process_manual_invoice will fetch the transactions from temp table (jai_ar_trx_ins_lines_t)
3640: and process the taxes to distributions and then flushout the temp table.
3641:
3642: During this the second concurrent fires and will find no data in temp table and will not process
3643: the modified data.

Line 3713: DELETE JAI_AR_TRX_INS_LINES_T

3709: -- AND v_reason_code = 'RETURN' THEN --commented for the BUG#2247013 as the reason_code can be anything.
3710: FOR tax_type_rec IN tax_type
3711: LOOP
3712: IF tax_type_rec.t_type <> 'Freight' THEN
3713: DELETE JAI_AR_TRX_INS_LINES_T
3714: WHERE customer_trx_id = P_CUSTOMER_TRX_ID
3715: and link_to_cust_trx_line_id = P_LINK_LINE_ID
3716: and customer_trx_line_id = tax_type_rec.line_id
3717: and tax_type_rec.t_type <> jai_constants.tax_type_freight;

Line 3965: Delete JAI_AR_TRX_INS_LINES_T

3961: FETCH cur_chk_jai_tax_dtls INTO ln_tax_line_exists;
3962: CLOSE cur_chk_jai_tax_dtls;
3963:
3964: IF nvl(ln_tax_line_exists,0) <> 1 THEN
3965: Delete JAI_AR_TRX_INS_LINES_T
3966: WHERE customer_trx_line_id = temp_rec.customer_trx_line_id
3967: AND link_to_cust_trx_line_id = temp_rec.link_to_cust_trx_line_id;
3968: ELSE
3969: --End bug#8476512

Line 4205: DELETE JAI_AR_TRX_INS_LINES_T

4201:
4202: v_sql_num :=33;
4203:
4204: /*added for bug#12589786*/
4205: DELETE JAI_AR_TRX_INS_LINES_T
4206: WHERE customer_trx_id = P_CUSTOMER_TRX_ID and
4207: link_to_cust_trx_line_id = P_LINK_LINE_ID;
4208: v_sql_num :=34;
4209:

Line 4224: UPDATE JAI_AR_TRX_INS_LINES_T SET ERROR_FLAG = 'R',ERR_MESG = ERRBUF WHERE

4220: when others then
4221: ERRBUF :=SUBSTR(SQLERRM,1,230);
4222: ROLLBACK TO TEMP_CUR_BLK_SVP;
4223:
4224: UPDATE JAI_AR_TRX_INS_LINES_T SET ERROR_FLAG = 'R',ERR_MESG = ERRBUF WHERE
4225: CUSTOMER_TRX_ID=P_CUSTOMER_TRX_ID
4226: AND LINK_TO_CUST_TRX_LINE_ID = P_LINK_LINE_ID;
4227:
4228: COMMIT;

Line 4354: /*Bug 11936630 - Delete the Inclusive Tax Lines inserted into JAI_AR_TRX_INS_LINES_T*/

4350: END LOOP;
4351: CLOSE get_ext_amt_tax;
4352: -- end modifications by subbu and Jagdish on 10-jun-01 for receipt discount issue.
4353: ------------------------------------------------------------------------------------------------
4354: /*Bug 11936630 - Delete the Inclusive Tax Lines inserted into JAI_AR_TRX_INS_LINES_T*/
4355: DELETE JAI_AR_TRX_INS_LINES_T jatilt
4356: WHERE customer_trx_id = P_CUSTOMER_TRX_ID and
4357: link_to_cust_trx_line_id = p_link_line_id
4358: AND EXISTS (select '1'

Line 4355: DELETE JAI_AR_TRX_INS_LINES_T jatilt

4351: CLOSE get_ext_amt_tax;
4352: -- end modifications by subbu and Jagdish on 10-jun-01 for receipt discount issue.
4353: ------------------------------------------------------------------------------------------------
4354: /*Bug 11936630 - Delete the Inclusive Tax Lines inserted into JAI_AR_TRX_INS_LINES_T*/
4355: DELETE JAI_AR_TRX_INS_LINES_T jatilt
4356: WHERE customer_trx_id = P_CUSTOMER_TRX_ID and
4357: link_to_cust_trx_line_id = p_link_line_id
4358: AND EXISTS (select '1'
4359: from JAI_AR_TRX_TAX_LINES jattl

Line 4400: UPDATE JAI_AR_TRX_INS_LINES_T SET ERROR_FLAG = 'R',ERR_MESG=ERRBUF WHERE CUSTOMER_TRX_ID=P_CUSTOMER_TRX_ID

4396:
4397: WHEN OTHERS THEN
4398:
4399: ERRBUF :=SUBSTR(SQLERRM,1,230);
4400: UPDATE JAI_AR_TRX_INS_LINES_T SET ERROR_FLAG = 'R',ERR_MESG=ERRBUF WHERE CUSTOMER_TRX_ID=P_CUSTOMER_TRX_ID
4401: AND LINK_TO_CUST_TRX_LINE_ID = P_LINK_LINE_ID;
4402: COMMIT;
4403: -- retcode := 7;
4404: -- fnd_file.put_line(FND_FILE.LOG, 'ABORTED RUN. Retcode = '|| retcode);