17:
18:
19: BEGIN
20: IF PG_DEBUG in ('Y', 'C') THEN
21: arp_standard.debug( 'arp_misc_cash_dist_pkg.insert_p()+' );
22: END IF;
23:
24: SELECT ar_misc_cash_distributions_s.nextval
25: INTO l_mcd_id
108: p_mcd_rec.attribute12,
109: p_mcd_rec.attribute13,
110: p_mcd_rec.attribute14,
111: p_mcd_rec.attribute15,
112: NVL( arp_standard.profile.request_id, p_mcd_rec.request_id ),
113: NVL( arp_standard.profile.program_application_id,
114: p_mcd_rec.program_application_id ),
115: NVL( arp_standard.profile.program_id, p_mcd_rec.program_id ),
116: DECODE( arp_standard.profile.program_id,
109: p_mcd_rec.attribute13,
110: p_mcd_rec.attribute14,
111: p_mcd_rec.attribute15,
112: NVL( arp_standard.profile.request_id, p_mcd_rec.request_id ),
113: NVL( arp_standard.profile.program_application_id,
114: p_mcd_rec.program_application_id ),
115: NVL( arp_standard.profile.program_id, p_mcd_rec.program_id ),
116: DECODE( arp_standard.profile.program_id,
117: NULL, NULL, SYSDATE ),
111: p_mcd_rec.attribute15,
112: NVL( arp_standard.profile.request_id, p_mcd_rec.request_id ),
113: NVL( arp_standard.profile.program_application_id,
114: p_mcd_rec.program_application_id ),
115: NVL( arp_standard.profile.program_id, p_mcd_rec.program_id ),
116: DECODE( arp_standard.profile.program_id,
117: NULL, NULL, SYSDATE ),
118: arp_standard.profile.user_id,
119: SYSDATE,
112: NVL( arp_standard.profile.request_id, p_mcd_rec.request_id ),
113: NVL( arp_standard.profile.program_application_id,
114: p_mcd_rec.program_application_id ),
115: NVL( arp_standard.profile.program_id, p_mcd_rec.program_id ),
116: DECODE( arp_standard.profile.program_id,
117: NULL, NULL, SYSDATE ),
118: arp_standard.profile.user_id,
119: SYSDATE,
120: arp_standard.profile.user_id,
114: p_mcd_rec.program_application_id ),
115: NVL( arp_standard.profile.program_id, p_mcd_rec.program_id ),
116: DECODE( arp_standard.profile.program_id,
117: NULL, NULL, SYSDATE ),
118: arp_standard.profile.user_id,
119: SYSDATE,
120: arp_standard.profile.user_id,
121: SYSDATE,
122: NVL( arp_standard.profile.last_update_login,
116: DECODE( arp_standard.profile.program_id,
117: NULL, NULL, SYSDATE ),
118: arp_standard.profile.user_id,
119: SYSDATE,
120: arp_standard.profile.user_id,
121: SYSDATE,
122: NVL( arp_standard.profile.last_update_login,
123: p_mcd_rec.last_update_login ),
124: p_mcd_rec.posting_control_id,
118: arp_standard.profile.user_id,
119: SYSDATE,
120: arp_standard.profile.user_id,
121: SYSDATE,
122: NVL( arp_standard.profile.last_update_login,
123: p_mcd_rec.last_update_login ),
124: p_mcd_rec.posting_control_id,
125: p_mcd_rec.acctd_amount,
126: p_mcd_rec.ussgl_transaction_code,
126: p_mcd_rec.ussgl_transaction_code,
127: p_mcd_rec.ussgl_transaction_code_context,
128: p_mcd_rec.created_from,
129: p_mcd_rec.reversal_gl_date
130: ,arp_standard.sysparm.org_id /* SSA changes anuj */
131: --5201086
132: ,l_crh_id
133: );
134:
133: );
134:
135: p_mcd_id := l_mcd_id;
136: IF PG_DEBUG in ('Y', 'C') THEN
137: arp_standard.debug( 'insert parameters.......');
138: arp_standard.debug( 'misc cash dist id = ' || to_char(l_mcd_id));
139: arp_standard.debug( 'cash_Receipt id = '|| to_char(p_mcd_rec.cash_receipt_id));
140: arp_standard.debug( 'percent= ' || to_char(p_mcd_rec.percent));
141: arp_standard.debug( 'amount= ' || to_char(p_mcd_rec.amount));
134:
135: p_mcd_id := l_mcd_id;
136: IF PG_DEBUG in ('Y', 'C') THEN
137: arp_standard.debug( 'insert parameters.......');
138: arp_standard.debug( 'misc cash dist id = ' || to_char(l_mcd_id));
139: arp_standard.debug( 'cash_Receipt id = '|| to_char(p_mcd_rec.cash_receipt_id));
140: arp_standard.debug( 'percent= ' || to_char(p_mcd_rec.percent));
141: arp_standard.debug( 'amount= ' || to_char(p_mcd_rec.amount));
142: arp_standard.debug( 'set_of_books id= ' || to_char(p_mcd_rec.set_of_books_id));
135: p_mcd_id := l_mcd_id;
136: IF PG_DEBUG in ('Y', 'C') THEN
137: arp_standard.debug( 'insert parameters.......');
138: arp_standard.debug( 'misc cash dist id = ' || to_char(l_mcd_id));
139: arp_standard.debug( 'cash_Receipt id = '|| to_char(p_mcd_rec.cash_receipt_id));
140: arp_standard.debug( 'percent= ' || to_char(p_mcd_rec.percent));
141: arp_standard.debug( 'amount= ' || to_char(p_mcd_rec.amount));
142: arp_standard.debug( 'set_of_books id= ' || to_char(p_mcd_rec.set_of_books_id));
143: arp_standard.debug( 'created_from' || p_mcd_rec.created_from);
136: IF PG_DEBUG in ('Y', 'C') THEN
137: arp_standard.debug( 'insert parameters.......');
138: arp_standard.debug( 'misc cash dist id = ' || to_char(l_mcd_id));
139: arp_standard.debug( 'cash_Receipt id = '|| to_char(p_mcd_rec.cash_receipt_id));
140: arp_standard.debug( 'percent= ' || to_char(p_mcd_rec.percent));
141: arp_standard.debug( 'amount= ' || to_char(p_mcd_rec.amount));
142: arp_standard.debug( 'set_of_books id= ' || to_char(p_mcd_rec.set_of_books_id));
143: arp_standard.debug( 'created_from' || p_mcd_rec.created_from);
144: arp_standard.debug( '');
137: arp_standard.debug( 'insert parameters.......');
138: arp_standard.debug( 'misc cash dist id = ' || to_char(l_mcd_id));
139: arp_standard.debug( 'cash_Receipt id = '|| to_char(p_mcd_rec.cash_receipt_id));
140: arp_standard.debug( 'percent= ' || to_char(p_mcd_rec.percent));
141: arp_standard.debug( 'amount= ' || to_char(p_mcd_rec.amount));
142: arp_standard.debug( 'set_of_books id= ' || to_char(p_mcd_rec.set_of_books_id));
143: arp_standard.debug( 'created_from' || p_mcd_rec.created_from);
144: arp_standard.debug( '');
145: arp_standard.debug( 'after insert into ar_misc_cash_distributions');
138: arp_standard.debug( 'misc cash dist id = ' || to_char(l_mcd_id));
139: arp_standard.debug( 'cash_Receipt id = '|| to_char(p_mcd_rec.cash_receipt_id));
140: arp_standard.debug( 'percent= ' || to_char(p_mcd_rec.percent));
141: arp_standard.debug( 'amount= ' || to_char(p_mcd_rec.amount));
142: arp_standard.debug( 'set_of_books id= ' || to_char(p_mcd_rec.set_of_books_id));
143: arp_standard.debug( 'created_from' || p_mcd_rec.created_from);
144: arp_standard.debug( '');
145: arp_standard.debug( 'after insert into ar_misc_cash_distributions');
146: END IF;
139: arp_standard.debug( 'cash_Receipt id = '|| to_char(p_mcd_rec.cash_receipt_id));
140: arp_standard.debug( 'percent= ' || to_char(p_mcd_rec.percent));
141: arp_standard.debug( 'amount= ' || to_char(p_mcd_rec.amount));
142: arp_standard.debug( 'set_of_books id= ' || to_char(p_mcd_rec.set_of_books_id));
143: arp_standard.debug( 'created_from' || p_mcd_rec.created_from);
144: arp_standard.debug( '');
145: arp_standard.debug( 'after insert into ar_misc_cash_distributions');
146: END IF;
147:
140: arp_standard.debug( 'percent= ' || to_char(p_mcd_rec.percent));
141: arp_standard.debug( 'amount= ' || to_char(p_mcd_rec.amount));
142: arp_standard.debug( 'set_of_books id= ' || to_char(p_mcd_rec.set_of_books_id));
143: arp_standard.debug( 'created_from' || p_mcd_rec.created_from);
144: arp_standard.debug( '');
145: arp_standard.debug( 'after insert into ar_misc_cash_distributions');
146: END IF;
147:
148:
141: arp_standard.debug( 'amount= ' || to_char(p_mcd_rec.amount));
142: arp_standard.debug( 'set_of_books id= ' || to_char(p_mcd_rec.set_of_books_id));
143: arp_standard.debug( 'created_from' || p_mcd_rec.created_from);
144: arp_standard.debug( '');
145: arp_standard.debug( 'after insert into ar_misc_cash_distributions');
146: END IF;
147:
148:
149: IF PG_DEBUG in ('Y', 'C') THEN
146: END IF;
147:
148:
149: IF PG_DEBUG in ('Y', 'C') THEN
150: arp_standard.debug( 'arp_misc_cash_dist_pkg.insert_p()-' );
151: END IF;
152: EXCEPTION
153: WHEN OTHERS THEN
154: IF PG_DEBUG in ('Y', 'C') THEN
151: END IF;
152: EXCEPTION
153: WHEN OTHERS THEN
154: IF PG_DEBUG in ('Y', 'C') THEN
155: arp_standard.debug( 'EXCEPTION: arp_misc_cash_dist_pkg.insert_p' );
156: END IF;
157: RAISE;
158: END insert_p;
159: --
166: AND current_record_flag = 'Y';
167: l_crh_id NUMBER;
168: BEGIN
169: IF PG_DEBUG in ('Y', 'C') THEN
170: arp_standard.debug( 'arp_misc_cash_dist_pkg.update_p()+' );
171: END IF;
172:
173: --5201086
174: IF p_mcd_rec.cash_receipt_history_id IS NULL AND
205: attribute12 = p_mcd_rec.attribute12,
206: attribute13 = p_mcd_rec.attribute13,
207: attribute14 = p_mcd_rec.attribute14,
208: attribute15 = p_mcd_rec.attribute15,
209: request_id = NVL( arp_standard.profile.request_id,
210: p_mcd_rec.request_id ),
211: program_application_id =
212: NVL( arp_standard.profile.program_application_id,
213: p_mcd_rec.program_application_id ),
208: attribute15 = p_mcd_rec.attribute15,
209: request_id = NVL( arp_standard.profile.request_id,
210: p_mcd_rec.request_id ),
211: program_application_id =
212: NVL( arp_standard.profile.program_application_id,
213: p_mcd_rec.program_application_id ),
214: program_id = NVL( arp_standard.profile.program_id,
215: p_mcd_rec.program_id ),
216: program_update_date =
210: p_mcd_rec.request_id ),
211: program_application_id =
212: NVL( arp_standard.profile.program_application_id,
213: p_mcd_rec.program_application_id ),
214: program_id = NVL( arp_standard.profile.program_id,
215: p_mcd_rec.program_id ),
216: program_update_date =
217: DECODE( arp_standard.profile.program_id,
218: NULL, NULL,
213: p_mcd_rec.program_application_id ),
214: program_id = NVL( arp_standard.profile.program_id,
215: p_mcd_rec.program_id ),
216: program_update_date =
217: DECODE( arp_standard.profile.program_id,
218: NULL, NULL,
219: SYSDATE
220: ),
221: last_updated_by = arp_standard.profile.user_id,
217: DECODE( arp_standard.profile.program_id,
218: NULL, NULL,
219: SYSDATE
220: ),
221: last_updated_by = arp_standard.profile.user_id,
222: last_update_date = SYSDATE,
223: last_update_login =
224: NVL( arp_standard.profile.last_update_login,
225: p_mcd_rec.last_update_login ),
220: ),
221: last_updated_by = arp_standard.profile.user_id,
222: last_update_date = SYSDATE,
223: last_update_login =
224: NVL( arp_standard.profile.last_update_login,
225: p_mcd_rec.last_update_login ),
226: posting_control_id = p_mcd_rec.posting_control_id,
227: acctd_amount = p_mcd_rec.acctd_amount,
228: ussgl_transaction_code = p_mcd_rec.ussgl_transaction_code,
234: ,cash_receipt_history_id = l_crh_id
235: WHERE misc_cash_distribution_id = p_mcd_rec.misc_cash_distribution_id;
236:
237: IF PG_DEBUG in ('Y', 'C') THEN
238: arp_standard.debug( 'arp_misc_cash_dist_pkg.update_p()-' );
239: END IF;
240: EXCEPTION
241: WHEN OTHERS THEN
242: IF PG_DEBUG in ('Y', 'C') THEN
239: END IF;
240: EXCEPTION
241: WHEN OTHERS THEN
242: IF PG_DEBUG in ('Y', 'C') THEN
243: arp_standard.debug( 'EXCEPTION: arp_misc_cash_dist_pkg.update_p' );
244: END IF;
245: RAISE;
246: END update_p;
247: --
248: PROCEDURE delete_p(
249: p_mcd_id IN ar_misc_cash_distributions.misc_cash_distribution_id%TYPE ) IS
250: BEGIN
251: IF PG_DEBUG in ('Y', 'C') THEN
252: arp_standard.debug( 'arp_misc_cash_dist_pkg.delete_p()+' );
253: END IF;
254: --
255: DELETE FROM ar_misc_cash_distributions
256: WHERE misc_cash_distribution_id = p_mcd_id;
255: DELETE FROM ar_misc_cash_distributions
256: WHERE misc_cash_distribution_id = p_mcd_id;
257:
258: IF PG_DEBUG in ('Y', 'C') THEN
259: arp_standard.debug( 'arp_misc_cash_dist_pkg.delete_p()-' );
260: END IF;
261: EXCEPTION
262: WHEN OTHERS THEN
263: IF PG_DEBUG in ('Y', 'C') THEN
260: END IF;
261: EXCEPTION
262: WHEN OTHERS THEN
263: IF PG_DEBUG in ('Y', 'C') THEN
264: arp_standard.debug( 'EXCEPTION: arp_misc_cash_dist_pkg.delete_p' );
265: END IF;
266: RAISE;
267: END delete_p;
268:
270: p_mcd_id IN ar_misc_cash_distributions.misc_cash_distribution_id%TYPE ) IS
271: l_mcd_id ar_misc_cash_distributions.misc_cash_distribution_id%TYPE;
272: BEGIN
273: IF PG_DEBUG in ('Y', 'C') THEN
274: arp_standard.debug( 'arp_misc_cash_dist_pkg.lock_p()+' );
275: END IF;
276: --
277: SELECT misc_cash_distribution_id
278: INTO l_mcd_id
280: WHERE misc_cash_distribution_id = p_mcd_id
281: FOR UPDATE OF amount NOWAIT ;
282: --
283: IF PG_DEBUG in ('Y', 'C') THEN
284: arp_standard.debug( 'arp_misc_cash_dist_pkg.lock_p()-' );
285: END IF;
286: EXCEPTION
287: WHEN OTHERS THEN
288: IF PG_DEBUG in ('Y', 'C') THEN
285: END IF;
286: EXCEPTION
287: WHEN OTHERS THEN
288: IF PG_DEBUG in ('Y', 'C') THEN
289: arp_standard.debug( 'EXCEPTION: arp_misc_cash_dist_pkg.lock_p' );
290: END IF;
291: RAISE;
292: END lock_p;
293:
295: p_mcd_id IN ar_misc_cash_distributions.misc_cash_distribution_id%TYPE,
296: p_mcd_rec OUT NOCOPY ar_misc_cash_distributions%ROWTYPE ) IS
297: BEGIN
298: IF PG_DEBUG in ('Y', 'C') THEN
299: arp_standard.debug( 'arp_misc_cash_dist_pkg.fetch_p()+' );
300: END IF;
301: --
302: SELECT *
303: INTO p_mcd_rec
304: FROM ar_misc_cash_distributions
305: WHERE misc_cash_distribution_id = p_mcd_id;
306: --
307: IF PG_DEBUG in ('Y', 'C') THEN
308: arp_standard.debug( 'arp_misc_cash_dist_pkg.fetch_p()-' );
309: END IF;
310: EXCEPTION
311: --
312: WHEN OTHERS THEN
310: EXCEPTION
311: --
312: WHEN OTHERS THEN
313: IF PG_DEBUG in ('Y', 'C') THEN
314: arp_standard.debug( 'EXCEPTION: arp_misc_cash_dist_pkg.fetch_p' );
315: END IF;
316: RAISE;
317: END fetch_p;
318:
320: p_mcd_id IN ar_misc_cash_distributions.misc_cash_distribution_id%TYPE,
321: p_mcd_rec OUT NOCOPY ar_misc_cash_distributions%ROWTYPE ) IS
322: BEGIN
323: IF PG_DEBUG in ('Y', 'C') THEN
324: arp_standard.debug( 'arp_misc_cash_dist_pkg.nowaitlock_fetch_p()+' );
325: END IF;
326: --
327: SELECT *
328: INTO p_mcd_rec
330: WHERE misc_cash_distribution_id = p_mcd_id
331: FOR UPDATE OF amount NOWAIT;
332: --
333: IF PG_DEBUG in ('Y', 'C') THEN
334: arp_standard.debug( 'arp_misc_cash_dist_pkg.nowaitlock_fetch_p()-' );
335: END IF;
336: EXCEPTION
337: --
338: WHEN OTHERS THEN
336: EXCEPTION
337: --
338: WHEN OTHERS THEN
339: IF PG_DEBUG in ('Y', 'C') THEN
340: arp_standard.debug( 'EXCEPTION: arp_misc_cash_dist_pkg.nowaitlock_fetch_p' );
341: END IF;
342: RAISE;
343: END nowaitlock_fetch_p;
344: --