69:
70: PROCEDURE Output( p IN ReceiptType ) IS
71: BEGIN
72: IF PG_DEBUG in ('Y', 'C') THEN
73: arp_standard.debug('Output: ' || 'Receipt Type' );
74: arp_standard.debug('Output: ' || 'CashReceiptId:'||p.CashReceiptId );
75: arp_standard.debug('Output: ' || 'ReceiptNumber:'||p.ReceiptNumber );
76: arp_standard.debug('Output: ' || 'PayFromCustomer:'||p.PayFromCustomer );
77: arp_standard.debug('Output: ' || 'CustomerNumber:'||p.CustomerNumber );
70: PROCEDURE Output( p IN ReceiptType ) IS
71: BEGIN
72: IF PG_DEBUG in ('Y', 'C') THEN
73: arp_standard.debug('Output: ' || 'Receipt Type' );
74: arp_standard.debug('Output: ' || 'CashReceiptId:'||p.CashReceiptId );
75: arp_standard.debug('Output: ' || 'ReceiptNumber:'||p.ReceiptNumber );
76: arp_standard.debug('Output: ' || 'PayFromCustomer:'||p.PayFromCustomer );
77: arp_standard.debug('Output: ' || 'CustomerNumber:'||p.CustomerNumber );
78: arp_standard.debug('Output: ' || 'CurrencyCode:'||p.CurrencyCode );
71: BEGIN
72: IF PG_DEBUG in ('Y', 'C') THEN
73: arp_standard.debug('Output: ' || 'Receipt Type' );
74: arp_standard.debug('Output: ' || 'CashReceiptId:'||p.CashReceiptId );
75: arp_standard.debug('Output: ' || 'ReceiptNumber:'||p.ReceiptNumber );
76: arp_standard.debug('Output: ' || 'PayFromCustomer:'||p.PayFromCustomer );
77: arp_standard.debug('Output: ' || 'CustomerNumber:'||p.CustomerNumber );
78: arp_standard.debug('Output: ' || 'CurrencyCode:'||p.CurrencyCode );
79: arp_standard.debug('Output: ' || 'ExchangeRate:'||p.ExchangeRate );
72: IF PG_DEBUG in ('Y', 'C') THEN
73: arp_standard.debug('Output: ' || 'Receipt Type' );
74: arp_standard.debug('Output: ' || 'CashReceiptId:'||p.CashReceiptId );
75: arp_standard.debug('Output: ' || 'ReceiptNumber:'||p.ReceiptNumber );
76: arp_standard.debug('Output: ' || 'PayFromCustomer:'||p.PayFromCustomer );
77: arp_standard.debug('Output: ' || 'CustomerNumber:'||p.CustomerNumber );
78: arp_standard.debug('Output: ' || 'CurrencyCode:'||p.CurrencyCode );
79: arp_standard.debug('Output: ' || 'ExchangeRate:'||p.ExchangeRate );
80: arp_standard.debug('Output: ' || '' );
73: arp_standard.debug('Output: ' || 'Receipt Type' );
74: arp_standard.debug('Output: ' || 'CashReceiptId:'||p.CashReceiptId );
75: arp_standard.debug('Output: ' || 'ReceiptNumber:'||p.ReceiptNumber );
76: arp_standard.debug('Output: ' || 'PayFromCustomer:'||p.PayFromCustomer );
77: arp_standard.debug('Output: ' || 'CustomerNumber:'||p.CustomerNumber );
78: arp_standard.debug('Output: ' || 'CurrencyCode:'||p.CurrencyCode );
79: arp_standard.debug('Output: ' || 'ExchangeRate:'||p.ExchangeRate );
80: arp_standard.debug('Output: ' || '' );
81: END IF;
74: arp_standard.debug('Output: ' || 'CashReceiptId:'||p.CashReceiptId );
75: arp_standard.debug('Output: ' || 'ReceiptNumber:'||p.ReceiptNumber );
76: arp_standard.debug('Output: ' || 'PayFromCustomer:'||p.PayFromCustomer );
77: arp_standard.debug('Output: ' || 'CustomerNumber:'||p.CustomerNumber );
78: arp_standard.debug('Output: ' || 'CurrencyCode:'||p.CurrencyCode );
79: arp_standard.debug('Output: ' || 'ExchangeRate:'||p.ExchangeRate );
80: arp_standard.debug('Output: ' || '' );
81: END IF;
82: END;
75: arp_standard.debug('Output: ' || 'ReceiptNumber:'||p.ReceiptNumber );
76: arp_standard.debug('Output: ' || 'PayFromCustomer:'||p.PayFromCustomer );
77: arp_standard.debug('Output: ' || 'CustomerNumber:'||p.CustomerNumber );
78: arp_standard.debug('Output: ' || 'CurrencyCode:'||p.CurrencyCode );
79: arp_standard.debug('Output: ' || 'ExchangeRate:'||p.ExchangeRate );
80: arp_standard.debug('Output: ' || '' );
81: END IF;
82: END;
83: --
76: arp_standard.debug('Output: ' || 'PayFromCustomer:'||p.PayFromCustomer );
77: arp_standard.debug('Output: ' || 'CustomerNumber:'||p.CustomerNumber );
78: arp_standard.debug('Output: ' || 'CurrencyCode:'||p.CurrencyCode );
79: arp_standard.debug('Output: ' || 'ExchangeRate:'||p.ExchangeRate );
80: arp_standard.debug('Output: ' || '' );
81: END IF;
82: END;
83: --
84: PROCEDURE Output( p IN TrxType ) IS
83: --
84: PROCEDURE Output( p IN TrxType ) IS
85: BEGIN
86: IF PG_DEBUG in ('Y', 'C') THEN
87: arp_standard.debug('Output: ' || 'TrxType' );
88: arp_standard.debug('Output: ' || 'CmPsIdFlag:'||p.CmPsIdFlag );
89: arp_standard.debug('Output: ' || 'PaymentScheduleId:'||p.PaymentScheduleId );
90: arp_standard.debug('Output: ' || 'TrxNumber:'||p.TrxNumber );
91: arp_standard.debug('Output: ' || 'OrgId:'||p.orgid);
84: PROCEDURE Output( p IN TrxType ) IS
85: BEGIN
86: IF PG_DEBUG in ('Y', 'C') THEN
87: arp_standard.debug('Output: ' || 'TrxType' );
88: arp_standard.debug('Output: ' || 'CmPsIdFlag:'||p.CmPsIdFlag );
89: arp_standard.debug('Output: ' || 'PaymentScheduleId:'||p.PaymentScheduleId );
90: arp_standard.debug('Output: ' || 'TrxNumber:'||p.TrxNumber );
91: arp_standard.debug('Output: ' || 'OrgId:'||p.orgid);
92: arp_standard.debug('Output: ' || '' );
85: BEGIN
86: IF PG_DEBUG in ('Y', 'C') THEN
87: arp_standard.debug('Output: ' || 'TrxType' );
88: arp_standard.debug('Output: ' || 'CmPsIdFlag:'||p.CmPsIdFlag );
89: arp_standard.debug('Output: ' || 'PaymentScheduleId:'||p.PaymentScheduleId );
90: arp_standard.debug('Output: ' || 'TrxNumber:'||p.TrxNumber );
91: arp_standard.debug('Output: ' || 'OrgId:'||p.orgid);
92: arp_standard.debug('Output: ' || '' );
93: END IF;
86: IF PG_DEBUG in ('Y', 'C') THEN
87: arp_standard.debug('Output: ' || 'TrxType' );
88: arp_standard.debug('Output: ' || 'CmPsIdFlag:'||p.CmPsIdFlag );
89: arp_standard.debug('Output: ' || 'PaymentScheduleId:'||p.PaymentScheduleId );
90: arp_standard.debug('Output: ' || 'TrxNumber:'||p.TrxNumber );
91: arp_standard.debug('Output: ' || 'OrgId:'||p.orgid);
92: arp_standard.debug('Output: ' || '' );
93: END IF;
94: END;
87: arp_standard.debug('Output: ' || 'TrxType' );
88: arp_standard.debug('Output: ' || 'CmPsIdFlag:'||p.CmPsIdFlag );
89: arp_standard.debug('Output: ' || 'PaymentScheduleId:'||p.PaymentScheduleId );
90: arp_standard.debug('Output: ' || 'TrxNumber:'||p.TrxNumber );
91: arp_standard.debug('Output: ' || 'OrgId:'||p.orgid);
92: arp_standard.debug('Output: ' || '' );
93: END IF;
94: END;
95: --
88: arp_standard.debug('Output: ' || 'CmPsIdFlag:'||p.CmPsIdFlag );
89: arp_standard.debug('Output: ' || 'PaymentScheduleId:'||p.PaymentScheduleId );
90: arp_standard.debug('Output: ' || 'TrxNumber:'||p.TrxNumber );
91: arp_standard.debug('Output: ' || 'OrgId:'||p.orgid);
92: arp_standard.debug('Output: ' || '' );
93: END IF;
94: END;
95: --
96: PROCEDURE Output( p IN ApplicationType ) IS
95: --
96: PROCEDURE Output( p IN ApplicationType ) IS
97: BEGIN
98: IF PG_DEBUG in ('Y', 'C') THEN
99: arp_standard.debug('Output: ' || 'ApplicationType' );
100: arp_standard.debug('Output: ' || 'ReceivableApplicationId:'||p.ReceivableApplicationId );
101: arp_standard.debug('Output: ' || 'GLDate:'||p.GLDate );
102: arp_standard.debug('Output: ' || 'TrxDate:'||p.TrxDate );
103: arp_standard.debug('Output: ' || 'AppType:'||p.AppType );
96: PROCEDURE Output( p IN ApplicationType ) IS
97: BEGIN
98: IF PG_DEBUG in ('Y', 'C') THEN
99: arp_standard.debug('Output: ' || 'ApplicationType' );
100: arp_standard.debug('Output: ' || 'ReceivableApplicationId:'||p.ReceivableApplicationId );
101: arp_standard.debug('Output: ' || 'GLDate:'||p.GLDate );
102: arp_standard.debug('Output: ' || 'TrxDate:'||p.TrxDate );
103: arp_standard.debug('Output: ' || 'AppType:'||p.AppType );
104: arp_standard.debug('Output: ' || 'CatMeaning:'||p.CatMeaning );
97: BEGIN
98: IF PG_DEBUG in ('Y', 'C') THEN
99: arp_standard.debug('Output: ' || 'ApplicationType' );
100: arp_standard.debug('Output: ' || 'ReceivableApplicationId:'||p.ReceivableApplicationId );
101: arp_standard.debug('Output: ' || 'GLDate:'||p.GLDate );
102: arp_standard.debug('Output: ' || 'TrxDate:'||p.TrxDate );
103: arp_standard.debug('Output: ' || 'AppType:'||p.AppType );
104: arp_standard.debug('Output: ' || 'CatMeaning:'||p.CatMeaning );
105: arp_standard.debug('Output: ' || 'PostingControlId:'||p.PostingControlId );
98: IF PG_DEBUG in ('Y', 'C') THEN
99: arp_standard.debug('Output: ' || 'ApplicationType' );
100: arp_standard.debug('Output: ' || 'ReceivableApplicationId:'||p.ReceivableApplicationId );
101: arp_standard.debug('Output: ' || 'GLDate:'||p.GLDate );
102: arp_standard.debug('Output: ' || 'TrxDate:'||p.TrxDate );
103: arp_standard.debug('Output: ' || 'AppType:'||p.AppType );
104: arp_standard.debug('Output: ' || 'CatMeaning:'||p.CatMeaning );
105: arp_standard.debug('Output: ' || 'PostingControlId:'||p.PostingControlId );
106: arp_standard.debug('Output: ' || '' );
99: arp_standard.debug('Output: ' || 'ApplicationType' );
100: arp_standard.debug('Output: ' || 'ReceivableApplicationId:'||p.ReceivableApplicationId );
101: arp_standard.debug('Output: ' || 'GLDate:'||p.GLDate );
102: arp_standard.debug('Output: ' || 'TrxDate:'||p.TrxDate );
103: arp_standard.debug('Output: ' || 'AppType:'||p.AppType );
104: arp_standard.debug('Output: ' || 'CatMeaning:'||p.CatMeaning );
105: arp_standard.debug('Output: ' || 'PostingControlId:'||p.PostingControlId );
106: arp_standard.debug('Output: ' || '' );
107: END IF;
100: arp_standard.debug('Output: ' || 'ReceivableApplicationId:'||p.ReceivableApplicationId );
101: arp_standard.debug('Output: ' || 'GLDate:'||p.GLDate );
102: arp_standard.debug('Output: ' || 'TrxDate:'||p.TrxDate );
103: arp_standard.debug('Output: ' || 'AppType:'||p.AppType );
104: arp_standard.debug('Output: ' || 'CatMeaning:'||p.CatMeaning );
105: arp_standard.debug('Output: ' || 'PostingControlId:'||p.PostingControlId );
106: arp_standard.debug('Output: ' || '' );
107: END IF;
108: END;
101: arp_standard.debug('Output: ' || 'GLDate:'||p.GLDate );
102: arp_standard.debug('Output: ' || 'TrxDate:'||p.TrxDate );
103: arp_standard.debug('Output: ' || 'AppType:'||p.AppType );
104: arp_standard.debug('Output: ' || 'CatMeaning:'||p.CatMeaning );
105: arp_standard.debug('Output: ' || 'PostingControlId:'||p.PostingControlId );
106: arp_standard.debug('Output: ' || '' );
107: END IF;
108: END;
109: --
102: arp_standard.debug('Output: ' || 'TrxDate:'||p.TrxDate );
103: arp_standard.debug('Output: ' || 'AppType:'||p.AppType );
104: arp_standard.debug('Output: ' || 'CatMeaning:'||p.CatMeaning );
105: arp_standard.debug('Output: ' || 'PostingControlId:'||p.PostingControlId );
106: arp_standard.debug('Output: ' || '' );
107: END IF;
108: END;
109: --
110: PROCEDURE Output( p IN ApplicationAmountType ) IS
109: --
110: PROCEDURE Output( p IN ApplicationAmountType ) IS
111: BEGIN
112: IF PG_DEBUG in ('Y', 'C') THEN
113: arp_standard.debug('Output: ' || 'ApplicationAmountType' );
114: arp_standard.debug('Output: ' || 'Amount:'||p.Amount );
115: arp_standard.debug('Output: ' || 'AcctdAmount:'||p.AcctdAmount );
116: arp_standard.debug('Output: ' || 'LineApplied:'||p.LineApplied );
117: arp_standard.debug('Output: ' || 'TaxApplied:'||p.TaxApplied );
110: PROCEDURE Output( p IN ApplicationAmountType ) IS
111: BEGIN
112: IF PG_DEBUG in ('Y', 'C') THEN
113: arp_standard.debug('Output: ' || 'ApplicationAmountType' );
114: arp_standard.debug('Output: ' || 'Amount:'||p.Amount );
115: arp_standard.debug('Output: ' || 'AcctdAmount:'||p.AcctdAmount );
116: arp_standard.debug('Output: ' || 'LineApplied:'||p.LineApplied );
117: arp_standard.debug('Output: ' || 'TaxApplied:'||p.TaxApplied );
118: arp_standard.debug('Output: ' || 'FreightApplied:'||p.FreightApplied );
111: BEGIN
112: IF PG_DEBUG in ('Y', 'C') THEN
113: arp_standard.debug('Output: ' || 'ApplicationAmountType' );
114: arp_standard.debug('Output: ' || 'Amount:'||p.Amount );
115: arp_standard.debug('Output: ' || 'AcctdAmount:'||p.AcctdAmount );
116: arp_standard.debug('Output: ' || 'LineApplied:'||p.LineApplied );
117: arp_standard.debug('Output: ' || 'TaxApplied:'||p.TaxApplied );
118: arp_standard.debug('Output: ' || 'FreightApplied:'||p.FreightApplied );
119: arp_standard.debug('Output: ' || 'ChargesApplied:'||p.ChargesApplied );
112: IF PG_DEBUG in ('Y', 'C') THEN
113: arp_standard.debug('Output: ' || 'ApplicationAmountType' );
114: arp_standard.debug('Output: ' || 'Amount:'||p.Amount );
115: arp_standard.debug('Output: ' || 'AcctdAmount:'||p.AcctdAmount );
116: arp_standard.debug('Output: ' || 'LineApplied:'||p.LineApplied );
117: arp_standard.debug('Output: ' || 'TaxApplied:'||p.TaxApplied );
118: arp_standard.debug('Output: ' || 'FreightApplied:'||p.FreightApplied );
119: arp_standard.debug('Output: ' || 'ChargesApplied:'||p.ChargesApplied );
120: arp_standard.debug('Output: ' || '' );
113: arp_standard.debug('Output: ' || 'ApplicationAmountType' );
114: arp_standard.debug('Output: ' || 'Amount:'||p.Amount );
115: arp_standard.debug('Output: ' || 'AcctdAmount:'||p.AcctdAmount );
116: arp_standard.debug('Output: ' || 'LineApplied:'||p.LineApplied );
117: arp_standard.debug('Output: ' || 'TaxApplied:'||p.TaxApplied );
118: arp_standard.debug('Output: ' || 'FreightApplied:'||p.FreightApplied );
119: arp_standard.debug('Output: ' || 'ChargesApplied:'||p.ChargesApplied );
120: arp_standard.debug('Output: ' || '' );
121: END IF;
114: arp_standard.debug('Output: ' || 'Amount:'||p.Amount );
115: arp_standard.debug('Output: ' || 'AcctdAmount:'||p.AcctdAmount );
116: arp_standard.debug('Output: ' || 'LineApplied:'||p.LineApplied );
117: arp_standard.debug('Output: ' || 'TaxApplied:'||p.TaxApplied );
118: arp_standard.debug('Output: ' || 'FreightApplied:'||p.FreightApplied );
119: arp_standard.debug('Output: ' || 'ChargesApplied:'||p.ChargesApplied );
120: arp_standard.debug('Output: ' || '' );
121: END IF;
122: END;
115: arp_standard.debug('Output: ' || 'AcctdAmount:'||p.AcctdAmount );
116: arp_standard.debug('Output: ' || 'LineApplied:'||p.LineApplied );
117: arp_standard.debug('Output: ' || 'TaxApplied:'||p.TaxApplied );
118: arp_standard.debug('Output: ' || 'FreightApplied:'||p.FreightApplied );
119: arp_standard.debug('Output: ' || 'ChargesApplied:'||p.ChargesApplied );
120: arp_standard.debug('Output: ' || '' );
121: END IF;
122: END;
123: --
116: arp_standard.debug('Output: ' || 'LineApplied:'||p.LineApplied );
117: arp_standard.debug('Output: ' || 'TaxApplied:'||p.TaxApplied );
118: arp_standard.debug('Output: ' || 'FreightApplied:'||p.FreightApplied );
119: arp_standard.debug('Output: ' || 'ChargesApplied:'||p.ChargesApplied );
120: arp_standard.debug('Output: ' || '' );
121: END IF;
122: END;
123: --
124: --
193: --
194: PROCEDURE Output( p_RCa IN CCA%ROWTYPE ) IS
195: BEGIN
196: IF PG_DEBUG in ('Y', 'C') THEN
197: arp_standard.debug('Output: ' || 'CCA%ROWTYPE' );
198: arp_standard.debug('Output: ' || 'Amount:'||p_RCa.Amount );
199: arp_standard.debug('Output: ' || 'Source:'||p_RCA.Source );
200: arp_standard.debug('Output: ' || 'SourceId:'||p_RCa.SourceId );
201: arp_standard.debug('Output: ' || '--------------------------------' );
194: PROCEDURE Output( p_RCa IN CCA%ROWTYPE ) IS
195: BEGIN
196: IF PG_DEBUG in ('Y', 'C') THEN
197: arp_standard.debug('Output: ' || 'CCA%ROWTYPE' );
198: arp_standard.debug('Output: ' || 'Amount:'||p_RCa.Amount );
199: arp_standard.debug('Output: ' || 'Source:'||p_RCA.Source );
200: arp_standard.debug('Output: ' || 'SourceId:'||p_RCa.SourceId );
201: arp_standard.debug('Output: ' || '--------------------------------' );
202: END IF;
195: BEGIN
196: IF PG_DEBUG in ('Y', 'C') THEN
197: arp_standard.debug('Output: ' || 'CCA%ROWTYPE' );
198: arp_standard.debug('Output: ' || 'Amount:'||p_RCa.Amount );
199: arp_standard.debug('Output: ' || 'Source:'||p_RCA.Source );
200: arp_standard.debug('Output: ' || 'SourceId:'||p_RCa.SourceId );
201: arp_standard.debug('Output: ' || '--------------------------------' );
202: END IF;
203: END Output;
196: IF PG_DEBUG in ('Y', 'C') THEN
197: arp_standard.debug('Output: ' || 'CCA%ROWTYPE' );
198: arp_standard.debug('Output: ' || 'Amount:'||p_RCa.Amount );
199: arp_standard.debug('Output: ' || 'Source:'||p_RCA.Source );
200: arp_standard.debug('Output: ' || 'SourceId:'||p_RCa.SourceId );
201: arp_standard.debug('Output: ' || '--------------------------------' );
202: END IF;
203: END Output;
204: --
197: arp_standard.debug('Output: ' || 'CCA%ROWTYPE' );
198: arp_standard.debug('Output: ' || 'Amount:'||p_RCa.Amount );
199: arp_standard.debug('Output: ' || 'Source:'||p_RCA.Source );
200: arp_standard.debug('Output: ' || 'SourceId:'||p_RCa.SourceId );
201: arp_standard.debug('Output: ' || '--------------------------------' );
202: END IF;
203: END Output;
204: --
205: BEGIN
214: l_TotalUnallocatedAmt := l_TotalUnallocatedAmt + RCA.UnallocatedAmt;
215: --
216: EXCEPTION
217: WHEN OTHERS THEN
218: arp_standard.debug( 'Exception:CurrentCBDApplications.Loop:');
219: Output( Rca );
220: RAISE;
221: END;
222: END LOOP;
224: NextElement := l_NextElement;
225: TotalUnallocatedAmt := l_TotalUnallocatedAmt;
226: EXCEPTION
227: WHEN OTHERS THEN
228: arp_standard.debug( ' Exception:CurrentCBDApplications:' );
229: arp_standard.debug( 'l_NextElement:'||l_NextElement );
230: arp_standard.debug( 'l_TotalAmount:'||l_TotalAmount );
231: RAISE;
232: END;
225: TotalUnallocatedAmt := l_TotalUnallocatedAmt;
226: EXCEPTION
227: WHEN OTHERS THEN
228: arp_standard.debug( ' Exception:CurrentCBDApplications:' );
229: arp_standard.debug( 'l_NextElement:'||l_NextElement );
230: arp_standard.debug( 'l_TotalAmount:'||l_TotalAmount );
231: RAISE;
232: END;
233: --
226: EXCEPTION
227: WHEN OTHERS THEN
228: arp_standard.debug( ' Exception:CurrentCBDApplications:' );
229: arp_standard.debug( 'l_NextElement:'||l_NextElement );
230: arp_standard.debug( 'l_TotalAmount:'||l_TotalAmount );
231: RAISE;
232: END;
233: --
234: --
430: ps.amount_due_original,
431: tl.sequence_num;
432: EXCEPTION
433: WHEN OTHERS THEN
434: arp_standard.debug( 'Exception:CurrentRevDistribution.Select PS Details:' );
435: RAISE;
436: END;
437: --
438: FOR GlDistRecord IN gl_dist_cursor( l_customer_trx_id, p_type ) LOOP
488: --
489: -- if the total amount comes to zero, report on this
490: -- IF l_TotalAmount = 0
491: -- THEN
492: -- arp_standard.debug( 'On ps_id:'||p_ps_id||' for Type:'||p_Type||' the Total Distribution=0');
493: -- arp_standard.debug( 'CurrentRevDistribution: TotalAmount = 0' );
494: -- arp_standard.debug( 'p_ps_id:'||p_ps_id );
495: -- arp_standard.debug( 'p_type:'||p_type );
496: -- END IF;
489: -- if the total amount comes to zero, report on this
490: -- IF l_TotalAmount = 0
491: -- THEN
492: -- arp_standard.debug( 'On ps_id:'||p_ps_id||' for Type:'||p_Type||' the Total Distribution=0');
493: -- arp_standard.debug( 'CurrentRevDistribution: TotalAmount = 0' );
494: -- arp_standard.debug( 'p_ps_id:'||p_ps_id );
495: -- arp_standard.debug( 'p_type:'||p_type );
496: -- END IF;
497: TotalAmount := l_TotalAmount;
490: -- IF l_TotalAmount = 0
491: -- THEN
492: -- arp_standard.debug( 'On ps_id:'||p_ps_id||' for Type:'||p_Type||' the Total Distribution=0');
493: -- arp_standard.debug( 'CurrentRevDistribution: TotalAmount = 0' );
494: -- arp_standard.debug( 'p_ps_id:'||p_ps_id );
495: -- arp_standard.debug( 'p_type:'||p_type );
496: -- END IF;
497: TotalAmount := l_TotalAmount;
498: NextElement := l_NextElement;
491: -- THEN
492: -- arp_standard.debug( 'On ps_id:'||p_ps_id||' for Type:'||p_Type||' the Total Distribution=0');
493: -- arp_standard.debug( 'CurrentRevDistribution: TotalAmount = 0' );
494: -- arp_standard.debug( 'p_ps_id:'||p_ps_id );
495: -- arp_standard.debug( 'p_type:'||p_type );
496: -- END IF;
497: TotalAmount := l_TotalAmount;
498: NextElement := l_NextElement;
499: EXCEPTION
497: TotalAmount := l_TotalAmount;
498: NextElement := l_NextElement;
499: EXCEPTION
500: WHEN OTHERS THEN
501: arp_standard.debug( 'Exception:CurrentRevDistribution:' );
502: arp_standard.debug( 'l_customer_trx_id:'||l_customer_trx_id );
503: arp_standard.debug( 'l_term_fraction:'||l_term_fraction );
504: arp_standard.debug( 'l_currency_code:'||l_currency_code );
505: arp_standard.debug( 'l_Amount:'||l_Amount );
498: NextElement := l_NextElement;
499: EXCEPTION
500: WHEN OTHERS THEN
501: arp_standard.debug( 'Exception:CurrentRevDistribution:' );
502: arp_standard.debug( 'l_customer_trx_id:'||l_customer_trx_id );
503: arp_standard.debug( 'l_term_fraction:'||l_term_fraction );
504: arp_standard.debug( 'l_currency_code:'||l_currency_code );
505: arp_standard.debug( 'l_Amount:'||l_Amount );
506: arp_standard.debug( 'l_AmountReconcile:'||l_AmountReconcile );
499: EXCEPTION
500: WHEN OTHERS THEN
501: arp_standard.debug( 'Exception:CurrentRevDistribution:' );
502: arp_standard.debug( 'l_customer_trx_id:'||l_customer_trx_id );
503: arp_standard.debug( 'l_term_fraction:'||l_term_fraction );
504: arp_standard.debug( 'l_currency_code:'||l_currency_code );
505: arp_standard.debug( 'l_Amount:'||l_Amount );
506: arp_standard.debug( 'l_AmountReconcile:'||l_AmountReconcile );
507: arp_standard.debug( 'l_FirstInstallmentCode:'||l_FirstInstallmentCode );
500: WHEN OTHERS THEN
501: arp_standard.debug( 'Exception:CurrentRevDistribution:' );
502: arp_standard.debug( 'l_customer_trx_id:'||l_customer_trx_id );
503: arp_standard.debug( 'l_term_fraction:'||l_term_fraction );
504: arp_standard.debug( 'l_currency_code:'||l_currency_code );
505: arp_standard.debug( 'l_Amount:'||l_Amount );
506: arp_standard.debug( 'l_AmountReconcile:'||l_AmountReconcile );
507: arp_standard.debug( 'l_FirstInstallmentCode:'||l_FirstInstallmentCode );
508: arp_standard.debug( 'l_NextElement:'||l_NextElement );
501: arp_standard.debug( 'Exception:CurrentRevDistribution:' );
502: arp_standard.debug( 'l_customer_trx_id:'||l_customer_trx_id );
503: arp_standard.debug( 'l_term_fraction:'||l_term_fraction );
504: arp_standard.debug( 'l_currency_code:'||l_currency_code );
505: arp_standard.debug( 'l_Amount:'||l_Amount );
506: arp_standard.debug( 'l_AmountReconcile:'||l_AmountReconcile );
507: arp_standard.debug( 'l_FirstInstallmentCode:'||l_FirstInstallmentCode );
508: arp_standard.debug( 'l_NextElement:'||l_NextElement );
509: arp_standard.debug( 'l_TotalAmount:'||l_TotalAmount );
502: arp_standard.debug( 'l_customer_trx_id:'||l_customer_trx_id );
503: arp_standard.debug( 'l_term_fraction:'||l_term_fraction );
504: arp_standard.debug( 'l_currency_code:'||l_currency_code );
505: arp_standard.debug( 'l_Amount:'||l_Amount );
506: arp_standard.debug( 'l_AmountReconcile:'||l_AmountReconcile );
507: arp_standard.debug( 'l_FirstInstallmentCode:'||l_FirstInstallmentCode );
508: arp_standard.debug( 'l_NextElement:'||l_NextElement );
509: arp_standard.debug( 'l_TotalAmount:'||l_TotalAmount );
510: arp_standard.debug( 'l_FirstInstallmentFlag:'||l_FirstInstallmentFlag );
503: arp_standard.debug( 'l_term_fraction:'||l_term_fraction );
504: arp_standard.debug( 'l_currency_code:'||l_currency_code );
505: arp_standard.debug( 'l_Amount:'||l_Amount );
506: arp_standard.debug( 'l_AmountReconcile:'||l_AmountReconcile );
507: arp_standard.debug( 'l_FirstInstallmentCode:'||l_FirstInstallmentCode );
508: arp_standard.debug( 'l_NextElement:'||l_NextElement );
509: arp_standard.debug( 'l_TotalAmount:'||l_TotalAmount );
510: arp_standard.debug( 'l_FirstInstallmentFlag:'||l_FirstInstallmentFlag );
511: RAISE;
504: arp_standard.debug( 'l_currency_code:'||l_currency_code );
505: arp_standard.debug( 'l_Amount:'||l_Amount );
506: arp_standard.debug( 'l_AmountReconcile:'||l_AmountReconcile );
507: arp_standard.debug( 'l_FirstInstallmentCode:'||l_FirstInstallmentCode );
508: arp_standard.debug( 'l_NextElement:'||l_NextElement );
509: arp_standard.debug( 'l_TotalAmount:'||l_TotalAmount );
510: arp_standard.debug( 'l_FirstInstallmentFlag:'||l_FirstInstallmentFlag );
511: RAISE;
512: END;
505: arp_standard.debug( 'l_Amount:'||l_Amount );
506: arp_standard.debug( 'l_AmountReconcile:'||l_AmountReconcile );
507: arp_standard.debug( 'l_FirstInstallmentCode:'||l_FirstInstallmentCode );
508: arp_standard.debug( 'l_NextElement:'||l_NextElement );
509: arp_standard.debug( 'l_TotalAmount:'||l_TotalAmount );
510: arp_standard.debug( 'l_FirstInstallmentFlag:'||l_FirstInstallmentFlag );
511: RAISE;
512: END;
513: --
506: arp_standard.debug( 'l_AmountReconcile:'||l_AmountReconcile );
507: arp_standard.debug( 'l_FirstInstallmentCode:'||l_FirstInstallmentCode );
508: arp_standard.debug( 'l_NextElement:'||l_NextElement );
509: arp_standard.debug( 'l_TotalAmount:'||l_TotalAmount );
510: arp_standard.debug( 'l_FirstInstallmentFlag:'||l_FirstInstallmentFlag );
511: RAISE;
512: END;
513: --
514: --
596: p_interim_rec.org_id
597: );
598: EXCEPTION
599: WHEN OTHERS THEN
600: arp_standard.debug( 'Exception:CreateInterim:' );
601: RAISE;
602: END;
603: --
604: --
741: AND cbd.payment_schedule_id = p_Trx.PaymentScheduleId
742: AND cbd.type = p_Type;
743: EXCEPTION
744: WHEN OTHERS THEN
745: arp_standard.debug( 'Exception:CreateDistribution.InsertPostedAR:' );
746: RAISE;
747: END;
748: ELSE
749: --
801: p_trx.OrgId
802: );
803: EXCEPTION
804: WHEN OTHERS THEN
805: arp_standard.debug( 'Exception:CreateDistribution.InsertCBD:' );
806: RAISE;
807: END;
808: --
809: -- bug3718694 Call CreateInterim procedure to insert record into
873:
874: CreateInterim ( l_interim_rec );
875: EXCEPTION
876: WHEN OTHERS THEN
877: arp_standard.debug( 'Exception:CreateDistribution.InsertAR:' );
878: RAISE;
879: END;
880: END IF;
881: EXCEPTION
879: END;
880: END IF;
881: EXCEPTION
882: WHEN OTHERS THEN
883: arp_standard.debug( 'Exception:CreateDistribution:' );
884: RAISE;
885: END;
886: --
887: --
1084: END IF;
1085: END IF;
1086: EXCEPTION
1087: WHEN OTHERS THEN
1088: arp_standard.debug( 'Exception:DistributeApplicationType:' );
1089: RAISE;
1090: END;
1091: --
1092: --
1166: --
1167: /*
1168: SurplusAmount := p_AppAmount.Amount - RunningTotalAmount;
1169: IF SurplusAmount <> 0 THEN
1170: arp_standard.debug( 'DistributeLTFApplication' );
1171: arp_standard.debug( 'LTF Charges doesn''t equal application amount for ra_id:'||p_App.ReceivableApplicationId );
1172: arp_standard.debug( '----------------------------------------' );
1173: AcctdAmount := arpcurr.ReconcileAcctdAmounts( p_Receipt.ExchangeRate,
1174: p_AppAmount.Amount,
1167: /*
1168: SurplusAmount := p_AppAmount.Amount - RunningTotalAmount;
1169: IF SurplusAmount <> 0 THEN
1170: arp_standard.debug( 'DistributeLTFApplication' );
1171: arp_standard.debug( 'LTF Charges doesn''t equal application amount for ra_id:'||p_App.ReceivableApplicationId );
1172: arp_standard.debug( '----------------------------------------' );
1173: AcctdAmount := arpcurr.ReconcileAcctdAmounts( p_Receipt.ExchangeRate,
1174: p_AppAmount.Amount,
1175: p_AppAmount.AcctdAmount,
1168: SurplusAmount := p_AppAmount.Amount - RunningTotalAmount;
1169: IF SurplusAmount <> 0 THEN
1170: arp_standard.debug( 'DistributeLTFApplication' );
1171: arp_standard.debug( 'LTF Charges doesn''t equal application amount for ra_id:'||p_App.ReceivableApplicationId );
1172: arp_standard.debug( '----------------------------------------' );
1173: AcctdAmount := arpcurr.ReconcileAcctdAmounts( p_Receipt.ExchangeRate,
1174: p_AppAmount.Amount,
1175: p_AppAmount.AcctdAmount,
1176: SurplusAmount,
1182: --
1183: --
1184: EXCEPTION
1185: WHEN OTHERS THEN
1186: arp_standard.debug( 'Exception:DistributeLTFApplication:' );
1187: RAISE;
1188: END;
1189: --
1190: --
1282: --
1283: l_Count NUMBER :=0;
1284:
1285: BEGIN
1286: arp_standard.debug( ' ' );
1287: arp_standard.debug( ' AR_RECEIVABLE_APPLICATIONS (non-app)...' );
1288: FOR RRa IN CRa
1289: LOOP
1290: -- bug3718694 Call CreateInterim procedure to insert record into
1283: l_Count NUMBER :=0;
1284:
1285: BEGIN
1286: arp_standard.debug( ' ' );
1287: arp_standard.debug( ' AR_RECEIVABLE_APPLICATIONS (non-app)...' );
1288: FOR RRa IN CRa
1289: LOOP
1290: -- bug3718694 Call CreateInterim procedure to insert record into
1291: -- ar_journal_interim .
1356: CreateInterim ( l_interim_rec ) ;
1357:
1358: EXCEPTION
1359: WHEN OTHERS THEN
1360: arp_standard.debug( 'Exception:ReportNonDistApplications.INSERT:' );
1361: arp_standard.debug('RRa.CashReceiptId:'||RRa.CashReceiptId );
1362: arp_standard.debug('RRa.ReceiptNumber:'||RRa.ReceiptNumber );
1363: arp_standard.debug('RRa.PayFromCustomer:'||RRa.PayFromCustomer );
1364: arp_standard.debug('RRa.CustomerNumber:'||RRa.CustomerNumber );
1357:
1358: EXCEPTION
1359: WHEN OTHERS THEN
1360: arp_standard.debug( 'Exception:ReportNonDistApplications.INSERT:' );
1361: arp_standard.debug('RRa.CashReceiptId:'||RRa.CashReceiptId );
1362: arp_standard.debug('RRa.ReceiptNumber:'||RRa.ReceiptNumber );
1363: arp_standard.debug('RRa.PayFromCustomer:'||RRa.PayFromCustomer );
1364: arp_standard.debug('RRa.CustomerNumber:'||RRa.CustomerNumber );
1365: arp_standard.debug('RRa.CurrencyCode:'||RRa.CurrencyCode );
1358: EXCEPTION
1359: WHEN OTHERS THEN
1360: arp_standard.debug( 'Exception:ReportNonDistApplications.INSERT:' );
1361: arp_standard.debug('RRa.CashReceiptId:'||RRa.CashReceiptId );
1362: arp_standard.debug('RRa.ReceiptNumber:'||RRa.ReceiptNumber );
1363: arp_standard.debug('RRa.PayFromCustomer:'||RRa.PayFromCustomer );
1364: arp_standard.debug('RRa.CustomerNumber:'||RRa.CustomerNumber );
1365: arp_standard.debug('RRa.CurrencyCode:'||RRa.CurrencyCode );
1366: arp_standard.debug('RRa.ReceivableApplicationId:'||RRa.ReceivableApplicationId );
1359: WHEN OTHERS THEN
1360: arp_standard.debug( 'Exception:ReportNonDistApplications.INSERT:' );
1361: arp_standard.debug('RRa.CashReceiptId:'||RRa.CashReceiptId );
1362: arp_standard.debug('RRa.ReceiptNumber:'||RRa.ReceiptNumber );
1363: arp_standard.debug('RRa.PayFromCustomer:'||RRa.PayFromCustomer );
1364: arp_standard.debug('RRa.CustomerNumber:'||RRa.CustomerNumber );
1365: arp_standard.debug('RRa.CurrencyCode:'||RRa.CurrencyCode );
1366: arp_standard.debug('RRa.ReceivableApplicationId:'||RRa.ReceivableApplicationId );
1367: arp_standard.debug('RRa.GlDate:'||RRa.GlDate );
1360: arp_standard.debug( 'Exception:ReportNonDistApplications.INSERT:' );
1361: arp_standard.debug('RRa.CashReceiptId:'||RRa.CashReceiptId );
1362: arp_standard.debug('RRa.ReceiptNumber:'||RRa.ReceiptNumber );
1363: arp_standard.debug('RRa.PayFromCustomer:'||RRa.PayFromCustomer );
1364: arp_standard.debug('RRa.CustomerNumber:'||RRa.CustomerNumber );
1365: arp_standard.debug('RRa.CurrencyCode:'||RRa.CurrencyCode );
1366: arp_standard.debug('RRa.ReceivableApplicationId:'||RRa.ReceivableApplicationId );
1367: arp_standard.debug('RRa.GlDate:'||RRa.GlDate );
1368: arp_standard.debug('RRa.TrxDate:'||RRa.TrxDate );
1361: arp_standard.debug('RRa.CashReceiptId:'||RRa.CashReceiptId );
1362: arp_standard.debug('RRa.ReceiptNumber:'||RRa.ReceiptNumber );
1363: arp_standard.debug('RRa.PayFromCustomer:'||RRa.PayFromCustomer );
1364: arp_standard.debug('RRa.CustomerNumber:'||RRa.CustomerNumber );
1365: arp_standard.debug('RRa.CurrencyCode:'||RRa.CurrencyCode );
1366: arp_standard.debug('RRa.ReceivableApplicationId:'||RRa.ReceivableApplicationId );
1367: arp_standard.debug('RRa.GlDate:'||RRa.GlDate );
1368: arp_standard.debug('RRa.TrxDate:'||RRa.TrxDate );
1369: arp_standard.debug('RRa.Amount:'||RRa.Amount );
1362: arp_standard.debug('RRa.ReceiptNumber:'||RRa.ReceiptNumber );
1363: arp_standard.debug('RRa.PayFromCustomer:'||RRa.PayFromCustomer );
1364: arp_standard.debug('RRa.CustomerNumber:'||RRa.CustomerNumber );
1365: arp_standard.debug('RRa.CurrencyCode:'||RRa.CurrencyCode );
1366: arp_standard.debug('RRa.ReceivableApplicationId:'||RRa.ReceivableApplicationId );
1367: arp_standard.debug('RRa.GlDate:'||RRa.GlDate );
1368: arp_standard.debug('RRa.TrxDate:'||RRa.TrxDate );
1369: arp_standard.debug('RRa.Amount:'||RRa.Amount );
1370: arp_standard.debug('RRa.AcctdAmount:'||RRa.AcctdAmount );
1363: arp_standard.debug('RRa.PayFromCustomer:'||RRa.PayFromCustomer );
1364: arp_standard.debug('RRa.CustomerNumber:'||RRa.CustomerNumber );
1365: arp_standard.debug('RRa.CurrencyCode:'||RRa.CurrencyCode );
1366: arp_standard.debug('RRa.ReceivableApplicationId:'||RRa.ReceivableApplicationId );
1367: arp_standard.debug('RRa.GlDate:'||RRa.GlDate );
1368: arp_standard.debug('RRa.TrxDate:'||RRa.TrxDate );
1369: arp_standard.debug('RRa.Amount:'||RRa.Amount );
1370: arp_standard.debug('RRa.AcctdAmount:'||RRa.AcctdAmount );
1371: arp_standard.debug('RRa.CodeCombinationId:'||RRa.CodeCombinationId );
1364: arp_standard.debug('RRa.CustomerNumber:'||RRa.CustomerNumber );
1365: arp_standard.debug('RRa.CurrencyCode:'||RRa.CurrencyCode );
1366: arp_standard.debug('RRa.ReceivableApplicationId:'||RRa.ReceivableApplicationId );
1367: arp_standard.debug('RRa.GlDate:'||RRa.GlDate );
1368: arp_standard.debug('RRa.TrxDate:'||RRa.TrxDate );
1369: arp_standard.debug('RRa.Amount:'||RRa.Amount );
1370: arp_standard.debug('RRa.AcctdAmount:'||RRa.AcctdAmount );
1371: arp_standard.debug('RRa.CodeCombinationId:'||RRa.CodeCombinationId );
1372: arp_standard.debug('RRa.Status:'||RRa.Status );
1365: arp_standard.debug('RRa.CurrencyCode:'||RRa.CurrencyCode );
1366: arp_standard.debug('RRa.ReceivableApplicationId:'||RRa.ReceivableApplicationId );
1367: arp_standard.debug('RRa.GlDate:'||RRa.GlDate );
1368: arp_standard.debug('RRa.TrxDate:'||RRa.TrxDate );
1369: arp_standard.debug('RRa.Amount:'||RRa.Amount );
1370: arp_standard.debug('RRa.AcctdAmount:'||RRa.AcctdAmount );
1371: arp_standard.debug('RRa.CodeCombinationId:'||RRa.CodeCombinationId );
1372: arp_standard.debug('RRa.Status:'||RRa.Status );
1373: arp_standard.debug('RRa.CatMeaning:'||RRa.CatMeaning );
1366: arp_standard.debug('RRa.ReceivableApplicationId:'||RRa.ReceivableApplicationId );
1367: arp_standard.debug('RRa.GlDate:'||RRa.GlDate );
1368: arp_standard.debug('RRa.TrxDate:'||RRa.TrxDate );
1369: arp_standard.debug('RRa.Amount:'||RRa.Amount );
1370: arp_standard.debug('RRa.AcctdAmount:'||RRa.AcctdAmount );
1371: arp_standard.debug('RRa.CodeCombinationId:'||RRa.CodeCombinationId );
1372: arp_standard.debug('RRa.Status:'||RRa.Status );
1373: arp_standard.debug('RRa.CatMeaning:'||RRa.CatMeaning );
1374: RAISE;
1367: arp_standard.debug('RRa.GlDate:'||RRa.GlDate );
1368: arp_standard.debug('RRa.TrxDate:'||RRa.TrxDate );
1369: arp_standard.debug('RRa.Amount:'||RRa.Amount );
1370: arp_standard.debug('RRa.AcctdAmount:'||RRa.AcctdAmount );
1371: arp_standard.debug('RRa.CodeCombinationId:'||RRa.CodeCombinationId );
1372: arp_standard.debug('RRa.Status:'||RRa.Status );
1373: arp_standard.debug('RRa.CatMeaning:'||RRa.CatMeaning );
1374: RAISE;
1375: END;
1368: arp_standard.debug('RRa.TrxDate:'||RRa.TrxDate );
1369: arp_standard.debug('RRa.Amount:'||RRa.Amount );
1370: arp_standard.debug('RRa.AcctdAmount:'||RRa.AcctdAmount );
1371: arp_standard.debug('RRa.CodeCombinationId:'||RRa.CodeCombinationId );
1372: arp_standard.debug('RRa.Status:'||RRa.Status );
1373: arp_standard.debug('RRa.CatMeaning:'||RRa.CatMeaning );
1374: RAISE;
1375: END;
1376: --
1369: arp_standard.debug('RRa.Amount:'||RRa.Amount );
1370: arp_standard.debug('RRa.AcctdAmount:'||RRa.AcctdAmount );
1371: arp_standard.debug('RRa.CodeCombinationId:'||RRa.CodeCombinationId );
1372: arp_standard.debug('RRa.Status:'||RRa.Status );
1373: arp_standard.debug('RRa.CatMeaning:'||RRa.CatMeaning );
1374: RAISE;
1375: END;
1376: --
1377: l_Count := l_Count + 1;
1375: END;
1376: --
1377: l_Count := l_Count + 1;
1378: END LOOP;
1379: arp_standard.debug( ' '||l_Count||' lines selected' );
1380: EXCEPTION
1381: WHEN OTHERS THEN
1382: arp_standard.debug( 'Exception:ReportNonDistApplications:' );
1383: RAISE;
1378: END LOOP;
1379: arp_standard.debug( ' '||l_Count||' lines selected' );
1380: EXCEPTION
1381: WHEN OTHERS THEN
1382: arp_standard.debug( 'Exception:ReportNonDistApplications:' );
1383: RAISE;
1384: END;
1385: --
1386: /*---------------------------------------------------------------------------*
1560: l_AppAmount ApplicationAmountType;
1561: l_Count NUMBER :=0;
1562: l_Class VARCHAR2(20);
1563: BEGIN
1564: arp_standard.debug( ' ' );
1565: arp_standard.debug( ' AR_RECEIVABLE_APPLICATION (app)...' );
1566: OPEN CRa;
1567: LOOP
1568: FETCH CRa
1561: l_Count NUMBER :=0;
1562: l_Class VARCHAR2(20);
1563: BEGIN
1564: arp_standard.debug( ' ' );
1565: arp_standard.debug( ' AR_RECEIVABLE_APPLICATION (app)...' );
1566: OPEN CRa;
1567: LOOP
1568: FETCH CRa
1569: INTO l_rowid,
1605: END IF;
1606: --
1607: END LOOP;
1608: CLOSE Cra;
1609: arp_standard.debug( ' '||l_Count||' lines selected' );
1610: EXCEPTION
1611: WHEN OTHERS THEN
1612: arp_standard.debug( 'Exception:ReportDistributedApplications:' );
1613: Output( l_AppAmount );
1608: CLOSE Cra;
1609: arp_standard.debug( ' '||l_Count||' lines selected' );
1610: EXCEPTION
1611: WHEN OTHERS THEN
1612: arp_standard.debug( 'Exception:ReportDistributedApplications:' );
1613: Output( l_AppAmount );
1614: Output( l_App );
1615: Output( l_Trx );
1616: Output( l_Receipt );
1781: CreateInterim(l_interim_rec) ;
1782:
1783: EXCEPTION
1784: WHEN OTHERS THEN
1785: arp_standard.debug( 'InsertIntoAR:' );
1786: RAISE;
1787: END;
1788: --
1789: -- This is the actual ReportCashReceiptHistory body
1788: --
1789: -- This is the actual ReportCashReceiptHistory body
1790: --
1791: BEGIN
1792: arp_standard.debug( ' ' );
1793: arp_standard.debug( ' AR_CASH_RECEIPT_HISTORY...' );
1794: OPEN CCrh;
1795: LOOP
1796: FETCH CCrh
1789: -- This is the actual ReportCashReceiptHistory body
1790: --
1791: BEGIN
1792: arp_standard.debug( ' ' );
1793: arp_standard.debug( ' AR_CASH_RECEIPT_HISTORY...' );
1794: OPEN CCrh;
1795: LOOP
1796: FETCH CCrh
1797: INTO RCrh;
1799: InsertIntoAR( RCrh );
1800: l_Count := l_Count + 1;
1801: END LOOP;
1802: CLOSE CCrh;
1803: arp_standard.debug( ' '||l_Count||' lines selected' );
1804: --
1805: EXCEPTION
1806: WHEN OTHERS THEN
1807: arp_standard.debug( 'ReportCashReceiptHistory:' );
1803: arp_standard.debug( ' '||l_Count||' lines selected' );
1804: --
1805: EXCEPTION
1806: WHEN OTHERS THEN
1807: arp_standard.debug( 'ReportCashReceiptHistory:' );
1808: RAISE;
1809: END;
1810: --
1811: --
1893: -- bug3718694
1894: l_interim_rec ar_journal_interim%ROWTYPE;
1895: l_interim_rec_null ar_journal_interim%ROWTYPE;
1896: BEGIN
1897: arp_standard.debug( ' ' );
1898: arp_standard.debug( ' AR_MISC_CASH_DISTRIBUTIONS...' );
1899: FOR RMcd IN CMcd
1900: LOOP
1901: -- bug3718694 Call CreateInterim procedure to insert record into
1894: l_interim_rec ar_journal_interim%ROWTYPE;
1895: l_interim_rec_null ar_journal_interim%ROWTYPE;
1896: BEGIN
1897: arp_standard.debug( ' ' );
1898: arp_standard.debug( ' AR_MISC_CASH_DISTRIBUTIONS...' );
1899: FOR RMcd IN CMcd
1900: LOOP
1901: -- bug3718694 Call CreateInterim procedure to insert record into
1902: -- ar_journal_interim .
1942: CreateInterim (l_interim_rec);
1943: --
1944: l_Count := l_Count + 1;
1945: END LOOP;
1946: arp_standard.debug( ' '||l_Count||' lines selected' );
1947: EXCEPTION
1948: WHEN OTHERS THEN
1949: arp_standard.debug( 'ReportMiscCashDistributions:' );
1950: RAISE;
1945: END LOOP;
1946: arp_standard.debug( ' '||l_Count||' lines selected' );
1947: EXCEPTION
1948: WHEN OTHERS THEN
1949: arp_standard.debug( 'ReportMiscCashDistributions:' );
1950: RAISE;
1951: END;
1952: --
1953: --
1986: --
1987: EXCEPTION
1988: WHEN OTHERS THEN
1989: IF PG_DEBUG in ('Y', 'C') THEN
1990: arp_standard.debug( 'ClearOOB' );
1991: END IF;
1992: RAISE;
1993: END ClearOOB;
1994:
2002: | DESCRIPTION |
2003: | Checks that the records inserted into ar_journal_interim balance for each |
2004: | BalanceId (reference22). |
2005: | Any BalanceId that fails to balance will be reported on |
2006: | (via arp_standard.debug), and will be deleted with ClearOOB |
2007: | PARAMETERS |
2008: | |
2009: | EXCEPTIONS RAISED |
2010: | |
2051: --
2052: l_ReceivableApplicationId ar_receivable_applications.receivable_application_id%TYPE;
2053: BEGIN
2054: --
2055: arp_standard.debug( ' ----------------------------------------------------' );
2056: arp_standard.debug( ' Checking DR/CR balance...' );
2057: arp_standard.debug( '' );
2058: --
2059: FOR RBal IN CBal
2052: l_ReceivableApplicationId ar_receivable_applications.receivable_application_id%TYPE;
2053: BEGIN
2054: --
2055: arp_standard.debug( ' ----------------------------------------------------' );
2056: arp_standard.debug( ' Checking DR/CR balance...' );
2057: arp_standard.debug( '' );
2058: --
2059: FOR RBal IN CBal
2060: LOOP
2053: BEGIN
2054: --
2055: arp_standard.debug( ' ----------------------------------------------------' );
2056: arp_standard.debug( ' Checking DR/CR balance...' );
2057: arp_standard.debug( '' );
2058: --
2059: FOR RBal IN CBal
2060: LOOP
2061: arp_standard.debug( 'Out Of balance:'||Rbal.CurrencyCode||' BalanceId:'||RBal.BalanceId );
2057: arp_standard.debug( '' );
2058: --
2059: FOR RBal IN CBal
2060: LOOP
2061: arp_standard.debug( 'Out Of balance:'||Rbal.CurrencyCode||' BalanceId:'||RBal.BalanceId );
2062: FOR RInt IN CInt( RBal.BalanceId, Rbal.CategoryCode )
2063: LOOP
2064: IF RInt.TableName = 'AR_CASH_BASIS_DISTRIBUTIONS'
2065: THEN
2069: WHERE cbd.cash_basis_distribution_id = RInt.Id;
2070: ELSE
2071: l_ReceivableApplicationId := NULL;
2072: END IF;
2073: arp_standard.debug( RPAD( Rint.TableName, 30)||
2074: RPAD( RInt.Id, 15 )||
2075: LPAD( NVL(TO_CHAR(RInt.EnteredDr), ' '),15)||
2076: LPAD( NVL(TO_CHAR(RInt.EnteredCr), ' '),15)||
2077: LPAD( NVL(TO_CHAR(RInt.AccountedDr), ' '),15)||
2077: LPAD( NVL(TO_CHAR(RInt.AccountedDr), ' '),15)||
2078: LPAD( NVL(TO_CHAR(RInt.AccountedCr), ' '),15)||
2079: ' '||l_ReceivableApplicationId );
2080: END LOOP;
2081: arp_standard.debug( RPAD( 'SUM:', 30)||
2082: RPAD( ' ', 15 )||
2083: LPAD( NVL(TO_CHAR(RBal.SumEnteredDr), ' '),15)||
2084: LPAD( NVL(TO_CHAR(RBal.SumEnteredCr), ' '),15)||
2085: LPAD( NVL(TO_CHAR(RBal.SumAccountedDr), ' '),15)||
2083: LPAD( NVL(TO_CHAR(RBal.SumEnteredDr), ' '),15)||
2084: LPAD( NVL(TO_CHAR(RBal.SumEnteredCr), ' '),15)||
2085: LPAD( NVL(TO_CHAR(RBal.SumAccountedDr), ' '),15)||
2086: LPAD( NVL(TO_CHAR(RBal.SumAccountedCr), ' '),15) );
2087: arp_standard.debug( '--------------------------------------------------------------------------------------------------------------------' );
2088: ClearOOB( p_Report, RBal.BalanceId, RBal.CategoryCode );
2089: END LOOP;
2090: EXCEPTION
2091: WHEN OTHERS THEN
2088: ClearOOB( p_Report, RBal.BalanceId, RBal.CategoryCode );
2089: END LOOP;
2090: EXCEPTION
2091: WHEN OTHERS THEN
2092: arp_standard.debug( 'CheckBalance:' );
2093: RAISE;
2094: END;
2095: --
2096: --
2122: --
2123: EXCEPTION
2124: WHEN OTHERS THEN
2125: IF PG_DEBUG in ('Y', 'C') THEN
2126: arp_standard.debug( 'DeleteFromCBD' );
2127: END IF;
2128: RAISE;
2129: END DeleteFromCBD;
2130: --
2151: END IF;
2152: CLOSE SelColumn;
2153: EXCEPTION
2154: WHEN OTHERS THEN
2155: arp_standard.debug( 'CheckUpgradedCustomer:' );
2156: RAISE;
2157: END;
2158:
2159: --
2163: BEGIN
2164: CheckUpgradedCustomer( l_FromRel9 );
2165: IF l_FromRel9 = 'Y'
2166: THEN
2167: arp_standard.fnd_message('AR_WWS_CASH_BASIS');
2168: ELSE
2169: IF p_Report.Trade = 'Y' OR
2170: p_Report.Misc = 'Y' OR
2171: p_Report.Ccurr = 'Y' OR
2206: END IF;
2207: END IF;
2208: EXCEPTION
2209: WHEN OTHERS THEN
2210: arp_standard.debug( 'Exception:arp_cash_basis_je_report.Report( p_Report ):'||sqlerrm );
2211: RAISE_APPLICATION_ERROR( -20000, sqlerrm||'$Revision: 120.5 $:Report( p_Report ):' );
2212: END;
2213: --
2214: --
2267: --
2268: Report( l_Report );
2269: EXCEPTION
2270: WHEN OTHERS THEN
2271: arp_standard.debug( 'Exception:arp_cash_basis_je_report.Report( ... ):'||sqlerrm );
2272: RAISE_APPLICATION_ERROR( -20000, sqlerrm||'$Revision: 120.5 $:Report( ... ):' );
2273: END;
2274: --
2275: END arp_cash_basis_je_report;