DBA Data[Home] [Help]

APPS.OKL_AMORT_SCHED_PROCESS_PVT dependencies on OKL_AMORT_SCHED_LINES

Line 122: -- into the OKL_AMORT_SCHED_LINES

118: --
119: -- API name : insert_lines
120: -- Pre-reqs : None
121: -- Function : This procedure inserts the Amortization Schedule generated
122: -- into the OKL_AMORT_SCHED_LINES
123: -- Parameters :
124: -- IN : p_api_version - Standard input parameter
125: -- p_init_msg_list - Standard input parameter
126: -- p_amort_sched_tbl - PL/SQL table for amor schedule

Line 163: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date)

159: --Following Code is performance oriented but commented since it is not supported in version prior to 11g.
160: /*
161: --Insert for Principal
162: forall ins_count in p_amort_sched_tbl.first .. p_amort_sched_tbl.last
163: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date)
164: values (p_pri_id,p_amor_line_id(ins_count),p_amort_sched_tbl(ins_count).principal,g_user_id,sysdate);
165: --Insert for Interest
166: forall ins_count in p_amort_sched_tbl.first .. p_amort_sched_tbl.last
167: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date)

Line 167: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date)

163: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date)
164: values (p_pri_id,p_amor_line_id(ins_count),p_amort_sched_tbl(ins_count).principal,g_user_id,sysdate);
165: --Insert for Interest
166: forall ins_count in p_amort_sched_tbl.first .. p_amort_sched_tbl.last
167: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date)
168: values (p_int_id,p_amor_line_id(ins_count),p_amort_sched_tbl(ins_count).interest,g_user_id,sysdate);
169: --Insert for Principal Balance
170: forall ins_count in p_amort_sched_tbl.first .. p_amort_sched_tbl.last
171: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date)

Line 171: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date)

167: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date)
168: values (p_int_id,p_amor_line_id(ins_count),p_amort_sched_tbl(ins_count).interest,g_user_id,sysdate);
169: --Insert for Principal Balance
170: forall ins_count in p_amort_sched_tbl.first .. p_amort_sched_tbl.last
171: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date)
172: values (p_pri_bal_id,p_amor_line_id(ins_count),p_amort_sched_tbl(ins_count).principal_balance,g_user_id,sysdate);
173: --Insert for Period
174: forall ins_count in p_amort_sched_tbl.first .. p_amort_sched_tbl.last
175: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date)

Line 175: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date)

171: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date)
172: values (p_pri_bal_id,p_amor_line_id(ins_count),p_amort_sched_tbl(ins_count).principal_balance,g_user_id,sysdate);
173: --Insert for Period
174: forall ins_count in p_amort_sched_tbl.first .. p_amort_sched_tbl.last
175: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date)
176: values (p_date_from_id,p_amor_line_id(ins_count),p_amort_sched_tbl(ins_count).start_date,g_user_id,sysdate);
177: --Insert for Past
178: forall ins_count in p_amort_sched_tbl.first .. p_amort_sched_tbl.last
179: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date)

Line 179: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date)

175: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date)
176: values (p_date_from_id,p_amor_line_id(ins_count),p_amort_sched_tbl(ins_count).start_date,g_user_id,sysdate);
177: --Insert for Past
178: forall ins_count in p_amort_sched_tbl.first .. p_amort_sched_tbl.last
179: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date)
180: values (p_pastproj_id,p_amor_line_id(ins_count),p_past_proj,g_user_id,sysdate);
181:
182: --Insert for Date To for Summary
183: if p_summ_flag then

Line 185: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date)

181:
182: --Insert for Date To for Summary
183: if p_summ_flag then
184: forall ins_count in p_amort_sched_tbl.first .. p_amort_sched_tbl.last
185: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date)
186: values (p_date_to_id,p_amor_line_id(ins_count),p_amort_sched_tbl(ins_count).end_date,g_user_id,sysdate);
187: end if;
188: */
189: for ins_count in p_amort_sched_tbl.first .. p_amort_sched_tbl.last

Line 192: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,

188: */
189: for ins_count in p_amort_sched_tbl.first .. p_amort_sched_tbl.last
190: loop
191: --Insert for Principal
192: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,
193: LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
194: values (p_pri_id,p_amor_line_id(ins_count),p_amort_sched_tbl(ins_count).principal,g_user_id,sysdate,g_user_id,sysdate,g_user_id);
195: --Insert for Interest
196: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,

Line 196: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,

192: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,
193: LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
194: values (p_pri_id,p_amor_line_id(ins_count),p_amort_sched_tbl(ins_count).principal,g_user_id,sysdate,g_user_id,sysdate,g_user_id);
195: --Insert for Interest
196: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,
197: LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
198: values (p_int_id,p_amor_line_id(ins_count),p_amort_sched_tbl(ins_count).interest,g_user_id,sysdate,g_user_id,sysdate,g_user_id);
199: --Insert for Principal Balance
200: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,

Line 200: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,

196: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,
197: LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
198: values (p_int_id,p_amor_line_id(ins_count),p_amort_sched_tbl(ins_count).interest,g_user_id,sysdate,g_user_id,sysdate,g_user_id);
199: --Insert for Principal Balance
200: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,
201: LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
202: values (p_pri_bal_id,p_amor_line_id(ins_count),p_amort_sched_tbl(ins_count).principal_balance,g_user_id,sysdate,g_user_id,sysdate,g_user_id);
203: --Insert for Loan Payment
204: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,

Line 204: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,

200: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,
201: LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
202: values (p_pri_bal_id,p_amor_line_id(ins_count),p_amort_sched_tbl(ins_count).principal_balance,g_user_id,sysdate,g_user_id,sysdate,g_user_id);
203: --Insert for Loan Payment
204: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,
205: LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
206: values (p_loan_pymnt_id,p_amor_line_id(ins_count),p_amort_sched_tbl(ins_count).loan_payment,g_user_id,sysdate,g_user_id,sysdate,g_user_id);
207: --Insert for Period
208: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,

Line 208: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,

204: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,
205: LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
206: values (p_loan_pymnt_id,p_amor_line_id(ins_count),p_amort_sched_tbl(ins_count).loan_payment,g_user_id,sysdate,g_user_id,sysdate,g_user_id);
207: --Insert for Period
208: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,
209: LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
210: values (p_date_from_id,p_amor_line_id(ins_count),to_char(p_amort_sched_tbl(ins_count).start_date,'dd-mon-yyyy'),g_user_id,sysdate,g_user_id,sysdate,g_user_id);
211: --Insert for Order BY
212: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,

Line 212: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,

208: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,
209: LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
210: values (p_date_from_id,p_amor_line_id(ins_count),to_char(p_amort_sched_tbl(ins_count).start_date,'dd-mon-yyyy'),g_user_id,sysdate,g_user_id,sysdate,g_user_id);
211: --Insert for Order BY
212: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,
213: LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
214: values (p_order_by_id,p_amor_line_id(ins_count),ins_count,g_user_id,sysdate,g_user_id,sysdate,g_user_id);
215:
216: --Insert for Date To for Summary

Line 218: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)

214: values (p_order_by_id,p_amor_line_id(ins_count),ins_count,g_user_id,sysdate,g_user_id,sysdate,g_user_id);
215:
216: --Insert for Date To for Summary
217: if p_summ_flag then
218: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
219: values (p_date_to_id,p_amor_line_id(ins_count),to_char(p_amort_sched_tbl(ins_count).end_date,'dd-mon-yyyy'),g_user_id,sysdate,g_user_id,sysdate,g_user_id);
220: else
221: --Insert into Payment type only for detail
222: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)

Line 222: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)

218: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
219: values (p_date_to_id,p_amor_line_id(ins_count),to_char(p_amort_sched_tbl(ins_count).end_date,'dd-mon-yyyy'),g_user_id,sysdate,g_user_id,sysdate,g_user_id);
220: else
221: --Insert into Payment type only for detail
222: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
223: values (p_pastproj_id,p_amor_line_id(ins_count),p_amort_sched_tbl(ins_count).payment_type,g_user_id,sysdate,g_user_id,sysdate,g_user_id);
224: --Insert for Projected Interest rate only for detail and for the first record
225: if ins_count = 1 then
226: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)

Line 226: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)

222: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
223: values (p_pastproj_id,p_amor_line_id(ins_count),p_amort_sched_tbl(ins_count).payment_type,g_user_id,sysdate,g_user_id,sysdate,g_user_id);
224: --Insert for Projected Interest rate only for detail and for the first record
225: if ins_count = 1 then
226: insert into OKL_AMORT_SCHED_LINES(AMORT_HDR_ID,AMORT_LINE_ID,AMORT_VALUE,created_by,creation_date,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
227: values (p_proj_interest_rate_id,p_amor_line_id(ins_count),p_proj_interest_rate,g_user_id,sysdate,g_user_id,sysdate,g_user_id);
228: end if;
229: end if;
230: end loop;

Line 261: -- into the OKL_AMORT_SCHED_LINES

257: --
258: -- API name : prepare_insert_lines
259: -- Pre-reqs : None
260: -- Function : This procedure prepares for inserting the Amortization Schedule generated
261: -- into the OKL_AMORT_SCHED_LINES
262: -- Parameters :
263: -- IN : p_api_version - Standard input parameter
264: -- p_init_msg_list - Standard input parameter
265: -- p_det_amort_sched_tbl - PL/SQL table for Detail amor schedule

Line 297: select okl_amort_sched_lines_s.nextval into l_det_amor_line_id(i) from dual;

293: l_rec_count := l_rec_count - 1;
294: l_det_amor_line_id.extend(l_rec_count,1);
295: for i in 1 .. l_det_amor_line_id.count
296: loop
297: select okl_amort_sched_lines_s.nextval into l_det_amor_line_id(i) from dual;
298: end loop;
299: end if;
300: -- dbms_output.put_line('l_det_amor_line_id : ' || l_det_amor_line_id.count || ',p_det_amort_sched_tbl.count: ' || p_det_amort_sched_tbl.count);
301: l_rec_count := 0;

Line 325: select okl_amort_sched_lines_s.nextval into l_summ_amor_line_id(i) from dual;

321: if l_summ_amor_line_id.count > l_det_amor_line_id.count then
322: l_summ_det_cnt := l_summ_det_cnt + 1;
323: for i in l_summ_det_cnt .. l_summ_amor_line_id.count
324: loop
325: select okl_amort_sched_lines_s.nextval into l_summ_amor_line_id(i) from dual;
326: end loop;
327: end if;
328: end if;
329:

Line 429: delete from OKL_AMORT_SCHED_LINES where AMORT_HDR_ID in(select AMORT_HDR_ID from OKL_AMORT_SCHED_HDRS

425: --If value returned from query is -1, then there is no report history for the contract
426: --Else there is a record, deletion need to be performed to maintain one copy each of Summary/Detail
427: --of the report for the contract
428: if l_old_trx_req_id is not null and l_old_trx_req_id <> -1 then
429: delete from OKL_AMORT_SCHED_LINES where AMORT_HDR_ID in(select AMORT_HDR_ID from OKL_AMORT_SCHED_HDRS
430: where trx_req_id=l_old_trx_req_id);
431: delete from OKL_AMORT_SCHED_HDRS where trx_req_id=l_old_trx_req_id;
432: end if;
433: --commit;