[Home] [Help]
PACKAGE BODY: APPS.ARP_PROCESS_BR_LINE
Source
1 PACKAGE BODY ARP_PROCESS_BR_LINE AS
2 /* $Header: ARTEBRLB.pls 120.9 2005/08/10 23:15:35 hyu ship $ */
3
4 /*===========================================================================+
5 | PROCEDURE |
6 | insert_line |
7 | |
8 | DESCRIPTION |
9 | Inserts a record into ra_customer_trx_lines for bills receivable |
10 | transaction. |
11 | |
12 | SCOPE - PUBLIC |
13 | |
14 | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED |
15 | arp_util.debug |
16 | |
17 | ARGUMENTS : IN: p_line_rec |
18 | OUT: p_customer_trx_line_id |
19 | IN/ OUT: |
20 | |
21 | RETURNS : NONE |
22 | |
23 | MODIFICATION HISTORY |
24 | 28-MAR-2000 Jani Rautiainen Created |
25 | |
26 +===========================================================================*/
27
28
29 PG_DEBUG varchar2(1) := NVL(FND_PROFILE.value('AFLOG_ENABLED'), 'N');
30
31 PROCEDURE insert_line(p_line_rec IN OUT NOCOPY ra_customer_trx_lines%rowtype,
32 p_customer_trx_line_id OUT NOCOPY ra_customer_trx_lines.customer_trx_line_id%type) IS
33
34 BEGIN
35
36 IF PG_DEBUG in ('Y', 'C') THEN
37 arp_util.debug('arp_process_br_line.insert_line()+');
38 END IF;
39
40 /*------------------------------------------------+
41 | All the validation and defaulting is done in |
42 | the BR API, so none is done in the entity |
43 | handler. |
44 +------------------------------------------------*/
45
46 /*----------------------------------------------------------------+
47 | Lock rows in other tables that reference this customer_trx_id |
48 +----------------------------------------------------------------*/
49 arp_process_br_header.lock_transaction(p_line_rec.customer_trx_id);
50
51 /*----------------------------------------------+
52 | Call the table handler to insert the line |
53 +----------------------------------------------*/
54
55 arp_ctl_pkg.insert_p( p_line_rec,
56 p_customer_trx_line_id);
57
58 /*----------------------------------------+
59 | BR has no Sales Credit, terms or tax |
60 +----------------------------------------*/
61
62 /*------------------------------------------+
63 | Call MRC logic to create MRC rows |
64 +------------------------------------------*/
65 -- No longer required as arp_ctl_pkg.insert_p does insert the mrc customer_trx_lines
66 -- ARP_PROCESS_BR_LINE.insert_mrc_transaction_line(p_line_rec,
67 -- p_customer_trx_line_id);
68
69 /*---------------------------------------------------------------------------+
70 | All accounting is done in the accounting engine called by transaction |
71 | history entity handler |
72 +---------------------------------------------------------------------------*/
73
74 IF PG_DEBUG in ('Y', 'C') THEN
75 arp_util.debug('arp_process_br_line.insert_line()-');
76 END IF;
77
78 EXCEPTION
79 WHEN OTHERS THEN
80 IF PG_DEBUG in ('Y', 'C') THEN
81 arp_util.debug('EXCEPTION: arp_process_br_line.insert_line()');
82 END IF;
83 arp_ctl_pkg.display_line_rec(p_line_rec);
84 RAISE;
85
86 END insert_line;
87
88
89 /*===========================================================================+
90 | PROCEDURE |
91 | update_line |
92 | |
93 | DESCRIPTION |
94 | Updates a ra_customer_trx_lines record for Bills Receivable |
95 | transaction lines. |
96 | |
97 | SCOPE - PUBLIC |
98 | |
99 | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED |
100 | arp_util.debug |
101 | |
102 | ARGUMENTS : IN: p_customer_trx_line_id |
103 | p_line_rec |
104 | OUT: |
105 | IN OUT: |
106 | |
107 | RETURNS : NONE |
108 | |
109 | MODIFICATION HISTORY |
110 | 28-MAR-2000 Jani Rautiainen Created |
111 | |
112 +===========================================================================*/
113
114
115 PROCEDURE update_line(p_customer_trx_line_id IN ra_customer_trx_lines.customer_trx_line_id%type,
116 p_line_rec IN OUT NOCOPY ra_customer_trx_lines%rowtype) IS
117
118
119 BEGIN
120
121 IF PG_DEBUG in ('Y', 'C') THEN
122 arp_util.debug('arp_process_br_line.update_line()+');
123 END IF;
124
125 /*------------------------------------------------+
126 | All the validation and defaulting is done in |
127 | the BR API, so none is done in the entity |
128 | handler. |
129 +------------------------------------------------*/
130
131 /*----------------------------------------------------------------+
132 | Lock rows in other tables that reference this customer_trx_id |
133 +----------------------------------------------------------------*/
134
135 arp_process_br_header.lock_transaction(p_line_rec.customer_trx_id);
136
137 /*---------------------------------------------+
138 | Call the table handler to update the line |
139 +---------------------------------------------*/
140
141 arp_ctl_pkg.update_p( p_line_rec,
142 p_customer_trx_line_id,
143 NULL);
144
145 /*----------------------------------------+
146 | BR has no Sales Credit, terms or tax |
147 +----------------------------------------*/
148
149 /*------------------------------------------+
150 | Call MRC logic to create MRC rows |
151 +------------------------------------------*/
152 -- No longer required as the procedure arp_ctl_pkg.update_p does the updation of mrc trx lines
153
154 -- ARP_PROCESS_BR_LINE.update_mrc_transaction_line(p_line_rec,
155 -- p_customer_trx_line_id);
156
157 /*---------------------------------------------------------------------------+
158 | All accounting is done in the accounting engine called by transaction |
159 | history entity handler |
160 +---------------------------------------------------------------------------*/
161
162 IF PG_DEBUG in ('Y', 'C') THEN
163 arp_util.debug('arp_process_br_line.update_line()-');
164 END IF;
165
166 EXCEPTION
167 WHEN OTHERS THEN
168 IF PG_DEBUG in ('Y', 'C') THEN
169 arp_util.debug('EXCEPTION: arp_process_br_line.update_line()');
170 END IF;
171 arp_ctl_pkg.display_line_rec(p_line_rec);
172 RAISE;
173
174 END update_line;
175
176 /*===========================================================================+
177 | PROCEDURE |
178 | delete_line |
179 | |
180 | DESCRIPTION |
181 | Deletes records from ra_customer_trx_lines for Bills Receivable |
182 | transaction lines |
183 | |
184 | SCOPE - PUBLIC |
185 | |
186 | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED |
187 | arp_util.debug |
188 | |
189 | ARGUMENTS : IN: p_customer_trx_line_id |
190 | p_line_rec |
191 | IN / OUT: |
192 | OUT: |
193 | |
194 | RETURNS : NONE |
195 | |
196 | MODIFICATION HISTORY |
197 | 28-MAR-2000 Jani Rautiainen Created |
198 | |
199 +===========================================================================*/
200
201 PROCEDURE delete_line(p_customer_trx_line_id IN ra_customer_trx_lines.customer_trx_line_id%type,
202 p_customer_trx_id IN ra_customer_trx.customer_trx_id%type) IS
203
204 BEGIN
205 IF PG_DEBUG in ('Y', 'C') THEN
206 arp_util.debug('arp_process_br_line.delete_line()+');
207 END IF;
208
209 /*------------------------------------------------+
210 | All the validation and defaulting is done in |
211 | the BR API, so none is done in the entity |
212 | handler. |
213 +------------------------------------------------*/
214
215 /*----------------------------------------------------------------+
216 | Lock rows in other tables that reference this customer_trx_id |
217 +----------------------------------------------------------------*/
218 arp_process_br_header.lock_transaction(p_customer_trx_id);
219
220 /*-----------------------------------------------------+
221 | call the table-handler to delete the line record |
222 +-----------------------------------------------------*/
223
224 arp_ctl_pkg.delete_p( p_customer_trx_line_id );
225
226 /*----------------------------------------+
227 | BR has no Sales Credit, terms or tax |
228 +----------------------------------------*/
229
230 /*------------------------------------------+
231 | Call MRC logic to create MRC rows |
232 +------------------------------------------*/
233 -- Should be removed as the arp_ctl_pkg.delete_p does the deletion of mrc lines
234 -- ARP_PROCESS_BR_LINE.delete_mrc_transaction_line(p_customer_trx_line_id);
235
236 /*---------------------------------------------------------------------------+
237 | All accounting is done in the accounting engine called by transaction |
238 | history entity handler |
239 +---------------------------------------------------------------------------*/
240
241 IF PG_DEBUG in ('Y', 'C') THEN
242 arp_util.debug('arp_process_br_line.delete_line()-');
243 END IF;
244
245 EXCEPTION
246 WHEN OTHERS THEN
247 IF PG_DEBUG in ('Y', 'C') THEN
248 arp_util.debug('EXCEPTION: arp_process_br_line.delete_line()');
249 arp_util.debug('delete_line: ' || 'p_customer_trx_line_id = ' || p_customer_trx_line_id);
250 END IF;
251 RAISE;
252
253 END delete_line;
254
255
256 END ARP_PROCESS_BR_LINE;