DBA Data[Home] [Help]

APPS.JAI_JRG_OTH_TRIGGER_PKG dependencies on JAI_CMN_RG_OTH_BALANCES

Line 16: lv_register_type JAI_CMN_RG_OTH_BALANCES.register_type%TYPE;

12: PROCEDURE BRI_T1 ( pr_old t_rec%type , pr_new in out t_rec%type , pv_action varchar2 , pv_return_code out nocopy varchar2 , pv_return_message out nocopy varchar2 ) IS
13: ln_balance number;
14: ln_balance_cnt number;
15: ln_org_unit_id JAI_CMN_INVENTORY_ORGS.org_unit_id%TYPE;
16: lv_register_type JAI_CMN_RG_OTH_BALANCES.register_type%TYPE;
17:
18: CURSOR cur_org_unit_id_pla IS
19: SELECT org_unit_id
20: FROM JAI_CMN_INVENTORY_ORGS

Line 39: FROM JAI_CMN_RG_OTH_BALANCES

35:
36: CURSOR cur_balance
37: IS
38: SELECT balance
39: FROM JAI_CMN_RG_OTH_BALANCES
40: WHERE org_unit_id = ln_org_unit_id
41: AND tax_type = pr_new.tax_type
42: AND register_type = lv_register_type;
43: /*Bug 5141459 start*/

Line 93: 1 4146822 4146708 New tables created(JAI_CMN_RG_OTHERS,JAI_CMN_RG_OTH_BALANCES)

89:
90: Sl No. Current Bug Dependent on
91: Bug/Patch set Details
92: -------------------------------------------------------------------------------------------------
93: 1 4146822 4146708 New tables created(JAI_CMN_RG_OTHERS,JAI_CMN_RG_OTH_BALANCES)
94: , columns added to tables
95: which are refered in this trigger
96:
97: --------------------------------------------------------------------------------------------------*/

Line 106: JAI_CMN_RG_OTH_BALANCES for the inserted tax type and register id. bug# 4146708 creates the objects

102: CREATED BY : rchandan
103: CREATED DATE : 28-JAN-2005
104: ENHANCEMENT BUG : 4146822
105: PURPOSE : To update opening balance and closing balance of JAI_CMN_RG_OTHERS and update the balance of
106: JAI_CMN_RG_OTH_BALANCES for the inserted tax type and register id. bug# 4146708 creates the objects
107:
108: **********************************************************************/
109: ln_balance := 0 ;
110: /*Bug 5141459 Start*/

Line 141: -- Retrieve the balance from JAI_CMN_RG_OTH_BALANCES

137: CLOSE cur_org_unit_id_pla;
138:
139: END IF;
140:
141: -- Retrieve the balance from JAI_CMN_RG_OTH_BALANCES
142:
143: SELECT count(1)
144: INTO ln_balance_cnt
145: FROM JAI_CMN_RG_OTH_BALANCES

Line 145: FROM JAI_CMN_RG_OTH_BALANCES

141: -- Retrieve the balance from JAI_CMN_RG_OTH_BALANCES
142:
143: SELECT count(1)
144: INTO ln_balance_cnt
145: FROM JAI_CMN_RG_OTH_BALANCES
146: WHERE org_unit_id = ln_org_unit_id
147: AND tax_type = pr_new.tax_type
148: AND register_type = lv_register_type;
149:

Line 150: IF ln_balance_cnt <> 0 THEN /* If there are no records in JAI_CMN_RG_OTH_BALANCES

146: WHERE org_unit_id = ln_org_unit_id
147: AND tax_type = pr_new.tax_type
148: AND register_type = lv_register_type;
149:
150: IF ln_balance_cnt <> 0 THEN /* If there are no records in JAI_CMN_RG_OTH_BALANCES
151: for that org_unit_id,tax_type,lv_register_type*/
152:
153: --Lock the table ja_in_oth_balances with a dummy update.
154:

Line 155: UPDATE JAI_CMN_RG_OTH_BALANCES

151: for that org_unit_id,tax_type,lv_register_type*/
152:
153: --Lock the table ja_in_oth_balances with a dummy update.
154:
155: UPDATE JAI_CMN_RG_OTH_BALANCES
156: SET tax_type = tax_type
157: WHERE org_unit_id = ln_org_unit_id
158: AND tax_type = pr_new.tax_type
159: AND register_type = lv_register_type;

Line 174: INSERT INTO JAI_CMN_RG_OTH_BALANCES( org_unit_id ,

170: ELSE
171:
172: ln_balance := 0;
173:
174: INSERT INTO JAI_CMN_RG_OTH_BALANCES( org_unit_id ,
175: tax_type ,
176: balance ,
177: register_type ,
178: created_by ,

Line 210: UPDATE JAI_CMN_RG_OTH_BALANCES

206: pr_new.closing_balance := ln_balance + pr_new.credit;
207:
208: END IF ;
209:
210: UPDATE JAI_CMN_RG_OTH_BALANCES
211: SET balance = pr_new.closing_balance,
212: last_updated_by = fnd_global.user_id,
213: last_update_date = sysdate,
214: last_update_login = fnd_global.login_id