[Home] [Help]
186:
187: BEGIN
188:
189: IF PG_DEBUG in ('Y', 'C') THEN
190: arp_standard.debug('Check_Entry: ' || 'ARP_RECONCILE.Reconcile_trx_br ()+ ');
191: END IF;
192:
193: --Set global variable for document being reconciled
194: g_orig_cust_trx_id := p_activity_cust_trx_id;
215: l_calling_point := 'BILL';
216: END IF;
217:
218: IF PG_DEBUG in ('Y', 'C') THEN
219: arp_standard.debug('Check_Entry: ' || 'Calling point ' || l_calling_point);
220: END IF;
221:
222: /*--------------------------------------------------------------------------+
223: | If the Transaction is not deferred then do not do any process as there is|
297: END IF; --payment schedule is closed
298:
299: <
300: IF PG_DEBUG in ('Y', 'C') THEN
301: arp_standard.debug('Check_Entry: ' || 'ARP_RECONCILE.Reconcile_trx_br ()- ');
302: END IF;
303:
304: EXCEPTION
305: WHEN OTHERS THEN
303:
304: EXCEPTION
305: WHEN OTHERS THEN
306: IF PG_DEBUG in ('Y', 'C') THEN
307: arp_standard.debug('Check_Entry: ' || 'EXCEPTION OTHERS: ARP_RECONCILE.Reconcile_trx_br ');
308: END IF;
309: RAISE;
310:
311: END Reconcile_trx_br;
333:
334: BEGIN
335:
336: IF PG_DEBUG in ('Y', 'C') THEN
337: arp_standard.debug('ARP_RECONCILE.Check_Entry - Checking for deferred tax');
338: END IF;
339:
340: IF (p_type = 'TRAN') THEN
341:
354:
355: EXCEPTION
356: WHEN NO_DATA_FOUND THEN
357: IF PG_DEBUG in ('Y', 'C') THEN
358: arp_standard.debug('ARP_RECONCILE.Check_Entry - NO DEFERRED TAX');
359: END IF;
360: p_required := FALSE; --Tax is not deferred processing not required
361: WHEN OTHERS THEN
362: IF PG_DEBUG in ('Y', 'C') THEN
359: END IF;
360: p_required := FALSE; --Tax is not deferred processing not required
361: WHEN OTHERS THEN
362: IF PG_DEBUG in ('Y', 'C') THEN
363: arp_standard.debug('EXCEPTION OTHERS: ARP_RECONCILE.Check_Entry - Transaction check ');
364: END IF;
365: RAISE;
366: END; --deferred tax processing required for Transactions
367:
374: p_required := TRUE; --Enable processing this should never happen
375: END IF;
376:
377: IF PG_DEBUG in ('Y', 'C') THEN
378: arp_standard.debug('ARP_RECONCILE.Check_Entry - DEFERRED TAX');
379: END IF;
380:
381: EXCEPTION
382: WHEN NO_DATA_FOUND THEN
380:
381: EXCEPTION
382: WHEN NO_DATA_FOUND THEN
383: IF PG_DEBUG in ('Y', 'C') THEN
384: arp_standard.debug('EXCEPTION NO_DATA_FOUND: ARP_RECONCILE.Check_Entry ');
385: END IF;
386: RAISE;
387: WHEN OTHERS THEN
388: IF PG_DEBUG in ('Y', 'C') THEN
385: END IF;
386: RAISE;
387: WHEN OTHERS THEN
388: IF PG_DEBUG in ('Y', 'C') THEN
389: arp_standard.debug('EXCEPTION OTHERS: ARP_RECONCILE.Check_Entry ');
390: END IF;
391: RAISE;
392: END Check_Entry;
393:
454:
455: BEGIN
456:
457: IF PG_DEBUG in ('Y', 'C') THEN
458: arp_standard.debug('ARP_RECONCILE.Reverse_Reconcile_Entry()+ ');
459: arp_standard.debug('Reverse_Reconcile_entry: ' || 'p_customer_trx_id ' || p_customer_trx_id);
460: arp_standard.debug('Reverse_Reconcile_entry: ' || 'p_calling_point ' || p_calling_point);
461: END IF;
462:
455: BEGIN
456:
457: IF PG_DEBUG in ('Y', 'C') THEN
458: arp_standard.debug('ARP_RECONCILE.Reverse_Reconcile_Entry()+ ');
459: arp_standard.debug('Reverse_Reconcile_entry: ' || 'p_customer_trx_id ' || p_customer_trx_id);
460: arp_standard.debug('Reverse_Reconcile_entry: ' || 'p_calling_point ' || p_calling_point);
461: END IF;
462:
463: IF p_calling_point IN ('TRAN', 'BLTR') THEN
456:
457: IF PG_DEBUG in ('Y', 'C') THEN
458: arp_standard.debug('ARP_RECONCILE.Reverse_Reconcile_Entry()+ ');
459: arp_standard.debug('Reverse_Reconcile_entry: ' || 'p_customer_trx_id ' || p_customer_trx_id);
460: arp_standard.debug('Reverse_Reconcile_entry: ' || 'p_calling_point ' || p_calling_point);
461: END IF;
462:
463: IF p_calling_point IN ('TRAN', 'BLTR') THEN
464:
462:
463: IF p_calling_point IN ('TRAN', 'BLTR') THEN
464:
465: IF PG_DEBUG in ('Y', 'C') THEN
466: arp_standard.debug('Reverse_Reconcile_entry: ' || 'Calling get_recon_acct for 1 -' || p_calling_point);
467: END IF;
468:
469: --get reconciliation entries customer trx line id, tax code, account
470: get_recon_acct( p_mode => p_mode ,
482:
483: ELSE
484:
485: IF PG_DEBUG in ('Y', 'C') THEN
486: arp_standard.debug('Reverse_Reconcile_entry: ' || 'Calling get_recon_acct for 2 -' || p_calling_point);
487: END IF;
488:
489: --Loop assignment times
490: FOR l_assign_rec IN get_assignments(p_customer_trx_id) LOOP
489: --Loop assignment times
490: FOR l_assign_rec IN get_assignments(p_customer_trx_id) LOOP
491:
492: IF PG_DEBUG in ('Y', 'C') THEN
493: arp_standard.debug('Reverse_Reconcile_entry: ' || 'l_assign_rec.drawee_site_use_id ' || l_assign_rec.drawee_site_use_id);
494: END IF;
495:
496: --If assignment is a bill then Recursive call
497: IF l_assign_rec.drawee_site_use_id IS NOT NULL THEN
496: --If assignment is a bill then Recursive call
497: IF l_assign_rec.drawee_site_use_id IS NOT NULL THEN
498:
499: IF PG_DEBUG in ('Y', 'C') THEN
500: arp_standard.debug('Reverse_Reconcile_entry: ' || 'Recursive call for l_assign_rec.br_ref_customer_trx_id ' || l_assign_rec.br_ref_customer_trx_id);
501: END IF;
502: Reverse_Reconcile_entry(
503: p_mode => p_mode ,
504: p_ae_doc_rec => p_ae_doc_rec ,
539:
540: END IF; --drawee site is null
541:
542: IF PG_DEBUG in ('Y', 'C') THEN
543: arp_standard.debug('ARP_RECONCILE.Reverse_Reconcile_Entry()- ');
544: END IF;
545:
546: EXCEPTION
547: WHEN NO_DATA_FOUND THEN
545:
546: EXCEPTION
547: WHEN NO_DATA_FOUND THEN
548: IF PG_DEBUG in ('Y', 'C') THEN
549: arp_standard.debug('EXCEPTION NO_DATA_FOUND: ARP_RECONCILE.Reverse_Reconcile_entry ');
550: END IF;
551: RAISE;
552: WHEN OTHERS THEN
553: IF PG_DEBUG in ('Y', 'C') THEN
550: END IF;
551: RAISE;
552: WHEN OTHERS THEN
553: IF PG_DEBUG in ('Y', 'C') THEN
554: arp_standard.debug('Reverse_Reconcile_entry: ' || SQLERRM);
555: arp_standard.debug('EXCEPTION OTHERS: ARP_RECONCILE.Reverse_Reconcile_entry ');
556: END IF;
557: RAISE;
558:
551: RAISE;
552: WHEN OTHERS THEN
553: IF PG_DEBUG in ('Y', 'C') THEN
554: arp_standard.debug('Reverse_Reconcile_entry: ' || SQLERRM);
555: arp_standard.debug('EXCEPTION OTHERS: ARP_RECONCILE.Reverse_Reconcile_entry ');
556: END IF;
557: RAISE;
558:
559: END Reverse_Reconcile_entry;
858:
859: BEGIN
860:
861: IF PG_DEBUG in ('Y', 'C') THEN
862: arp_standard.debug('ARP_RECONCILE.Get_Recon_Acct()+ ');
863: arp_standard.debug('get_recon_acct: ' || 'p_customer_trx_id ' || p_customer_trx_id);
864: arp_standard.debug('get_recon_acct: ' || 'p_customer_trx_line_id ' || p_customer_trx_line_id);
865: arp_standard.debug('get_recon_acct: ' || 'p_calling_point ' || p_calling_point);
866: END IF;
859: BEGIN
860:
861: IF PG_DEBUG in ('Y', 'C') THEN
862: arp_standard.debug('ARP_RECONCILE.Get_Recon_Acct()+ ');
863: arp_standard.debug('get_recon_acct: ' || 'p_customer_trx_id ' || p_customer_trx_id);
864: arp_standard.debug('get_recon_acct: ' || 'p_customer_trx_line_id ' || p_customer_trx_line_id);
865: arp_standard.debug('get_recon_acct: ' || 'p_calling_point ' || p_calling_point);
866: END IF;
867:
860:
861: IF PG_DEBUG in ('Y', 'C') THEN
862: arp_standard.debug('ARP_RECONCILE.Get_Recon_Acct()+ ');
863: arp_standard.debug('get_recon_acct: ' || 'p_customer_trx_id ' || p_customer_trx_id);
864: arp_standard.debug('get_recon_acct: ' || 'p_customer_trx_line_id ' || p_customer_trx_line_id);
865: arp_standard.debug('get_recon_acct: ' || 'p_calling_point ' || p_calling_point);
866: END IF;
867:
868: sob_id := p_ae_sys_rec.set_of_books_id;
861: IF PG_DEBUG in ('Y', 'C') THEN
862: arp_standard.debug('ARP_RECONCILE.Get_Recon_Acct()+ ');
863: arp_standard.debug('get_recon_acct: ' || 'p_customer_trx_id ' || p_customer_trx_id);
864: arp_standard.debug('get_recon_acct: ' || 'p_customer_trx_line_id ' || p_customer_trx_line_id);
865: arp_standard.debug('get_recon_acct: ' || 'p_calling_point ' || p_calling_point);
866: END IF;
867:
868: sob_id := p_ae_sys_rec.set_of_books_id;
869: IF PG_DEBUG in ('Y', 'C') THEN
866: END IF;
867:
868: sob_id := p_ae_sys_rec.set_of_books_id;
869: IF PG_DEBUG in ('Y', 'C') THEN
870: arp_standard.debug('get_recon_acct: ' || 'set of books id = ' || to_char(sob_id));
871: END IF;
872:
873: -- Construct Select Cursor based on reporting type:
874: IF PG_DEBUG in ('Y', 'C') THEN
871: END IF;
872:
873: -- Construct Select Cursor based on reporting type:
874: IF PG_DEBUG in ('Y', 'C') THEN
875: arp_standard.debug('get_recon_acct: ' || 'selecting cursor based on reporting type');
876: END IF;
877:
878: sql_stmt := select1_stmt ||
879: select2_stmt; /* common between primary and reporting */
898: group2;
899: END IF;
900:
901: IF PG_DEBUG in ('Y', 'C') THEN
902: arp_standard.debug ('get_recon_acct: ' || 'select_stmt = ' || sql_stmt);
903: END IF;
904:
905: IF ( p_ae_sys_rec.sob_type = 'P') THEN
906: OPEN get_recon_accounting FOR sql_stmt
923:
924: --{BUG4301323
925: LOOP
926: IF PG_DEBUG in ('Y', 'C') THEN
927: arp_standard.debug('get_recon_acct: ' || 'before fetch..');
928: END IF;
929: --get reconciliation entries customer trx line id, tax code, account
930: FETCH get_recon_accounting into l_recon_rec;
931: EXIT WHEN get_recon_accounting%NOTFOUND;
930: FETCH get_recon_accounting into l_recon_rec;
931: EXIT WHEN get_recon_accounting%NOTFOUND;
932:
933: IF PG_DEBUG in ('Y', 'C') THEN
934: arp_standard.debug('get_recon_acct: ' || 'In the reverse reconciliation entries Loop ');
935: arp_standard.debug('get_recon_acct: ' || 'tax_group_code_id ' || l_recon_rec.tax_group_code_id);
936: arp_standard.debug('get_recon_acct: ' || 'tax_code_id ' || l_recon_rec.tax_code_id);
937: arp_standard.debug('get_recon_acct: ' || 'location segment id ' || l_recon_rec.location_segment_id);
938: END IF;
931: EXIT WHEN get_recon_accounting%NOTFOUND;
932:
933: IF PG_DEBUG in ('Y', 'C') THEN
934: arp_standard.debug('get_recon_acct: ' || 'In the reverse reconciliation entries Loop ');
935: arp_standard.debug('get_recon_acct: ' || 'tax_group_code_id ' || l_recon_rec.tax_group_code_id);
936: arp_standard.debug('get_recon_acct: ' || 'tax_code_id ' || l_recon_rec.tax_code_id);
937: arp_standard.debug('get_recon_acct: ' || 'location segment id ' || l_recon_rec.location_segment_id);
938: END IF;
939:
932:
933: IF PG_DEBUG in ('Y', 'C') THEN
934: arp_standard.debug('get_recon_acct: ' || 'In the reverse reconciliation entries Loop ');
935: arp_standard.debug('get_recon_acct: ' || 'tax_group_code_id ' || l_recon_rec.tax_group_code_id);
936: arp_standard.debug('get_recon_acct: ' || 'tax_code_id ' || l_recon_rec.tax_code_id);
937: arp_standard.debug('get_recon_acct: ' || 'location segment id ' || l_recon_rec.location_segment_id);
938: END IF;
939:
940: l_ae_line_rec := l_ae_empty_line_rec;
933: IF PG_DEBUG in ('Y', 'C') THEN
934: arp_standard.debug('get_recon_acct: ' || 'In the reverse reconciliation entries Loop ');
935: arp_standard.debug('get_recon_acct: ' || 'tax_group_code_id ' || l_recon_rec.tax_group_code_id);
936: arp_standard.debug('get_recon_acct: ' || 'tax_code_id ' || l_recon_rec.tax_code_id);
937: arp_standard.debug('get_recon_acct: ' || 'location segment id ' || l_recon_rec.location_segment_id);
938: END IF;
939:
940: l_ae_line_rec := l_ae_empty_line_rec;
941:
1009:
1010: END IF;
1011:
1012: IF PG_DEBUG in ('Y', 'C') THEN
1013: arp_standard.debug('ARP_RECONCILE.Get_Recon_Acct()- ');
1014: END IF;
1015:
1016: EXCEPTION
1017: WHEN OTHERS THEN
1015:
1016: EXCEPTION
1017: WHEN OTHERS THEN
1018: IF PG_DEBUG in ('Y', 'C') THEN
1019: arp_standard.debug('EXCEPTION OTHERS : ARP_RECONCILE.Get_Recon_Acct ');
1020: END IF;
1021: RAISE;
1022: END get_recon_acct;
1023:
1043:
1044: BEGIN
1045:
1046: IF PG_DEBUG in ('Y', 'C') THEN
1047: arp_standard.debug('ARP_RECONCILE.Check_all_bills_closed ()+ ');
1048: END IF;
1049:
1050: select 'N'
1051: into p_all_br_closed
1061: and ps.customer_trx_id <> g_orig_cust_trx_id
1062: );
1063:
1064: IF PG_DEBUG in ('Y', 'C') THEN
1065: arp_standard.debug('ARP_RECONCILE.Check_all_bills_closed, -set p_all_br_closed to N ');
1066: arp_standard.debug('ARP_RECONCILE.Check_all_bills_closed ()- ');
1067: END IF;
1068:
1069: EXCEPTION
1062: );
1063:
1064: IF PG_DEBUG in ('Y', 'C') THEN
1065: arp_standard.debug('ARP_RECONCILE.Check_all_bills_closed, -set p_all_br_closed to N ');
1066: arp_standard.debug('ARP_RECONCILE.Check_all_bills_closed ()- ');
1067: END IF;
1068:
1069: EXCEPTION
1070: WHEN NO_DATA_FOUND then
1068:
1069: EXCEPTION
1070: WHEN NO_DATA_FOUND then
1071: IF PG_DEBUG in ('Y', 'C') THEN
1072: arp_standard.debug('NO_DATA_FOUND : ARP_RECONCILE.Check_all_bills_closed, -set p_all_br_closed to Y ');
1073: END IF;
1074: p_all_br_closed := 'Y';
1075: WHEN OTHERS then
1076: IF PG_DEBUG in ('Y', 'C') THEN
1073: END IF;
1074: p_all_br_closed := 'Y';
1075: WHEN OTHERS then
1076: IF PG_DEBUG in ('Y', 'C') THEN
1077: arp_standard.debug('EXCEPTION OTHERS : ARP_RECONCILE.Check_all_bills_closed ');
1078: END IF;
1079: RAISE;
1080:
1081: END Check_all_bills_closed;
1186:
1187: BEGIN
1188:
1189: IF PG_DEBUG in ('Y', 'C') THEN
1190: arp_standard.debug('ARP_RECONCILE.Reconcile_Trx_Tax ()+ ');
1191: arp_standard.debug('Reconcile_trx_tax: ' || 'Input Parameters ');
1192: arp_standard.debug('Reconcile_trx_tax: ' || 'p_customer_trx_id ' || p_customer_trx_id);
1193: arp_standard.debug('Reconcile_trx_tax: ' || 'p_br_cust_trx_line_id ' || p_br_cust_trx_line_id);
1194: arp_standard.debug('Reconcile_trx_tax: ' || 'p_calling_point ' || p_calling_point);
1187: BEGIN
1188:
1189: IF PG_DEBUG in ('Y', 'C') THEN
1190: arp_standard.debug('ARP_RECONCILE.Reconcile_Trx_Tax ()+ ');
1191: arp_standard.debug('Reconcile_trx_tax: ' || 'Input Parameters ');
1192: arp_standard.debug('Reconcile_trx_tax: ' || 'p_customer_trx_id ' || p_customer_trx_id);
1193: arp_standard.debug('Reconcile_trx_tax: ' || 'p_br_cust_trx_line_id ' || p_br_cust_trx_line_id);
1194: arp_standard.debug('Reconcile_trx_tax: ' || 'p_calling_point ' || p_calling_point);
1195: END IF;
1188:
1189: IF PG_DEBUG in ('Y', 'C') THEN
1190: arp_standard.debug('ARP_RECONCILE.Reconcile_Trx_Tax ()+ ');
1191: arp_standard.debug('Reconcile_trx_tax: ' || 'Input Parameters ');
1192: arp_standard.debug('Reconcile_trx_tax: ' || 'p_customer_trx_id ' || p_customer_trx_id);
1193: arp_standard.debug('Reconcile_trx_tax: ' || 'p_br_cust_trx_line_id ' || p_br_cust_trx_line_id);
1194: arp_standard.debug('Reconcile_trx_tax: ' || 'p_calling_point ' || p_calling_point);
1195: END IF;
1196:
1189: IF PG_DEBUG in ('Y', 'C') THEN
1190: arp_standard.debug('ARP_RECONCILE.Reconcile_Trx_Tax ()+ ');
1191: arp_standard.debug('Reconcile_trx_tax: ' || 'Input Parameters ');
1192: arp_standard.debug('Reconcile_trx_tax: ' || 'p_customer_trx_id ' || p_customer_trx_id);
1193: arp_standard.debug('Reconcile_trx_tax: ' || 'p_br_cust_trx_line_id ' || p_br_cust_trx_line_id);
1194: arp_standard.debug('Reconcile_trx_tax: ' || 'p_calling_point ' || p_calling_point);
1195: END IF;
1196:
1197: /*-----------------------------------------------------------------------------+
1190: arp_standard.debug('ARP_RECONCILE.Reconcile_Trx_Tax ()+ ');
1191: arp_standard.debug('Reconcile_trx_tax: ' || 'Input Parameters ');
1192: arp_standard.debug('Reconcile_trx_tax: ' || 'p_customer_trx_id ' || p_customer_trx_id);
1193: arp_standard.debug('Reconcile_trx_tax: ' || 'p_br_cust_trx_line_id ' || p_br_cust_trx_line_id);
1194: arp_standard.debug('Reconcile_trx_tax: ' || 'p_calling_point ' || p_calling_point);
1195: END IF;
1196:
1197: /*-----------------------------------------------------------------------------+
1198: | All chained Bills containing the current transaction assignment must be |
1233: +-----------------------------------------------------------------------------------------*/
1234: BEGIN
1235:
1236: IF PG_DEBUG in ('Y', 'C') THEN
1237: arp_standard.debug('Reconcile_trx_tax: ' || 'Check CM applications for deferred tax reconciliation ()+ ');
1238: END IF;
1239:
1240: l_cm_amt := 0; l_cm_acctd_amt := 0; l_cm_line_amt := 0;
1241: l_cm_tax_amt := 0; l_cm_frt_amt := 0; l_cm_chrg_amt := 0;
1260:
1261: IF ((l_cm_amt <> 0) OR (l_cm_acctd_amt <> 0) OR (l_cm_line_amt <> 0)
1262: OR (l_cm_tax_amt <> 0) OR (l_cm_frt_amt <> 0) OR (l_cm_chrg_amt <> 0)) THEN
1263: IF PG_DEBUG in ('Y', 'C') THEN
1264: arp_standard.debug('Reconcile_trx_tax: ' || 'Sum of CM applications to Transaction is not zero - simulate activity');
1265: END IF;
1266: l_simul_activity := 'Y';
1267: ELSE
1268: IF PG_DEBUG in ('Y', 'C') THEN
1265: END IF;
1266: l_simul_activity := 'Y';
1267: ELSE
1268: IF PG_DEBUG in ('Y', 'C') THEN
1269: arp_standard.debug('Reconcile_trx_tax: ' || 'Sum of CM applications is zero or no applications - do not simulate activity ');
1270: END IF;
1271: l_simul_activity := 'N';
1272: END IF;
1273:
1271: l_simul_activity := 'N';
1272: END IF;
1273:
1274: IF PG_DEBUG in ('Y', 'C') THEN
1275: arp_standard.debug('Reconcile_trx_tax: ' || 'Check CM applications for deferred tax reconciliation ()- ');
1276: END IF;
1277:
1278: EXCEPTION
1279: WHEN NO_DATA_FOUND THEN
1277:
1278: EXCEPTION
1279: WHEN NO_DATA_FOUND THEN
1280: IF PG_DEBUG in ('Y', 'C') THEN
1281: arp_standard.debug('NO_DATA_FOUND : ARP_RECONCILE.Reconcile_trx_tax, CM applications do not exist ');
1282: END IF;
1283: l_simul_activity := 'N';
1284: IF PG_DEBUG in ('Y', 'C') THEN
1285: arp_standard.debug('Reconcile_trx_tax: ' || 'set l_simul_activity ' || l_simul_activity);
1281: arp_standard.debug('NO_DATA_FOUND : ARP_RECONCILE.Reconcile_trx_tax, CM applications do not exist ');
1282: END IF;
1283: l_simul_activity := 'N';
1284: IF PG_DEBUG in ('Y', 'C') THEN
1285: arp_standard.debug('Reconcile_trx_tax: ' || 'set l_simul_activity ' || l_simul_activity);
1286: END IF;
1287: WHEN OTHERS THEN
1288: IF PG_DEBUG in ('Y', 'C') THEN
1289: arp_standard.debug('EXCEPTION OTHERS : ARP_RECONCILE.Reconcile_trx_tax, in CM check applications sum');
1285: arp_standard.debug('Reconcile_trx_tax: ' || 'set l_simul_activity ' || l_simul_activity);
1286: END IF;
1287: WHEN OTHERS THEN
1288: IF PG_DEBUG in ('Y', 'C') THEN
1289: arp_standard.debug('EXCEPTION OTHERS : ARP_RECONCILE.Reconcile_trx_tax, in CM check applications sum');
1290: END IF;
1291: RAISE;
1292:
1293: END; --block to determine CM activity on transaction
1304: IF (l_simul_activity = 'N') AND (p_pay_class = 'CM') THEN
1305: BEGIN
1306:
1307: IF PG_DEBUG in ('Y', 'C') THEN
1308: arp_standard.debug('Reconcile_trx_tax: ' || 'Check applications from CM to Transactions ()+ ');
1309: END IF;
1310:
1311: l_cm_amt := 0; l_cm_acctd_amt := 0; l_cm_line_amt := 0;
1312: l_cm_tax_amt := 0; l_cm_frt_amt := 0; l_cm_chrg_amt := 0;
1331:
1332: IF ((l_cm_amt <> 0) OR (l_cm_acctd_amt <> 0) OR (l_cm_line_amt <> 0)
1333: OR (l_cm_tax_amt <> 0) OR (l_cm_frt_amt <> 0) OR (l_cm_chrg_amt <> 0)) THEN
1334: IF PG_DEBUG in ('Y', 'C') THEN
1335: arp_standard.debug('Reconcile_trx_tax: ' || 'Applications from CM to Transaction are not zero - simulate activity');
1336: END IF;
1337: l_simul_activity := 'Y';
1338: ELSE
1339: IF PG_DEBUG in ('Y', 'C') THEN
1336: END IF;
1337: l_simul_activity := 'Y';
1338: ELSE
1339: IF PG_DEBUG in ('Y', 'C') THEN
1340: arp_standard.debug('Reconcile_trx_tax: ' || 'Applications from CM to Transaction are zero - do not simulate activity ');
1341: END IF;
1342: l_simul_activity := 'N';
1343: END IF;
1344:
1342: l_simul_activity := 'N';
1343: END IF;
1344:
1345: IF PG_DEBUG in ('Y', 'C') THEN
1346: arp_standard.debug('Reconcile_trx_tax: ' || 'Check applications from CM to Transactions ()- ');
1347: END IF;
1348:
1349: EXCEPTION
1350: WHEN NO_DATA_FOUND THEN
1348:
1349: EXCEPTION
1350: WHEN NO_DATA_FOUND THEN
1351: IF PG_DEBUG in ('Y', 'C') THEN
1352: arp_standard.debug('NO_DATA_FOUND : ARP_RECONCILE.Reconcile_trx_tax, Applications from CM ' ||
1353: 'to Transaction do not exist ');
1354: END IF;
1355: l_simul_activity := 'N';
1356: IF PG_DEBUG in ('Y', 'C') THEN
1353: 'to Transaction do not exist ');
1354: END IF;
1355: l_simul_activity := 'N';
1356: IF PG_DEBUG in ('Y', 'C') THEN
1357: arp_standard.debug('Reconcile_trx_tax: ' || 'set l_simul_activity ' || l_simul_activity);
1358: END IF;
1359: WHEN OTHERS THEN
1360: IF PG_DEBUG in ('Y', 'C') THEN
1361: arp_standard.debug('EXCEPTION OTHERS : ARP_RECONCILE.Reconcile_trx_tax, in CM applications ' ||
1357: arp_standard.debug('Reconcile_trx_tax: ' || 'set l_simul_activity ' || l_simul_activity);
1358: END IF;
1359: WHEN OTHERS THEN
1360: IF PG_DEBUG in ('Y', 'C') THEN
1361: arp_standard.debug('EXCEPTION OTHERS : ARP_RECONCILE.Reconcile_trx_tax, in CM applications ' ||
1362: 'from CM to Transaction');
1363: END IF;
1364: RAISE;
1365:
1369: /*--------------------------------------------------------------------+
1370: |Cache the payment schedule details into the table if already cached |
1371: +--------------------------------------------------------------------*/
1372: IF PG_DEBUG in ('Y', 'C') THEN
1373: arp_standard.debug('Reconcile_trx_tax: ' || 'Processing Non CM activity ');
1374: END IF;
1375:
1376: IF (l_simul_activity = 'Y') THEN
1377:
1375:
1376: IF (l_simul_activity = 'Y') THEN
1377:
1378: IF PG_DEBUG in ('Y', 'C') THEN
1379: arp_standard.debug('Reconcile_trx_tax: ' || 'l_simul_activity ' || l_simul_activity);
1380: END IF;
1381:
1382: FOR l_activity IN get_single_activity LOOP
1383:
1381:
1382: FOR l_activity IN get_single_activity LOOP
1383:
1384: IF PG_DEBUG in ('Y', 'C') THEN
1385: arp_standard.debug('Reconcile_trx_tax: ' || 'In loop get single activity');
1386: END IF;
1387:
1388: l_cached := FALSE;
1389:
1393:
1394: IF (l_pay_tbl(l_ctr).applied_payment_schedule_id = l_activity.payment_schedule_id)
1395: THEN
1396: IF PG_DEBUG in ('Y', 'C') THEN
1397: arp_standard.debug('Reconcile_trx_tax: ' || '5) Hit found in cache');
1398: END IF;
1399:
1400: --Set the application record buckets
1401: l_pay_tbl(l_ctr).applied_customer_trx_id := p_customer_trx_id;
1422:
1423: l_cached := TRUE;
1424:
1425: IF PG_DEBUG in ('Y', 'C') THEN
1426: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').applied_customer_trx_id = '||l_pay_tbl(l_ctr).applied_customer_trx_id);
1427: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').applied_payment_schedule_id = '||l_pay_tbl(l_ctr).applied_payment_schedule_id);
1428: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').amount_applied = '||l_pay_tbl(l_ctr).amount_applied);
1429: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').acctd_amount_applied_to = '||l_pay_tbl(l_ctr).acctd_amount_applied_to);
1430: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').line_applied = '||l_pay_tbl(l_ctr).line_applied);
1423: l_cached := TRUE;
1424:
1425: IF PG_DEBUG in ('Y', 'C') THEN
1426: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').applied_customer_trx_id = '||l_pay_tbl(l_ctr).applied_customer_trx_id);
1427: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').applied_payment_schedule_id = '||l_pay_tbl(l_ctr).applied_payment_schedule_id);
1428: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').amount_applied = '||l_pay_tbl(l_ctr).amount_applied);
1429: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').acctd_amount_applied_to = '||l_pay_tbl(l_ctr).acctd_amount_applied_to);
1430: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').line_applied = '||l_pay_tbl(l_ctr).line_applied);
1431: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').tax_applied= '||l_pay_tbl(l_ctr).tax_applied);
1424:
1425: IF PG_DEBUG in ('Y', 'C') THEN
1426: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').applied_customer_trx_id = '||l_pay_tbl(l_ctr).applied_customer_trx_id);
1427: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').applied_payment_schedule_id = '||l_pay_tbl(l_ctr).applied_payment_schedule_id);
1428: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').amount_applied = '||l_pay_tbl(l_ctr).amount_applied);
1429: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').acctd_amount_applied_to = '||l_pay_tbl(l_ctr).acctd_amount_applied_to);
1430: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').line_applied = '||l_pay_tbl(l_ctr).line_applied);
1431: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').tax_applied= '||l_pay_tbl(l_ctr).tax_applied);
1432: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').freight_applied= '||l_pay_tbl(l_ctr).freight_applied);
1425: IF PG_DEBUG in ('Y', 'C') THEN
1426: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').applied_customer_trx_id = '||l_pay_tbl(l_ctr).applied_customer_trx_id);
1427: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').applied_payment_schedule_id = '||l_pay_tbl(l_ctr).applied_payment_schedule_id);
1428: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').amount_applied = '||l_pay_tbl(l_ctr).amount_applied);
1429: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').acctd_amount_applied_to = '||l_pay_tbl(l_ctr).acctd_amount_applied_to);
1430: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').line_applied = '||l_pay_tbl(l_ctr).line_applied);
1431: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').tax_applied= '||l_pay_tbl(l_ctr).tax_applied);
1432: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').freight_applied= '||l_pay_tbl(l_ctr).freight_applied);
1433: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').receivables_charges_applied= '||l_pay_tbl(l_ctr).receivables_charges_applied);
1426: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').applied_customer_trx_id = '||l_pay_tbl(l_ctr).applied_customer_trx_id);
1427: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').applied_payment_schedule_id = '||l_pay_tbl(l_ctr).applied_payment_schedule_id);
1428: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').amount_applied = '||l_pay_tbl(l_ctr).amount_applied);
1429: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').acctd_amount_applied_to = '||l_pay_tbl(l_ctr).acctd_amount_applied_to);
1430: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').line_applied = '||l_pay_tbl(l_ctr).line_applied);
1431: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').tax_applied= '||l_pay_tbl(l_ctr).tax_applied);
1432: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').freight_applied= '||l_pay_tbl(l_ctr).freight_applied);
1433: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').receivables_charges_applied= '||l_pay_tbl(l_ctr).receivables_charges_applied);
1434: END IF;
1427: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').applied_payment_schedule_id = '||l_pay_tbl(l_ctr).applied_payment_schedule_id);
1428: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').amount_applied = '||l_pay_tbl(l_ctr).amount_applied);
1429: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').acctd_amount_applied_to = '||l_pay_tbl(l_ctr).acctd_amount_applied_to);
1430: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').line_applied = '||l_pay_tbl(l_ctr).line_applied);
1431: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').tax_applied= '||l_pay_tbl(l_ctr).tax_applied);
1432: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').freight_applied= '||l_pay_tbl(l_ctr).freight_applied);
1433: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').receivables_charges_applied= '||l_pay_tbl(l_ctr).receivables_charges_applied);
1434: END IF;
1435: END IF; --add to cache
1428: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').amount_applied = '||l_pay_tbl(l_ctr).amount_applied);
1429: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').acctd_amount_applied_to = '||l_pay_tbl(l_ctr).acctd_amount_applied_to);
1430: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').line_applied = '||l_pay_tbl(l_ctr).line_applied);
1431: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').tax_applied= '||l_pay_tbl(l_ctr).tax_applied);
1432: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').freight_applied= '||l_pay_tbl(l_ctr).freight_applied);
1433: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').receivables_charges_applied= '||l_pay_tbl(l_ctr).receivables_charges_applied);
1434: END IF;
1435: END IF; --add to cache
1436:
1429: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').acctd_amount_applied_to = '||l_pay_tbl(l_ctr).acctd_amount_applied_to);
1430: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').line_applied = '||l_pay_tbl(l_ctr).line_applied);
1431: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').tax_applied= '||l_pay_tbl(l_ctr).tax_applied);
1432: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').freight_applied= '||l_pay_tbl(l_ctr).freight_applied);
1433: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_ctr||').receivables_charges_applied= '||l_pay_tbl(l_ctr).receivables_charges_applied);
1434: END IF;
1435: END IF; --add to cache
1436:
1437: END LOOP; --process cached lines in payment table
1443: +------------------------------------------------------------------------*/
1444: IF (NOT l_cached) THEN
1445:
1446: IF PG_DEBUG in ('Y', 'C') THEN
1447: arp_standard.debug('Reconcile_trx_tax: ' || '5) Now caching');
1448: END IF;
1449:
1450: l_pay_ctr := l_pay_ctr + 1;
1451:
1461:
1462: l_cached := TRUE;
1463:
1464: IF PG_DEBUG in ('Y', 'C') THEN
1465: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').applied_customer_trx_id = '||l_pay_tbl(l_pay_ctr).applied_customer_trx_id);
1466: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').applied_payment_schedule_id = '||l_pay_tbl(l_pay_ctr).applied_payment_schedule_id);
1467: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').amount_applied = '||l_pay_tbl(l_pay_ctr).amount_applied);
1468: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').acctd_amount_applied_to = '||l_pay_tbl(l_pay_ctr).acctd_amount_applied_to);
1469: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').line_applied = '||l_pay_tbl(l_pay_ctr).line_applied);
1462: l_cached := TRUE;
1463:
1464: IF PG_DEBUG in ('Y', 'C') THEN
1465: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').applied_customer_trx_id = '||l_pay_tbl(l_pay_ctr).applied_customer_trx_id);
1466: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').applied_payment_schedule_id = '||l_pay_tbl(l_pay_ctr).applied_payment_schedule_id);
1467: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').amount_applied = '||l_pay_tbl(l_pay_ctr).amount_applied);
1468: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').acctd_amount_applied_to = '||l_pay_tbl(l_pay_ctr).acctd_amount_applied_to);
1469: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').line_applied = '||l_pay_tbl(l_pay_ctr).line_applied);
1470: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').tax_applied= '||l_pay_tbl(l_pay_ctr).tax_applied);
1463:
1464: IF PG_DEBUG in ('Y', 'C') THEN
1465: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').applied_customer_trx_id = '||l_pay_tbl(l_pay_ctr).applied_customer_trx_id);
1466: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').applied_payment_schedule_id = '||l_pay_tbl(l_pay_ctr).applied_payment_schedule_id);
1467: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').amount_applied = '||l_pay_tbl(l_pay_ctr).amount_applied);
1468: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').acctd_amount_applied_to = '||l_pay_tbl(l_pay_ctr).acctd_amount_applied_to);
1469: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').line_applied = '||l_pay_tbl(l_pay_ctr).line_applied);
1470: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').tax_applied= '||l_pay_tbl(l_pay_ctr).tax_applied);
1471: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').freight_applied= '||l_pay_tbl(l_pay_ctr).freight_applied);
1464: IF PG_DEBUG in ('Y', 'C') THEN
1465: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').applied_customer_trx_id = '||l_pay_tbl(l_pay_ctr).applied_customer_trx_id);
1466: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').applied_payment_schedule_id = '||l_pay_tbl(l_pay_ctr).applied_payment_schedule_id);
1467: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').amount_applied = '||l_pay_tbl(l_pay_ctr).amount_applied);
1468: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').acctd_amount_applied_to = '||l_pay_tbl(l_pay_ctr).acctd_amount_applied_to);
1469: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').line_applied = '||l_pay_tbl(l_pay_ctr).line_applied);
1470: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').tax_applied= '||l_pay_tbl(l_pay_ctr).tax_applied);
1471: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').freight_applied= '||l_pay_tbl(l_pay_ctr).freight_applied);
1472: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').receivables_charges_applied= '||l_pay_tbl(l_pay_ctr).receivables_charges_applied);
1465: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').applied_customer_trx_id = '||l_pay_tbl(l_pay_ctr).applied_customer_trx_id);
1466: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').applied_payment_schedule_id = '||l_pay_tbl(l_pay_ctr).applied_payment_schedule_id);
1467: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').amount_applied = '||l_pay_tbl(l_pay_ctr).amount_applied);
1468: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').acctd_amount_applied_to = '||l_pay_tbl(l_pay_ctr).acctd_amount_applied_to);
1469: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').line_applied = '||l_pay_tbl(l_pay_ctr).line_applied);
1470: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').tax_applied= '||l_pay_tbl(l_pay_ctr).tax_applied);
1471: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').freight_applied= '||l_pay_tbl(l_pay_ctr).freight_applied);
1472: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').receivables_charges_applied= '||l_pay_tbl(l_pay_ctr).receivables_charges_applied);
1473: END IF;
1466: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').applied_payment_schedule_id = '||l_pay_tbl(l_pay_ctr).applied_payment_schedule_id);
1467: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').amount_applied = '||l_pay_tbl(l_pay_ctr).amount_applied);
1468: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').acctd_amount_applied_to = '||l_pay_tbl(l_pay_ctr).acctd_amount_applied_to);
1469: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').line_applied = '||l_pay_tbl(l_pay_ctr).line_applied);
1470: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').tax_applied= '||l_pay_tbl(l_pay_ctr).tax_applied);
1471: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').freight_applied= '||l_pay_tbl(l_pay_ctr).freight_applied);
1472: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').receivables_charges_applied= '||l_pay_tbl(l_pay_ctr).receivables_charges_applied);
1473: END IF;
1474:
1467: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').amount_applied = '||l_pay_tbl(l_pay_ctr).amount_applied);
1468: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').acctd_amount_applied_to = '||l_pay_tbl(l_pay_ctr).acctd_amount_applied_to);
1469: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').line_applied = '||l_pay_tbl(l_pay_ctr).line_applied);
1470: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').tax_applied= '||l_pay_tbl(l_pay_ctr).tax_applied);
1471: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').freight_applied= '||l_pay_tbl(l_pay_ctr).freight_applied);
1472: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').receivables_charges_applied= '||l_pay_tbl(l_pay_ctr).receivables_charges_applied);
1473: END IF;
1474:
1475: END IF; --not cached
1468: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').acctd_amount_applied_to = '||l_pay_tbl(l_pay_ctr).acctd_amount_applied_to);
1469: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').line_applied = '||l_pay_tbl(l_pay_ctr).line_applied);
1470: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').tax_applied= '||l_pay_tbl(l_pay_ctr).tax_applied);
1471: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').freight_applied= '||l_pay_tbl(l_pay_ctr).freight_applied);
1472: arp_standard.debug('Reconcile_trx_tax: ' || 'l_pay_tbl('||l_pay_ctr||').receivables_charges_applied= '||l_pay_tbl(l_pay_ctr).receivables_charges_applied);
1473: END IF;
1474:
1475: END IF; --not cached
1476:
1498: p_g_ae_line_tbl => p_g_ae_line_tbl );
1499:
1500: <
1501: IF PG_DEBUG in ('Y', 'C') THEN
1502: arp_standard.debug('ARP_RECONCILE.Reconcile_trx_tax ()- ');
1503: END IF;
1504:
1505: EXCEPTION
1506: WHEN NO_DATA_FOUND THEN
1504:
1505: EXCEPTION
1506: WHEN NO_DATA_FOUND THEN
1507: IF PG_DEBUG in ('Y', 'C') THEN
1508: arp_standard.debug('EXCEPTION NO_DATA_FOUND: ARP_RECONCILE.Reconcile_trx_tax ');
1509: END IF;
1510: RAISE;
1511:
1512: WHEN OTHERS THEN
1510: RAISE;
1511:
1512: WHEN OTHERS THEN
1513: IF PG_DEBUG in ('Y', 'C') THEN
1514: arp_standard.debug('EXCEPTION OTHERS : ARP_RECONCILE.Reconcile_trx_tax ');
1515: END IF;
1516: RAISE;
1517:
1518: END Reconcile_trx_tax;
1619: l_required BOOLEAN;
1620:
1621: BEGIN
1622: IF PG_DEBUG in ('Y', 'C') THEN
1623: arp_standard.debug('ARP_RECONCILE.Reconcile_br_tax ()+');
1624: END IF;
1625:
1626: /*----------------------------------------------------------------------------------------+
1627: | All chained Bills starting from the current Bill must be closed for the Reconciliation |
1688: l_pay_tbl(l_pay_ctr).freight_applied := l_br_tbl(l_assn_ctr).br_adj_frt_amt * -1;
1689: l_pay_tbl(l_pay_ctr).receivables_charges_applied := l_br_tbl(l_assn_ctr).br_adj_chrg_amt * -1;
1690:
1691: IF PG_DEBUG in ('Y', 'C') THEN
1692: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP applied_customer_trx_id ' || l_pay_tbl(l_pay_ctr).applied_customer_trx_id);
1693: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP applied_payment_schedule_id ' || l_pay_tbl(l_pay_ctr).applied_payment_schedule_id);
1694: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP amount_applied ' || l_pay_tbl(l_pay_ctr).amount_applied);
1695: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP acctd_amount_applied_to ' || l_pay_tbl(l_pay_ctr).acctd_amount_applied_to);
1696: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP line_applied ' || l_pay_tbl(l_pay_ctr).line_applied);
1689: l_pay_tbl(l_pay_ctr).receivables_charges_applied := l_br_tbl(l_assn_ctr).br_adj_chrg_amt * -1;
1690:
1691: IF PG_DEBUG in ('Y', 'C') THEN
1692: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP applied_customer_trx_id ' || l_pay_tbl(l_pay_ctr).applied_customer_trx_id);
1693: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP applied_payment_schedule_id ' || l_pay_tbl(l_pay_ctr).applied_payment_schedule_id);
1694: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP amount_applied ' || l_pay_tbl(l_pay_ctr).amount_applied);
1695: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP acctd_amount_applied_to ' || l_pay_tbl(l_pay_ctr).acctd_amount_applied_to);
1696: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP line_applied ' || l_pay_tbl(l_pay_ctr).line_applied);
1697: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP tax_applied ' || l_pay_tbl(l_pay_ctr).tax_applied);
1690:
1691: IF PG_DEBUG in ('Y', 'C') THEN
1692: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP applied_customer_trx_id ' || l_pay_tbl(l_pay_ctr).applied_customer_trx_id);
1693: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP applied_payment_schedule_id ' || l_pay_tbl(l_pay_ctr).applied_payment_schedule_id);
1694: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP amount_applied ' || l_pay_tbl(l_pay_ctr).amount_applied);
1695: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP acctd_amount_applied_to ' || l_pay_tbl(l_pay_ctr).acctd_amount_applied_to);
1696: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP line_applied ' || l_pay_tbl(l_pay_ctr).line_applied);
1697: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP tax_applied ' || l_pay_tbl(l_pay_ctr).tax_applied);
1698: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP freight_applied ' || l_pay_tbl(l_pay_ctr).freight_applied);
1691: IF PG_DEBUG in ('Y', 'C') THEN
1692: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP applied_customer_trx_id ' || l_pay_tbl(l_pay_ctr).applied_customer_trx_id);
1693: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP applied_payment_schedule_id ' || l_pay_tbl(l_pay_ctr).applied_payment_schedule_id);
1694: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP amount_applied ' || l_pay_tbl(l_pay_ctr).amount_applied);
1695: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP acctd_amount_applied_to ' || l_pay_tbl(l_pay_ctr).acctd_amount_applied_to);
1696: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP line_applied ' || l_pay_tbl(l_pay_ctr).line_applied);
1697: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP tax_applied ' || l_pay_tbl(l_pay_ctr).tax_applied);
1698: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP freight_applied ' || l_pay_tbl(l_pay_ctr).freight_applied);
1699: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP receivables_charges_applied ' || l_pay_tbl(l_pay_ctr).receivables_charges_applied);
1692: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP applied_customer_trx_id ' || l_pay_tbl(l_pay_ctr).applied_customer_trx_id);
1693: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP applied_payment_schedule_id ' || l_pay_tbl(l_pay_ctr).applied_payment_schedule_id);
1694: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP amount_applied ' || l_pay_tbl(l_pay_ctr).amount_applied);
1695: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP acctd_amount_applied_to ' || l_pay_tbl(l_pay_ctr).acctd_amount_applied_to);
1696: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP line_applied ' || l_pay_tbl(l_pay_ctr).line_applied);
1697: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP tax_applied ' || l_pay_tbl(l_pay_ctr).tax_applied);
1698: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP freight_applied ' || l_pay_tbl(l_pay_ctr).freight_applied);
1699: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP receivables_charges_applied ' || l_pay_tbl(l_pay_ctr).receivables_charges_applied);
1700: arp_standard.debug('Reconcile_br_tax: ' || 'Drawee Site Id ' || l_br_tbl(l_assn_ctr).drawee_site_use_id);
1693: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP applied_payment_schedule_id ' || l_pay_tbl(l_pay_ctr).applied_payment_schedule_id);
1694: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP amount_applied ' || l_pay_tbl(l_pay_ctr).amount_applied);
1695: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP acctd_amount_applied_to ' || l_pay_tbl(l_pay_ctr).acctd_amount_applied_to);
1696: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP line_applied ' || l_pay_tbl(l_pay_ctr).line_applied);
1697: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP tax_applied ' || l_pay_tbl(l_pay_ctr).tax_applied);
1698: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP freight_applied ' || l_pay_tbl(l_pay_ctr).freight_applied);
1699: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP receivables_charges_applied ' || l_pay_tbl(l_pay_ctr).receivables_charges_applied);
1700: arp_standard.debug('Reconcile_br_tax: ' || 'Drawee Site Id ' || l_br_tbl(l_assn_ctr).drawee_site_use_id);
1701: END IF;
1694: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP amount_applied ' || l_pay_tbl(l_pay_ctr).amount_applied);
1695: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP acctd_amount_applied_to ' || l_pay_tbl(l_pay_ctr).acctd_amount_applied_to);
1696: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP line_applied ' || l_pay_tbl(l_pay_ctr).line_applied);
1697: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP tax_applied ' || l_pay_tbl(l_pay_ctr).tax_applied);
1698: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP freight_applied ' || l_pay_tbl(l_pay_ctr).freight_applied);
1699: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP receivables_charges_applied ' || l_pay_tbl(l_pay_ctr).receivables_charges_applied);
1700: arp_standard.debug('Reconcile_br_tax: ' || 'Drawee Site Id ' || l_br_tbl(l_assn_ctr).drawee_site_use_id);
1701: END IF;
1702:
1695: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP acctd_amount_applied_to ' || l_pay_tbl(l_pay_ctr).acctd_amount_applied_to);
1696: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP line_applied ' || l_pay_tbl(l_pay_ctr).line_applied);
1697: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP tax_applied ' || l_pay_tbl(l_pay_ctr).tax_applied);
1698: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP freight_applied ' || l_pay_tbl(l_pay_ctr).freight_applied);
1699: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP receivables_charges_applied ' || l_pay_tbl(l_pay_ctr).receivables_charges_applied);
1700: arp_standard.debug('Reconcile_br_tax: ' || 'Drawee Site Id ' || l_br_tbl(l_assn_ctr).drawee_site_use_id);
1701: END IF;
1702:
1703: /*--------------------------------------------------------------------------+
1696: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP line_applied ' || l_pay_tbl(l_pay_ctr).line_applied);
1697: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP tax_applied ' || l_pay_tbl(l_pay_ctr).tax_applied);
1698: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP freight_applied ' || l_pay_tbl(l_pay_ctr).freight_applied);
1699: arp_standard.debug('Reconcile_br_tax: ' || 'l_pay_tbl APP receivables_charges_applied ' || l_pay_tbl(l_pay_ctr).receivables_charges_applied);
1700: arp_standard.debug('Reconcile_br_tax: ' || 'Drawee Site Id ' || l_br_tbl(l_assn_ctr).drawee_site_use_id);
1701: END IF;
1702:
1703: /*--------------------------------------------------------------------------+
1704: | Recursive call required because current assignment is a bill of exchange.|
1794:
1795: END IF; --All chained bills are closed
1796:
1797: IF PG_DEBUG in ('Y', 'C') THEN
1798: arp_standard.debug('ARP_RECONCILE.Reconcile_br_tax ()-');
1799: END IF;
1800:
1801: EXCEPTION
1802: WHEN NO_DATA_FOUND THEN
1800:
1801: EXCEPTION
1802: WHEN NO_DATA_FOUND THEN
1803: IF PG_DEBUG in ('Y', 'C') THEN
1804: arp_standard.debug('EXCEPTION NO_DATA_FOUND : ARP_RECONCILE.Reconcile_br_tax ');
1805: END IF;
1806: RAISE;
1807:
1808: WHEN OTHERS THEN
1806: RAISE;
1807:
1808: WHEN OTHERS THEN
1809: IF PG_DEBUG in ('Y', 'C') THEN
1810: arp_standard.debug('EXCEPTION OTHERS : ARP_RECONCILE.Reconcile_br_tax ');
1811: END IF;
1812: RAISE;
1813:
1814: END Reconcile_br_tax;
1853: l_pay_sched_upd_yn VARCHAR2(1);
1854:
1855: BEGIN
1856: IF PG_DEBUG in ('Y', 'C') THEN
1857: arp_standard.debug('ARP_RECONCILE.Detect_Closure()+');
1858: END IF;
1859:
1860: /*---------------------------------------------------------------------------+
1861: | Retrieve amount and accounted amount remaining for all installments on the|
1872: from ar_payment_schedules pay
1873: where pay.customer_trx_id = p_customer_trx_id;
1874: END IF;
1875: IF PG_DEBUG in ('Y', 'C') THEN
1876: arp_standard.debug('Detect_Closure: ' || 'p_customer_trx_id ' || p_customer_trx_id);
1877: arp_standard.debug('Detect_Closure: ' || 'pay_class ' || p_pay_class);
1878: arp_standard.debug('Detect_Closure: ' || 'p_pay_sched_upd_yn ' || p_pay_sched_upd_yn);
1879: arp_standard.debug('Detect_Closure: ' || 'p_pay_sched_upd_cm_yn ' || p_pay_sched_upd_cm_yn);
1880: arp_standard.debug('Detect_Closure: ' || 'g_call_num ' || g_call_num);
1873: where pay.customer_trx_id = p_customer_trx_id;
1874: END IF;
1875: IF PG_DEBUG in ('Y', 'C') THEN
1876: arp_standard.debug('Detect_Closure: ' || 'p_customer_trx_id ' || p_customer_trx_id);
1877: arp_standard.debug('Detect_Closure: ' || 'pay_class ' || p_pay_class);
1878: arp_standard.debug('Detect_Closure: ' || 'p_pay_sched_upd_yn ' || p_pay_sched_upd_yn);
1879: arp_standard.debug('Detect_Closure: ' || 'p_pay_sched_upd_cm_yn ' || p_pay_sched_upd_cm_yn);
1880: arp_standard.debug('Detect_Closure: ' || 'g_call_num ' || g_call_num);
1881: arp_standard.debug('Detect_Closure: ' || 'Parameter p_activity_amt ' || p_activity_amt);
1874: END IF;
1875: IF PG_DEBUG in ('Y', 'C') THEN
1876: arp_standard.debug('Detect_Closure: ' || 'p_customer_trx_id ' || p_customer_trx_id);
1877: arp_standard.debug('Detect_Closure: ' || 'pay_class ' || p_pay_class);
1878: arp_standard.debug('Detect_Closure: ' || 'p_pay_sched_upd_yn ' || p_pay_sched_upd_yn);
1879: arp_standard.debug('Detect_Closure: ' || 'p_pay_sched_upd_cm_yn ' || p_pay_sched_upd_cm_yn);
1880: arp_standard.debug('Detect_Closure: ' || 'g_call_num ' || g_call_num);
1881: arp_standard.debug('Detect_Closure: ' || 'Parameter p_activity_amt ' || p_activity_amt);
1882: arp_standard.debug('Detect_Closure: ' || 'Parameter p_activity_acctd_amt ' || p_activity_acctd_amt);
1875: IF PG_DEBUG in ('Y', 'C') THEN
1876: arp_standard.debug('Detect_Closure: ' || 'p_customer_trx_id ' || p_customer_trx_id);
1877: arp_standard.debug('Detect_Closure: ' || 'pay_class ' || p_pay_class);
1878: arp_standard.debug('Detect_Closure: ' || 'p_pay_sched_upd_yn ' || p_pay_sched_upd_yn);
1879: arp_standard.debug('Detect_Closure: ' || 'p_pay_sched_upd_cm_yn ' || p_pay_sched_upd_cm_yn);
1880: arp_standard.debug('Detect_Closure: ' || 'g_call_num ' || g_call_num);
1881: arp_standard.debug('Detect_Closure: ' || 'Parameter p_activity_amt ' || p_activity_amt);
1882: arp_standard.debug('Detect_Closure: ' || 'Parameter p_activity_acctd_amt ' || p_activity_acctd_amt);
1883: arp_standard.debug('Detect_Closure: ' || 'Selected pay l_amount_due_remaining ' || l_amount_due_remaining);
1876: arp_standard.debug('Detect_Closure: ' || 'p_customer_trx_id ' || p_customer_trx_id);
1877: arp_standard.debug('Detect_Closure: ' || 'pay_class ' || p_pay_class);
1878: arp_standard.debug('Detect_Closure: ' || 'p_pay_sched_upd_yn ' || p_pay_sched_upd_yn);
1879: arp_standard.debug('Detect_Closure: ' || 'p_pay_sched_upd_cm_yn ' || p_pay_sched_upd_cm_yn);
1880: arp_standard.debug('Detect_Closure: ' || 'g_call_num ' || g_call_num);
1881: arp_standard.debug('Detect_Closure: ' || 'Parameter p_activity_amt ' || p_activity_amt);
1882: arp_standard.debug('Detect_Closure: ' || 'Parameter p_activity_acctd_amt ' || p_activity_acctd_amt);
1883: arp_standard.debug('Detect_Closure: ' || 'Selected pay l_amount_due_remaining ' || l_amount_due_remaining);
1884: arp_standard.debug('Detect_Closure: ' || 'Selected pay l_acctd_amount_due_remaining ' || l_acctd_amount_due_remaining);
1877: arp_standard.debug('Detect_Closure: ' || 'pay_class ' || p_pay_class);
1878: arp_standard.debug('Detect_Closure: ' || 'p_pay_sched_upd_yn ' || p_pay_sched_upd_yn);
1879: arp_standard.debug('Detect_Closure: ' || 'p_pay_sched_upd_cm_yn ' || p_pay_sched_upd_cm_yn);
1880: arp_standard.debug('Detect_Closure: ' || 'g_call_num ' || g_call_num);
1881: arp_standard.debug('Detect_Closure: ' || 'Parameter p_activity_amt ' || p_activity_amt);
1882: arp_standard.debug('Detect_Closure: ' || 'Parameter p_activity_acctd_amt ' || p_activity_acctd_amt);
1883: arp_standard.debug('Detect_Closure: ' || 'Selected pay l_amount_due_remaining ' || l_amount_due_remaining);
1884: arp_standard.debug('Detect_Closure: ' || 'Selected pay l_acctd_amount_due_remaining ' || l_acctd_amount_due_remaining);
1885: END IF;
1878: arp_standard.debug('Detect_Closure: ' || 'p_pay_sched_upd_yn ' || p_pay_sched_upd_yn);
1879: arp_standard.debug('Detect_Closure: ' || 'p_pay_sched_upd_cm_yn ' || p_pay_sched_upd_cm_yn);
1880: arp_standard.debug('Detect_Closure: ' || 'g_call_num ' || g_call_num);
1881: arp_standard.debug('Detect_Closure: ' || 'Parameter p_activity_amt ' || p_activity_amt);
1882: arp_standard.debug('Detect_Closure: ' || 'Parameter p_activity_acctd_amt ' || p_activity_acctd_amt);
1883: arp_standard.debug('Detect_Closure: ' || 'Selected pay l_amount_due_remaining ' || l_amount_due_remaining);
1884: arp_standard.debug('Detect_Closure: ' || 'Selected pay l_acctd_amount_due_remaining ' || l_acctd_amount_due_remaining);
1885: END IF;
1886:
1879: arp_standard.debug('Detect_Closure: ' || 'p_pay_sched_upd_cm_yn ' || p_pay_sched_upd_cm_yn);
1880: arp_standard.debug('Detect_Closure: ' || 'g_call_num ' || g_call_num);
1881: arp_standard.debug('Detect_Closure: ' || 'Parameter p_activity_amt ' || p_activity_amt);
1882: arp_standard.debug('Detect_Closure: ' || 'Parameter p_activity_acctd_amt ' || p_activity_acctd_amt);
1883: arp_standard.debug('Detect_Closure: ' || 'Selected pay l_amount_due_remaining ' || l_amount_due_remaining);
1884: arp_standard.debug('Detect_Closure: ' || 'Selected pay l_acctd_amount_due_remaining ' || l_acctd_amount_due_remaining);
1885: END IF;
1886:
1887: --Set the payment schedule updated flag
1880: arp_standard.debug('Detect_Closure: ' || 'g_call_num ' || g_call_num);
1881: arp_standard.debug('Detect_Closure: ' || 'Parameter p_activity_amt ' || p_activity_amt);
1882: arp_standard.debug('Detect_Closure: ' || 'Parameter p_activity_acctd_amt ' || p_activity_acctd_amt);
1883: arp_standard.debug('Detect_Closure: ' || 'Selected pay l_amount_due_remaining ' || l_amount_due_remaining);
1884: arp_standard.debug('Detect_Closure: ' || 'Selected pay l_acctd_amount_due_remaining ' || l_acctd_amount_due_remaining);
1885: END IF;
1886:
1887: --Set the payment schedule updated flag
1888: IF (p_pay_class = 'CM') AND (g_call_num = 2) AND (p_pay_sched_upd_cm_yn IS NOT NULL) THEN
1900: l_acctd_amount_due_remaining := l_acctd_amount_due_remaining +
1901: p_activity_acctd_amt;
1902:
1903: IF PG_DEBUG in ('Y', 'C') THEN
1904: arp_standard.debug('Detect_Closure: ' || 'Payment schedule not updated hence calculating remaining amounts ');
1905: arp_standard.debug('Detect_Closure: ' || 'l_amount_due_remaining + p_activity_amt ' || l_amount_due_remaining);
1906: arp_standard.debug('Detect_Closure: ' || 'l_acctd_amount_due_remaining + p_activity_acctd_amt ' || l_acctd_amount_due_remaining);
1907: END IF;
1908: END IF;
1901: p_activity_acctd_amt;
1902:
1903: IF PG_DEBUG in ('Y', 'C') THEN
1904: arp_standard.debug('Detect_Closure: ' || 'Payment schedule not updated hence calculating remaining amounts ');
1905: arp_standard.debug('Detect_Closure: ' || 'l_amount_due_remaining + p_activity_amt ' || l_amount_due_remaining);
1906: arp_standard.debug('Detect_Closure: ' || 'l_acctd_amount_due_remaining + p_activity_acctd_amt ' || l_acctd_amount_due_remaining);
1907: END IF;
1908: END IF;
1909:
1902:
1903: IF PG_DEBUG in ('Y', 'C') THEN
1904: arp_standard.debug('Detect_Closure: ' || 'Payment schedule not updated hence calculating remaining amounts ');
1905: arp_standard.debug('Detect_Closure: ' || 'l_amount_due_remaining + p_activity_amt ' || l_amount_due_remaining);
1906: arp_standard.debug('Detect_Closure: ' || 'l_acctd_amount_due_remaining + p_activity_acctd_amt ' || l_acctd_amount_due_remaining);
1907: END IF;
1908: END IF;
1909:
1910: /*---------------------------------------------------------------------+
1914:
1915: IF ((l_amount_due_remaining + l_acctd_amount_due_remaining) <> 0) THEN
1916: p_closed_pymt_yn := 'N'; --paymentschedule is not closed so do not call reconciliation routine
1917: IF PG_DEBUG in ('Y', 'C') THEN
1918: arp_standard.debug('Detect_Closure: ' || 'Transaction ' || p_customer_trx_id || ' payment schedule is not closed - do not reconcile ');
1919: END IF;
1920: ELSE
1921: p_closed_pymt_yn := 'Y';
1922: IF PG_DEBUG in ('Y', 'C') THEN
1919: END IF;
1920: ELSE
1921: p_closed_pymt_yn := 'Y';
1922: IF PG_DEBUG in ('Y', 'C') THEN
1923: arp_standard.debug('Detect_Closure: ' || 'Transaction ' || p_customer_trx_id || ' payment schedule is closed - reconcile ');
1924: END IF;
1925: END IF;
1926:
1927: <
1926:
1927: <
1928:
1929: IF PG_DEBUG in ('Y', 'C') THEN
1930: arp_standard.debug('ARP_RECONCILE.Detect_Closure()-');
1931: END IF;
1932:
1933: EXCEPTION
1934: WHEN NO_DATA_FOUND THEN
1932:
1933: EXCEPTION
1934: WHEN NO_DATA_FOUND THEN
1935: IF PG_DEBUG in ('Y', 'C') THEN
1936: arp_standard.debug('EXCEPTION NO_DATA_FOUND : ARP_RECONCILE.Detect_Closure ');
1937: END IF;
1938: RAISE;
1939:
1940: WHEN OTHERS THEN
1938: RAISE;
1939:
1940: WHEN OTHERS THEN
1941: IF PG_DEBUG in ('Y', 'C') THEN
1942: arp_standard.debug('EXCEPTION OTHERS : ARP_RECONCILE.Detect_Closure ');
1943: END IF;
1944: RAISE;
1945:
1946: END Detect_Closure;
1962: p_g_ae_line_tbl IN OUT NOCOPY ae_line_tbl_type ) IS
1963:
1964: BEGIN
1965: IF PG_DEBUG in ('Y', 'C') THEN
1966: arp_standard.debug('ARP_RECONCILE.Assign_Elements()+');
1967: END IF;
1968:
1969: /*--------------------------------------------------------------------------------+
1970: | Do not create 0 amount Reconciliation entries if tax and taxable amounts are 0 |
2112: Dump_Line_Amts(p_ae_line_rec);
2113:
2114: <
2115: IF PG_DEBUG in ('Y', 'C') THEN
2116: arp_standard.debug( 'ARP_RECONCILE.Assign_Elements()-');
2117: END IF;
2118:
2119: EXCEPTION
2120: WHEN OTHERS THEN
2118:
2119: EXCEPTION
2120: WHEN OTHERS THEN
2121: IF PG_DEBUG in ('Y', 'C') THEN
2122: arp_standard.debug('EXCEPTION OTHERS : ARP_RECONCILE.Assign_Elements');
2123: END IF;
2124: RAISE;
2125:
2126: END Assign_Elements;
2140:
2141: BEGIN
2142:
2143: IF PG_DEBUG in ('Y', 'C') THEN
2144: arp_standard.debug('ARP_RECONCILE.Dump_Line_Amts()+');
2145: arp_standard.debug('Dump_Line_Amts: ' || 'ae_line_type = ' || p_ae_line_rec.ae_line_type);
2146: arp_standard.debug('Dump_Line_Amts: ' || 'ae_line_type_secondary = ' || p_ae_line_rec.ae_line_type_secondary);
2147: arp_standard.debug('Dump_Line_Amts: ' || 'source_id = ' || p_ae_line_rec.source_id);
2148: arp_standard.debug('Dump_Line_Amts: ' || 'source_table = ' || p_ae_line_rec.source_table);
2141: BEGIN
2142:
2143: IF PG_DEBUG in ('Y', 'C') THEN
2144: arp_standard.debug('ARP_RECONCILE.Dump_Line_Amts()+');
2145: arp_standard.debug('Dump_Line_Amts: ' || 'ae_line_type = ' || p_ae_line_rec.ae_line_type);
2146: arp_standard.debug('Dump_Line_Amts: ' || 'ae_line_type_secondary = ' || p_ae_line_rec.ae_line_type_secondary);
2147: arp_standard.debug('Dump_Line_Amts: ' || 'source_id = ' || p_ae_line_rec.source_id);
2148: arp_standard.debug('Dump_Line_Amts: ' || 'source_table = ' || p_ae_line_rec.source_table);
2149: arp_standard.debug('Dump_Line_Amts: ' || 'account = ' || p_ae_line_rec.account);
2142:
2143: IF PG_DEBUG in ('Y', 'C') THEN
2144: arp_standard.debug('ARP_RECONCILE.Dump_Line_Amts()+');
2145: arp_standard.debug('Dump_Line_Amts: ' || 'ae_line_type = ' || p_ae_line_rec.ae_line_type);
2146: arp_standard.debug('Dump_Line_Amts: ' || 'ae_line_type_secondary = ' || p_ae_line_rec.ae_line_type_secondary);
2147: arp_standard.debug('Dump_Line_Amts: ' || 'source_id = ' || p_ae_line_rec.source_id);
2148: arp_standard.debug('Dump_Line_Amts: ' || 'source_table = ' || p_ae_line_rec.source_table);
2149: arp_standard.debug('Dump_Line_Amts: ' || 'account = ' || p_ae_line_rec.account);
2150: arp_standard.debug('Dump_Line_Amts: ' || 'entered_dr = ' || p_ae_line_rec.entered_dr);
2143: IF PG_DEBUG in ('Y', 'C') THEN
2144: arp_standard.debug('ARP_RECONCILE.Dump_Line_Amts()+');
2145: arp_standard.debug('Dump_Line_Amts: ' || 'ae_line_type = ' || p_ae_line_rec.ae_line_type);
2146: arp_standard.debug('Dump_Line_Amts: ' || 'ae_line_type_secondary = ' || p_ae_line_rec.ae_line_type_secondary);
2147: arp_standard.debug('Dump_Line_Amts: ' || 'source_id = ' || p_ae_line_rec.source_id);
2148: arp_standard.debug('Dump_Line_Amts: ' || 'source_table = ' || p_ae_line_rec.source_table);
2149: arp_standard.debug('Dump_Line_Amts: ' || 'account = ' || p_ae_line_rec.account);
2150: arp_standard.debug('Dump_Line_Amts: ' || 'entered_dr = ' || p_ae_line_rec.entered_dr);
2151: arp_standard.debug('Dump_Line_Amts: ' || 'entered_cr = ' || p_ae_line_rec.entered_cr);
2144: arp_standard.debug('ARP_RECONCILE.Dump_Line_Amts()+');
2145: arp_standard.debug('Dump_Line_Amts: ' || 'ae_line_type = ' || p_ae_line_rec.ae_line_type);
2146: arp_standard.debug('Dump_Line_Amts: ' || 'ae_line_type_secondary = ' || p_ae_line_rec.ae_line_type_secondary);
2147: arp_standard.debug('Dump_Line_Amts: ' || 'source_id = ' || p_ae_line_rec.source_id);
2148: arp_standard.debug('Dump_Line_Amts: ' || 'source_table = ' || p_ae_line_rec.source_table);
2149: arp_standard.debug('Dump_Line_Amts: ' || 'account = ' || p_ae_line_rec.account);
2150: arp_standard.debug('Dump_Line_Amts: ' || 'entered_dr = ' || p_ae_line_rec.entered_dr);
2151: arp_standard.debug('Dump_Line_Amts: ' || 'entered_cr = ' || p_ae_line_rec.entered_cr);
2152: arp_standard.debug('Dump_Line_Amts: ' || 'accounted_dr = ' || p_ae_line_rec.accounted_dr);
2145: arp_standard.debug('Dump_Line_Amts: ' || 'ae_line_type = ' || p_ae_line_rec.ae_line_type);
2146: arp_standard.debug('Dump_Line_Amts: ' || 'ae_line_type_secondary = ' || p_ae_line_rec.ae_line_type_secondary);
2147: arp_standard.debug('Dump_Line_Amts: ' || 'source_id = ' || p_ae_line_rec.source_id);
2148: arp_standard.debug('Dump_Line_Amts: ' || 'source_table = ' || p_ae_line_rec.source_table);
2149: arp_standard.debug('Dump_Line_Amts: ' || 'account = ' || p_ae_line_rec.account);
2150: arp_standard.debug('Dump_Line_Amts: ' || 'entered_dr = ' || p_ae_line_rec.entered_dr);
2151: arp_standard.debug('Dump_Line_Amts: ' || 'entered_cr = ' || p_ae_line_rec.entered_cr);
2152: arp_standard.debug('Dump_Line_Amts: ' || 'accounted_dr = ' || p_ae_line_rec.accounted_dr);
2153: arp_standard.debug('Dump_Line_Amts: ' || 'accounted_cr = ' || p_ae_line_rec.accounted_cr);
2146: arp_standard.debug('Dump_Line_Amts: ' || 'ae_line_type_secondary = ' || p_ae_line_rec.ae_line_type_secondary);
2147: arp_standard.debug('Dump_Line_Amts: ' || 'source_id = ' || p_ae_line_rec.source_id);
2148: arp_standard.debug('Dump_Line_Amts: ' || 'source_table = ' || p_ae_line_rec.source_table);
2149: arp_standard.debug('Dump_Line_Amts: ' || 'account = ' || p_ae_line_rec.account);
2150: arp_standard.debug('Dump_Line_Amts: ' || 'entered_dr = ' || p_ae_line_rec.entered_dr);
2151: arp_standard.debug('Dump_Line_Amts: ' || 'entered_cr = ' || p_ae_line_rec.entered_cr);
2152: arp_standard.debug('Dump_Line_Amts: ' || 'accounted_dr = ' || p_ae_line_rec.accounted_dr);
2153: arp_standard.debug('Dump_Line_Amts: ' || 'accounted_cr = ' || p_ae_line_rec.accounted_cr);
2154: arp_standard.debug('Dump_Line_Amts: ' || 'source_id_secondary = ' || p_ae_line_rec.source_id_secondary);
2147: arp_standard.debug('Dump_Line_Amts: ' || 'source_id = ' || p_ae_line_rec.source_id);
2148: arp_standard.debug('Dump_Line_Amts: ' || 'source_table = ' || p_ae_line_rec.source_table);
2149: arp_standard.debug('Dump_Line_Amts: ' || 'account = ' || p_ae_line_rec.account);
2150: arp_standard.debug('Dump_Line_Amts: ' || 'entered_dr = ' || p_ae_line_rec.entered_dr);
2151: arp_standard.debug('Dump_Line_Amts: ' || 'entered_cr = ' || p_ae_line_rec.entered_cr);
2152: arp_standard.debug('Dump_Line_Amts: ' || 'accounted_dr = ' || p_ae_line_rec.accounted_dr);
2153: arp_standard.debug('Dump_Line_Amts: ' || 'accounted_cr = ' || p_ae_line_rec.accounted_cr);
2154: arp_standard.debug('Dump_Line_Amts: ' || 'source_id_secondary = ' || p_ae_line_rec.source_id_secondary);
2155: arp_standard.debug('Dump_Line_Amts: ' || 'source_table_secondary = ' || p_ae_line_rec.source_table_secondary);
2148: arp_standard.debug('Dump_Line_Amts: ' || 'source_table = ' || p_ae_line_rec.source_table);
2149: arp_standard.debug('Dump_Line_Amts: ' || 'account = ' || p_ae_line_rec.account);
2150: arp_standard.debug('Dump_Line_Amts: ' || 'entered_dr = ' || p_ae_line_rec.entered_dr);
2151: arp_standard.debug('Dump_Line_Amts: ' || 'entered_cr = ' || p_ae_line_rec.entered_cr);
2152: arp_standard.debug('Dump_Line_Amts: ' || 'accounted_dr = ' || p_ae_line_rec.accounted_dr);
2153: arp_standard.debug('Dump_Line_Amts: ' || 'accounted_cr = ' || p_ae_line_rec.accounted_cr);
2154: arp_standard.debug('Dump_Line_Amts: ' || 'source_id_secondary = ' || p_ae_line_rec.source_id_secondary);
2155: arp_standard.debug('Dump_Line_Amts: ' || 'source_table_secondary = ' || p_ae_line_rec.source_table_secondary);
2156: arp_standard.debug('Dump_Line_Amts: ' || 'currency_code = ' || p_ae_line_rec.currency_code);
2149: arp_standard.debug('Dump_Line_Amts: ' || 'account = ' || p_ae_line_rec.account);
2150: arp_standard.debug('Dump_Line_Amts: ' || 'entered_dr = ' || p_ae_line_rec.entered_dr);
2151: arp_standard.debug('Dump_Line_Amts: ' || 'entered_cr = ' || p_ae_line_rec.entered_cr);
2152: arp_standard.debug('Dump_Line_Amts: ' || 'accounted_dr = ' || p_ae_line_rec.accounted_dr);
2153: arp_standard.debug('Dump_Line_Amts: ' || 'accounted_cr = ' || p_ae_line_rec.accounted_cr);
2154: arp_standard.debug('Dump_Line_Amts: ' || 'source_id_secondary = ' || p_ae_line_rec.source_id_secondary);
2155: arp_standard.debug('Dump_Line_Amts: ' || 'source_table_secondary = ' || p_ae_line_rec.source_table_secondary);
2156: arp_standard.debug('Dump_Line_Amts: ' || 'currency_code = ' || p_ae_line_rec.currency_code);
2157: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_rate = ' || p_ae_line_rec.currency_conversion_rate);
2150: arp_standard.debug('Dump_Line_Amts: ' || 'entered_dr = ' || p_ae_line_rec.entered_dr);
2151: arp_standard.debug('Dump_Line_Amts: ' || 'entered_cr = ' || p_ae_line_rec.entered_cr);
2152: arp_standard.debug('Dump_Line_Amts: ' || 'accounted_dr = ' || p_ae_line_rec.accounted_dr);
2153: arp_standard.debug('Dump_Line_Amts: ' || 'accounted_cr = ' || p_ae_line_rec.accounted_cr);
2154: arp_standard.debug('Dump_Line_Amts: ' || 'source_id_secondary = ' || p_ae_line_rec.source_id_secondary);
2155: arp_standard.debug('Dump_Line_Amts: ' || 'source_table_secondary = ' || p_ae_line_rec.source_table_secondary);
2156: arp_standard.debug('Dump_Line_Amts: ' || 'currency_code = ' || p_ae_line_rec.currency_code);
2157: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_rate = ' || p_ae_line_rec.currency_conversion_rate);
2158: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_type = ' || p_ae_line_rec.currency_conversion_type);
2151: arp_standard.debug('Dump_Line_Amts: ' || 'entered_cr = ' || p_ae_line_rec.entered_cr);
2152: arp_standard.debug('Dump_Line_Amts: ' || 'accounted_dr = ' || p_ae_line_rec.accounted_dr);
2153: arp_standard.debug('Dump_Line_Amts: ' || 'accounted_cr = ' || p_ae_line_rec.accounted_cr);
2154: arp_standard.debug('Dump_Line_Amts: ' || 'source_id_secondary = ' || p_ae_line_rec.source_id_secondary);
2155: arp_standard.debug('Dump_Line_Amts: ' || 'source_table_secondary = ' || p_ae_line_rec.source_table_secondary);
2156: arp_standard.debug('Dump_Line_Amts: ' || 'currency_code = ' || p_ae_line_rec.currency_code);
2157: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_rate = ' || p_ae_line_rec.currency_conversion_rate);
2158: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_type = ' || p_ae_line_rec.currency_conversion_type);
2159: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_date = ' || p_ae_line_rec.currency_conversion_date);
2152: arp_standard.debug('Dump_Line_Amts: ' || 'accounted_dr = ' || p_ae_line_rec.accounted_dr);
2153: arp_standard.debug('Dump_Line_Amts: ' || 'accounted_cr = ' || p_ae_line_rec.accounted_cr);
2154: arp_standard.debug('Dump_Line_Amts: ' || 'source_id_secondary = ' || p_ae_line_rec.source_id_secondary);
2155: arp_standard.debug('Dump_Line_Amts: ' || 'source_table_secondary = ' || p_ae_line_rec.source_table_secondary);
2156: arp_standard.debug('Dump_Line_Amts: ' || 'currency_code = ' || p_ae_line_rec.currency_code);
2157: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_rate = ' || p_ae_line_rec.currency_conversion_rate);
2158: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_type = ' || p_ae_line_rec.currency_conversion_type);
2159: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_date = ' || p_ae_line_rec.currency_conversion_date);
2160: arp_standard.debug('Dump_Line_Amts: ' || 'third_party_id = ' || p_ae_line_rec.third_party_id);
2153: arp_standard.debug('Dump_Line_Amts: ' || 'accounted_cr = ' || p_ae_line_rec.accounted_cr);
2154: arp_standard.debug('Dump_Line_Amts: ' || 'source_id_secondary = ' || p_ae_line_rec.source_id_secondary);
2155: arp_standard.debug('Dump_Line_Amts: ' || 'source_table_secondary = ' || p_ae_line_rec.source_table_secondary);
2156: arp_standard.debug('Dump_Line_Amts: ' || 'currency_code = ' || p_ae_line_rec.currency_code);
2157: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_rate = ' || p_ae_line_rec.currency_conversion_rate);
2158: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_type = ' || p_ae_line_rec.currency_conversion_type);
2159: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_date = ' || p_ae_line_rec.currency_conversion_date);
2160: arp_standard.debug('Dump_Line_Amts: ' || 'third_party_id = ' || p_ae_line_rec.third_party_id);
2161: arp_standard.debug('Dump_Line_Amts: ' || 'third_party_sub_id = ' || p_ae_line_rec.third_party_sub_id);
2154: arp_standard.debug('Dump_Line_Amts: ' || 'source_id_secondary = ' || p_ae_line_rec.source_id_secondary);
2155: arp_standard.debug('Dump_Line_Amts: ' || 'source_table_secondary = ' || p_ae_line_rec.source_table_secondary);
2156: arp_standard.debug('Dump_Line_Amts: ' || 'currency_code = ' || p_ae_line_rec.currency_code);
2157: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_rate = ' || p_ae_line_rec.currency_conversion_rate);
2158: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_type = ' || p_ae_line_rec.currency_conversion_type);
2159: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_date = ' || p_ae_line_rec.currency_conversion_date);
2160: arp_standard.debug('Dump_Line_Amts: ' || 'third_party_id = ' || p_ae_line_rec.third_party_id);
2161: arp_standard.debug('Dump_Line_Amts: ' || 'third_party_sub_id = ' || p_ae_line_rec.third_party_sub_id);
2162: arp_standard.debug('Dump_Line_Amts: ' || 'tax_group_code_id = ' || p_ae_line_rec.tax_group_code_id);
2155: arp_standard.debug('Dump_Line_Amts: ' || 'source_table_secondary = ' || p_ae_line_rec.source_table_secondary);
2156: arp_standard.debug('Dump_Line_Amts: ' || 'currency_code = ' || p_ae_line_rec.currency_code);
2157: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_rate = ' || p_ae_line_rec.currency_conversion_rate);
2158: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_type = ' || p_ae_line_rec.currency_conversion_type);
2159: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_date = ' || p_ae_line_rec.currency_conversion_date);
2160: arp_standard.debug('Dump_Line_Amts: ' || 'third_party_id = ' || p_ae_line_rec.third_party_id);
2161: arp_standard.debug('Dump_Line_Amts: ' || 'third_party_sub_id = ' || p_ae_line_rec.third_party_sub_id);
2162: arp_standard.debug('Dump_Line_Amts: ' || 'tax_group_code_id = ' || p_ae_line_rec.tax_group_code_id);
2163: arp_standard.debug('Dump_Line_Amts: ' || 'tax_code_id = ' || p_ae_line_rec.tax_code_id);
2156: arp_standard.debug('Dump_Line_Amts: ' || 'currency_code = ' || p_ae_line_rec.currency_code);
2157: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_rate = ' || p_ae_line_rec.currency_conversion_rate);
2158: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_type = ' || p_ae_line_rec.currency_conversion_type);
2159: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_date = ' || p_ae_line_rec.currency_conversion_date);
2160: arp_standard.debug('Dump_Line_Amts: ' || 'third_party_id = ' || p_ae_line_rec.third_party_id);
2161: arp_standard.debug('Dump_Line_Amts: ' || 'third_party_sub_id = ' || p_ae_line_rec.third_party_sub_id);
2162: arp_standard.debug('Dump_Line_Amts: ' || 'tax_group_code_id = ' || p_ae_line_rec.tax_group_code_id);
2163: arp_standard.debug('Dump_Line_Amts: ' || 'tax_code_id = ' || p_ae_line_rec.tax_code_id);
2164: arp_standard.debug('Dump_Line_Amts: ' || 'location_segment_id = ' || p_ae_line_rec.location_segment_id);
2157: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_rate = ' || p_ae_line_rec.currency_conversion_rate);
2158: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_type = ' || p_ae_line_rec.currency_conversion_type);
2159: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_date = ' || p_ae_line_rec.currency_conversion_date);
2160: arp_standard.debug('Dump_Line_Amts: ' || 'third_party_id = ' || p_ae_line_rec.third_party_id);
2161: arp_standard.debug('Dump_Line_Amts: ' || 'third_party_sub_id = ' || p_ae_line_rec.third_party_sub_id);
2162: arp_standard.debug('Dump_Line_Amts: ' || 'tax_group_code_id = ' || p_ae_line_rec.tax_group_code_id);
2163: arp_standard.debug('Dump_Line_Amts: ' || 'tax_code_id = ' || p_ae_line_rec.tax_code_id);
2164: arp_standard.debug('Dump_Line_Amts: ' || 'location_segment_id = ' || p_ae_line_rec.location_segment_id);
2165: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_entered_dr = ' || p_ae_line_rec.taxable_entered_dr);
2158: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_type = ' || p_ae_line_rec.currency_conversion_type);
2159: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_date = ' || p_ae_line_rec.currency_conversion_date);
2160: arp_standard.debug('Dump_Line_Amts: ' || 'third_party_id = ' || p_ae_line_rec.third_party_id);
2161: arp_standard.debug('Dump_Line_Amts: ' || 'third_party_sub_id = ' || p_ae_line_rec.third_party_sub_id);
2162: arp_standard.debug('Dump_Line_Amts: ' || 'tax_group_code_id = ' || p_ae_line_rec.tax_group_code_id);
2163: arp_standard.debug('Dump_Line_Amts: ' || 'tax_code_id = ' || p_ae_line_rec.tax_code_id);
2164: arp_standard.debug('Dump_Line_Amts: ' || 'location_segment_id = ' || p_ae_line_rec.location_segment_id);
2165: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_entered_dr = ' || p_ae_line_rec.taxable_entered_dr);
2166: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_entered_cr = ' || p_ae_line_rec.taxable_entered_cr);
2159: arp_standard.debug('Dump_Line_Amts: ' || 'currency_conversion_date = ' || p_ae_line_rec.currency_conversion_date);
2160: arp_standard.debug('Dump_Line_Amts: ' || 'third_party_id = ' || p_ae_line_rec.third_party_id);
2161: arp_standard.debug('Dump_Line_Amts: ' || 'third_party_sub_id = ' || p_ae_line_rec.third_party_sub_id);
2162: arp_standard.debug('Dump_Line_Amts: ' || 'tax_group_code_id = ' || p_ae_line_rec.tax_group_code_id);
2163: arp_standard.debug('Dump_Line_Amts: ' || 'tax_code_id = ' || p_ae_line_rec.tax_code_id);
2164: arp_standard.debug('Dump_Line_Amts: ' || 'location_segment_id = ' || p_ae_line_rec.location_segment_id);
2165: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_entered_dr = ' || p_ae_line_rec.taxable_entered_dr);
2166: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_entered_cr = ' || p_ae_line_rec.taxable_entered_cr);
2167: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_accounted_dr = ' || p_ae_line_rec.taxable_accounted_dr);
2160: arp_standard.debug('Dump_Line_Amts: ' || 'third_party_id = ' || p_ae_line_rec.third_party_id);
2161: arp_standard.debug('Dump_Line_Amts: ' || 'third_party_sub_id = ' || p_ae_line_rec.third_party_sub_id);
2162: arp_standard.debug('Dump_Line_Amts: ' || 'tax_group_code_id = ' || p_ae_line_rec.tax_group_code_id);
2163: arp_standard.debug('Dump_Line_Amts: ' || 'tax_code_id = ' || p_ae_line_rec.tax_code_id);
2164: arp_standard.debug('Dump_Line_Amts: ' || 'location_segment_id = ' || p_ae_line_rec.location_segment_id);
2165: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_entered_dr = ' || p_ae_line_rec.taxable_entered_dr);
2166: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_entered_cr = ' || p_ae_line_rec.taxable_entered_cr);
2167: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_accounted_dr = ' || p_ae_line_rec.taxable_accounted_dr);
2168: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_accounted_cr = ' || p_ae_line_rec.taxable_accounted_cr);
2161: arp_standard.debug('Dump_Line_Amts: ' || 'third_party_sub_id = ' || p_ae_line_rec.third_party_sub_id);
2162: arp_standard.debug('Dump_Line_Amts: ' || 'tax_group_code_id = ' || p_ae_line_rec.tax_group_code_id);
2163: arp_standard.debug('Dump_Line_Amts: ' || 'tax_code_id = ' || p_ae_line_rec.tax_code_id);
2164: arp_standard.debug('Dump_Line_Amts: ' || 'location_segment_id = ' || p_ae_line_rec.location_segment_id);
2165: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_entered_dr = ' || p_ae_line_rec.taxable_entered_dr);
2166: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_entered_cr = ' || p_ae_line_rec.taxable_entered_cr);
2167: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_accounted_dr = ' || p_ae_line_rec.taxable_accounted_dr);
2168: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_accounted_cr = ' || p_ae_line_rec.taxable_accounted_cr);
2169: arp_standard.debug('Dump_Line_Amts: ' || 'applied_from_doc_table = ' || p_ae_line_rec.applied_from_doc_table);
2162: arp_standard.debug('Dump_Line_Amts: ' || 'tax_group_code_id = ' || p_ae_line_rec.tax_group_code_id);
2163: arp_standard.debug('Dump_Line_Amts: ' || 'tax_code_id = ' || p_ae_line_rec.tax_code_id);
2164: arp_standard.debug('Dump_Line_Amts: ' || 'location_segment_id = ' || p_ae_line_rec.location_segment_id);
2165: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_entered_dr = ' || p_ae_line_rec.taxable_entered_dr);
2166: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_entered_cr = ' || p_ae_line_rec.taxable_entered_cr);
2167: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_accounted_dr = ' || p_ae_line_rec.taxable_accounted_dr);
2168: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_accounted_cr = ' || p_ae_line_rec.taxable_accounted_cr);
2169: arp_standard.debug('Dump_Line_Amts: ' || 'applied_from_doc_table = ' || p_ae_line_rec.applied_from_doc_table);
2170: arp_standard.debug('Dump_Line_Amts: ' || 'applied_from_doc_id = ' || p_ae_line_rec.applied_from_doc_id);
2163: arp_standard.debug('Dump_Line_Amts: ' || 'tax_code_id = ' || p_ae_line_rec.tax_code_id);
2164: arp_standard.debug('Dump_Line_Amts: ' || 'location_segment_id = ' || p_ae_line_rec.location_segment_id);
2165: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_entered_dr = ' || p_ae_line_rec.taxable_entered_dr);
2166: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_entered_cr = ' || p_ae_line_rec.taxable_entered_cr);
2167: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_accounted_dr = ' || p_ae_line_rec.taxable_accounted_dr);
2168: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_accounted_cr = ' || p_ae_line_rec.taxable_accounted_cr);
2169: arp_standard.debug('Dump_Line_Amts: ' || 'applied_from_doc_table = ' || p_ae_line_rec.applied_from_doc_table);
2170: arp_standard.debug('Dump_Line_Amts: ' || 'applied_from_doc_id = ' || p_ae_line_rec.applied_from_doc_id);
2171: arp_standard.debug('Dump_Line_Amts: ' || 'applied_to_doc_table = ' || p_ae_line_rec.applied_to_doc_table);
2164: arp_standard.debug('Dump_Line_Amts: ' || 'location_segment_id = ' || p_ae_line_rec.location_segment_id);
2165: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_entered_dr = ' || p_ae_line_rec.taxable_entered_dr);
2166: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_entered_cr = ' || p_ae_line_rec.taxable_entered_cr);
2167: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_accounted_dr = ' || p_ae_line_rec.taxable_accounted_dr);
2168: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_accounted_cr = ' || p_ae_line_rec.taxable_accounted_cr);
2169: arp_standard.debug('Dump_Line_Amts: ' || 'applied_from_doc_table = ' || p_ae_line_rec.applied_from_doc_table);
2170: arp_standard.debug('Dump_Line_Amts: ' || 'applied_from_doc_id = ' || p_ae_line_rec.applied_from_doc_id);
2171: arp_standard.debug('Dump_Line_Amts: ' || 'applied_to_doc_table = ' || p_ae_line_rec.applied_to_doc_table);
2172: arp_standard.debug('Dump_Line_Amts: ' || 'applied_to_doc_id = ' || p_ae_line_rec.applied_to_doc_id);
2165: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_entered_dr = ' || p_ae_line_rec.taxable_entered_dr);
2166: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_entered_cr = ' || p_ae_line_rec.taxable_entered_cr);
2167: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_accounted_dr = ' || p_ae_line_rec.taxable_accounted_dr);
2168: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_accounted_cr = ' || p_ae_line_rec.taxable_accounted_cr);
2169: arp_standard.debug('Dump_Line_Amts: ' || 'applied_from_doc_table = ' || p_ae_line_rec.applied_from_doc_table);
2170: arp_standard.debug('Dump_Line_Amts: ' || 'applied_from_doc_id = ' || p_ae_line_rec.applied_from_doc_id);
2171: arp_standard.debug('Dump_Line_Amts: ' || 'applied_to_doc_table = ' || p_ae_line_rec.applied_to_doc_table);
2172: arp_standard.debug('Dump_Line_Amts: ' || 'applied_to_doc_id = ' || p_ae_line_rec.applied_to_doc_id);
2173: arp_standard.debug('Dump_Line_Amts: ' || 'tax_link_id = ' || p_ae_line_rec.tax_link_id);
2166: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_entered_cr = ' || p_ae_line_rec.taxable_entered_cr);
2167: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_accounted_dr = ' || p_ae_line_rec.taxable_accounted_dr);
2168: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_accounted_cr = ' || p_ae_line_rec.taxable_accounted_cr);
2169: arp_standard.debug('Dump_Line_Amts: ' || 'applied_from_doc_table = ' || p_ae_line_rec.applied_from_doc_table);
2170: arp_standard.debug('Dump_Line_Amts: ' || 'applied_from_doc_id = ' || p_ae_line_rec.applied_from_doc_id);
2171: arp_standard.debug('Dump_Line_Amts: ' || 'applied_to_doc_table = ' || p_ae_line_rec.applied_to_doc_table);
2172: arp_standard.debug('Dump_Line_Amts: ' || 'applied_to_doc_id = ' || p_ae_line_rec.applied_to_doc_id);
2173: arp_standard.debug('Dump_Line_Amts: ' || 'tax_link_id = ' || p_ae_line_rec.tax_link_id);
2174: arp_standard.debug('Dump_Line_Amts: ' || 'reversed_source_id = ' || p_ae_line_rec.reversed_source_id);
2167: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_accounted_dr = ' || p_ae_line_rec.taxable_accounted_dr);
2168: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_accounted_cr = ' || p_ae_line_rec.taxable_accounted_cr);
2169: arp_standard.debug('Dump_Line_Amts: ' || 'applied_from_doc_table = ' || p_ae_line_rec.applied_from_doc_table);
2170: arp_standard.debug('Dump_Line_Amts: ' || 'applied_from_doc_id = ' || p_ae_line_rec.applied_from_doc_id);
2171: arp_standard.debug('Dump_Line_Amts: ' || 'applied_to_doc_table = ' || p_ae_line_rec.applied_to_doc_table);
2172: arp_standard.debug('Dump_Line_Amts: ' || 'applied_to_doc_id = ' || p_ae_line_rec.applied_to_doc_id);
2173: arp_standard.debug('Dump_Line_Amts: ' || 'tax_link_id = ' || p_ae_line_rec.tax_link_id);
2174: arp_standard.debug('Dump_Line_Amts: ' || 'reversed_source_id = ' || p_ae_line_rec.reversed_source_id);
2175: arp_standard.debug('Dump_Line_Amts: ' || 'summarize_flag = ' || p_ae_line_rec.summarize_flag);
2168: arp_standard.debug('Dump_Line_Amts: ' || 'taxable_accounted_cr = ' || p_ae_line_rec.taxable_accounted_cr);
2169: arp_standard.debug('Dump_Line_Amts: ' || 'applied_from_doc_table = ' || p_ae_line_rec.applied_from_doc_table);
2170: arp_standard.debug('Dump_Line_Amts: ' || 'applied_from_doc_id = ' || p_ae_line_rec.applied_from_doc_id);
2171: arp_standard.debug('Dump_Line_Amts: ' || 'applied_to_doc_table = ' || p_ae_line_rec.applied_to_doc_table);
2172: arp_standard.debug('Dump_Line_Amts: ' || 'applied_to_doc_id = ' || p_ae_line_rec.applied_to_doc_id);
2173: arp_standard.debug('Dump_Line_Amts: ' || 'tax_link_id = ' || p_ae_line_rec.tax_link_id);
2174: arp_standard.debug('Dump_Line_Amts: ' || 'reversed_source_id = ' || p_ae_line_rec.reversed_source_id);
2175: arp_standard.debug('Dump_Line_Amts: ' || 'summarize_flag = ' || p_ae_line_rec.summarize_flag);
2176: arp_standard.debug('ARP_RECONCILE.Dump_Line_Amts()-');
2169: arp_standard.debug('Dump_Line_Amts: ' || 'applied_from_doc_table = ' || p_ae_line_rec.applied_from_doc_table);
2170: arp_standard.debug('Dump_Line_Amts: ' || 'applied_from_doc_id = ' || p_ae_line_rec.applied_from_doc_id);
2171: arp_standard.debug('Dump_Line_Amts: ' || 'applied_to_doc_table = ' || p_ae_line_rec.applied_to_doc_table);
2172: arp_standard.debug('Dump_Line_Amts: ' || 'applied_to_doc_id = ' || p_ae_line_rec.applied_to_doc_id);
2173: arp_standard.debug('Dump_Line_Amts: ' || 'tax_link_id = ' || p_ae_line_rec.tax_link_id);
2174: arp_standard.debug('Dump_Line_Amts: ' || 'reversed_source_id = ' || p_ae_line_rec.reversed_source_id);
2175: arp_standard.debug('Dump_Line_Amts: ' || 'summarize_flag = ' || p_ae_line_rec.summarize_flag);
2176: arp_standard.debug('ARP_RECONCILE.Dump_Line_Amts()-');
2177: END IF;
2170: arp_standard.debug('Dump_Line_Amts: ' || 'applied_from_doc_id = ' || p_ae_line_rec.applied_from_doc_id);
2171: arp_standard.debug('Dump_Line_Amts: ' || 'applied_to_doc_table = ' || p_ae_line_rec.applied_to_doc_table);
2172: arp_standard.debug('Dump_Line_Amts: ' || 'applied_to_doc_id = ' || p_ae_line_rec.applied_to_doc_id);
2173: arp_standard.debug('Dump_Line_Amts: ' || 'tax_link_id = ' || p_ae_line_rec.tax_link_id);
2174: arp_standard.debug('Dump_Line_Amts: ' || 'reversed_source_id = ' || p_ae_line_rec.reversed_source_id);
2175: arp_standard.debug('Dump_Line_Amts: ' || 'summarize_flag = ' || p_ae_line_rec.summarize_flag);
2176: arp_standard.debug('ARP_RECONCILE.Dump_Line_Amts()-');
2177: END IF;
2178:
2171: arp_standard.debug('Dump_Line_Amts: ' || 'applied_to_doc_table = ' || p_ae_line_rec.applied_to_doc_table);
2172: arp_standard.debug('Dump_Line_Amts: ' || 'applied_to_doc_id = ' || p_ae_line_rec.applied_to_doc_id);
2173: arp_standard.debug('Dump_Line_Amts: ' || 'tax_link_id = ' || p_ae_line_rec.tax_link_id);
2174: arp_standard.debug('Dump_Line_Amts: ' || 'reversed_source_id = ' || p_ae_line_rec.reversed_source_id);
2175: arp_standard.debug('Dump_Line_Amts: ' || 'summarize_flag = ' || p_ae_line_rec.summarize_flag);
2176: arp_standard.debug('ARP_RECONCILE.Dump_Line_Amts()-');
2177: END IF;
2178:
2179: EXCEPTION
2172: arp_standard.debug('Dump_Line_Amts: ' || 'applied_to_doc_id = ' || p_ae_line_rec.applied_to_doc_id);
2173: arp_standard.debug('Dump_Line_Amts: ' || 'tax_link_id = ' || p_ae_line_rec.tax_link_id);
2174: arp_standard.debug('Dump_Line_Amts: ' || 'reversed_source_id = ' || p_ae_line_rec.reversed_source_id);
2175: arp_standard.debug('Dump_Line_Amts: ' || 'summarize_flag = ' || p_ae_line_rec.summarize_flag);
2176: arp_standard.debug('ARP_RECONCILE.Dump_Line_Amts()-');
2177: END IF;
2178:
2179: EXCEPTION
2180: WHEN OTHERS THEN
2178:
2179: EXCEPTION
2180: WHEN OTHERS THEN
2181: IF PG_DEBUG in ('Y', 'C') THEN
2182: arp_standard.debug('EXCEPTION OTHERS : ARP_RECONCILE.Dump_Line_Amts');
2183: END IF;
2184: RAISE;
2185:
2186: END Dump_Line_Amts;
2448:
2449: BEGIN
2450:
2451: IF PG_DEBUG in ('Y', 'C') THEN
2452: arp_standard.debug('ARP_RECONCILE.Process_Recon()+');
2453: arp_standard.debug('Process_Recon: ' || 'list Input of parameters ');
2454: arp_standard.debug('Process_Recon: ' || 'p_br_cust_trx_line_id ' || p_br_cust_trx_line_id);
2455: arp_standard.debug('Process_Recon: ' || 'p_customer_trx_id ' || p_customer_trx_id);
2456: arp_standard.debug('Process_Recon: ' || 'p_simul_app ' || p_simul_app);
2449: BEGIN
2450:
2451: IF PG_DEBUG in ('Y', 'C') THEN
2452: arp_standard.debug('ARP_RECONCILE.Process_Recon()+');
2453: arp_standard.debug('Process_Recon: ' || 'list Input of parameters ');
2454: arp_standard.debug('Process_Recon: ' || 'p_br_cust_trx_line_id ' || p_br_cust_trx_line_id);
2455: arp_standard.debug('Process_Recon: ' || 'p_customer_trx_id ' || p_customer_trx_id);
2456: arp_standard.debug('Process_Recon: ' || 'p_simul_app ' || p_simul_app);
2457: arp_standard.debug('Process_Recon: ' || 'p_calling_point ' || p_calling_point);
2450:
2451: IF PG_DEBUG in ('Y', 'C') THEN
2452: arp_standard.debug('ARP_RECONCILE.Process_Recon()+');
2453: arp_standard.debug('Process_Recon: ' || 'list Input of parameters ');
2454: arp_standard.debug('Process_Recon: ' || 'p_br_cust_trx_line_id ' || p_br_cust_trx_line_id);
2455: arp_standard.debug('Process_Recon: ' || 'p_customer_trx_id ' || p_customer_trx_id);
2456: arp_standard.debug('Process_Recon: ' || 'p_simul_app ' || p_simul_app);
2457: arp_standard.debug('Process_Recon: ' || 'p_calling_point ' || p_calling_point);
2458: arp_standard.debug('Process_Recon: ' || 'p_pay_ctr ' || p_pay_ctr);
2451: IF PG_DEBUG in ('Y', 'C') THEN
2452: arp_standard.debug('ARP_RECONCILE.Process_Recon()+');
2453: arp_standard.debug('Process_Recon: ' || 'list Input of parameters ');
2454: arp_standard.debug('Process_Recon: ' || 'p_br_cust_trx_line_id ' || p_br_cust_trx_line_id);
2455: arp_standard.debug('Process_Recon: ' || 'p_customer_trx_id ' || p_customer_trx_id);
2456: arp_standard.debug('Process_Recon: ' || 'p_simul_app ' || p_simul_app);
2457: arp_standard.debug('Process_Recon: ' || 'p_calling_point ' || p_calling_point);
2458: arp_standard.debug('Process_Recon: ' || 'p_pay_ctr ' || p_pay_ctr);
2459: END IF;
2452: arp_standard.debug('ARP_RECONCILE.Process_Recon()+');
2453: arp_standard.debug('Process_Recon: ' || 'list Input of parameters ');
2454: arp_standard.debug('Process_Recon: ' || 'p_br_cust_trx_line_id ' || p_br_cust_trx_line_id);
2455: arp_standard.debug('Process_Recon: ' || 'p_customer_trx_id ' || p_customer_trx_id);
2456: arp_standard.debug('Process_Recon: ' || 'p_simul_app ' || p_simul_app);
2457: arp_standard.debug('Process_Recon: ' || 'p_calling_point ' || p_calling_point);
2458: arp_standard.debug('Process_Recon: ' || 'p_pay_ctr ' || p_pay_ctr);
2459: END IF;
2460:
2453: arp_standard.debug('Process_Recon: ' || 'list Input of parameters ');
2454: arp_standard.debug('Process_Recon: ' || 'p_br_cust_trx_line_id ' || p_br_cust_trx_line_id);
2455: arp_standard.debug('Process_Recon: ' || 'p_customer_trx_id ' || p_customer_trx_id);
2456: arp_standard.debug('Process_Recon: ' || 'p_simul_app ' || p_simul_app);
2457: arp_standard.debug('Process_Recon: ' || 'p_calling_point ' || p_calling_point);
2458: arp_standard.debug('Process_Recon: ' || 'p_pay_ctr ' || p_pay_ctr);
2459: END IF;
2460:
2461: /*-------------------------------------------------------------------------------+
2454: arp_standard.debug('Process_Recon: ' || 'p_br_cust_trx_line_id ' || p_br_cust_trx_line_id);
2455: arp_standard.debug('Process_Recon: ' || 'p_customer_trx_id ' || p_customer_trx_id);
2456: arp_standard.debug('Process_Recon: ' || 'p_simul_app ' || p_simul_app);
2457: arp_standard.debug('Process_Recon: ' || 'p_calling_point ' || p_calling_point);
2458: arp_standard.debug('Process_Recon: ' || 'p_pay_ctr ' || p_pay_ctr);
2459: END IF;
2460:
2461: /*-------------------------------------------------------------------------------+
2462: | For an assignment on a Bill simulate an activity such as an application which |
2472:
2473: IF p_pay_tbl.EXISTS(p_pay_ctr) THEN --atleast one activity exists
2474:
2475: IF PG_DEBUG in ('Y', 'C') THEN
2476: arp_standard.debug('Process_Recon: ' || 'p_pay_tbl simulate application ');
2477: END IF;
2478:
2479: FOR l_ctr3 IN p_pay_tbl.FIRST .. p_pay_tbl.LAST LOOP
2480:
2505:
2506: IF l_ae_line_tbl.EXISTS(l_ae_ctr) THEN --Atleast one Tax line exists
2507:
2508: IF PG_DEBUG in ('Y', 'C') THEN
2509: arp_standard.debug('Process_Recon: ' || 'Caching Tax for simulated application ');
2510: END IF;
2511:
2512: FOR l_ctr1 IN l_ae_line_tbl.FIRST .. l_ae_line_tbl.LAST LOOP
2513:
2535: AND (l_ae_line_tbl(l_ctr1).ae_line_type = 'DEFERRED_TAX'))
2536: THEN
2537:
2538: IF PG_DEBUG in ('Y', 'C') THEN
2539: arp_standard.debug('Process_Recon: ' || '1) Hit found in cache ae_tax_tbl');
2540: END IF;
2541:
2542: ae_tax_tbl(l_ctr).ae_amount := ae_tax_tbl(l_ctr).ae_amount
2543: + nvl(l_ae_line_tbl(l_ctr1).entered_dr,0)
2568: +-----------------------------------------------------------------------------*/
2569: IF (NOT l_cached) AND (l_ae_line_tbl(l_ctr1).ae_line_type = 'DEFERRED_TAX')
2570: THEN
2571: IF PG_DEBUG in ('Y', 'C') THEN
2572: arp_standard.debug('Process_Recon: ' || '1) Now caching in cache ae_tax_tbl');
2573: END IF;
2574:
2575: l_tax_ctr := l_tax_ctr + 1;
2576:
2600:
2601: l_cached := TRUE;
2602:
2603: IF PG_DEBUG in ('Y', 'C') THEN
2604: arp_standard.debug('Process_Recon: ' || ' ');
2605: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_location_segment_id = ' || ae_tax_tbl(l_tax_ctr).ae_location_segment_id);
2606: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_tax_group_code_id = ' || ae_tax_tbl(l_tax_ctr).ae_tax_group_code_id);
2607: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_tax_code_id = ' || ae_tax_tbl(l_tax_ctr).ae_tax_code_id);
2608: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_code_combination_id = ' || ae_tax_tbl(l_tax_ctr).ae_code_combination_id);
2601: l_cached := TRUE;
2602:
2603: IF PG_DEBUG in ('Y', 'C') THEN
2604: arp_standard.debug('Process_Recon: ' || ' ');
2605: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_location_segment_id = ' || ae_tax_tbl(l_tax_ctr).ae_location_segment_id);
2606: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_tax_group_code_id = ' || ae_tax_tbl(l_tax_ctr).ae_tax_group_code_id);
2607: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_tax_code_id = ' || ae_tax_tbl(l_tax_ctr).ae_tax_code_id);
2608: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_code_combination_id = ' || ae_tax_tbl(l_tax_ctr).ae_code_combination_id);
2609: arp_standard.debug('Process_Recon: ' || ' ');
2602:
2603: IF PG_DEBUG in ('Y', 'C') THEN
2604: arp_standard.debug('Process_Recon: ' || ' ');
2605: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_location_segment_id = ' || ae_tax_tbl(l_tax_ctr).ae_location_segment_id);
2606: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_tax_group_code_id = ' || ae_tax_tbl(l_tax_ctr).ae_tax_group_code_id);
2607: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_tax_code_id = ' || ae_tax_tbl(l_tax_ctr).ae_tax_code_id);
2608: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_code_combination_id = ' || ae_tax_tbl(l_tax_ctr).ae_code_combination_id);
2609: arp_standard.debug('Process_Recon: ' || ' ');
2610: END IF;
2603: IF PG_DEBUG in ('Y', 'C') THEN
2604: arp_standard.debug('Process_Recon: ' || ' ');
2605: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_location_segment_id = ' || ae_tax_tbl(l_tax_ctr).ae_location_segment_id);
2606: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_tax_group_code_id = ' || ae_tax_tbl(l_tax_ctr).ae_tax_group_code_id);
2607: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_tax_code_id = ' || ae_tax_tbl(l_tax_ctr).ae_tax_code_id);
2608: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_code_combination_id = ' || ae_tax_tbl(l_tax_ctr).ae_code_combination_id);
2609: arp_standard.debug('Process_Recon: ' || ' ');
2610: END IF;
2611:
2604: arp_standard.debug('Process_Recon: ' || ' ');
2605: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_location_segment_id = ' || ae_tax_tbl(l_tax_ctr).ae_location_segment_id);
2606: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_tax_group_code_id = ' || ae_tax_tbl(l_tax_ctr).ae_tax_group_code_id);
2607: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_tax_code_id = ' || ae_tax_tbl(l_tax_ctr).ae_tax_code_id);
2608: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_code_combination_id = ' || ae_tax_tbl(l_tax_ctr).ae_code_combination_id);
2609: arp_standard.debug('Process_Recon: ' || ' ');
2610: END IF;
2611:
2612: END IF; --not cached
2605: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_location_segment_id = ' || ae_tax_tbl(l_tax_ctr).ae_location_segment_id);
2606: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_tax_group_code_id = ' || ae_tax_tbl(l_tax_ctr).ae_tax_group_code_id);
2607: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_tax_code_id = ' || ae_tax_tbl(l_tax_ctr).ae_tax_code_id);
2608: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_code_combination_id = ' || ae_tax_tbl(l_tax_ctr).ae_code_combination_id);
2609: arp_standard.debug('Process_Recon: ' || ' ');
2610: END IF;
2611:
2612: END IF; --not cached
2613:
2624: |Cache the deferred tax from the original transaction accounting table for use in |
2625: |the reconciliation process |
2626: +---------------------------------------------------------------------------------*/
2627: IF PG_DEBUG in ('Y', 'C') THEN
2628: arp_standard.debug('Process_Recon: ' || 'Caching deferred tax from Original Transaction accounting ');
2629: END IF;
2630:
2631: FOR l_init_def_tax IN get_init_def_tax_acct LOOP
2632:
2630:
2631: FOR l_init_def_tax IN get_init_def_tax_acct LOOP
2632:
2633: IF PG_DEBUG in ('Y', 'C') THEN
2634: arp_standard.debug('Process_Recon: ' || 'Processing Original Transaction accounting ');
2635: END IF;
2636:
2637: l_cached := FALSE;
2638:
2648: AND (ae_tax_tbl(l_ctr).ae_code_combination_id = l_init_def_tax.account))
2649: THEN
2650:
2651: IF PG_DEBUG in ('Y', 'C') THEN
2652: arp_standard.debug('Process_Recon: ' || '2) Hit found in cache ae_tax_tbl');
2653: END IF;
2654:
2655: ae_tax_tbl(l_ctr).ae_amount := ae_tax_tbl(l_ctr).ae_amount
2656: + l_init_def_tax.amount;
2677: +---------------------------------------------------------------------------------*/
2678: IF (NOT l_cached) THEN
2679:
2680: IF PG_DEBUG in ('Y', 'C') THEN
2681: arp_standard.debug('Process_Recon: ' || '2) Now caching in cache ae_tax_tbl');
2682: END IF;
2683:
2684: l_tax_ctr := l_tax_ctr + 1;
2685:
2699:
2700: ae_tax_tbl(l_tax_ctr).ae_taxable_acctd_amount := l_init_def_tax.taxable_acctd_amount;
2701:
2702: IF PG_DEBUG in ('Y', 'C') THEN
2703: arp_standard.debug('Process_Recon: ' || ' ');
2704: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_location_segment_id = ' || ae_tax_tbl(l_tax_ctr).ae_location_segment_id);
2705: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_tax_group_code_id = ' || ae_tax_tbl(l_tax_ctr).ae_tax_group_code_id);
2706: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_tax_code_id = ' || ae_tax_tbl(l_tax_ctr).ae_tax_code_id);
2707: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_code_combination_id = ' || ae_tax_tbl(l_tax_ctr).ae_code_combination_id);
2700: ae_tax_tbl(l_tax_ctr).ae_taxable_acctd_amount := l_init_def_tax.taxable_acctd_amount;
2701:
2702: IF PG_DEBUG in ('Y', 'C') THEN
2703: arp_standard.debug('Process_Recon: ' || ' ');
2704: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_location_segment_id = ' || ae_tax_tbl(l_tax_ctr).ae_location_segment_id);
2705: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_tax_group_code_id = ' || ae_tax_tbl(l_tax_ctr).ae_tax_group_code_id);
2706: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_tax_code_id = ' || ae_tax_tbl(l_tax_ctr).ae_tax_code_id);
2707: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_code_combination_id = ' || ae_tax_tbl(l_tax_ctr).ae_code_combination_id);
2708: arp_standard.debug('Process_Recon: ' || ' ');
2701:
2702: IF PG_DEBUG in ('Y', 'C') THEN
2703: arp_standard.debug('Process_Recon: ' || ' ');
2704: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_location_segment_id = ' || ae_tax_tbl(l_tax_ctr).ae_location_segment_id);
2705: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_tax_group_code_id = ' || ae_tax_tbl(l_tax_ctr).ae_tax_group_code_id);
2706: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_tax_code_id = ' || ae_tax_tbl(l_tax_ctr).ae_tax_code_id);
2707: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_code_combination_id = ' || ae_tax_tbl(l_tax_ctr).ae_code_combination_id);
2708: arp_standard.debug('Process_Recon: ' || ' ');
2709: END IF;
2702: IF PG_DEBUG in ('Y', 'C') THEN
2703: arp_standard.debug('Process_Recon: ' || ' ');
2704: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_location_segment_id = ' || ae_tax_tbl(l_tax_ctr).ae_location_segment_id);
2705: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_tax_group_code_id = ' || ae_tax_tbl(l_tax_ctr).ae_tax_group_code_id);
2706: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_tax_code_id = ' || ae_tax_tbl(l_tax_ctr).ae_tax_code_id);
2707: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_code_combination_id = ' || ae_tax_tbl(l_tax_ctr).ae_code_combination_id);
2708: arp_standard.debug('Process_Recon: ' || ' ');
2709: END IF;
2710:
2703: arp_standard.debug('Process_Recon: ' || ' ');
2704: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_location_segment_id = ' || ae_tax_tbl(l_tax_ctr).ae_location_segment_id);
2705: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_tax_group_code_id = ' || ae_tax_tbl(l_tax_ctr).ae_tax_group_code_id);
2706: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_tax_code_id = ' || ae_tax_tbl(l_tax_ctr).ae_tax_code_id);
2707: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_code_combination_id = ' || ae_tax_tbl(l_tax_ctr).ae_code_combination_id);
2708: arp_standard.debug('Process_Recon: ' || ' ');
2709: END IF;
2710:
2711: l_cached := TRUE;
2704: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_location_segment_id = ' || ae_tax_tbl(l_tax_ctr).ae_location_segment_id);
2705: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_tax_group_code_id = ' || ae_tax_tbl(l_tax_ctr).ae_tax_group_code_id);
2706: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_tax_code_id = ' || ae_tax_tbl(l_tax_ctr).ae_tax_code_id);
2707: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_tax_ctr||').ae_code_combination_id = ' || ae_tax_tbl(l_tax_ctr).ae_code_combination_id);
2708: arp_standard.debug('Process_Recon: ' || ' ');
2709: END IF;
2710:
2711: l_cached := TRUE;
2712:
2716:
2717: END IF; --Simulating an application to reconcile against single activity
2718:
2719: IF PG_DEBUG in ('Y', 'C') THEN
2720: arp_standard.debug('Process_Recon: ' || 'Start caching physically created tax accounting entries due to past activity');
2721: END IF;
2722:
2723: /*---------------------------------------------------------------------------------+
2724: |Cache the deferred tax accounting entries physically created in ar_distributions |
2743: AND (ae_tax_activity_tbl(l_ctr).ae_code_combination_id = l_inv_nr.account))
2744: THEN
2745:
2746: IF PG_DEBUG in ('Y', 'C') THEN
2747: arp_standard.debug('Process_Recon: ' || '3) Hit found in cache ae_tax_activity_tbl');
2748: END IF;
2749:
2750: ae_tax_activity_tbl(l_ctr).ae_amount :=
2751: ae_tax_activity_tbl(l_ctr).ae_amount + l_inv_nr.amount;
2772: +---------------------------------------------------------------------------------*/
2773: IF (NOT l_cached) THEN
2774:
2775: IF PG_DEBUG in ('Y', 'C') THEN
2776: arp_standard.debug('Process_Recon: ' || '3) Now caching in cache ae_tax_activity_tbl');
2777: END IF;
2778:
2779: l_tax_ctr1 := l_tax_ctr1 + 1;
2780: ae_tax_activity_tbl(l_tax_ctr1).ae_location_segment_id := l_inv_nr.location_segment_id;
2795:
2796: l_cached := TRUE;
2797:
2798: IF PG_DEBUG in ('Y', 'C') THEN
2799: arp_standard.debug('Process_Recon: ' || ' ');
2800: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_location_segment_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_location_segment_id);
2801: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_tax_group_code_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_tax_group_code_id);
2802: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_tax_code_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_tax_code_id);
2803: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_amount = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_amount);
2796: l_cached := TRUE;
2797:
2798: IF PG_DEBUG in ('Y', 'C') THEN
2799: arp_standard.debug('Process_Recon: ' || ' ');
2800: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_location_segment_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_location_segment_id);
2801: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_tax_group_code_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_tax_group_code_id);
2802: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_tax_code_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_tax_code_id);
2803: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_amount = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_amount);
2804: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_acctd_amount = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_acctd_amount);
2797:
2798: IF PG_DEBUG in ('Y', 'C') THEN
2799: arp_standard.debug('Process_Recon: ' || ' ');
2800: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_location_segment_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_location_segment_id);
2801: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_tax_group_code_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_tax_group_code_id);
2802: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_tax_code_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_tax_code_id);
2803: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_amount = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_amount);
2804: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_acctd_amount = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_acctd_amount);
2805: arp_standard.debug('Process_Recon: ' || ' ');
2798: IF PG_DEBUG in ('Y', 'C') THEN
2799: arp_standard.debug('Process_Recon: ' || ' ');
2800: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_location_segment_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_location_segment_id);
2801: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_tax_group_code_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_tax_group_code_id);
2802: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_tax_code_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_tax_code_id);
2803: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_amount = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_amount);
2804: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_acctd_amount = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_acctd_amount);
2805: arp_standard.debug('Process_Recon: ' || ' ');
2806: END IF;
2799: arp_standard.debug('Process_Recon: ' || ' ');
2800: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_location_segment_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_location_segment_id);
2801: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_tax_group_code_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_tax_group_code_id);
2802: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_tax_code_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_tax_code_id);
2803: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_amount = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_amount);
2804: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_acctd_amount = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_acctd_amount);
2805: arp_standard.debug('Process_Recon: ' || ' ');
2806: END IF;
2807:
2800: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_location_segment_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_location_segment_id);
2801: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_tax_group_code_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_tax_group_code_id);
2802: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_tax_code_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_tax_code_id);
2803: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_amount = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_amount);
2804: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_acctd_amount = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_acctd_amount);
2805: arp_standard.debug('Process_Recon: ' || ' ');
2806: END IF;
2807:
2808: END IF; --not cached then cache
2801: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_tax_group_code_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_tax_group_code_id);
2802: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_tax_code_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_tax_code_id);
2803: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_amount = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_amount);
2804: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_acctd_amount = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_acctd_amount);
2805: arp_standard.debug('Process_Recon: ' || ' ');
2806: END IF;
2807:
2808: END IF; --not cached then cache
2809:
2818: +---------------------------------------------------------------------------------*/
2819: IF p_g_ae_line_tbl.EXISTS(p_g_ae_ctr) AND (g_call_num = 1) THEN
2820:
2821: IF PG_DEBUG in ('Y', 'C') THEN
2822: arp_standard.debug('Process_Recon: ' || '4) Cache table p_g_ae_line_tbl Exists');
2823: END IF;
2824:
2825: FOR l_ctr1 IN p_g_ae_line_tbl.FIRST .. p_g_ae_line_tbl.LAST LOOP
2826:
2826:
2827: l_cached := FALSE;
2828:
2829: IF PG_DEBUG in ('Y', 'C') THEN
2830: arp_standard.debug('Process_Recon: ' || ' ');
2831: arp_standard.debug('Process_Recon: ' || 'Checking whether global table accounting matches tax activity table');
2832: arp_standard.debug('Process_Recon: ' || 'p_br_cust_trx_line_id ' || p_br_cust_trx_line_id);
2833: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').source_id_secondary ' || p_g_ae_line_tbl(l_ctr1).source_id_secondary);
2834: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').source_table_secondary ' || p_g_ae_line_tbl(l_ctr1).source_table_secondary);
2827: l_cached := FALSE;
2828:
2829: IF PG_DEBUG in ('Y', 'C') THEN
2830: arp_standard.debug('Process_Recon: ' || ' ');
2831: arp_standard.debug('Process_Recon: ' || 'Checking whether global table accounting matches tax activity table');
2832: arp_standard.debug('Process_Recon: ' || 'p_br_cust_trx_line_id ' || p_br_cust_trx_line_id);
2833: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').source_id_secondary ' || p_g_ae_line_tbl(l_ctr1).source_id_secondary);
2834: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').source_table_secondary ' || p_g_ae_line_tbl(l_ctr1).source_table_secondary);
2835: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').ae_line_type ' || p_g_ae_line_tbl(l_ctr1).ae_line_type);
2828:
2829: IF PG_DEBUG in ('Y', 'C') THEN
2830: arp_standard.debug('Process_Recon: ' || ' ');
2831: arp_standard.debug('Process_Recon: ' || 'Checking whether global table accounting matches tax activity table');
2832: arp_standard.debug('Process_Recon: ' || 'p_br_cust_trx_line_id ' || p_br_cust_trx_line_id);
2833: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').source_id_secondary ' || p_g_ae_line_tbl(l_ctr1).source_id_secondary);
2834: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').source_table_secondary ' || p_g_ae_line_tbl(l_ctr1).source_table_secondary);
2835: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').ae_line_type ' || p_g_ae_line_tbl(l_ctr1).ae_line_type);
2836: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').location_segment_id ' || p_g_ae_line_tbl(l_ctr1).location_segment_id);
2829: IF PG_DEBUG in ('Y', 'C') THEN
2830: arp_standard.debug('Process_Recon: ' || ' ');
2831: arp_standard.debug('Process_Recon: ' || 'Checking whether global table accounting matches tax activity table');
2832: arp_standard.debug('Process_Recon: ' || 'p_br_cust_trx_line_id ' || p_br_cust_trx_line_id);
2833: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').source_id_secondary ' || p_g_ae_line_tbl(l_ctr1).source_id_secondary);
2834: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').source_table_secondary ' || p_g_ae_line_tbl(l_ctr1).source_table_secondary);
2835: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').ae_line_type ' || p_g_ae_line_tbl(l_ctr1).ae_line_type);
2836: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').location_segment_id ' || p_g_ae_line_tbl(l_ctr1).location_segment_id);
2837: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').tax_group_code_id ' || p_g_ae_line_tbl(l_ctr1).tax_group_code_id);
2830: arp_standard.debug('Process_Recon: ' || ' ');
2831: arp_standard.debug('Process_Recon: ' || 'Checking whether global table accounting matches tax activity table');
2832: arp_standard.debug('Process_Recon: ' || 'p_br_cust_trx_line_id ' || p_br_cust_trx_line_id);
2833: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').source_id_secondary ' || p_g_ae_line_tbl(l_ctr1).source_id_secondary);
2834: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').source_table_secondary ' || p_g_ae_line_tbl(l_ctr1).source_table_secondary);
2835: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').ae_line_type ' || p_g_ae_line_tbl(l_ctr1).ae_line_type);
2836: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').location_segment_id ' || p_g_ae_line_tbl(l_ctr1).location_segment_id);
2837: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').tax_group_code_id ' || p_g_ae_line_tbl(l_ctr1).tax_group_code_id);
2838: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').tax_code_id ' || p_g_ae_line_tbl(l_ctr1).tax_code_id);
2831: arp_standard.debug('Process_Recon: ' || 'Checking whether global table accounting matches tax activity table');
2832: arp_standard.debug('Process_Recon: ' || 'p_br_cust_trx_line_id ' || p_br_cust_trx_line_id);
2833: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').source_id_secondary ' || p_g_ae_line_tbl(l_ctr1).source_id_secondary);
2834: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').source_table_secondary ' || p_g_ae_line_tbl(l_ctr1).source_table_secondary);
2835: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').ae_line_type ' || p_g_ae_line_tbl(l_ctr1).ae_line_type);
2836: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').location_segment_id ' || p_g_ae_line_tbl(l_ctr1).location_segment_id);
2837: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').tax_group_code_id ' || p_g_ae_line_tbl(l_ctr1).tax_group_code_id);
2838: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').tax_code_id ' || p_g_ae_line_tbl(l_ctr1).tax_code_id);
2839: arp_standard.debug('Process_Recon: ' || ' ');
2832: arp_standard.debug('Process_Recon: ' || 'p_br_cust_trx_line_id ' || p_br_cust_trx_line_id);
2833: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').source_id_secondary ' || p_g_ae_line_tbl(l_ctr1).source_id_secondary);
2834: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').source_table_secondary ' || p_g_ae_line_tbl(l_ctr1).source_table_secondary);
2835: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').ae_line_type ' || p_g_ae_line_tbl(l_ctr1).ae_line_type);
2836: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').location_segment_id ' || p_g_ae_line_tbl(l_ctr1).location_segment_id);
2837: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').tax_group_code_id ' || p_g_ae_line_tbl(l_ctr1).tax_group_code_id);
2838: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').tax_code_id ' || p_g_ae_line_tbl(l_ctr1).tax_code_id);
2839: arp_standard.debug('Process_Recon: ' || ' ');
2840: END IF;
2833: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').source_id_secondary ' || p_g_ae_line_tbl(l_ctr1).source_id_secondary);
2834: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').source_table_secondary ' || p_g_ae_line_tbl(l_ctr1).source_table_secondary);
2835: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').ae_line_type ' || p_g_ae_line_tbl(l_ctr1).ae_line_type);
2836: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').location_segment_id ' || p_g_ae_line_tbl(l_ctr1).location_segment_id);
2837: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').tax_group_code_id ' || p_g_ae_line_tbl(l_ctr1).tax_group_code_id);
2838: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').tax_code_id ' || p_g_ae_line_tbl(l_ctr1).tax_code_id);
2839: arp_standard.debug('Process_Recon: ' || ' ');
2840: END IF;
2841:
2834: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').source_table_secondary ' || p_g_ae_line_tbl(l_ctr1).source_table_secondary);
2835: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').ae_line_type ' || p_g_ae_line_tbl(l_ctr1).ae_line_type);
2836: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').location_segment_id ' || p_g_ae_line_tbl(l_ctr1).location_segment_id);
2837: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').tax_group_code_id ' || p_g_ae_line_tbl(l_ctr1).tax_group_code_id);
2838: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').tax_code_id ' || p_g_ae_line_tbl(l_ctr1).tax_code_id);
2839: arp_standard.debug('Process_Recon: ' || ' ');
2840: END IF;
2841:
2842: IF ae_tax_activity_tbl.EXISTS(l_tax_ctr1) THEN
2835: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').ae_line_type ' || p_g_ae_line_tbl(l_ctr1).ae_line_type);
2836: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').location_segment_id ' || p_g_ae_line_tbl(l_ctr1).location_segment_id);
2837: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').tax_group_code_id ' || p_g_ae_line_tbl(l_ctr1).tax_group_code_id);
2838: arp_standard.debug('Process_Recon: ' || 'p_g_ae_line_tbl('|| l_ctr1 || ').tax_code_id ' || p_g_ae_line_tbl(l_ctr1).tax_code_id);
2839: arp_standard.debug('Process_Recon: ' || ' ');
2840: END IF;
2841:
2842: IF ae_tax_activity_tbl.EXISTS(l_tax_ctr1) THEN
2843:
2841:
2842: IF ae_tax_activity_tbl.EXISTS(l_tax_ctr1) THEN
2843:
2844: IF PG_DEBUG in ('Y', 'C') THEN
2845: arp_standard.debug('Process_Recon: ' || '4) Cache table ae_tax_activity_tbl Exists');
2846: END IF;
2847:
2848: FOR l_ctr IN ae_tax_activity_tbl.FIRST .. ae_tax_activity_tbl.LAST LOOP
2849:
2870: AND (p_g_ae_line_tbl(l_ctr1).ae_line_type = 'DEFERRED_TAX'))
2871: THEN
2872:
2873: IF PG_DEBUG in ('Y', 'C') THEN
2874: arp_standard.debug('Process_Recon: ' || '4) Hit found in cache ae_tax_activity_tbl');
2875: END IF;
2876:
2877: ae_tax_activity_tbl(l_ctr).ae_amount :=
2878: ae_tax_activity_tbl(l_ctr).ae_amount + nvl(p_g_ae_line_tbl(l_ctr1).entered_dr,0) * -1
2908: AND (p_g_ae_line_tbl(l_ctr1).ae_line_type = 'DEFERRED_TAX'))
2909: THEN
2910:
2911: IF PG_DEBUG in ('Y', 'C') THEN
2912: arp_standard.debug('Process_Recon: ' || '4) Now caching in cache ae_tax_activity_tbl');
2913: END IF;
2914:
2915: l_tax_ctr1 := l_tax_ctr1 + 1;
2916:
2938:
2939: l_cached := TRUE;
2940:
2941: IF PG_DEBUG in ('Y', 'C') THEN
2942: arp_standard.debug('Process_Recon: ' || ' ');
2943: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_location_segment_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_location_segment_id);
2944: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_tax_group_code_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_tax_group_code_id);
2945: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_tax_code_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_tax_code_id);
2946: arp_standard.debug('Process_Recon: ' || ' ');
2939: l_cached := TRUE;
2940:
2941: IF PG_DEBUG in ('Y', 'C') THEN
2942: arp_standard.debug('Process_Recon: ' || ' ');
2943: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_location_segment_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_location_segment_id);
2944: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_tax_group_code_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_tax_group_code_id);
2945: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_tax_code_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_tax_code_id);
2946: arp_standard.debug('Process_Recon: ' || ' ');
2947: END IF;
2940:
2941: IF PG_DEBUG in ('Y', 'C') THEN
2942: arp_standard.debug('Process_Recon: ' || ' ');
2943: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_location_segment_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_location_segment_id);
2944: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_tax_group_code_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_tax_group_code_id);
2945: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_tax_code_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_tax_code_id);
2946: arp_standard.debug('Process_Recon: ' || ' ');
2947: END IF;
2948:
2941: IF PG_DEBUG in ('Y', 'C') THEN
2942: arp_standard.debug('Process_Recon: ' || ' ');
2943: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_location_segment_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_location_segment_id);
2944: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_tax_group_code_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_tax_group_code_id);
2945: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_tax_code_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_tax_code_id);
2946: arp_standard.debug('Process_Recon: ' || ' ');
2947: END IF;
2948:
2949: END IF; --not cached then cache
2942: arp_standard.debug('Process_Recon: ' || ' ');
2943: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_location_segment_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_location_segment_id);
2944: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_tax_group_code_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_tax_group_code_id);
2945: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_tax_ctr1||').ae_tax_code_id = ' || ae_tax_activity_tbl(l_tax_ctr1).ae_tax_code_id);
2946: arp_standard.debug('Process_Recon: ' || ' ');
2947: END IF;
2948:
2949: END IF; --not cached then cache
2950:
2957: |accounting with that of the physically stored accounting entries in ar_distributions, due |
2958: |to activity on the Bill |
2959: +------------------------------------------------------------------------------------------*/
2960: IF PG_DEBUG in ('Y', 'C') THEN
2961: arp_standard.debug('Process_Recon: ' || 'Reconciling original accounting with the activity accounting ');
2962: END IF;
2963:
2964: IF ae_tax_tbl.EXISTS(l_tax_ctr) THEN
2965:
2963:
2964: IF ae_tax_tbl.EXISTS(l_tax_ctr) THEN
2965:
2966: IF PG_DEBUG in ('Y', 'C') THEN
2967: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl Exists , ae_tax_activity_tbl Exists ');
2968: END IF;
2969:
2970: FOR l_ctr IN ae_tax_tbl.FIRST .. ae_tax_tbl.LAST LOOP
2971:
2969:
2970: FOR l_ctr IN ae_tax_tbl.FIRST .. ae_tax_tbl.LAST LOOP
2971:
2972: IF PG_DEBUG in ('Y', 'C') THEN
2973: arp_standard.debug('Process_Recon: ' || 'Looping through table ae_tax_tbl to Reconcile l_ctr ' || l_ctr);
2974: arp_standard.debug('Process_Recon: ' || ' ');
2975: arp_standard.debug('Process_Recon: ' || '******** ');
2976: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_ctr||').ae_location_segment_id = '|| ae_tax_tbl(l_ctr).ae_location_segment_id);
2977: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_ctr||').ae_tax_group_code_id = '|| ae_tax_tbl(l_ctr).ae_tax_group_code_id);
2970: FOR l_ctr IN ae_tax_tbl.FIRST .. ae_tax_tbl.LAST LOOP
2971:
2972: IF PG_DEBUG in ('Y', 'C') THEN
2973: arp_standard.debug('Process_Recon: ' || 'Looping through table ae_tax_tbl to Reconcile l_ctr ' || l_ctr);
2974: arp_standard.debug('Process_Recon: ' || ' ');
2975: arp_standard.debug('Process_Recon: ' || '******** ');
2976: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_ctr||').ae_location_segment_id = '|| ae_tax_tbl(l_ctr).ae_location_segment_id);
2977: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_ctr||').ae_tax_group_code_id = '|| ae_tax_tbl(l_ctr).ae_tax_group_code_id);
2978: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_ctr||').ae_tax_code_id = '|| ae_tax_tbl(l_ctr).ae_tax_code_id);
2971:
2972: IF PG_DEBUG in ('Y', 'C') THEN
2973: arp_standard.debug('Process_Recon: ' || 'Looping through table ae_tax_tbl to Reconcile l_ctr ' || l_ctr);
2974: arp_standard.debug('Process_Recon: ' || ' ');
2975: arp_standard.debug('Process_Recon: ' || '******** ');
2976: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_ctr||').ae_location_segment_id = '|| ae_tax_tbl(l_ctr).ae_location_segment_id);
2977: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_ctr||').ae_tax_group_code_id = '|| ae_tax_tbl(l_ctr).ae_tax_group_code_id);
2978: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_ctr||').ae_tax_code_id = '|| ae_tax_tbl(l_ctr).ae_tax_code_id);
2979: arp_standard.debug('Process_Recon: ' || '******** ');
2972: IF PG_DEBUG in ('Y', 'C') THEN
2973: arp_standard.debug('Process_Recon: ' || 'Looping through table ae_tax_tbl to Reconcile l_ctr ' || l_ctr);
2974: arp_standard.debug('Process_Recon: ' || ' ');
2975: arp_standard.debug('Process_Recon: ' || '******** ');
2976: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_ctr||').ae_location_segment_id = '|| ae_tax_tbl(l_ctr).ae_location_segment_id);
2977: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_ctr||').ae_tax_group_code_id = '|| ae_tax_tbl(l_ctr).ae_tax_group_code_id);
2978: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_ctr||').ae_tax_code_id = '|| ae_tax_tbl(l_ctr).ae_tax_code_id);
2979: arp_standard.debug('Process_Recon: ' || '******** ');
2980: END IF;
2973: arp_standard.debug('Process_Recon: ' || 'Looping through table ae_tax_tbl to Reconcile l_ctr ' || l_ctr);
2974: arp_standard.debug('Process_Recon: ' || ' ');
2975: arp_standard.debug('Process_Recon: ' || '******** ');
2976: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_ctr||').ae_location_segment_id = '|| ae_tax_tbl(l_ctr).ae_location_segment_id);
2977: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_ctr||').ae_tax_group_code_id = '|| ae_tax_tbl(l_ctr).ae_tax_group_code_id);
2978: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_ctr||').ae_tax_code_id = '|| ae_tax_tbl(l_ctr).ae_tax_code_id);
2979: arp_standard.debug('Process_Recon: ' || '******** ');
2980: END IF;
2981:
2974: arp_standard.debug('Process_Recon: ' || ' ');
2975: arp_standard.debug('Process_Recon: ' || '******** ');
2976: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_ctr||').ae_location_segment_id = '|| ae_tax_tbl(l_ctr).ae_location_segment_id);
2977: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_ctr||').ae_tax_group_code_id = '|| ae_tax_tbl(l_ctr).ae_tax_group_code_id);
2978: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_ctr||').ae_tax_code_id = '|| ae_tax_tbl(l_ctr).ae_tax_code_id);
2979: arp_standard.debug('Process_Recon: ' || '******** ');
2980: END IF;
2981:
2982: l_match_cond := FALSE;
2975: arp_standard.debug('Process_Recon: ' || '******** ');
2976: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_ctr||').ae_location_segment_id = '|| ae_tax_tbl(l_ctr).ae_location_segment_id);
2977: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_ctr||').ae_tax_group_code_id = '|| ae_tax_tbl(l_ctr).ae_tax_group_code_id);
2978: arp_standard.debug('Process_Recon: ' || 'ae_tax_tbl('||l_ctr||').ae_tax_code_id = '|| ae_tax_tbl(l_ctr).ae_tax_code_id);
2979: arp_standard.debug('Process_Recon: ' || '******** ');
2980: END IF;
2981:
2982: l_match_cond := FALSE;
2983:
2985:
2986: FOR l_ctr1 IN ae_tax_activity_tbl.FIRST .. ae_tax_activity_tbl.LAST LOOP
2987:
2988: IF PG_DEBUG in ('Y', 'C') THEN
2989: arp_standard.debug('Process_Recon: ' || 'Looping through table ae_tax_activity_tbl l_ctr1 ' || l_ctr1);
2990: arp_standard.debug('Process_Recon: ' || ' ');
2991: arp_standard.debug('Process_Recon: ' || '>>>>>>>> COMPARE');
2992: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_location_segment_id = '|| ae_tax_activity_tbl(l_ctr1).ae_location_segment_id);
2993: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_tax_group_code_id = '|| ae_tax_activity_tbl(l_ctr1).ae_tax_group_code_id);
2986: FOR l_ctr1 IN ae_tax_activity_tbl.FIRST .. ae_tax_activity_tbl.LAST LOOP
2987:
2988: IF PG_DEBUG in ('Y', 'C') THEN
2989: arp_standard.debug('Process_Recon: ' || 'Looping through table ae_tax_activity_tbl l_ctr1 ' || l_ctr1);
2990: arp_standard.debug('Process_Recon: ' || ' ');
2991: arp_standard.debug('Process_Recon: ' || '>>>>>>>> COMPARE');
2992: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_location_segment_id = '|| ae_tax_activity_tbl(l_ctr1).ae_location_segment_id);
2993: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_tax_group_code_id = '|| ae_tax_activity_tbl(l_ctr1).ae_tax_group_code_id);
2994: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_tax_code_id = '|| ae_tax_activity_tbl(l_ctr1).ae_tax_code_id);
2987:
2988: IF PG_DEBUG in ('Y', 'C') THEN
2989: arp_standard.debug('Process_Recon: ' || 'Looping through table ae_tax_activity_tbl l_ctr1 ' || l_ctr1);
2990: arp_standard.debug('Process_Recon: ' || ' ');
2991: arp_standard.debug('Process_Recon: ' || '>>>>>>>> COMPARE');
2992: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_location_segment_id = '|| ae_tax_activity_tbl(l_ctr1).ae_location_segment_id);
2993: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_tax_group_code_id = '|| ae_tax_activity_tbl(l_ctr1).ae_tax_group_code_id);
2994: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_tax_code_id = '|| ae_tax_activity_tbl(l_ctr1).ae_tax_code_id);
2995: arp_standard.debug('Process_Recon: ' || 'Amount ' || ae_tax_tbl(l_ctr).ae_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_amount);
2988: IF PG_DEBUG in ('Y', 'C') THEN
2989: arp_standard.debug('Process_Recon: ' || 'Looping through table ae_tax_activity_tbl l_ctr1 ' || l_ctr1);
2990: arp_standard.debug('Process_Recon: ' || ' ');
2991: arp_standard.debug('Process_Recon: ' || '>>>>>>>> COMPARE');
2992: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_location_segment_id = '|| ae_tax_activity_tbl(l_ctr1).ae_location_segment_id);
2993: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_tax_group_code_id = '|| ae_tax_activity_tbl(l_ctr1).ae_tax_group_code_id);
2994: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_tax_code_id = '|| ae_tax_activity_tbl(l_ctr1).ae_tax_code_id);
2995: arp_standard.debug('Process_Recon: ' || 'Amount ' || ae_tax_tbl(l_ctr).ae_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_amount);
2996: arp_standard.debug('Process_Recon: ' || 'Accounted Amount ' || ae_tax_tbl(l_ctr).ae_acctd_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_acctd_amount);
2989: arp_standard.debug('Process_Recon: ' || 'Looping through table ae_tax_activity_tbl l_ctr1 ' || l_ctr1);
2990: arp_standard.debug('Process_Recon: ' || ' ');
2991: arp_standard.debug('Process_Recon: ' || '>>>>>>>> COMPARE');
2992: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_location_segment_id = '|| ae_tax_activity_tbl(l_ctr1).ae_location_segment_id);
2993: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_tax_group_code_id = '|| ae_tax_activity_tbl(l_ctr1).ae_tax_group_code_id);
2994: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_tax_code_id = '|| ae_tax_activity_tbl(l_ctr1).ae_tax_code_id);
2995: arp_standard.debug('Process_Recon: ' || 'Amount ' || ae_tax_tbl(l_ctr).ae_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_amount);
2996: arp_standard.debug('Process_Recon: ' || 'Accounted Amount ' || ae_tax_tbl(l_ctr).ae_acctd_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_acctd_amount);
2997: arp_standard.debug('Process_Recon: ' || 'Taxable Amount ' || ae_tax_tbl(l_ctr).ae_taxable_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_taxable_amount);
2990: arp_standard.debug('Process_Recon: ' || ' ');
2991: arp_standard.debug('Process_Recon: ' || '>>>>>>>> COMPARE');
2992: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_location_segment_id = '|| ae_tax_activity_tbl(l_ctr1).ae_location_segment_id);
2993: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_tax_group_code_id = '|| ae_tax_activity_tbl(l_ctr1).ae_tax_group_code_id);
2994: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_tax_code_id = '|| ae_tax_activity_tbl(l_ctr1).ae_tax_code_id);
2995: arp_standard.debug('Process_Recon: ' || 'Amount ' || ae_tax_tbl(l_ctr).ae_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_amount);
2996: arp_standard.debug('Process_Recon: ' || 'Accounted Amount ' || ae_tax_tbl(l_ctr).ae_acctd_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_acctd_amount);
2997: arp_standard.debug('Process_Recon: ' || 'Taxable Amount ' || ae_tax_tbl(l_ctr).ae_taxable_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_taxable_amount);
2998: arp_standard.debug('Process_Recon: ' || 'Taxable Accounted Amount ' || ae_tax_tbl(l_ctr).ae_taxable_acctd_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_taxable_acctd_amount);
2991: arp_standard.debug('Process_Recon: ' || '>>>>>>>> COMPARE');
2992: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_location_segment_id = '|| ae_tax_activity_tbl(l_ctr1).ae_location_segment_id);
2993: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_tax_group_code_id = '|| ae_tax_activity_tbl(l_ctr1).ae_tax_group_code_id);
2994: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_tax_code_id = '|| ae_tax_activity_tbl(l_ctr1).ae_tax_code_id);
2995: arp_standard.debug('Process_Recon: ' || 'Amount ' || ae_tax_tbl(l_ctr).ae_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_amount);
2996: arp_standard.debug('Process_Recon: ' || 'Accounted Amount ' || ae_tax_tbl(l_ctr).ae_acctd_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_acctd_amount);
2997: arp_standard.debug('Process_Recon: ' || 'Taxable Amount ' || ae_tax_tbl(l_ctr).ae_taxable_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_taxable_amount);
2998: arp_standard.debug('Process_Recon: ' || 'Taxable Accounted Amount ' || ae_tax_tbl(l_ctr).ae_taxable_acctd_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_taxable_acctd_amount);
2999: arp_standard.debug('Process_Recon: ' || '>>>>>>>> COMPARE');
2992: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_location_segment_id = '|| ae_tax_activity_tbl(l_ctr1).ae_location_segment_id);
2993: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_tax_group_code_id = '|| ae_tax_activity_tbl(l_ctr1).ae_tax_group_code_id);
2994: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_tax_code_id = '|| ae_tax_activity_tbl(l_ctr1).ae_tax_code_id);
2995: arp_standard.debug('Process_Recon: ' || 'Amount ' || ae_tax_tbl(l_ctr).ae_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_amount);
2996: arp_standard.debug('Process_Recon: ' || 'Accounted Amount ' || ae_tax_tbl(l_ctr).ae_acctd_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_acctd_amount);
2997: arp_standard.debug('Process_Recon: ' || 'Taxable Amount ' || ae_tax_tbl(l_ctr).ae_taxable_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_taxable_amount);
2998: arp_standard.debug('Process_Recon: ' || 'Taxable Accounted Amount ' || ae_tax_tbl(l_ctr).ae_taxable_acctd_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_taxable_acctd_amount);
2999: arp_standard.debug('Process_Recon: ' || '>>>>>>>> COMPARE');
3000: END IF;
2993: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_tax_group_code_id = '|| ae_tax_activity_tbl(l_ctr1).ae_tax_group_code_id);
2994: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_tax_code_id = '|| ae_tax_activity_tbl(l_ctr1).ae_tax_code_id);
2995: arp_standard.debug('Process_Recon: ' || 'Amount ' || ae_tax_tbl(l_ctr).ae_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_amount);
2996: arp_standard.debug('Process_Recon: ' || 'Accounted Amount ' || ae_tax_tbl(l_ctr).ae_acctd_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_acctd_amount);
2997: arp_standard.debug('Process_Recon: ' || 'Taxable Amount ' || ae_tax_tbl(l_ctr).ae_taxable_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_taxable_amount);
2998: arp_standard.debug('Process_Recon: ' || 'Taxable Accounted Amount ' || ae_tax_tbl(l_ctr).ae_taxable_acctd_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_taxable_acctd_amount);
2999: arp_standard.debug('Process_Recon: ' || '>>>>>>>> COMPARE');
3000: END IF;
3001:
2994: arp_standard.debug('Process_Recon: ' || 'ae_tax_activity_tbl('||l_ctr1||').ae_tax_code_id = '|| ae_tax_activity_tbl(l_ctr1).ae_tax_code_id);
2995: arp_standard.debug('Process_Recon: ' || 'Amount ' || ae_tax_tbl(l_ctr).ae_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_amount);
2996: arp_standard.debug('Process_Recon: ' || 'Accounted Amount ' || ae_tax_tbl(l_ctr).ae_acctd_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_acctd_amount);
2997: arp_standard.debug('Process_Recon: ' || 'Taxable Amount ' || ae_tax_tbl(l_ctr).ae_taxable_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_taxable_amount);
2998: arp_standard.debug('Process_Recon: ' || 'Taxable Accounted Amount ' || ae_tax_tbl(l_ctr).ae_taxable_acctd_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_taxable_acctd_amount);
2999: arp_standard.debug('Process_Recon: ' || '>>>>>>>> COMPARE');
3000: END IF;
3001:
3002: IF (((ae_tax_tbl(l_ctr).ae_location_segment_id IS NOT NULL)
2995: arp_standard.debug('Process_Recon: ' || 'Amount ' || ae_tax_tbl(l_ctr).ae_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_amount);
2996: arp_standard.debug('Process_Recon: ' || 'Accounted Amount ' || ae_tax_tbl(l_ctr).ae_acctd_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_acctd_amount);
2997: arp_standard.debug('Process_Recon: ' || 'Taxable Amount ' || ae_tax_tbl(l_ctr).ae_taxable_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_taxable_amount);
2998: arp_standard.debug('Process_Recon: ' || 'Taxable Accounted Amount ' || ae_tax_tbl(l_ctr).ae_taxable_acctd_amount || ' VS ' || ae_tax_activity_tbl(l_ctr1).ae_taxable_acctd_amount);
2999: arp_standard.debug('Process_Recon: ' || '>>>>>>>> COMPARE');
3000: END IF;
3001:
3002: IF (((ae_tax_tbl(l_ctr).ae_location_segment_id IS NOT NULL)
3003: AND (ae_tax_activity_tbl(l_ctr1).ae_location_segment_id IS NOT NULL)
3012: AND (ae_tax_tbl(l_ctr).ae_code_combination_id = ae_tax_activity_tbl(l_ctr1).ae_code_combination_id))
3013: THEN
3014:
3015: IF PG_DEBUG in ('Y', 'C') THEN
3016: arp_standard.debug('Process_Recon: ' || 'Matching condition found in ae_tax_tbl, construct reconcile entry ');
3017: END IF;
3018:
3019: ae_tax_activity_tbl(l_ctr1).ae_match_flag := 'Y';
3020:
3125: +---------------------------------------------------------------------------------*/
3126: IF (NOT l_match_cond) THEN
3127:
3128: IF PG_DEBUG in ('Y', 'C') THEN
3129: arp_standard.debug('Process_Recon: ' || 'Matching condition not found in ae_tax_tbl, construct reconcile entry ');
3130: END IF;
3131:
3132: --set amount
3133: IF ae_tax_tbl(l_ctr).ae_amount > 0 THEN
3183: +---------------------------------------------------------------------------------*/
3184: IF (l_cre_rec) THEN --set other attributes of accounting lines reconciliation entry
3185:
3186: IF PG_DEBUG in ('Y', 'C') THEN
3187: arp_standard.debug('Process_Recon: ' || 'Assemble the l_ae_line_rec record for reconciliation entry ');
3188: END IF;
3189:
3190: --Build the Deferred Tax accounting entry
3191: Build_Deferred_Tax(
3222:
3223: END LOOP; --tax table
3224:
3225: IF PG_DEBUG in ('Y', 'C') THEN
3226: arp_standard.debug('Process_Recon: ' || 'REVERSE SWEEP ');
3227: END IF;
3228:
3229: /*----------------------------------------------------------------------------+
3230: | Sweep through the tax activity table and if the matching flag is not Y then|
3247: | to activity as there is no match for on Original Transaction by |
3248: | tax group, tax code, location and account |
3249: +------------------------------------------------------------------*/
3250: IF PG_DEBUG in ('Y', 'C') THEN
3251: arp_standard.debug('Process_Recon: ' || 'REVERSE SWEEP ae_tax_activity_tbl(l_ctr).ae_amount' || ae_tax_activity_tbl(l_ctr).ae_amount);
3252: END IF;
3253: IF ae_tax_activity_tbl(l_ctr).ae_amount > 0 THEN
3254:
3255: l_ae_line_rec.entered_dr := abs(ae_tax_activity_tbl(l_ctr).ae_amount);
3261: l_cre_rec := TRUE;
3262: END IF;
3263:
3264: IF PG_DEBUG in ('Y', 'C') THEN
3265: arp_standard.debug('Process_Recon: ' || 'REVERSE SWEEP ae_tax_activity_tbl(l_ctr).ae_acctd_amount' || ae_tax_activity_tbl(l_ctr).ae_acctd_amount);
3266: END IF;
3267: --set accounted amount
3268: IF ae_tax_activity_tbl(l_ctr).ae_acctd_amount > 0 THEN
3269:
3276: l_cre_rec := TRUE;
3277: END IF;
3278:
3279: IF PG_DEBUG in ('Y', 'C') THEN
3280: arp_standard.debug('Process_Recon: ' || 'REVERSE SWEEP ae_tax_activity_tbl(l_ctr).ae_taxable_amount' || ae_tax_activity_tbl(l_ctr).ae_taxable_amount);
3281: END IF;
3282: --set taxable amount
3283: IF ae_tax_activity_tbl(l_ctr).ae_taxable_amount > 0 THEN
3284: l_ae_line_rec.taxable_entered_dr := abs(ae_tax_activity_tbl(l_ctr).ae_taxable_amount);
3290: l_cre_rec := TRUE;
3291: END IF;
3292:
3293: IF PG_DEBUG in ('Y', 'C') THEN
3294: arp_standard.debug('Process_Recon: ' || 'REVERSE SWEEP ae_tax_activity_tbl(l_ctr).ae_taxable_acctd_amount' || ae_tax_activity_tbl(l_ctr).ae_taxable_acctd_amount);
3295: END IF;
3296: --set taxable accounted amount
3297: IF ae_tax_activity_tbl(l_ctr).ae_taxable_acctd_amount > 0 THEN
3298: l_ae_line_rec.taxable_accounted_dr := abs(ae_tax_activity_tbl(l_ctr).ae_taxable_acctd_amount);
3343:
3344: END IF; --lines exist in tax and activity table
3345:
3346: IF PG_DEBUG in ('Y', 'C') THEN
3347: arp_standard.debug('ARP_RECONCILE.Process_Recon ()-');
3348: END IF;
3349:
3350: EXCEPTION
3351: WHEN NO_DATA_FOUND THEN
3349:
3350: EXCEPTION
3351: WHEN NO_DATA_FOUND THEN
3352: IF PG_DEBUG in ('Y', 'C') THEN
3353: arp_standard.debug('EXCEPTION NO_DATA_FOUND : ARP_RECONCILE.Process_Recon ');
3354: END IF;
3355: RAISE;
3356:
3357: WHEN OTHERS THEN
3355: RAISE;
3356:
3357: WHEN OTHERS THEN
3358: IF PG_DEBUG in ('Y', 'C') THEN
3359: arp_standard.debug('EXCEPTION OTHERS : ARP_RECONCILE.Process_Recon ');
3360: END IF;
3361: RAISE;
3362:
3363: END Process_Recon;
3394:
3395: BEGIN
3396:
3397: IF PG_DEBUG in ('Y', 'C') THEN
3398: arp_standard.debug('ARP_RECONCILE.Build_Deferred_Tax ()+');
3399: END IF;
3400:
3401: /*-----------------------------------------------------------------------------+
3402: | Create the Dr or Cr to the deferred tax account, set details such as rates, |
3423: | Bill line id, however for transactions only the source type secondary is used|
3424: +------------------------------------------------------------------------------*/
3425: IF (p_calling_point IN ('BILL', 'BLTR')) THEN
3426: IF PG_DEBUG in ('Y', 'C') THEN
3427: arp_standard.debug('Build_Deferred_Tax: ' || 'Setting source type secondary to ASSIGNMENT_RECONCILE');
3428: END IF;
3429:
3430: --set transaction reconciliation entries line type secondary when bill is closed
3431: IF (p_calling_point = 'BLTR') THEN
3437: p_ae_line_rec.source_id_secondary := p_br_cust_trx_line_id ;
3438: p_ae_line_rec.source_table_secondary := 'CTL' ;
3439: ELSE --for transactions we only populate source type secondary for deferred tax
3440: IF PG_DEBUG in ('Y', 'C') THEN
3441: arp_standard.debug('Build_Deferred_Tax: ' || 'Setting source type secondary to RECONCILE');
3442: END IF;
3443: p_ae_line_rec.ae_line_type_secondary := 'RECONCILE';
3444: p_ae_line_rec.source_id_secondary := p_customer_trx_id;
3445: p_ae_line_rec.source_table_secondary := 'CT';
3454: p_ae_line_rec.tax_link_id := '' ;
3455: p_ae_line_rec.reversed_source_id := '' ;
3456:
3457: IF PG_DEBUG in ('Y', 'C') THEN
3458: arp_standard.debug('ARP_RECONCILE.Build_Deferred_Tax ()-');
3459: END IF;
3460:
3461: EXCEPTION
3462: WHEN NO_DATA_FOUND THEN
3460:
3461: EXCEPTION
3462: WHEN NO_DATA_FOUND THEN
3463: IF PG_DEBUG in ('Y', 'C') THEN
3464: arp_standard.debug('EXCEPTION NO_DATA_FOUND : ARP_RECONCILE.Build_Deferred_Tax ');
3465: END IF;
3466: RAISE;
3467:
3468: WHEN OTHERS THEN
3466: RAISE;
3467:
3468: WHEN OTHERS THEN
3469: IF PG_DEBUG in ('Y', 'C') THEN
3470: arp_standard.debug('EXCEPTION OTHERS : ARP_RECONCILE.Build_Deferred_Tax ');
3471: END IF;
3472: RAISE;
3473:
3474: END Build_Deferred_Tax;
3499: l_swap_amt NUMBER;
3500:
3501: BEGIN
3502: IF PG_DEBUG in ('Y', 'C') THEN
3503: arp_standard.debug('ARP_RECONCILE.Build_Tax ()+');
3504: END IF;
3505:
3506: /*-----------------------------------------------------------------------------+
3507: | Create the Offsetting Dr or Cr to the Collected tax account. To do this, the|
3514: | manually. Ideally the combination of deferred and collected tax accounts |
3515: | will not change. |
3516: +-----------------------------------------------------------------------------*/
3517: IF PG_DEBUG in ('Y', 'C') THEN
3518: arp_standard.debug('Build_Tax: ' || 'Fetching offsetting collected tax accounting entry');
3519: arp_standard.debug('Build_Tax: ' || 'Using parameter p_customer_trx_id ' || p_customer_trx_id);
3520: arp_standard.debug('Build_Tax: ' || 'Using parameter location_segment_id ' || p_location_segment_id);
3521: arp_standard.debug('Build_Tax: ' || 'Using parameter tax_group_code_id ' || p_tax_group_code_id);
3522: arp_standard.debug('Build_Tax: ' || 'Using parameter tax_code_id ' || p_tax_code_id);
3515: | will not change. |
3516: +-----------------------------------------------------------------------------*/
3517: IF PG_DEBUG in ('Y', 'C') THEN
3518: arp_standard.debug('Build_Tax: ' || 'Fetching offsetting collected tax accounting entry');
3519: arp_standard.debug('Build_Tax: ' || 'Using parameter p_customer_trx_id ' || p_customer_trx_id);
3520: arp_standard.debug('Build_Tax: ' || 'Using parameter location_segment_id ' || p_location_segment_id);
3521: arp_standard.debug('Build_Tax: ' || 'Using parameter tax_group_code_id ' || p_tax_group_code_id);
3522: arp_standard.debug('Build_Tax: ' || 'Using parameter tax_code_id ' || p_tax_code_id);
3523: arp_standard.debug('Build_Tax: ' || 'Using parameter code_combination_id ' || p_code_combination_id);
3516: +-----------------------------------------------------------------------------*/
3517: IF PG_DEBUG in ('Y', 'C') THEN
3518: arp_standard.debug('Build_Tax: ' || 'Fetching offsetting collected tax accounting entry');
3519: arp_standard.debug('Build_Tax: ' || 'Using parameter p_customer_trx_id ' || p_customer_trx_id);
3520: arp_standard.debug('Build_Tax: ' || 'Using parameter location_segment_id ' || p_location_segment_id);
3521: arp_standard.debug('Build_Tax: ' || 'Using parameter tax_group_code_id ' || p_tax_group_code_id);
3522: arp_standard.debug('Build_Tax: ' || 'Using parameter tax_code_id ' || p_tax_code_id);
3523: arp_standard.debug('Build_Tax: ' || 'Using parameter code_combination_id ' || p_code_combination_id);
3524: END IF;
3517: IF PG_DEBUG in ('Y', 'C') THEN
3518: arp_standard.debug('Build_Tax: ' || 'Fetching offsetting collected tax accounting entry');
3519: arp_standard.debug('Build_Tax: ' || 'Using parameter p_customer_trx_id ' || p_customer_trx_id);
3520: arp_standard.debug('Build_Tax: ' || 'Using parameter location_segment_id ' || p_location_segment_id);
3521: arp_standard.debug('Build_Tax: ' || 'Using parameter tax_group_code_id ' || p_tax_group_code_id);
3522: arp_standard.debug('Build_Tax: ' || 'Using parameter tax_code_id ' || p_tax_code_id);
3523: arp_standard.debug('Build_Tax: ' || 'Using parameter code_combination_id ' || p_code_combination_id);
3524: END IF;
3525:
3518: arp_standard.debug('Build_Tax: ' || 'Fetching offsetting collected tax accounting entry');
3519: arp_standard.debug('Build_Tax: ' || 'Using parameter p_customer_trx_id ' || p_customer_trx_id);
3520: arp_standard.debug('Build_Tax: ' || 'Using parameter location_segment_id ' || p_location_segment_id);
3521: arp_standard.debug('Build_Tax: ' || 'Using parameter tax_group_code_id ' || p_tax_group_code_id);
3522: arp_standard.debug('Build_Tax: ' || 'Using parameter tax_code_id ' || p_tax_code_id);
3523: arp_standard.debug('Build_Tax: ' || 'Using parameter code_combination_id ' || p_code_combination_id);
3524: END IF;
3525:
3526: --In R12 the vat tax id also called the tax rate id is the unique key
3519: arp_standard.debug('Build_Tax: ' || 'Using parameter p_customer_trx_id ' || p_customer_trx_id);
3520: arp_standard.debug('Build_Tax: ' || 'Using parameter location_segment_id ' || p_location_segment_id);
3521: arp_standard.debug('Build_Tax: ' || 'Using parameter tax_group_code_id ' || p_tax_group_code_id);
3522: arp_standard.debug('Build_Tax: ' || 'Using parameter tax_code_id ' || p_tax_code_id);
3523: arp_standard.debug('Build_Tax: ' || 'Using parameter code_combination_id ' || p_code_combination_id);
3524: END IF;
3525:
3526: --In R12 the vat tax id also called the tax rate id is the unique key
3527: --there is no concept of tax group id and location segment id is no longer
3551: --bug7484223
3552: IF l_collected_ccid IS NULL then
3553:
3554: IF PG_DEBUG in ('Y', 'C') THEN
3555: arp_standard.debug('This code will be called in very rare scenario.');
3556: arp_standard.debug('This will derive tax ccid if above routine fails to derive.');
3557: END IF;
3558:
3559: SELECT max(gld.collected_tax_ccid) ae_collected_tax_ccid
3552: IF l_collected_ccid IS NULL then
3553:
3554: IF PG_DEBUG in ('Y', 'C') THEN
3555: arp_standard.debug('This code will be called in very rare scenario.');
3556: arp_standard.debug('This will derive tax ccid if above routine fails to derive.');
3557: END IF;
3558:
3559: SELECT max(gld.collected_tax_ccid) ae_collected_tax_ccid
3560: INTO l_collected_ccid
3586: vat_tax_id not exist in CTL, then ccid will be taken from existing
3587: app ard against the same INV. This is rarest scenario. */
3588:
3589: IF PG_DEBUG in ('Y', 'C') THEN
3590: arp_standard.debug('This will derive tax ccid from app ard against the INV.');
3591: END IF;
3592:
3593: SELECT MAX(code_combination_id)
3594: INTO l_collected_ccid
3616:
3617: END IF;
3618:
3619: IF PG_DEBUG in ('Y', 'C') THEN
3620: arp_standard.debug('Build_Tax: Collected CCID: '||l_collected_ccid);
3621: arp_standard.debug('Build_Tax: ' || 'Completed fetching offsetting collected tax accounting entry');
3622: END IF;
3623:
3624: p_ae_line_rec.ae_line_type := 'TAX';
3617: END IF;
3618:
3619: IF PG_DEBUG in ('Y', 'C') THEN
3620: arp_standard.debug('Build_Tax: Collected CCID: '||l_collected_ccid);
3621: arp_standard.debug('Build_Tax: ' || 'Completed fetching offsetting collected tax accounting entry');
3622: END IF;
3623:
3624: p_ae_line_rec.ae_line_type := 'TAX';
3625: p_ae_line_rec.account := l_collected_ccid;
3644: p_ae_line_rec.taxable_accounted_dr := p_ae_line_rec.taxable_accounted_cr;
3645: p_ae_line_rec.taxable_accounted_cr := l_swap_amt;
3646:
3647: IF PG_DEBUG in ('Y', 'C') THEN
3648: arp_standard.debug('ARP_RECONCILE.Build_Tax ()-');
3649: END IF;
3650:
3651: EXCEPTION
3652: WHEN NO_DATA_FOUND THEN
3650:
3651: EXCEPTION
3652: WHEN NO_DATA_FOUND THEN
3653: IF PG_DEBUG in ('Y', 'C') THEN
3654: arp_standard.debug('EXCEPTION NO_DATA_FOUND : ARP_RECONCILE.Build_Tax ');
3655: END IF;
3656: RAISE;
3657:
3658: WHEN OTHERS THEN
3656: RAISE;
3657:
3658: WHEN OTHERS THEN
3659: IF PG_DEBUG in ('Y', 'C') THEN
3660: arp_standard.debug('EXCEPTION OTHERS : ARP_RECONCILE.Build_Tax ');
3661: END IF;
3662: RAISE;
3663:
3664: END Build_Tax;