DBA Data[Home] [Help]

APPS.JAI_AR_RCTA_TRIGGER_PKG dependencies on JAI_AR_TRXS

Line 96: FROM JAI_AR_TRXS

92: WHERE order_type_id = pr_new.batch_source_id and order_flag = 'N');
93:
94: Cursor organization_cur IS
95: SELECT organization_id,location_id
96: FROM JAI_AR_TRXS
97: WHERE trx_number = v_parent_trx_number;
98:
99: Cursor transaction_type_cur IS
100: Select type

Line 107: From JAI_AR_TRXS

103: And NVL(org_id,0) = NVL(pr_new.org_id,0);
104:
105: Cursor localization_header_info IS
106: Select organization_id, location_id, update_rg_flag
107: From JAI_AR_TRXS
108: Where customer_trx_id= pr_new.previous_customer_trx_id;
109:
110: v_currency_code gl_sets_of_books.currency_code%type;
111: CURSOR curr(c_sob NUMBER) IS

Line 234: INSERT INTO JAI_AR_TRXS

230: END IF;
231: END IF;
232:
233: -------
234: INSERT INTO JAI_AR_TRXS
235: (
236: CUSTOMER_TRX_ID ,
237: ORGANIZATION_ID ,
238: LOCATION_ID ,

Line 308: v_vat_invoice_no JAI_AR_TRXS.tax_invoice_no%type;

304:
305: v_vat_start_num JAI_CMN_INVENTORY_ORGS.current_number%Type;
306: v_vat_jump_by JAI_CMN_INVENTORY_ORGS.jump_by%type;
307: v_vat_prefix JAI_CMN_INVENTORY_ORGS.prefix%type;
308: v_vat_invoice_no JAI_AR_TRXS.tax_invoice_no%type;
309: v_vat_reg_no JAI_CMN_INVENTORY_ORGS.vat_reg_no%type;
310:
311:
312: v_organization_id Number;

Line 316: v_loc_vat_inv_no JAI_AR_TRXS.tax_invoice_no%type;

312: v_organization_id Number;
313: v_loc_id Number;
314: v_vat_taxes_exist Number;
315: v_trans_type VARCHAR2(30);
316: v_loc_vat_inv_no JAI_AR_TRXS.tax_invoice_no%type;
317:
318: CURSOR organization_cur IS
319: SELECT organization_id,location_id
320: FROM JAI_AR_TRXS

Line 320: FROM JAI_AR_TRXS

316: v_loc_vat_inv_no JAI_AR_TRXS.tax_invoice_no%type;
317:
318: CURSOR organization_cur IS
319: SELECT organization_id,location_id
320: FROM JAI_AR_TRXS
321: where customer_trx_id = pr_new.customer_trx_id;
322:
323: CURSOR C_VAT_INVOICE_CUR IS
324: SELECT TAX_INVOICE_NO

Line 325: FROM JAI_AR_TRXS

321: where customer_trx_id = pr_new.customer_trx_id;
322:
323: CURSOR C_VAT_INVOICE_CUR IS
324: SELECT TAX_INVOICE_NO
325: FROM JAI_AR_TRXS
326: WHERE Customer_Trx_Id = pr_new.customer_trx_id;
327:
328:
329: cursor c_vat_taxes_exist

Line 399: update JAI_AR_TRXS

395: else
396: v_vat_invoice_no := v_vat_start_num;
397: end if;
398:
399: update JAI_AR_TRXS
400: set tax_invoice_no = v_vat_invoice_no
401: where customer_trx_id = pr_new.customer_trx_id;
402:
403: update JAI_CMN_INVENTORY_ORGS

Line 579: Update JAI_AR_TRXS

575:
576: IF pr_new.created_from = 'RAXTRX' THEN
577: IF pr_new.CUSTOMER_TRX_ID <> pr_old.CUSTOMER_TRX_ID
578: THEN
579: Update JAI_AR_TRXS
580: Set Customer_Trx_ID = pr_new.Customer_Trx_ID
581: Where Customer_Trx_ID = pr_old.Customer_Trx_ID;
582: Update JAI_AR_TRX_LINES
583: Set Customer_Trx_Id = pr_new.Customer_Trx_ID

Line 588: Update JAI_AR_TRXS

584: Where Customer_Trx_ID = pr_old.Customer_Trx_ID;
585: END IF;
586:
587:
588: Update JAI_AR_TRXS
589: Set Trx_Number = pr_new.Trx_Number
590: Where Customer_Trx_ID = pr_new.Customer_Trx_ID;
591: END IF;
592:

Line 600: Update JAI_AR_TRXS

596: IF NVL(v_trans_type,'N') in ('CM','DM') THEN
597:
598: -- Start, Vijay Shankar for bug # 3181921
599: IF pr_new.created_from = 'RAXTRX' THEN
600: Update JAI_AR_TRXS
601: Set Trx_Number = pr_new.Trx_Number
602: Where Customer_Trx_ID = pr_new.Customer_Trx_ID;
603: ELSE
604: -- End, Vijay Shankar for bug # 3181921

Line 606: Update JAI_AR_TRXS

602: Where Customer_Trx_ID = pr_new.Customer_Trx_ID;
603: ELSE
604: -- End, Vijay Shankar for bug # 3181921
605:
606: Update JAI_AR_TRXS
607: Set Trx_Number = pr_new.Trx_Number
608: , Once_Completed_Flag = NVL(pr_new.Complete_Flag,'N')
609: Where Customer_Trx_ID = pr_new.Customer_Trx_ID;
610: END IF;

Line 613: Update JAI_AR_TRXS

609: Where Customer_Trx_ID = pr_new.Customer_Trx_ID;
610: END IF;
611:
612: ELSIF NVL(v_trans_type,'N') = 'INV' THEN
613: Update JAI_AR_TRXS
614: Set Trx_Number = pr_new.Trx_Number
615: Where Customer_Trx_ID = pr_new.Customer_Trx_ID;
616: END IF;
617: /* Added an exception block by Ramananda for bug#4570303 */

Line 638: lv_vat_invoice_no JAI_AR_TRXS.VAT_INVOICE_NO%TYPE ;

634: PROCEDURE ARU_T3 ( pr_old t_rec%type , pr_new t_rec%type , pv_action varchar2 , pv_return_code out nocopy varchar2 , pv_return_message out nocopy varchar2 ) IS
635: v_organization_id NUMBER ;
636: v_loc_id NUMBER ;
637: v_trans_type RA_CUST_TRX_TYPES_ALL.TYPE%TYPE ;
638: lv_vat_invoice_no JAI_AR_TRXS.VAT_INVOICE_NO%TYPE ;
639: ln_regime_id JAI_RGM_DEFINITIONS.REGIME_ID%TYPE ;
640: ln_regime_code JAI_RGM_DEFINITIONS.REGIME_CODE%TYPE ;
641: lv_process_flag VARCHAR2(10) ;
642: lv_process_message VARCHAR2(4000) ;

Line 644: ld_vat_invoice_date JAI_AR_TRXS.VAT_INVOICE_DATE%TYPE ;

640: ln_regime_code JAI_RGM_DEFINITIONS.REGIME_CODE%TYPE ;
641: lv_process_flag VARCHAR2(10) ;
642: lv_process_message VARCHAR2(4000) ;
643: ld_gl_date RA_CUST_TRX_LINE_GL_DIST_ALL.GL_DATE%TYPE ;
644: ld_vat_invoice_date JAI_AR_TRXS.VAT_INVOICE_DATE%TYPE ;
645:
646:
647: /*
648: || Get the organization, location, vat_invoice_no and vat_invoice_date from JAI_AR_TRXS

Line 648: || Get the organization, location, vat_invoice_no and vat_invoice_date from JAI_AR_TRXS

644: ld_vat_invoice_date JAI_AR_TRXS.VAT_INVOICE_DATE%TYPE ;
645:
646:
647: /*
648: || Get the organization, location, vat_invoice_no and vat_invoice_date from JAI_AR_TRXS
649: */
650: CURSOR organization_cur
651: IS
652: SELECT

Line 658: JAI_AR_TRXS

654: location_id ,
655: vat_invoice_no ,
656: vat_invoice_date
657: FROM
658: JAI_AR_TRXS
659: WHERE
660: customer_trx_id = pr_new.customer_trx_id;
661:
662: /*

Line 715: JAI_AR_TRXS

711: IS
712: SELECT
713: vat_invoice_no
714: FROM
715: JAI_AR_TRXS
716: WHERE
717: customer_trx_id = pr_new.previous_customer_trx_id;
718:
719: /*

Line 911: JAI_AR_TRXS

907:
908: END IF;
909:
910: UPDATE
911: JAI_AR_TRXS
912: SET
913: vat_invoice_no = lv_vat_invoice_no ,
914: vat_invoice_date = nvl(ld_gl_date,pr_new.trx_date)
915: WHERE

Line 1034: v_update_rg23d_flag JAI_AR_TRXS.UPDATE_RG23D_FLAG%TYPE;/*Bug#4601570 bduvarag*/

1030: v_register_exp_date JAI_OM_OE_BOND_REG_HDRS.bond_expiry_date%type;
1031: v_lou_flag JAI_OM_OE_BOND_REG_HDRS.lou_flag%type;
1032: -- added by sriram - bug # 3021588
1033: v_trading_flag JAI_CMN_INVENTORY_ORGS.TRADING%TYPE;/*Bug#4601570 bduvarag*/
1034: v_update_rg23d_flag JAI_AR_TRXS.UPDATE_RG23D_FLAG%TYPE;/*Bug#4601570 bduvarag*/
1035:
1036: /*
1037: || Start of bug 4101549
1038: || Cursor modified by aiyer

Line 1050: JAI_AR_TRXS

1046: decode(once_completed_flag,'A','RG23A','C','RG23C','P','PLA') register_type,
1047: update_rg_flag, -- update_rg_flag added by sriram - bug# 3496577
1048: nvl(update_rg23d_flag,'N') /*Bug 5040383*/
1049: FROM
1050: JAI_AR_TRXS
1051: WHERE
1052: customer_trx_id = v_customer_trx_id;
1053:
1054:

Line 1076: FROM JAI_AR_TRXS

1072: WHERE organization_id = p_org_id AND fin_active_flag = 'Y';
1073:
1074: CURSOR tax_amount_cur IS
1075: SELECT NVL(tax_amount,0) tax_amount
1076: FROM JAI_AR_TRXS
1077: WHERE customer_trx_id = v_customer_trx_id;
1078:
1079: CURSOR preference_reg_cur(p_org_id IN NUMBER, p_loc_id IN NUMBER) IS
1080: SELECT pref_rg23a , pref_rg23c , pref_pla

Line 1093: FROM JAI_AR_TRXS

1089: ORGANIZATION_ID = P_ORG_ID;
1090:
1091: CURSOR organization_cur IS
1092: SELECT organization_id,location_id
1093: FROM JAI_AR_TRXS
1094: WHERE trx_number = v_parent_trx_number;
1095:
1096: CURSOR register_balance_cur(p_org_id IN NUMBER, p_loc_id IN NUMBER) IS
1097: SELECT NVL(register_balance,0) register_balance

Line 1244: FROM JAI_AR_TRXS jtrx,

1240:
1241: --3661746
1242: CURSOR c_total_Excise_amt IS
1243: SELECT nvl(sum(jrtl.func_tax_amount),0)
1244: FROM JAI_AR_TRXS jtrx,
1245: JAI_AR_TRX_LINES jtl,
1246: JAI_AR_TRX_TAX_LINES jrtl,
1247: JAI_CMN_TAXES_ALL jtc ,
1248: JAI_INV_ITM_SETUPS jmtl

Line 1284: CURSOR cur_chk_temp_lines_exist( cp_customer_trx_id JAI_AR_TRXS.CUSTOMER_TRX_ID%TYPE ) /* changed the RA_CUSTOMER_TRX_ALL.CUSTOMER_TRX_ID%TYPE to JAI_AR_TRXS.CUSTOMER_TRX_ID%TYPE for the bug 5364288 */

1280: || Cursor added by aiyer for the bug 4185033
1281: || Check whether the JAI_AR_TRX_INS_LINES_T table still has the row corresponding to the current
1282: || customer_trx_id
1283: */
1284: CURSOR cur_chk_temp_lines_exist( cp_customer_trx_id JAI_AR_TRXS.CUSTOMER_TRX_ID%TYPE ) /* changed the RA_CUSTOMER_TRX_ALL.CUSTOMER_TRX_ID%TYPE to JAI_AR_TRXS.CUSTOMER_TRX_ID%TYPE for the bug 5364288 */
1285: IS
1286: /* commented and added the below for bug#11664009 and added the below
1287: SELECT
1288: 1

Line 1316: FROM JAI_AR_TRXS

1312: CURSOR c_vat_invoice_cur
1313: IS
1314: SELECT
1315: vat_invoice_no
1316: FROM JAI_AR_TRXS
1317: WHERE customer_trx_id = pr_new.customer_trx_id;
1318:
1319: CURSOR cur_vat_taxes_exist
1320: IS

Line 1375: CURSOR cur_get_same_inv_no ( cp_organization_id JAI_AR_TRXS.ORGANIZATION_ID%TYPE ,

1371: --bug#5645003, ends
1372:
1373:
1374:
1375: CURSOR cur_get_same_inv_no ( cp_organization_id JAI_AR_TRXS.ORGANIZATION_ID%TYPE ,
1376: cp_location_id JAI_AR_TRXS.LOCATION_ID%TYPE
1377: )
1378: IS
1379: SELECT

Line 1376: cp_location_id JAI_AR_TRXS.LOCATION_ID%TYPE

1372:
1373:
1374:
1375: CURSOR cur_get_same_inv_no ( cp_organization_id JAI_AR_TRXS.ORGANIZATION_ID%TYPE ,
1376: cp_location_id JAI_AR_TRXS.LOCATION_ID%TYPE
1377: )
1378: IS
1379: SELECT
1380: nvl(attribute_value ,'N') attribute_value

Line 1421: lv_vat_invoice_number JAI_AR_TRXS.VAT_INVOICE_NO%TYPE;

1417: lv_register_type VARCHAR2(5);
1418: lv_rg23a_cess_avlbl VARCHAR2(10);
1419: lv_rg23c_cess_avlbl VARCHAR2(10);
1420: lv_pla_cess_avlbl VARCHAR2(10);
1421: lv_vat_invoice_number JAI_AR_TRXS.VAT_INVOICE_NO%TYPE;
1422: lv_vat_taxes_exist VARCHAR2(1);
1423: lv_vat_no_same_exc_no JAI_RGM_REGISTRATIONS.ATTRIBUTE_VALUE%TYPE; -- := 'N'; --Ramananda for File.Sql.35
1424: ld_gl_date RA_CUST_TRX_LINE_GL_DIST_ALL.GL_DATE%TYPE;
1425: ln_regime_id JAI_RGM_DEFINITIONS.REGIME_ID%TYPE;

Line 1446: FROM JAI_AR_TRXS

1442:
1443: CURSOR cur_get_gst_invoice
1444: IS
1445: SELECT gst_invoice_no
1446: FROM JAI_AR_TRXS
1447: WHERE customer_trx_id = pr_new.customer_trx_id ;
1448:
1449: CURSOR cur_chk_gst_exists ( cp_regime_code JAI_RGM_ORG_REGNS_V.REGIME_CODE%TYPE)
1450: IS

Line 1514: FROM JAI_AR_TRXS

1510: CURSOR c_st_invoice_cur
1511: IS
1512: SELECT
1513: st_inv_number
1514: FROM JAI_AR_TRXS
1515: WHERE customer_trx_id = pr_new.customer_trx_id;
1516:
1517: CURSOR cur_st_taxes_exist
1518: IS

Line 1534: lv_st_inv_number jai_ar_trxs.st_inv_number%TYPE;

1530: jcttl.tax_id = jtc.tax_id AND
1531: jtc.tax_type = jrttv.tax_type AND
1532: regime_code = jai_constants.service_regime AND
1533: jtc.org_id = pr_new.org_id ;
1534: lv_st_inv_number jai_ar_trxs.st_inv_number%TYPE;
1535: /*Added by Qinglei for the Advanced Receipt for Service Tax enhancement Bug 13361952 End*/
1536: /*Added by Qinglei on 26-Dec-2011 for bug13531549 begin*/
1537: CURSOR cur_excise_taxes_exist(pn_customer_trx_line_id NUMBER)
1538: IS

Line 1704: UPDATE JAI_AR_TRXS

1700: */
1701:
1702: IF NVL(v_trans_type,'N') <> 'INV' THEN
1703: /*Bug 5171573 bduvarag start*/
1704: UPDATE JAI_AR_TRXS
1705: SET ONCE_COMPLETED_FLAG = pr_new.COMPLETE_FLAG
1706: WHERE CUSTOMER_TRX_ID = V_CUSTOMER_TRX_ID;
1707: /*Bug 5171573 bduvarag End*/
1708: RETURN;

Line 1716: UPDATE JAI_AR_TRXS

1712: --Added by Zhiwei for Open Interface ER bug#11683927 on 10-Feb-2011.
1713: --Add 'AND' condition, program will proceed while AR transaction is not from OFI Open Interface.
1714: AND ln_open_source = 0
1715: THEN
1716: UPDATE JAI_AR_TRXS
1717: SET ONCE_COMPLETED_FLAG = pr_new.COMPLETE_FLAG
1718: WHERE CUSTOMER_TRX_ID = V_CUSTOMER_TRX_ID;
1719: ELSE
1720:

Line 2223: FROM JAI_AR_TRXS

2219: v_reg_type VARCHAR2(10);
2220: Begin
2221: SELECT once_completed_flag
2222: INTO v_reg_type
2223: FROM JAI_AR_TRXS
2224: WHERE CUSTOMER_TRX_ID = pr_new.Customer_trx_id;
2225:
2226: IF v_reg_type = 'P' THEN
2227: v_reg_type := 'PLA';

Line 2348: FROM JAI_AR_TRXS

2344: v_reg_type1 VARCHAR2(10);
2345: Begin
2346: SELECT once_completed_flag
2347: INTO v_reg_type1
2348: FROM JAI_AR_TRXS
2349: WHERE CUSTOMER_TRX_ID = pr_new.Customer_trx_id;
2350:
2351: If v_reg_type1 = 'P' THEN
2352: v_reg_type1 := 'PLA';

Line 2422: UPDATE JAI_AR_TRXS

2418: SYSDATE ,
2419: FND_GLOBAL.USER_ID ,
2420: SYSDATE);
2421: END IF;
2422: UPDATE JAI_AR_TRXS
2423: SET
2424: ONCE_COMPLETED_FLAG = pr_new.COMPLETE_FLAG
2425: WHERE CUSTOMER_TRX_ID = V_CUSTOMER_TRX_ID;
2426: END IF;

Line 2629: JAI_AR_TRXS

2625:
2626:
2627:
2628: UPDATE
2629: JAI_AR_TRXS
2630: SET
2631: vat_invoice_no = lv_vat_invoice_number ,
2632: vat_invoice_date = nvl(ld_gl_date,pr_new.trx_date)
2633: WHERE

Line 2693: UPDATE jai_ar_trxs

2689:
2690: END IF;
2691:
2692:
2693: UPDATE jai_ar_trxs
2694: SET st_inv_number = lv_st_inv_number
2695: WHERE customer_trx_id = pr_new.customer_trx_id ;
2696:
2697: ELSE

Line 2894: FROM JAI_AR_TRXS

2890:
2891:
2892: CURSOR SO_AR_HDR_INFO IS
2893: SELECT organization_id, location_id, batch_source_id
2894: FROM JAI_AR_TRXS
2895: WHERE Customer_Trx_ID = v_customer_trx_id;
2896:
2897: /*Bug 8625057 - Start*/
2898: CURSOR cur_chk_rgm ( cp_tax_type JAI_CMN_TAXES_ALL.TAX_TYPE%TYPE )

Line 2977: ||changed the variable definition from RA_CUSTOMER_TRX_ALL.CUSTOMER_TRX_ID%TYPE to JAI_AR_TRXS.CUSTOMER_TRX_ID%TYPE

2973: v_err_mesg VARCHAR2(250);
2974:
2975: /*
2976: || start of bug 5364288 - code modified by aiyer
2977: ||changed the variable definition from RA_CUSTOMER_TRX_ALL.CUSTOMER_TRX_ID%TYPE to JAI_AR_TRXS.CUSTOMER_TRX_ID%TYPE
2978: */
2979: v_trx_num JAI_AR_TRXS.TRX_NUMBER%TYPE;
2980:
2981: /* End of bug 5364288 */

Line 2979: v_trx_num JAI_AR_TRXS.TRX_NUMBER%TYPE;

2975: /*
2976: || start of bug 5364288 - code modified by aiyer
2977: ||changed the variable definition from RA_CUSTOMER_TRX_ALL.CUSTOMER_TRX_ID%TYPE to JAI_AR_TRXS.CUSTOMER_TRX_ID%TYPE
2978: */
2979: v_trx_num JAI_AR_TRXS.TRX_NUMBER%TYPE;
2980:
2981: /* End of bug 5364288 */
2982:
2983: v_TRX_TAX_COUNT Number;

Line 3366: FROM JAI_AR_TRXS

3362: FROM JAI_AR_TRX_APPS_RELS_T ;/*altered by rchandan for bug#4479131*/
3363:
3364: CURSOR organization_cur IS
3365: SELECT organization_id, location_id--added by peng.zheng for bug 10043656
3366: FROM JAI_AR_TRXS
3367: WHERE trx_number = pr_new.recurred_from_trx_number;
3368:
3369: CURSOR ONCE_COMPLETE_FLAG_CUR IS
3370: SELECT once_completed_flag

Line 3371: FROM JAI_AR_TRXS

3367: WHERE trx_number = pr_new.recurred_from_trx_number;
3368:
3369: CURSOR ONCE_COMPLETE_FLAG_CUR IS
3370: SELECT once_completed_flag
3371: FROM JAI_AR_TRXS
3372: WHERE customer_trx_id = v_header_id;
3373:
3374: v_trans_type Varchar2(30);
3375:

Line 3474: the change is being reflected in the JAI_AR_TRXS table.

3470: CURSOR TAX_INFO_CUR MODIFY PRECEDENCE IS ADDED FROM 6 TO 10
3471: SQL STATEMENT JAI_AR_TRX_TAX_LINES MODIFY PRECEDENCE IS ADDED FROM 6 TO 10
3472: 3. 27-Feb-2007 CSahoo for Bug 5390583, File Version 120.5 Forward Porting of 11i BUG 5357400
3473: When a change is done in the invoice currency code from the front end
3474: the change is being reflected in the JAI_AR_TRXS table.
3475: Added a IF clause for the same.
3476:
3477:
3478: 4. 14-05-2007 ssawant for bug 5879769, File Version 120.6

Line 3543: UPDATE JAI_AR_TRXS

3539: END IF;
3540: --Following If and update added by CSahoo - bug# 5390583
3541: IF pr_new.invoice_currency_code <> pr_old.invoice_currency_code THEN
3542:
3543: UPDATE JAI_AR_TRXS
3544: SET invoice_currency_code = pr_new.invoice_currency_code ,
3545: exchange_rate_type = pr_new.exchange_rate_type ,
3546: exchange_date = pr_new.exchange_date ,
3547: exchange_rate = pr_new.exchange_rate

Line 3811: LV_ONCE_COMPLETED_FLAG JAI_AR_TRXS.ONCE_COMPLETED_FLAG%TYPE;

3807: ( PR_OLD T_REC%TYPE , PR_NEW T_REC%TYPE , PV_ACTION VARCHAR2 , PV_RETURN_CODE OUT NOCOPY VARCHAR2 , PV_RETURN_MESSAGE OUT NOCOPY VARCHAR2 )
3808: IS
3809: LV_DOCUMENT_TYPE VARCHAR2(40);
3810: LN_REG_ID NUMBER;
3811: LV_ONCE_COMPLETED_FLAG JAI_AR_TRXS.ONCE_COMPLETED_FLAG%TYPE;
3812: V_HEADER_ID NUMBER;
3813:
3814:
3815: CURSOR ONCE_COMPLETE_FLAG_CUR IS

Line 3817: FROM JAI_AR_TRXS

3813:
3814:
3815: CURSOR ONCE_COMPLETE_FLAG_CUR IS
3816: SELECT ONCE_COMPLETED_FLAG
3817: FROM JAI_AR_TRXS
3818: WHERE CUSTOMER_TRX_ID = V_HEADER_ID;
3819:
3820:
3821: --Added by Xiao for Open Interface ER bug#11683927 on 10-Feb-2011, begin

Line 3974: REM JAI_AR_TRXS for non-shippable RMA.

3970: REM are imported into AR together.
3971: REM
3972: REM 10-Jun-2010 Modified by Allen Yang for bug 9793678
3973: REM Commented code which populates VAT invoice number on
3974: REM JAI_AR_TRXS for non-shippable RMA.
3975: REM
3976: REM 09-Jul-2010 Modified by Bo Li for Bug 9765108
3977: REM Change the procedure ARU_T8, modified the logic of inserting
3978: REM repository table for nonshippable RMA.

Line 3985: lv_vat_invoice_no JAI_AR_TRXS.VAT_INVOICE_NO%TYPE ;

3981: PROCEDURE ARU_T8 ( pr_old t_rec%type , pr_new t_rec%type , pv_action varchar2 , pv_return_code out nocopy varchar2 , pv_return_message out nocopy varchar2 ) IS
3982: v_organization_id NUMBER ;
3983: v_loc_id NUMBER ;
3984: v_trans_type RA_CUST_TRX_TYPES_ALL.TYPE%TYPE ;
3985: lv_vat_invoice_no JAI_AR_TRXS.VAT_INVOICE_NO%TYPE ;
3986: ln_regime_id JAI_RGM_DEFINITIONS.REGIME_ID%TYPE ;
3987: ln_regime_code JAI_RGM_DEFINITIONS.REGIME_CODE%TYPE ;
3988: lv_process_flag VARCHAR2(10) ;
3989: lv_process_message VARCHAR2(4000) ;

Line 3991: ld_vat_invoice_date JAI_AR_TRXS.VAT_INVOICE_DATE%TYPE ;

3987: ln_regime_code JAI_RGM_DEFINITIONS.REGIME_CODE%TYPE ;
3988: lv_process_flag VARCHAR2(10) ;
3989: lv_process_message VARCHAR2(4000) ;
3990: ld_gl_date RA_CUST_TRX_LINE_GL_DIST_ALL.GL_DATE%TYPE ;
3991: ld_vat_invoice_date JAI_AR_TRXS.VAT_INVOICE_DATE%TYPE ;
3992:
3993: ln_rma_flag NUMBER;
3994: ln_order_line_id NUMBER;
3995: ln_nonship_rma_flag NUMBER;

Line 4045: || Get the organization, location, vat_invoice_no and vat_invoice_date from JAI_AR_TRXS

4041: AND l.rma_line_id = pn_order_line_id
4042: AND msi.shippable_item_flag = 'N' ;
4043:
4044: /*
4045: || Get the organization, location, vat_invoice_no and vat_invoice_date from JAI_AR_TRXS
4046: */
4047: CURSOR organization_cur
4048: IS
4049: SELECT organization_id ,

Line 4053: FROM JAI_AR_TRXS

4049: SELECT organization_id ,
4050: location_id ,
4051: vat_invoice_no ,
4052: vat_invoice_date
4053: FROM JAI_AR_TRXS
4054: WHERE customer_trx_id = pr_new.customer_trx_id;
4055:
4056: /*
4057: || Get the transaction type of the document

Line 4099: FROM JAI_AR_TRXS

4095:
4096: CURSOR cur_get_in_vat_no
4097: IS
4098: SELECT vat_invoice_no
4099: FROM JAI_AR_TRXS
4100: WHERE customer_trx_id = pr_new.previous_customer_trx_id;
4101:
4102: /*
4103: || Check if only 'VAT REVERSAL' tax type is present in ja_in_ra_cust_trx_tax_lines

Line 4154: cp_organization_id IN JAI_AR_TRXS.organization_id%TYPE,

4150: ( cp_source IN jai_rgm_trx_records.source%TYPE,
4151: cp_source_trx_type IN jai_rgm_trx_records.source_trx_type%TYPE,
4152: cp_source_table_name IN jai_rgm_trx_records.source_table_name%TYPE,
4153: cp_customer_trx_line_id IN ra_customer_trx_lines.customer_trx_line_id%TYPE,
4154: cp_organization_id IN JAI_AR_TRXS.organization_id%TYPE,
4155: cp_loc_id IN JAI_AR_TRXS.location_id%TYPE
4156: )
4157: IS
4158: SELECT

Line 4155: cp_loc_id IN JAI_AR_TRXS.location_id%TYPE

4151: cp_source_trx_type IN jai_rgm_trx_records.source_trx_type%TYPE,
4152: cp_source_table_name IN jai_rgm_trx_records.source_table_name%TYPE,
4153: cp_customer_trx_line_id IN ra_customer_trx_lines.customer_trx_line_id%TYPE,
4154: cp_organization_id IN JAI_AR_TRXS.organization_id%TYPE,
4155: cp_loc_id IN JAI_AR_TRXS.location_id%TYPE
4156: )
4157: IS
4158: SELECT
4159: jctl.customer_trx_id ,

Line 4458: UPDATE JAI_AR_TRXS

4454: END LOOP;
4455:
4456: /* Commented by Allen Yang 10-Jun-2010 for bug 9793678
4457: IF lv_vat_invoice_no IS NOT NULL THEN
4458: UPDATE JAI_AR_TRXS
4459: SET vat_invoice_no = lv_vat_invoice_no ,
4460: vat_invoice_date = nvl(ld_gl_date,pr_new.trx_date)
4461: WHERE customer_trx_id = pr_new.customer_trx_id ;
4462: END IF;

Line 4493: Added legal_entity_id for table JAI_AR_TRXS in insert statement

4489: 2. 10-Jun-2005 File Version: 116.2
4490: Removal of SQL LITERALs is done
4491:
4492: 3. 10-Jun-2005 rallamse bug#4448789 116.3
4493: Added legal_entity_id for table JAI_AR_TRXS in insert statement
4494:
4495: 4. 26-07-2005 rallamse bug#4510143 120.2
4496: Modified legal_entity_id for table JAI_AR_TRXS to get from header_info_cur cursor
4497:

Line 4496: Modified legal_entity_id for table JAI_AR_TRXS to get from header_info_cur cursor

4492: 3. 10-Jun-2005 rallamse bug#4448789 116.3
4493: Added legal_entity_id for table JAI_AR_TRXS in insert statement
4494:
4495: 4. 26-07-2005 rallamse bug#4510143 120.2
4496: Modified legal_entity_id for table JAI_AR_TRXS to get from header_info_cur cursor
4497:
4498: 5. 10-Aug-2005 Aiyer bug 4545146 version 120.1
4499: Issue:-
4500: Deadlock on tables due to multiple triggers on the same table (in different sql files)

Line 4543: FROM JAI_AR_TRXS

4539: ORDER BY customer_trx_id;
4540:
4541: CURSOR ONCE_COMPLETE_FLAG_CUR(p_header_id IN NUMBER, p_batch_source_id IN Number) IS
4542: SELECT once_completed_flag, 1
4543: FROM JAI_AR_TRXS
4544: WHERE customer_trx_id = p_header_id
4545: AND NVL(batch_source_id,0) = p_batch_source_id;
4546:
4547: CURSOR parent_header_id(p_recurred_from_trx_number IN Varchar2, p_batch_source_id IN Number) IS

Line 4549: FROM JAI_AR_TRXS a

4545: AND NVL(batch_source_id,0) = p_batch_source_id;
4546:
4547: CURSOR parent_header_id(p_recurred_from_trx_number IN Varchar2, p_batch_source_id IN Number) IS
4548: SELECT a.customer_trx_id
4549: FROM JAI_AR_TRXS a
4550: WHERE a.trx_number = p_recurred_from_trx_number
4551: AND NVL(batch_source_id,0) = p_batch_source_id;
4552:
4553: CURSOR LINES_INFO_CUR(p_parent_header_id IN Number) IS

Line 4576: FROM JAI_AR_TRXS

4572:
4573: CURSOR HEADER_INFO_CUR(p_recurred_from_trx_number IN Varchar2, p_batch_source_id IN Number) IS
4574: SELECT CUSTOMER_TRX_ID, ORGANIZATION_ID, LOCATION_ID, UPDATE_RG_FLAG, UPDATE_RG23D_FLAG,
4575: TAX_AMOUNT, LINE_AMOUNT, TOTAL_AMOUNT, BATCH_SOURCE_ID,legal_entity_id /* added rallamse bug#4448789 */
4576: FROM JAI_AR_TRXS
4577: WHERE trx_number = p_recurred_from_trx_number
4578: AND NVL(batch_source_id,0) = p_batch_source_id;
4579:
4580: BEGIN

Line 4614: INSERT INTO JAI_AR_TRXS

4610: IF NVL(x,0) <> 1 THEN
4611:
4612: FOR hdr in HEADER_INFO_CUR(v_recurred_from_trx_number, v_batch_source_id)
4613: LOOP
4614: INSERT INTO JAI_AR_TRXS
4615: (customer_trx_id, organization_id, location_id, update_rg23d_flag,
4616: update_rg_flag, trx_number, once_completed_flag,
4617: line_amount, batch_source_id, created_from,
4618: creation_date, created_by,

Line 4700: UPDATE JAI_AR_TRXS

4696: WHERE customer_trx_line_id = v_customer_trx_line_id;
4697: v_line_tax_amount := 0;
4698: END LOOP;
4699:
4700: UPDATE JAI_AR_TRXS
4701: SET tax_amount = v_header_tax_amount,
4702: total_amount = nvl(line_amount,0) + v_header_tax_amount
4703: WHERE customer_trx_id = v_header_id;
4704: v_header_tax_amount := 0;

Line 4711: DELETE JAI_AR_TRXS

4707:
4708: --added this procedure for bug#7450481
4709: PROCEDURE ARD_T1 ( pr_old t_rec%type , pv_action varchar2 , pv_return_code out nocopy varchar2 , pv_return_message out nocopy varchar2 ) IS
4710: BEGIN
4711: DELETE JAI_AR_TRXS
4712: WHERE customer_trx_id = pr_old.customer_trx_id ;
4713:
4714: pv_return_message := '';
4715: pv_return_code := jai_constants.successful;