DBA Data[Home] [Help]

APPS.PN_VAR_RENT_PKG dependencies on PN_VAR_RENT_PKG

Line 1: package body PN_VAR_RENT_PKG AS

1: package body PN_VAR_RENT_PKG AS
2: /* $Header: PNVRFUNB.pls 120.51.12020000.3 2013/04/14 23:03:24 smahapat ship $ */
3:
4: /*===========================================================================+
5: -- NAME : INSERT_PERIODS_ROW

Line 81: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.INSERT_PERIODS_ROW (+)');

77: l_org_id NUMBER;
78:
79: BEGIN
80:
81: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.INSERT_PERIODS_ROW (+)');
82:
83: -------------------------------------------------------
84: -- We need to generate the period number
85: -------------------------------------------------------

Line 183: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.INSERT_PERIODS_ROW (-)');

179: RAISE NO_DATA_FOUND;
180: END IF;
181: CLOSE c;
182:
183: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.INSERT_PERIODS_ROW (-)');
184:
185: END INSERT_PERIODS_ROW;
186:
187: /*===========================================================================+

Line 222: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_PERIODS_ROW (+)');

218: l_date DATE;
219:
220: BEGIN
221:
222: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_PERIODS_ROW (+)');
223:
224: l_date := NVL(x_term_date,(TO_DATE('01/01/1776','mm/dd/yyyy')));
225:
226: DELETE FROM PN_VAR_PERIODS_ALL

Line 238: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_PERIODS_ROW (-)');

234: RAISE NO_DATA_FOUND;
235: END IF;
236: END IF;
237:
238: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_PERIODS_ROW (-)');
239:
240: END DELETE_PERIODS_ROW;
241:
242:

Line 329: PN_VAR_RENT_PKG.INSERT_REPORT_DATE_ROW

325: l_report_end_date := least(l_group_end_date,
326: add_months(l_report_start_date,l_report_frequency)-1);
327: l_row_id := NULL;
328: l_report_date_id := NULL;
329: PN_VAR_RENT_PKG.INSERT_REPORT_DATE_ROW
330: (
331: X_ROWID => l_row_id
332: ,X_REPORT_DATE_ID => l_report_date_id
333: ,X_GRP_DATE_ID => l_group_date_id

Line 458: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.INSERT_REPORT_DATE_ROW (+)');

454: l_org_id NUMBER ;
455:
456: BEGIN
457:
458: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.INSERT_REPORT_DATE_ROW (+)');
459:
460: -------------------------------------------------------
461: -- SELECT the nextval FOR report date id
462: -------------------------------------------------------

Line 546: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.INSERT_REPORT_DATE_ROW (-)');

542: RAISE NO_DATA_FOUND;
543: END IF;
544: CLOSE c;
545:
546: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.INSERT_REPORT_DATE_ROW (-)');
547:
548: END INSERT_REPORT_DATE_ROW;
549:
550:

Line 584: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_REPORT_DATE_ROW (+)');

580: l_date DATE;
581:
582: BEGIN
583:
584: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_REPORT_DATE_ROW (+)');
585:
586: l_date := NVL(X_END_DATE,(TO_DATE('01/01/1776','mm/dd/yyyy')));
587:
588: DELETE FROM PN_VAR_REPORT_DATES_ALL

Line 593: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_REPORT_DATE_ROW (-)');

589: WHERE VAR_RENT_ID = X_VAR_RENT_ID
590: AND REPORT_START_DATE > l_date
591: AND REPORT_END_DATE > l_date;
592:
593: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_REPORT_DATE_ROW (-)');
594:
595: END DELETE_REPORT_DATE_ROW;
596:
597:

Line 678: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.INSERT_GRP_DATE_ROW (+)');

674: l_org_id NUMBER ;
675:
676: BEGIN
677:
678: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.INSERT_GRP_DATE_ROW (+)');
679:
680: -------------------------------------------------------
681: -- SELECT the nextval FOR group date id
682: -------------------------------------------------------

Line 754: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.INSERT_GRP_DATE_ROW (-)');

750: RAISE NO_DATA_FOUND;
751: END IF;
752: CLOSE c;
753:
754: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.INSERT_GRP_DATE_ROW (-)');
755:
756: END INSERT_GRP_DATE_ROW;
757:
758: /*===========================================================================+

Line 793: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_GRP_DATE_ROW (+)');

789: l_date DATE;
790:
791: BEGIN
792:
793: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_GRP_DATE_ROW (+)');
794:
795: l_date := NVL(x_term_date,(TO_DATE('01/01/1776','mm/dd/yyyy')));
796:
797: DELETE FROM PN_VAR_GRP_DATES_ALL

Line 810: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_GRP_DATE_ROW (-)');

806: RAISE NO_DATA_FOUND;
807: END IF;
808: END IF;
809:
810: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_GRP_DATE_ROW (-)');
811:
812: END DELETE_GRP_DATE_ROW;
813:
814: /*=============================================================================+

Line 857: -- pass org id to PN_VAR_RENT_PKG.INSERT_GRP_DATE_ROW

853: -- CURSOR cal_periods to add END_date >= p_vr_comm_date
854: -- AND remove the period_year condition.
855: -- 14-JUL-05 hareesha o Bug 4284035 - Replaced pn_var_grp_dates with _ALL tbl
856: -- 26-OCT-05 piagrawa o Bug#4702709 - Passed org id in insert row handler.
857: -- pass org id to PN_VAR_RENT_PKG.INSERT_GRP_DATE_ROW
858: -- 28-nov-05 pikhar o Replaced pn_var_periods with _ALL table
859: -- 11-JAN-07 Pseeram o Added the call to cretae_report_dates
860: -- 21-MAR-07 Lbala o Bug # 5937888 - added code to change reptg_due_date
861: --05-apr-2013 pcheruvu Bug 16362059:Changed se;ect query in cusor cal_periods

Line 1061: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.CREATE_VAR_RENT_PERIODS (+)');

1057:
1058:
1059: BEGIN
1060:
1061: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.CREATE_VAR_RENT_PERIODS (+)');
1062: pnp_debug_pkg.debug ('p_var_rent_id '||p_var_rent_id);
1063: pnp_debug_pkg.debug ('p_cumulative_vol'||p_cumulative_vol);
1064: pnp_debug_pkg.debug ('p_comm_date '||p_comm_date);
1065: pnp_debug_pkg.debug ('p_term_date '||p_term_date);

Line 1225: PN_VAR_RENT_PKG.INSERT_PERIODS_ROW

1221: IF l_period_exists = 'N' THEN /* Insert the period if it does not exist */
1222: --call to insert into PN_VAR_PERIODS;
1223:
1224: pnp_debug_pkg.debug(' period exists ...N');
1225: PN_VAR_RENT_PKG.INSERT_PERIODS_ROW
1226: (X_ROWID => l_rowId,
1227: X_PERIOD_ID => l_periodId,
1228: X_PERIOD_NUM => l_periodNum,
1229: X_VAR_RENT_ID => p_var_rent_id,

Line 1274: IF l_status = pn_var_rent_pkg.status THEN

1270:
1271: pnp_debug_pkg.debug('period end date is equsal to period in data base ..');
1272:
1273: /* Make the period as active if it is inactive */
1274: IF l_status = pn_var_rent_pkg.status THEN
1275:
1276: pnp_debug_pkg.debug('period is inactive ..'||l_period_id);
1277: UPDATE pn_var_periods_all
1278: SET status = NULL

Line 1380: PN_VAR_RENT_PKG.INSERT_GRP_DATE_ROW

1376: pnp_debug_pkg.debug ('l_group_exists = N');
1377: ------------------------------------------------------------
1378: --call to insert into PN_VAR_GRP_DATES;
1379: ------------------------------------------------------------
1380: PN_VAR_RENT_PKG.INSERT_GRP_DATE_ROW
1381: (X_ROWID => l_rowId,
1382: X_GRP_DATE_ID => l_grpDateId,
1383: X_VAR_RENT_ID => p_var_rent_id,
1384: X_PERIOD_ID => p_period_id,

Line 1487: PN_VAR_RENT_PKG.INSERT_GRP_DATE_ROW

1483:
1484: ------------------------------------------------------------
1485: --call to insert into PN_VAR_GRP_DATES;
1486: ------------------------------------------------------------
1487: PN_VAR_RENT_PKG.INSERT_GRP_DATE_ROW
1488: (X_ROWID => l_rowId,
1489: X_GRP_DATE_ID => l_grpDateId,
1490: X_VAR_RENT_ID => p_var_rent_id,
1491: X_PERIOD_ID => p_period_id,

Line 1596: PN_VAR_RENT_PKG.INSERT_GRP_DATE_ROW

1592: ------------------------------------------------------------
1593: --call to insert into PN_VAR_GRP_DATES;
1594: ------------------------------------------------------------
1595:
1596: PN_VAR_RENT_PKG.INSERT_GRP_DATE_ROW
1597: (X_ROWID => l_rowId,
1598: X_GRP_DATE_ID => l_grpDateId,
1599: X_VAR_RENT_ID => p_var_rent_id,
1600: X_PERIOD_ID => p_period_id,

Line 1704: PN_VAR_RENT_PKG.INSERT_GRP_DATE_ROW

1700:
1701: ------------------------------------------------------------
1702: --call to insert into PN_VAR_GRP_DATES;
1703: ------------------------------------------------------------
1704: PN_VAR_RENT_PKG.INSERT_GRP_DATE_ROW
1705: (X_ROWID => l_rowId,
1706: X_GRP_DATE_ID => l_grpDateId,
1707: X_VAR_RENT_ID => p_var_rent_id,
1708: X_PERIOD_ID => p_period_id,

Line 1762: PN_VAR_RENT_PKG.delete_report_date_row(p_var_rent_id, NULL);

1758: END LOOP;
1759:
1760: END LOOP;
1761:
1762: PN_VAR_RENT_PKG.delete_report_date_row(p_var_rent_id, NULL);
1763: PN_VAR_RENT_PKG.create_report_dates (p_var_rent_id);
1764:
1765: END IF; --p_create_flag
1766:

Line 1763: PN_VAR_RENT_PKG.create_report_dates (p_var_rent_id);

1759:
1760: END LOOP;
1761:
1762: PN_VAR_RENT_PKG.delete_report_date_row(p_var_rent_id, NULL);
1763: PN_VAR_RENT_PKG.create_report_dates (p_var_rent_id);
1764:
1765: END IF; --p_create_flag
1766:
1767: -- for each group date record created above update with corresponding invoice dates

Line 2080: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.CREATE_VAR_RENT_PERIODS (-)');

2076: END LOOP;
2077:
2078: END LOOP;
2079:
2080: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.CREATE_VAR_RENT_PERIODS (-)');
2081:
2082: END CREATE_VAR_RENT_PERIODS;
2083:
2084: /*=============================================================================+

Line 2117: -- Pass org id to PN_VAR_RENT_PKG.INSERT_GRP_DATE_ROW

2113: -- We prorate for the first partial period, but use a annual
2114: -- breakpoint in the last period.
2115: --
2116: -- 26-OCT-05 piagrawa o Bug#4702709 - Passed org id in insert row handler.
2117: -- Pass org id to PN_VAR_RENT_PKG.INSERT_GRP_DATE_ROW
2118: -- 05-jan-06 piagrawa o Bug #4630098 - added handling for passing correct
2119: -- proration factor to insert_grp_date_row.
2120: -- 11-JAN-07 Pseeram o Added the call create_report_dates
2121: -- 21-MAR-07 Lbala o Bug # 5937888 - added code to change reptg_due_date

Line 2219: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.CREATE_VAR_RENT_PERIODS_NOCAL (+)');

2215: AND start_date = p_start_date;
2216:
2217: BEGIN
2218:
2219: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.CREATE_VAR_RENT_PERIODS_NOCAL (+)');
2220: put_log('PN_VAR_RENT_PKG.CREATE_VAR_RENT_PERIODS_NOCAL (+)');
2221:
2222: SELECT VR.commencement_date,
2223: VR.termination_date,

Line 2220: put_log('PN_VAR_RENT_PKG.CREATE_VAR_RENT_PERIODS_NOCAL (+)');

2216:
2217: BEGIN
2218:
2219: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.CREATE_VAR_RENT_PERIODS_NOCAL (+)');
2220: put_log('PN_VAR_RENT_PKG.CREATE_VAR_RENT_PERIODS_NOCAL (+)');
2221:
2222: SELECT VR.commencement_date,
2223: VR.termination_date,
2224: DECODE(VR.proration_days,'999',365,VR.proration_days),

Line 2315: PN_VAR_RENT_PKG.INSERT_PERIODS_ROW

2311: pnp_debug_pkg.debug('New Period Start Date:'||vr_periods(i).l_period_start_date);
2312: pnp_debug_pkg.debug('New Period End Date:'||vr_periods(i).l_period_end_date);
2313: pnp_debug_pkg.debug('partial period ...'||l_partial_period);
2314:
2315: PN_VAR_RENT_PKG.INSERT_PERIODS_ROW
2316: ( X_ROWID => l_rowId,
2317: X_PERIOD_ID => VR_periods(i).l_period_id,
2318: X_PERIOD_NUM => l_periodNum,
2319: X_VAR_RENT_ID => p_var_rent_id,

Line 2365: IF l_status = pn_var_rent_pkg.status THEN

2361:
2362: pnp_debug_pkg.debug('period end date is equsal to period in data base ..');
2363:
2364: /* Make the period as active if it is inactive */
2365: IF l_status = pn_var_rent_pkg.status THEN
2366:
2367: pnp_debug_pkg.debug('period is inactive ..'||l_periodId);
2368:
2369: UPDATE pn_var_periods_all

Line 2547: PN_VAR_RENT_PKG.INSERT_GRP_DATE_ROW

2543: l_proration_Factor := 1;
2544:
2545: END IF;
2546:
2547: PN_VAR_RENT_PKG.INSERT_GRP_DATE_ROW
2548: ( X_ROWID => l_rowId,
2549: X_GRP_DATE_ID => l_grpDateId,
2550: X_VAR_RENT_ID => p_var_rent_id,
2551: X_PERIOD_ID => VR_periods(i).l_period_id,

Line 2629: PN_VAR_RENT_PKG.delete_report_date_row(p_var_rent_id, NULL);

2625: END LOOP;
2626:
2627: END LOOP;
2628:
2629: PN_VAR_RENT_PKG.delete_report_date_row(p_var_rent_id, NULL);
2630: PN_VAR_RENT_PKG.create_report_dates (p_var_rent_id);
2631:
2632: put_log('PN_VAR_RENT_PKG.CREATE_VAR_RENT_PERIODS_NOCAL (-)');
2633: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.CREATE_VAR_RENT_PERIODS_NOCAL (-)');

Line 2630: PN_VAR_RENT_PKG.create_report_dates (p_var_rent_id);

2626:
2627: END LOOP;
2628:
2629: PN_VAR_RENT_PKG.delete_report_date_row(p_var_rent_id, NULL);
2630: PN_VAR_RENT_PKG.create_report_dates (p_var_rent_id);
2631:
2632: put_log('PN_VAR_RENT_PKG.CREATE_VAR_RENT_PERIODS_NOCAL (-)');
2633: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.CREATE_VAR_RENT_PERIODS_NOCAL (-)');
2634:

Line 2632: put_log('PN_VAR_RENT_PKG.CREATE_VAR_RENT_PERIODS_NOCAL (-)');

2628:
2629: PN_VAR_RENT_PKG.delete_report_date_row(p_var_rent_id, NULL);
2630: PN_VAR_RENT_PKG.create_report_dates (p_var_rent_id);
2631:
2632: put_log('PN_VAR_RENT_PKG.CREATE_VAR_RENT_PERIODS_NOCAL (-)');
2633: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.CREATE_VAR_RENT_PERIODS_NOCAL (-)');
2634:
2635: END CREATE_VAR_RENT_PERIODS_NOCAL;
2636:

Line 2633: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.CREATE_VAR_RENT_PERIODS_NOCAL (-)');

2629: PN_VAR_RENT_PKG.delete_report_date_row(p_var_rent_id, NULL);
2630: PN_VAR_RENT_PKG.create_report_dates (p_var_rent_id);
2631:
2632: put_log('PN_VAR_RENT_PKG.CREATE_VAR_RENT_PERIODS_NOCAL (-)');
2633: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.CREATE_VAR_RENT_PERIODS_NOCAL (-)');
2634:
2635: END CREATE_VAR_RENT_PERIODS_NOCAL;
2636:
2637: /*=============================================================================+

Line 2684: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_RENT_PERIODS (+)');

2680: l_date DATE;
2681:
2682: BEGIN
2683:
2684: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_RENT_PERIODS (+)');
2685:
2686: l_lines_exist := PN_VAR_RENT_PKG.find_if_lines_exist(p_var_rent_id, NULL, l_date);
2687:
2688: l_constr_exist:= PN_VAR_RENT_PKG.find_if_constr_exist(p_var_rent_id, l_date);

Line 2686: l_lines_exist := PN_VAR_RENT_PKG.find_if_lines_exist(p_var_rent_id, NULL, l_date);

2682: BEGIN
2683:
2684: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_RENT_PERIODS (+)');
2685:
2686: l_lines_exist := PN_VAR_RENT_PKG.find_if_lines_exist(p_var_rent_id, NULL, l_date);
2687:
2688: l_constr_exist:= PN_VAR_RENT_PKG.find_if_constr_exist(p_var_rent_id, l_date);
2689:
2690: l_date := NVL(p_term_date,(TO_DATE('01/01/1776','mm/dd/yyyy')));

Line 2688: l_constr_exist:= PN_VAR_RENT_PKG.find_if_constr_exist(p_var_rent_id, l_date);

2684: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_RENT_PERIODS (+)');
2685:
2686: l_lines_exist := PN_VAR_RENT_PKG.find_if_lines_exist(p_var_rent_id, NULL, l_date);
2687:
2688: l_constr_exist:= PN_VAR_RENT_PKG.find_if_constr_exist(p_var_rent_id, l_date);
2689:
2690: l_date := NVL(p_term_date,(TO_DATE('01/01/1776','mm/dd/yyyy')));
2691:
2692: -- Added by Sathesh K 15-APR-2005 to delete schedules and items records

Line 2764: pn_var_rent_pkg.delete_report_date_row(p_var_rent_id,l_date);

2760: IF SQL%NOTFOUND THEN
2761: NULL;
2762: END IF;
2763:
2764: pn_var_rent_pkg.delete_report_date_row(p_var_rent_id,l_date);
2765:
2766: pn_var_rent_pkg.delete_grp_date_row(p_var_rent_id,l_date);
2767:
2768: IF l_lines_exist IS NOT NULL THEN

Line 2766: pn_var_rent_pkg.delete_grp_date_row(p_var_rent_id,l_date);

2762: END IF;
2763:
2764: pn_var_rent_pkg.delete_report_date_row(p_var_rent_id,l_date);
2765:
2766: pn_var_rent_pkg.delete_grp_date_row(p_var_rent_id,l_date);
2767:
2768: IF l_lines_exist IS NOT NULL THEN
2769: pn_var_rent_pkg.delete_var_rent_lines(p_var_rent_id,l_date);
2770: END IF;

Line 2769: pn_var_rent_pkg.delete_var_rent_lines(p_var_rent_id,l_date);

2765:
2766: pn_var_rent_pkg.delete_grp_date_row(p_var_rent_id,l_date);
2767:
2768: IF l_lines_exist IS NOT NULL THEN
2769: pn_var_rent_pkg.delete_var_rent_lines(p_var_rent_id,l_date);
2770: END IF;
2771:
2772: IF l_constr_exist IS NOT NULL THEN
2773: pn_var_rent_pkg.delete_var_rent_constr(p_var_rent_id,l_date);

Line 2773: pn_var_rent_pkg.delete_var_rent_constr(p_var_rent_id,l_date);

2769: pn_var_rent_pkg.delete_var_rent_lines(p_var_rent_id,l_date);
2770: END IF;
2771:
2772: IF l_constr_exist IS NOT NULL THEN
2773: pn_var_rent_pkg.delete_var_rent_constr(p_var_rent_id,l_date);
2774: END IF;
2775:
2776: pn_var_rent_pkg.delete_periods_row(p_var_rent_id,l_date);
2777:

Line 2776: pn_var_rent_pkg.delete_periods_row(p_var_rent_id,l_date);

2772: IF l_constr_exist IS NOT NULL THEN
2773: pn_var_rent_pkg.delete_var_rent_constr(p_var_rent_id,l_date);
2774: END IF;
2775:
2776: pn_var_rent_pkg.delete_periods_row(p_var_rent_id,l_date);
2777:
2778: /*DELETE FROM pn_var_transactions_all
2779: WHERE var_rent_id = p_var_rent_id;*/
2780:

Line 2803: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_RENT_PERIODS (-)');

2799: IF SQL%NOTFOUND THEN
2800: NULL;
2801: END IF;
2802:
2803: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_RENT_PERIODS (-)');
2804:
2805: END DELETE_VAR_RENT_PERIODS;
2806:
2807: /*=============================================================================+

Line 2856: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.UPDATE_VAR_RENT_PERIODS (+)');

2852: p_cumulative_vol VARCHAR2(1);
2853:
2854: BEGIN
2855:
2856: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.UPDATE_VAR_RENT_PERIODS (+)');
2857:
2858: -- Get dates/info, GL calendar used from Variable Rent record
2859:
2860: SELECT DECODE(cal.reptg_freq_code,'MON', 1,

Line 2950: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.UPDATE_VAR_RENT_PERIODS (-)');

2946: AND grp_start_date <= p_term_date
2947: AND grp_end_date >= p_term_date
2948: AND rownum < 2;
2949:
2950: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.UPDATE_VAR_RENT_PERIODS (-)');
2951:
2952: END UPDATE_VAR_RENT_PERIODS;
2953:
2954: /*===========================================================================+

Line 2999: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_RENT_CONSTR (+)');

2995: AND end_date > l_date);
2996:
2997: BEGIN
2998:
2999: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_RENT_CONSTR (+)');
3000:
3001: FOR constr_rec IN c1 LOOP
3002:
3003: PN_VAR_CONSTRAINTS_PKG.DELETE_ROW(constr_rec.constraint_id);

Line 3014: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_RENT_CONSTR (-)');

3010: END IF;
3011:
3012: END LOOP;
3013:
3014: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_RENT_CONSTR (-)');
3015:
3016: END DELETE_VAR_RENT_CONSTR;
3017:
3018: /*===========================================================================+

Line 3071: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_RENT_LINES (+)');

3067: AND end_date > l_date);
3068:
3069: BEGIN
3070:
3071: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_RENT_LINES (+)');
3072:
3073: FOR lines_rec IN c1 LOOP
3074:
3075: l_bkptshd_exist := PN_VAR_RENT_PKG.find_if_bkptshd_exist(lines_rec.line_item_id);

Line 3075: l_bkptshd_exist := PN_VAR_RENT_PKG.find_if_bkptshd_exist(lines_rec.line_item_id);

3071: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_RENT_LINES (+)');
3072:
3073: FOR lines_rec IN c1 LOOP
3074:
3075: l_bkptshd_exist := PN_VAR_RENT_PKG.find_if_bkptshd_exist(lines_rec.line_item_id);
3076: -------------------------------------------------------------------------
3077: -- First delete breakpoints associated with each line associated with each
3078: -- period for this variable rent record
3079: -------------------------------------------------------------------------

Line 3081: PN_VAR_RENT_PKG.DELETE_VAR_BKPTS_HEAD(lines_rec.line_item_id);

3077: -- First delete breakpoints associated with each line associated with each
3078: -- period for this variable rent record
3079: -------------------------------------------------------------------------
3080: IF l_bkptshd_exist IS NOT NULL THEN
3081: PN_VAR_RENT_PKG.DELETE_VAR_BKPTS_HEAD(lines_rec.line_item_id);
3082: END IF;
3083:
3084: l_volhist_exist := PN_VAR_RENT_PKG.find_if_volhist_exist(lines_rec.line_item_id);
3085: -------------------------------------------------------------------------

Line 3084: l_volhist_exist := PN_VAR_RENT_PKG.find_if_volhist_exist(lines_rec.line_item_id);

3080: IF l_bkptshd_exist IS NOT NULL THEN
3081: PN_VAR_RENT_PKG.DELETE_VAR_BKPTS_HEAD(lines_rec.line_item_id);
3082: END IF;
3083:
3084: l_volhist_exist := PN_VAR_RENT_PKG.find_if_volhist_exist(lines_rec.line_item_id);
3085: -------------------------------------------------------------------------
3086: -- First delete volume history associated with each line associated with each
3087: -- period for this variable rent record
3088: -------------------------------------------------------------------------

Line 3090: PN_VAR_RENT_PKG.DELETE_VAR_VOL_HIST(lines_rec.line_item_id);

3086: -- First delete volume history associated with each line associated with each
3087: -- period for this variable rent record
3088: -------------------------------------------------------------------------
3089: IF l_volhist_exist IS NOT NULL THEN
3090: PN_VAR_RENT_PKG.DELETE_VAR_VOL_HIST(lines_rec.line_item_id);
3091: END IF;
3092:
3093: l_deduct_exist := PN_VAR_RENT_PKG.find_if_deduct_exist(lines_rec.line_item_id);
3094: -------------------------------------------------------------------------

Line 3093: l_deduct_exist := PN_VAR_RENT_PKG.find_if_deduct_exist(lines_rec.line_item_id);

3089: IF l_volhist_exist IS NOT NULL THEN
3090: PN_VAR_RENT_PKG.DELETE_VAR_VOL_HIST(lines_rec.line_item_id);
3091: END IF;
3092:
3093: l_deduct_exist := PN_VAR_RENT_PKG.find_if_deduct_exist(lines_rec.line_item_id);
3094: -------------------------------------------------------------------------
3095: -- First delete deductions associated with each line associated with each
3096: -- period for this variable rent record
3097: -------------------------------------------------------------------------

Line 3099: PN_VAR_RENT_PKG.DELETE_VAR_RENT_DEDUCT(lines_rec.line_item_id);

3095: -- First delete deductions associated with each line associated with each
3096: -- period for this variable rent record
3097: -------------------------------------------------------------------------
3098: IF l_deduct_exist IS NOT NULL THEN
3099: PN_VAR_RENT_PKG.DELETE_VAR_RENT_DEDUCT(lines_rec.line_item_id);
3100: END IF;
3101: -------------------------------------------------------------------------
3102: -- Delete lines associated with each period for this variable rent record
3103: -------------------------------------------------------------------------

Line 3115: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_RENT_LINES (-)');

3111: END IF;
3112:
3113: END LOOP;
3114:
3115: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_RENT_LINES (-)');
3116:
3117: END DELETE_VAR_RENT_LINES;
3118:
3119: /*===========================================================================+

Line 3156: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_RENT_DEDUCT (+)');

3152: WHERE line_item_id = p_line_item_id;
3153:
3154: BEGIN
3155:
3156: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_RENT_DEDUCT (+)');
3157:
3158: FOR deduct_rec IN c1 LOOP
3159:
3160: PN_VAR_DEDUCTIONS_PKG.DELETE_ROW(deduct_rec.deduction_id);

Line 3171: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_RENT_DEDUCT (-)');

3167: END IF;
3168:
3169: END LOOP;
3170:
3171: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_RENT_DEDUCT (-)');
3172:
3173: END DELETE_VAR_RENT_DEDUCT;
3174:
3175: /*===========================================================================+

Line 3214: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_VOL_HIST (+)');

3210: WHERE line_item_id = p_line_item_id;
3211:
3212: BEGIN
3213:
3214: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_VOL_HIST (+)');
3215:
3216: FOR vol_hist_rec IN c1 LOOP
3217:
3218: PN_VAR_VOL_HIST_PKG.DELETE_ROW(vol_hist_rec.vol_hist_id);

Line 3229: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_VOL_HIST (-)');

3225: END IF;
3226:
3227: END LOOP;
3228:
3229: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_VOL_HIST (-)');
3230:
3231: END DELETE_VAR_VOL_HIST;
3232:
3233: /*===========================================================================+

Line 3274: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_BKPTS_HEAD (+)');

3270: WHERE line_item_id = p_line_item_id;
3271:
3272: BEGIN
3273:
3274: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_BKPTS_HEAD (+)');
3275:
3276: FOR head_rec IN c2 LOOP
3277:
3278: l_bkptsdet_exist := PN_VAR_RENT_PKG.find_if_bkptsdet_exist(head_rec.bkpt_header_id);

Line 3278: l_bkptsdet_exist := PN_VAR_RENT_PKG.find_if_bkptsdet_exist(head_rec.bkpt_header_id);

3274: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_BKPTS_HEAD (+)');
3275:
3276: FOR head_rec IN c2 LOOP
3277:
3278: l_bkptsdet_exist := PN_VAR_RENT_PKG.find_if_bkptsdet_exist(head_rec.bkpt_header_id);
3279: -------------------------------------------------------------------------
3280: -- First DELETE breakpoINt details ASsociated with each breakpoINt header
3281: -------------------------------------------------------------------------
3282: IF l_bkptsdet_exist IS NOT NULL THEN

Line 3283: PN_VAR_RENT_PKG.DELETE_VAR_BKPTS_DET(head_rec.bkpt_header_id);

3279: -------------------------------------------------------------------------
3280: -- First DELETE breakpoINt details ASsociated with each breakpoINt header
3281: -------------------------------------------------------------------------
3282: IF l_bkptsdet_exist IS NOT NULL THEN
3283: PN_VAR_RENT_PKG.DELETE_VAR_BKPTS_DET(head_rec.bkpt_header_id);
3284: END IF;
3285: -----------------------------------------------------
3286: -- DELETE breakpoINt header ASsociated with each lINe
3287: -----------------------------------------------------

Line 3292: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_BKPTS_HEAD (-)');

3288: PN_VAR_BKPTS_HEAD_PKG.DELETE_ROW(head_rec.bkpt_header_id);
3289:
3290: END LOOP;
3291:
3292: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_BKPTS_HEAD (-)');
3293:
3294: END DELETE_VAR_BKPTS_HEAD;
3295:
3296: /*===========================================================================+

Line 3335: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_BKPTS_DET (+)');

3331: WHERE bkpt_header_id = p_bkpt_header_id;
3332:
3333: BEGIN
3334:
3335: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_BKPTS_DET (+)');
3336:
3337: FOR det_rec IN c1 LOOP
3338:
3339: PN_VAR_BKPTS_DET_PKG.DELETE_ROW(det_rec.bkpt_detail_id);

Line 3343: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_BKPTS_DET (-)');

3339: PN_VAR_BKPTS_DET_PKG.DELETE_ROW(det_rec.bkpt_detail_id);
3340:
3341: END LOOP;
3342:
3343: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_BKPTS_DET (-)');
3344:
3345: END DELETE_VAR_BKPTS_DET;
3346:
3347: /*===========================================================================+

Line 3378: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_PERIOD_EXISTS (+)');

3374: l_period_exists NUMBER;
3375:
3376: BEGIN
3377:
3378: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_PERIOD_EXISTS (+)');
3379:
3380: SELECT 1
3381: INTO l_period_exists
3382: FROM dual

Line 3389: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_PERIOD_EXISTS (-)');

3385: WHERE periods.var_rent_id = p_var_rent_id);
3386:
3387: RETURN l_period_exists;
3388:
3389: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_PERIOD_EXISTS (-)');
3390:
3391: EXCEPTION
3392:
3393: WHEN OTHERS THEN

Line 3430: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_CALCULATION_EXISTS (+)');

3426: l_calculation_exists NUMBER;
3427:
3428: BEGIN
3429:
3430: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_CALCULATION_EXISTS (+)');
3431:
3432: SELECT 1
3433: INTO l_calculation_exists
3434: FROM dual

Line 3441: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_CALCULATION_EXISTS (-)');

3437: WHERE inv.var_rent_id = p_var_rent_id);
3438:
3439: RETURN l_calculation_exists;
3440:
3441: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_CALCULATION_EXISTS (-)');
3442:
3443: EXCEPTION
3444:
3445: WHEN OTHERS THEN

Line 3481: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_INVOICE_EXISTS (+)');

3477: l_invoice_exists NUMBER;
3478:
3479: BEGIN
3480:
3481: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_INVOICE_EXISTS (+)');
3482:
3483: SELECT 1
3484: INTO l_invoice_exists
3485: FROM dual

Line 3492: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_INVOICE_EXISTS (-)');

3488: WHERE inv.var_rent_id = p_var_rent_id);
3489:
3490: RETURN l_invoice_exists;
3491:
3492: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_INVOICE_EXISTS (-)');
3493:
3494: EXCEPTION
3495:
3496: WHEN OTHERS THEN

Line 3548: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_RENT_INVOICES (+)');

3544:
3545:
3546: BEGIN
3547:
3548: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_RENT_INVOICES (+)');
3549:
3550: l_date := NVL(p_term_date,(TO_DATE('01/01/1776','mm/dd/yyyy')));
3551:
3552: l_lines_exist := PN_VAR_RENT_PKG.find_if_lines_exist(p_var_rent_id, NULL, l_date);

Line 3552: l_lines_exist := PN_VAR_RENT_PKG.find_if_lines_exist(p_var_rent_id, NULL, l_date);

3548: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_RENT_INVOICES (+)');
3549:
3550: l_date := NVL(p_term_date,(TO_DATE('01/01/1776','mm/dd/yyyy')));
3551:
3552: l_lines_exist := PN_VAR_RENT_PKG.find_if_lines_exist(p_var_rent_id, NULL, l_date);
3553:
3554: l_constr_exist:= PN_VAR_RENT_PKG.find_if_constr_exist(p_var_rent_id, l_date);
3555:
3556: DELETE FROM pn_payment_items_all

Line 3554: l_constr_exist:= PN_VAR_RENT_PKG.find_if_constr_exist(p_var_rent_id, l_date);

3550: l_date := NVL(p_term_date,(TO_DATE('01/01/1776','mm/dd/yyyy')));
3551:
3552: l_lines_exist := PN_VAR_RENT_PKG.find_if_lines_exist(p_var_rent_id, NULL, l_date);
3553:
3554: l_constr_exist:= PN_VAR_RENT_PKG.find_if_constr_exist(p_var_rent_id, l_date);
3555:
3556: DELETE FROM pn_payment_items_all
3557: WHERE payment_term_id IN
3558: (SELECT payment_term_id

Line 3625: l_volhist_exist := PN_VAR_RENT_PKG.find_if_volhist_exist(lines_rec.line_item_id);

3621: END IF;
3622:
3623: FOR lines_rec IN c1 LOOP
3624:
3625: l_volhist_exist := PN_VAR_RENT_PKG.find_if_volhist_exist(lines_rec.line_item_id);
3626: -------------------------------------------------------------------------
3627: -- First delete volume history associated with each line associated with each
3628: -- period for this variable rent record
3629: -------------------------------------------------------------------------

Line 3631: PN_VAR_RENT_PKG.DELETE_VAR_VOL_HIST(lines_rec.line_item_id);

3627: -- First delete volume history associated with each line associated with each
3628: -- period for this variable rent record
3629: -------------------------------------------------------------------------
3630: IF l_volhist_exist IS NOT NULL THEN
3631: PN_VAR_RENT_PKG.DELETE_VAR_VOL_HIST(lines_rec.line_item_id);
3632: END IF;
3633:
3634: l_deduct_exist := PN_VAR_RENT_PKG.find_if_deduct_exist(lines_rec.line_item_id);
3635: -------------------------------------------------------------------------

Line 3634: l_deduct_exist := PN_VAR_RENT_PKG.find_if_deduct_exist(lines_rec.line_item_id);

3630: IF l_volhist_exist IS NOT NULL THEN
3631: PN_VAR_RENT_PKG.DELETE_VAR_VOL_HIST(lines_rec.line_item_id);
3632: END IF;
3633:
3634: l_deduct_exist := PN_VAR_RENT_PKG.find_if_deduct_exist(lines_rec.line_item_id);
3635: -------------------------------------------------------------------------
3636: -- First delete deductions associated with each line associated with each
3637: -- period for this variable rent record
3638: -------------------------------------------------------------------------

Line 3640: PN_VAR_RENT_PKG.DELETE_VAR_RENT_DEDUCT(lines_rec.line_item_id);

3636: -- First delete deductions associated with each line associated with each
3637: -- period for this variable rent record
3638: -------------------------------------------------------------------------
3639: IF l_deduct_exist IS NOT NULL THEN
3640: PN_VAR_RENT_PKG.DELETE_VAR_RENT_DEDUCT(lines_rec.line_item_id);
3641: END IF;
3642:
3643: END LOOP;
3644:

Line 3645: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_RENT_INVOICES (-)');

3641: END IF;
3642:
3643: END LOOP;
3644:
3645: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DELETE_VAR_RENT_INVOICES (-)');
3646:
3647: END DELETE_VAR_RENT_INVOICES;
3648:
3649: /*===========================================================================+

Line 3680: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_VRDATES_EXISTS (+)');

3676: l_vrdates_exists NUMBER;
3677:
3678: BEGIN
3679:
3680: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_VRDATES_EXISTS (+)');
3681:
3682: SELECT 1
3683: INTO l_vrdates_exists
3684: FROM dual

Line 3691: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_VRDATES_EXISTS (-)');

3687: WHERE dates.var_rent_id = p_var_rent_id);
3688:
3689: RETURN l_vrdates_exists;
3690:
3691: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_VRDATES_EXISTS (-)');
3692:
3693: EXCEPTION
3694:
3695: WHEN OTHERS THEN

Line 3737: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_LINES_EXIST (+)');

3733: l_date DATE;
3734:
3735: BEGIN
3736:
3737: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_LINES_EXIST (+)');
3738:
3739: l_date := nvl(p_term_date,(to_date('01/01/1776','mm/dd/yyyy')));
3740:
3741: SELECT 1

Line 3756: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_LINES_EXIST (-)');

3752: );
3753:
3754: RETURN l_lines_exist;
3755:
3756: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_LINES_EXIST (-)');
3757:
3758: EXCEPTION
3759:
3760: WHEN OTHERS THEN

Line 3796: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_VOLHIST_EXIST (+)');

3792: l_volhist_exist NUMBER;
3793:
3794: BEGIN
3795:
3796: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_VOLHIST_EXIST (+)');
3797:
3798: SELECT 1
3799: INTO l_volhist_exist
3800: FROM dual

Line 3808: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_VOLHIST_EXIST (-)');

3804: );
3805:
3806: RETURN l_volhist_exist;
3807:
3808: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_VOLHIST_EXIST (-)');
3809:
3810: EXCEPTION
3811:
3812: WHEN OTHERS THEN

Line 3852: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_VOLHIST_APPROVED_EXIST (+)');

3848: l_volhist_approved_exist VARCHAR2(1);
3849:
3850: BEGIN
3851:
3852: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_VOLHIST_APPROVED_EXIST (+)');
3853:
3854: SELECT 'Y'
3855: INTO l_volhist_approved_exist
3856: FROM dual

Line 3866: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_VOLHIST_APPROVED_EXIST (-)');

3862: );
3863:
3864: RETURN l_volhist_approved_exist;
3865:
3866: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_VOLHIST_APPROVED_EXIST (-)');
3867:
3868: EXCEPTION
3869:
3870: WHEN OTHERS THEN

Line 3937: IF PN_VAR_RENT_PKG.find_if_volhist_exist( i.line_item_id ) IS NOT NULL THEN

3933:
3934: IF p_id_type = 'LINE_ITEM_ID' THEN
3935:
3936: FOR i IN c_bkptshd_line_item( p_id ) LOOP
3937: IF PN_VAR_RENT_PKG.find_if_volhist_exist( i.line_item_id ) IS NOT NULL THEN
3938: l_volhist_bkpts_exist := PN_VAR_RENT_PKG.find_if_bkptsdet_exist( i.bkpt_header_id );
3939: IF l_volhist_bkpts_exist IS NOT NULL THEN
3940: RETURN l_volhist_bkpts_exist;
3941: END IF;

Line 3938: l_volhist_bkpts_exist := PN_VAR_RENT_PKG.find_if_bkptsdet_exist( i.bkpt_header_id );

3934: IF p_id_type = 'LINE_ITEM_ID' THEN
3935:
3936: FOR i IN c_bkptshd_line_item( p_id ) LOOP
3937: IF PN_VAR_RENT_PKG.find_if_volhist_exist( i.line_item_id ) IS NOT NULL THEN
3938: l_volhist_bkpts_exist := PN_VAR_RENT_PKG.find_if_bkptsdet_exist( i.bkpt_header_id );
3939: IF l_volhist_bkpts_exist IS NOT NULL THEN
3940: RETURN l_volhist_bkpts_exist;
3941: END IF;
3942: END IF;

Line 3948: IF PN_VAR_RENT_PKG.find_if_volhist_exist( i.line_item_id ) IS NOT NULL THEN

3944:
3945: ELSIF p_id_type = 'PERIOD_ID' THEN
3946:
3947: FOR i in c_bkptshd_period ( p_id ) LOOP
3948: IF PN_VAR_RENT_PKG.find_if_volhist_exist( i.line_item_id ) IS NOT NULL THEN
3949: l_volhist_bkpts_exist := PN_VAR_RENT_PKG.find_if_bkptsdet_exist( i.bkpt_header_id );
3950: IF l_volhist_bkpts_exist IS NOT NULL THEN
3951: RETURN l_volhist_bkpts_exist;
3952: END IF;

Line 3949: l_volhist_bkpts_exist := PN_VAR_RENT_PKG.find_if_bkptsdet_exist( i.bkpt_header_id );

3945: ELSIF p_id_type = 'PERIOD_ID' THEN
3946:
3947: FOR i in c_bkptshd_period ( p_id ) LOOP
3948: IF PN_VAR_RENT_PKG.find_if_volhist_exist( i.line_item_id ) IS NOT NULL THEN
3949: l_volhist_bkpts_exist := PN_VAR_RENT_PKG.find_if_bkptsdet_exist( i.bkpt_header_id );
3950: IF l_volhist_bkpts_exist IS NOT NULL THEN
3951: RETURN l_volhist_bkpts_exist;
3952: END IF;
3953: END IF;

Line 3959: IF PN_VAR_RENT_PKG.find_if_volhist_exist( i.line_item_id ) IS NOT NULL THEN

3955:
3956: ELSIF p_id_type = 'VAR_RENT_ID' THEN
3957:
3958: FOR i IN c_bkptshd_var_rent ( p_id ) LOOP
3959: IF PN_VAR_RENT_PKG.find_if_volhist_exist( i.line_item_id ) IS NOT NULL THEN
3960: l_volhist_bkpts_exist := PN_VAR_RENT_PKG.find_if_bkptsdet_exist( i.bkpt_header_id );
3961: IF l_volhist_bkpts_exist IS NOT NULL THEN
3962: RETURN l_volhist_bkpts_exist;
3963: END IF;

Line 3960: l_volhist_bkpts_exist := PN_VAR_RENT_PKG.find_if_bkptsdet_exist( i.bkpt_header_id );

3956: ELSIF p_id_type = 'VAR_RENT_ID' THEN
3957:
3958: FOR i IN c_bkptshd_var_rent ( p_id ) LOOP
3959: IF PN_VAR_RENT_PKG.find_if_volhist_exist( i.line_item_id ) IS NOT NULL THEN
3960: l_volhist_bkpts_exist := PN_VAR_RENT_PKG.find_if_bkptsdet_exist( i.bkpt_header_id );
3961: IF l_volhist_bkpts_exist IS NOT NULL THEN
3962: RETURN l_volhist_bkpts_exist;
3963: END IF;
3964: END IF;

Line 3971: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_BKPTS_EXIST (+)');

3967: END IF;
3968:
3969: RETURN l_volhist_bkpts_exist;
3970:
3971: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_BKPTS_EXIST (+)');
3972:
3973: END find_if_volhist_bkpts_exist;
3974:
3975: /*===========================================================================+

Line 4011: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_CONSTR_EXIST (+)');

4007: l_date DATE;
4008:
4009: BEGIN
4010:
4011: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_CONSTR_EXIST (+)');
4012:
4013: l_date := NVL(p_term_date,(TO_DATE('01/01/1776','mm/dd/yyyy')));
4014:
4015: SELECT 1

Line 4029: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_CONSTR_EXIST (-)');

4025: );
4026:
4027: RETURN l_constr_exist;
4028:
4029: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_CONSTR_EXIST (-)');
4030:
4031: EXCEPTION
4032:
4033: WHEN OTHERS THEN

Line 4072: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_ABAT_DEF_EXIST (+)');

4068: l_abat_exist NUMBER;
4069:
4070: BEGIN
4071:
4072: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_ABAT_DEF_EXIST (+)');
4073:
4074: SELECT 1
4075: INTO l_abat_exist
4076: FROM dual

Line 4084: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_ABAT_DEF_EXIST (-)');

4080: );
4081:
4082: RETURN l_abat_exist;
4083:
4084: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_ABAT_DEF_EXIST (-)');
4085:
4086: EXCEPTION
4087:
4088: WHEN OTHERS THEN

Line 4128: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_CONSTR_DEF_EXIST (+)');

4124: l_constr_exist NUMBER;
4125:
4126: BEGIN
4127:
4128: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_CONSTR_DEF_EXIST (+)');
4129:
4130: SELECT 1
4131: INTO l_constr_exist
4132: FROM dual

Line 4140: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_CONSTR_DEF_EXIST (-)');

4136: );
4137:
4138: RETURN l_constr_exist;
4139:
4140: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_CONSTR_DEF_EXIST (-)');
4141:
4142: EXCEPTION
4143:
4144: WHEN OTHERS THEN

Line 4180: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_DEDUCT_EXIST (+)');

4176: l_deduct_exist NUMBER;
4177:
4178: BEGIN
4179:
4180: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_DEDUCT_EXIST (+)');
4181:
4182: SELECT 1
4183: INTO l_deduct_exist
4184: FROM dual

Line 4192: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_DEDUCT_EXIST (-)');

4188: );
4189:
4190: RETURN l_deduct_exist;
4191:
4192: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_DEDUCT_EXIST (-)');
4193:
4194: EXCEPTION
4195:
4196: WHEN OTHERS THEN

Line 4232: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.LOCK_ROW_EXCEPTION (+)');

4228: PROCEDURE LOCK_ROW_EXCEPTION (p_column_name IN VARCHAR2,
4229: p_new_value IN VARCHAR2)
4230: IS
4231: BEGIN
4232: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.LOCK_ROW_EXCEPTION (+)');
4233:
4234: fnd_message.set_name ('PN','PN_RECORD_CHANGED');
4235: fnd_message.set_token ('COLUMN_NAME',p_column_name);
4236: fnd_message.set_token ('NEW_VALUE',p_new_value);

Line 4239: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.LOCK_ROW_EXCEPTION (-)');

4235: fnd_message.set_token ('COLUMN_NAME',p_column_name);
4236: fnd_message.set_token ('NEW_VALUE',p_new_value);
4237: app_exception.raise_exception;
4238:
4239: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.LOCK_ROW_EXCEPTION (-)');
4240: END lock_row_exception;
4241:
4242: /*===========================================================================+
4243: | FUNCTION

Line 4304: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_REPORTING_PERIODS (+)');

4300: l_reporting_periods NUMBER;
4301:
4302: BEGIN
4303:
4304: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_REPORTING_PERIODS (+)');
4305:
4306: SELECT count(GRP_START_DATE)
4307: INTO l_reporting_periods
4308: FROM pn_var_grp_dates_all

Line 4313: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_REPORTING_PERIODS (-)');

4309: WHERE period_id = p_period_id;
4310:
4311: RETURN l_reporting_periods;
4312:
4313: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_REPORTING_PERIODS (-)');
4314:
4315: EXCEPTION
4316:
4317: WHEN OTHERS THEN

Line 4352: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_REPORTING_PERIODS (+)');

4348: l_reporting_periods NUMBER;
4349:
4350: BEGIN
4351:
4352: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_REPORTING_PERIODS (+)');
4353:
4354: IF p_freq_code = 'MON' THEN
4355:
4356: RETURN 12;

Line 4372: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_REPORTING_PERIODS (-)');

4368: RETURN 1;
4369:
4370: END IF;
4371:
4372: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_REPORTING_PERIODS (-)');
4373:
4374: RETURN l_reporting_periods;
4375:
4376: EXCEPTION

Line 4423: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.CALCULATE_BASE_RENT (+)');

4419: l_base_rent NUMBER;
4420:
4421: BEGIN
4422:
4423: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.CALCULATE_BASE_RENT (+)');
4424:
4425: IF (p_base_rent_type = 'ROLLING') THEN
4426:
4427: SELECT SUM(item.ACTUAL_AMOUNT)

Line 4475: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.CALCULATE_BASE_RENT (-)');

4471: AND term.currency_code = var.currency_code;
4472:
4473: END IF;
4474:
4475: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.CALCULATE_BASE_RENT (-)');
4476:
4477: RETURN l_base_rent;
4478:
4479: EXCEPTION

Line 4528: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.GET_GRP_DATE_INFO (+)');

4524: l_grp_date_info GRP_DATE_INFO_REC ;
4525:
4526: BEGIN
4527:
4528: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.GET_GRP_DATE_INFO (+)');
4529:
4530: SELECT grp_date_id,
4531: grp_start_date,
4532: grp_end_date,

Line 4550: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.GET_GRP_DATE_INFO (-)');

4546: AND grp_end_date >= p_start_date
4547: AND grp_end_date >= p_end_date
4548: AND rownum = 1;
4549:
4550: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.GET_GRP_DATE_INFO (-)');
4551:
4552: RETURN l_grp_date_info;
4553:
4554: EXCEPTION

Line 4598: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.GET_PRORATION_FACTOR (+)');

4594: l_proration_factor PRORATION_FACTOR_REC ;
4595:
4596: BEGIN
4597:
4598: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.GET_PRORATION_FACTOR (+)');
4599:
4600: SELECT
4601: (p1.end_date-p1.start_date)+1 first_period_pro_days,
4602: p1.proration_factor first_period_gl_days,

Line 4629: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.GET_PRORATION_FACTOR (-)');

4625: AND g2.grp_date_id = (SELECT max(grp_date_id)
4626: FROM pn_var_grp_dates
4627: WHERE var_rent_id = p_var_rent_id);
4628:
4629: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.GET_PRORATION_FACTOR (-)');
4630:
4631: RETURN l_proration_factor;
4632:
4633: EXCEPTION

Line 4673: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_BKPTSHD_EXIST (+)');

4669: l_bkptshd_exists NUMBER;
4670:
4671: BEGIN
4672:
4673: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_BKPTSHD_EXIST (+)');
4674:
4675: SELECT 1
4676: INTO l_bkptshd_exists
4677: FROM dual

Line 4682: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_BKPTSHD_EXIST (-)');

4678: WHERE EXISTS ( SELECT head.bkpt_header_id
4679: FROM pn_var_bkpts_head_ALL head
4680: WHERE head.line_item_id = p_line_item_id);
4681:
4682: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_BKPTSHD_EXIST (-)');
4683:
4684: RETURN l_bkptshd_exists;
4685:
4686: EXCEPTION

Line 4724: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_BKPTSDET_EXIST (+)');

4720: l_bkptsdet_exist NUMBER;
4721:
4722: BEGIN
4723:
4724: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_BKPTSDET_EXIST (+)');
4725:
4726: SELECT 1
4727: INTO l_bkptsdet_exist
4728: FROM dual

Line 4733: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_BKPTSDET_EXIST (-)');

4729: WHERE EXISTS ( SELECT det.bkpt_detail_id
4730: FROM pn_var_bkpts_det_ALL det
4731: WHERE det.bkpt_header_id = p_bkpt_header_id);
4732:
4733: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_BKPTSDET_EXIST (-)');
4734:
4735: RETURN l_bkptsdet_exist;
4736:
4737: EXCEPTION

Line 4792: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_EXPORTED (+)');

4788: l_exported NUMBER;
4789:
4790: BEGIN
4791:
4792: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_EXPORTED (+)');
4793:
4794: IF p_block IN('SUMMARY_FDR_BLK','VARENT_DATES_BLK') THEN
4795:
4796: SELECT 1

Line 4893: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_EXPORTED (-)');

4889:
4890:
4891: END IF;
4892:
4893: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_EXPORTED (-)');
4894:
4895: RETURN l_exported;
4896:
4897: EXCEPTION

Line 4936: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_EXPORTED (+)');

4932: l_exported NUMBER;
4933:
4934: BEGIN
4935: NULL;
4936: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_EXPORTED (+)');
4937: SELECT 1
4938: INTO l_exported
4939: FROM dual
4940: WHERE EXISTS ( SELECT vol_hist_id

Line 4946: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_EXPORTED (-)');

4942: WHERE vol_hist_id = p_id
4943: AND forecasted_exp_code = 'Y'
4944: );
4945:
4946: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_EXPORTED (-)');
4947:
4948: RETURN l_exported;
4949:
4950: EXCEPTION

Line 4994: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_STATUS (+)');

4990: l_status VARCHAR2(30);
4991:
4992: BEGIN
4993:
4994: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_STATUS (+)');
4995:
4996: SELECT 'COMPLETE'
4997: INTO l_status
4998: FROM dual

Line 5016: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_STATUS (-)');

5012: (actual_exp_code = 'N' AND FORECASTED_exp_code ='Y' AND variance_exp_code = 'Y')
5013: )
5014: );
5015:
5016: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_STATUS (-)');
5017:
5018: RETURN l_status;
5019:
5020: EXCEPTION

Line 5079: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_ADJUST_HIST_EXISTS (+)');

5075: l_adjust_hist_exists NUMBER := NULL;
5076:
5077: BEGIN
5078:
5079: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_ADJUST_HIST_EXISTS (+)');
5080:
5081: SELECT 1
5082: INTO l_adjust_hist_exists
5083: FROM dual

Line 5090: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_ADJUST_HIST_EXISTS (-)');

5086: WHERE inv1.period_id = p_period_id
5087: AND (NVL(inv1.adjust_num,0) <> 0 OR
5088: NVL(inv1.true_up_amt,0) <> 0 ));
5089:
5090: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_ADJUST_HIST_EXISTS (-)');
5091:
5092: RETURN l_adjust_hist_exists;
5093:
5094: EXCEPTION

Line 5146: pnp_debug_pkg.debug( 'pn_var_rent_pkg.approved_term_exist (+): ');

5142: l_term_exISts VARCHAR2(1) := 'N';
5143:
5144: BEGIN
5145:
5146: pnp_debug_pkg.debug( 'pn_var_rent_pkg.approved_term_exist (+): ');
5147:
5148: FOR chk_term_cur_rec IN chk_term_cur LOOP
5149: l_term_exists := chk_term_cur_rec.term_exists;
5150: END LOOP;

Line 5152: pnp_debug_pkg.debug( 'pn_var_rent_pkg.approved_term_exist (-): ');

5148: FOR chk_term_cur_rec IN chk_term_cur LOOP
5149: l_term_exists := chk_term_cur_rec.term_exists;
5150: END LOOP;
5151:
5152: pnp_debug_pkg.debug( 'pn_var_rent_pkg.approved_term_exist (-): ');
5153:
5154: RETURN l_term_exists;
5155:
5156: END approved_term_exist;

Line 5182: pnp_debug_pkg.debug( 'pn_var_rent_pkg.delet_INv_summ(+): ');

5178: l_bkptsdet_exISt NUMBER := NULL;
5179:
5180: BEGIN
5181:
5182: pnp_debug_pkg.debug( 'pn_var_rent_pkg.delet_INv_summ(+): ');
5183:
5184: OPEN c_exist;
5185: LOOP
5186:

Line 5190: l_bkptsdet_exist := PN_VAR_RENT_PKG.find_if_bkptsdet_exist(l_bkpt_header_id);

5186:
5187: FETCH c_exist INTO l_bkpt_header_id;
5188: EXIT when c_exist%NOTFOUND;
5189:
5190: l_bkptsdet_exist := PN_VAR_RENT_PKG.find_if_bkptsdet_exist(l_bkpt_header_id);
5191:
5192: -------------------------------------------------------------------------
5193: -- first delete breakpoint details associated with each breakpoint header
5194: -------------------------------------------------------------------------

Line 5196: pn_var_rent_pkg.delete_var_bkpts_det(l_bkpt_header_id);

5192: -------------------------------------------------------------------------
5193: -- first delete breakpoint details associated with each breakpoint header
5194: -------------------------------------------------------------------------
5195: IF l_bkptsdet_exist IS NOT NULL THEN
5196: pn_var_rent_pkg.delete_var_bkpts_det(l_bkpt_header_id);
5197: END IF;
5198:
5199: -----------------------------------------------------
5200: -- delete breakpoint header associated with each line

Line 5240: pnp_debug_pkg.debug( 'pn_var_rent_pkg.delet_INv_summ(-): ');

5236: IF SQL%NOTFOUND THEN
5237: NULL;
5238: END IF;
5239:
5240: pnp_debug_pkg.debug( 'pn_var_rent_pkg.delet_INv_summ(-): ');
5241:
5242: END delete_inv_summ;
5243:
5244: /*===========================================================================+

Line 5278: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_VOL_READY_FOR_ADJUST (+)');

5274: l_vol_ready_for_adjust NUMBER := NULL;
5275:
5276: BEGIN
5277:
5278: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_VOL_READY_FOR_ADJUST (+)');
5279:
5280: IF p_invoice_on = 'ACTUAL' THEN
5281:
5282: SELECT 1

Line 5310: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_VOL_READY_FOR_ADJUST (-)');

5306: AND grp.grp_date_id = vh.grp_date_id));
5307:
5308: END IF;
5309:
5310: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_VOL_READY_FOR_ADJUST (-)');
5311:
5312: RETURN l_vol_ready_for_adjust;
5313:
5314: EXCEPTION

Line 5368: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.UPDATE_LOCATION_FOR_VR_TERMS (+)');

5364: TYPE number_tbl_type IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
5365: l_payment_term_id number_tbl_type;
5366:
5367: BEGIN
5368: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.UPDATE_LOCATION_FOR_VR_TERMS (+)');
5369:
5370: OPEN C_UPD_TERMS;
5371: LOOP
5372: FETCH C_UPD_TERMS

Line 5384: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.UPDATE_LOCATION_FOR_VR_TERMS (-)');

5380: EXIT WHEN C_UPD_TERMS%NOTFOUND;
5381:
5382: END LOOP;
5383:
5384: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.UPDATE_LOCATION_FOR_VR_TERMS (-)');
5385:
5386: -- initialize api return status to success
5387: p_return_status := FND_API.G_RET_STS_SUCCESS;
5388:

Line 6434: pn_var_rent_pkg.create_var_rent_periods_nocal(p_var_rent_id => p_var_rent_id ,

6430:
6431: FOR i in v_new_periods_tbl.FIRST .. v_new_periods_tbl.LAST
6432: LOOP
6433: IF v_new_periods_tbl(i).flag = 'A' THEN
6434: pn_var_rent_pkg.create_var_rent_periods_nocal(p_var_rent_id => p_var_rent_id ,
6435: p_cumulative_vol => 'Y' ,
6436: p_yr_start_date => var_rent_dates_rec.year_start_date);
6437: END IF;
6438: END LOOP; -- end loop for v_new_periods_tbl.FIRST .. v_new_periods_tbl.LAST

Line 6916: PN_VAR_RENT_PKG.INSERT_GRP_DATE_ROW(

6912: IF vr_grp_dates(i).l_grp_start_date >= l_period_start_date AND
6913: vr_grp_dates(i).l_grp_end_date <= l_period_end_date THEN
6914: --put_log('-----------------------------------------');
6915: put_log(' Creating new group ');
6916: PN_VAR_RENT_PKG.INSERT_GRP_DATE_ROW(
6917: x_rowid => l_rowId,
6918: x_grp_date_id => l_grpDateId,
6919: x_var_rent_id => p_pn_var_rent_dates_rec.var_rent_id,
6920: x_period_id => p_period_id,

Line 6949: pn_var_rent_pkg.create_var_rent_periods(

6945:
6946: END LOOP;
6947:
6948: IF NVL(p_pn_var_rent_dates_rec.use_gl_calendar,'N') = 'Y' THEN
6949: pn_var_rent_pkg.create_var_rent_periods(
6950: p_var_rent_id => p_pn_var_rent_dates_rec.var_rent_id,
6951: p_cumulative_vol => 'Y',
6952: p_comm_date => l_vr_comm_dt,
6953: p_term_date => l_vr_term_dt,

Line 7014: put_log ('PN_VAR_RENT_PKG.create_new_bkpts (+)');

7010: retcode VARCHAR2(5000);
7011: l_default VARCHAR2(1);
7012:
7013: BEGIN
7014: put_log ('PN_VAR_RENT_PKG.create_new_bkpts (+)');
7015: FOR main_vr_rec in main_vr_cur
7016: LOOP
7017: UPDATE pn_var_rents_all
7018: SET termination_date = p_extension_end_date

Line 7053: put_log ('PN_VAR_RENT_PKG.create_new_bkpts (-)');

7049: AND line_end_date = p_old_end_date;
7050: COMMIT;
7051: END IF;
7052: END LOOP;
7053: put_log ('PN_VAR_RENT_PKG.create_new_bkpts (-)');
7054: EXCEPTION
7055: WHEN OTHERS THEN
7056: pnp_debug_pkg.debug('error ' || sqlerrm);
7057: fnd_message.set_name('PN','PN_OTHERS_EXCEPTION');

Line 7686: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_BKPTS_SETUP_EXISTS (+)');

7682: l_bkpts_exists NUMBER;
7683:
7684: BEGIN
7685:
7686: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_BKPTS_SETUP_EXISTS (+)');
7687:
7688: /*SELECT 1
7689: INTO l_bkpts_exists
7690: FROM dual

Line 7709: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_BKPTS_SETUP_EXISTS (-)');

7705: WHEN OTHERS
7706: THEN
7707: RETURN FALSE;
7708:
7709: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_BKPTS_SETUP_EXISTS (-)');
7710:
7711: END FIND_IF_BKPTS_SETUP_EXISTS;
7712:
7713: Procedure put_log(p_string VARCHAR2)

Line 7780: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DETERMINE_FREQUENCY (+)');

7776: l_freq_code PN_VAR_RENT_DATES_ALL.REPTG_FREQ_CODE%TYPE;
7777:
7778: BEGIN
7779:
7780: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DETERMINE_FREQUENCY (+)');
7781:
7782: SELECT X_VAR_RENT_END_DATE - X_VAR_RENT_START_DATE + 1
7783: INTO l_days
7784: FROM dual;

Line 7805: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DETERMINE_FREQUENCY (-)');

7801: WHEN OTHERS
7802: THEN
7803: RETURN NULL;
7804:
7805: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.DETERMINE_FREQUENCY (-)');
7806:
7807: END DETERMINE_FREQUENCY;
7808:
7809: PROCEDURE update_bkpt_details(p_var_rent_id IN NUMBER,

Line 7862: pnp_debug_pkg.debug ('pn_var_rent_pkg.delete_vr_setup (+)');

7858: PROCEDURE delete_vr_setup ( p_var_rent_id IN NUMBER
7859: ,p_new_termn_date IN DATE)
7860: IS
7861: BEGIN
7862: pnp_debug_pkg.debug ('pn_var_rent_pkg.delete_vr_setup (+)');
7863:
7864: /* Delete the data from main tables */
7865: DELETE pn_var_vol_hist_all
7866: WHERE start_date > p_new_termn_date

Line 7926: pnp_debug_pkg.debug ('pn_var_rent_pkg.delete_vr_setup (-)');

7922: DELETE pn_var_abat_defaults_all
7923: WHERE start_date > p_new_termn_date
7924: AND var_rent_id = p_var_rent_id;
7925:
7926: pnp_debug_pkg.debug ('pn_var_rent_pkg.delete_vr_setup (-)');
7927:
7928: END delete_vr_setup;
7929:
7930: -------------------------------------------------------------------------------

Line 8078: pnp_debug_pkg.debug ('pn_var_rent_pkg.remove_later_periods (+)');

8074: l_variance_exp_code VARCHAR2(1) := 'N';
8075: l_var_term_status VARCHAR2(1);
8076:
8077: BEGIN
8078: pnp_debug_pkg.debug ('pn_var_rent_pkg.remove_later_periods (+)');
8079: pnp_debug_pkg.debug (' Parameters :');
8080: pnp_debug_pkg.debug (' ------------------------------------------- :');
8081: pnp_debug_pkg.debug (' p_var_rent_id = '|| p_var_rent_id);
8082: pnp_debug_pkg.debug (' p_new_termn_date = '|| p_new_termn_date);

Line 8250: SET status = pn_var_rent_pkg.status

8246:
8247: /* OPEN ISSUE */
8248: /* Update the periods after new termination date - set status = 'Reversed' */
8249: UPDATE pn_var_periods_all
8250: SET status = pn_var_rent_pkg.status
8251: WHERE var_rent_id = p_var_rent_id
8252: AND start_date > p_new_termn_date;
8253:
8254: pnp_debug_pkg.debug ('pn_var_rent_pkg.remove_later_periods (-)');

Line 8254: pnp_debug_pkg.debug ('pn_var_rent_pkg.remove_later_periods (-)');

8250: SET status = pn_var_rent_pkg.status
8251: WHERE var_rent_id = p_var_rent_id
8252: AND start_date > p_new_termn_date;
8253:
8254: pnp_debug_pkg.debug ('pn_var_rent_pkg.remove_later_periods (-)');
8255:
8256: EXCEPTION
8257: WHEN OTHERS THEN
8258: pnp_debug_pkg.debug (' Remove Later Periods Error:'||SQLERRM);

Line 8372: pnp_debug_pkg.debug ('pn_var_rent_pkg.early_terminate_setup (+)');

8368: l_inv_sch_date DATE := NULL;
8369: l_period_id NUMBER := 0;
8370:
8371: BEGIN
8372: pnp_debug_pkg.debug ('pn_var_rent_pkg.early_terminate_setup (+)');
8373: pnp_debug_pkg.debug ('p_var_rent_id ....'||p_var_rent_id);
8374: pnp_debug_pkg.debug ('p_period_id ......'||p_period_id);
8375: pnp_debug_pkg.debug ('p_new_termn_date ...'||p_new_termn_date);
8376:

Line 8435: PN_VAR_RENT_PKG.DELETE_REPORT_DATE_ROW(p_var_rent_id, p_new_termn_date);

8431: reptg_due_date = l_due_date
8432: WHERE var_rent_id = p_var_rent_id
8433: AND p_new_termn_date BETWEEN grp_start_date AND grp_end_date;
8434:
8435: PN_VAR_RENT_PKG.DELETE_REPORT_DATE_ROW(p_var_rent_id, p_new_termn_date);
8436:
8437: UPDATE pn_var_report_dates_all
8438: SET report_end_date = p_new_termn_date
8439: WHERE grp_date_id = l_group_date_id

Line 8520: pnp_debug_pkg.debug ('pn_var_rent_pkg.early_terminate_setup (-)');

8516: Partial_period = 'Y'
8517: WHERE var_rent_id = p_var_rent_id
8518: AND period_id = p_period_id;
8519:
8520: pnp_debug_pkg.debug ('pn_var_rent_pkg.early_terminate_setup (-)');
8521: END;
8522:
8523: -------------------------------------------------------------------------------
8524: -- NAME : early_terminate_period

Line 8633: pnp_debug_pkg.debug ('pn_var_rent_pkg.early_terminate_period (+)');

8629: l_variance_exp_code VARCHAR2(1) := 'N';
8630: l_var_term_status VARCHAR2(1);
8631:
8632: BEGIN
8633: pnp_debug_pkg.debug ('pn_var_rent_pkg.early_terminate_period (+)');
8634: pnp_debug_pkg.debug ('p_var_rent_id ...'||p_var_rent_id);
8635: pnp_debug_pkg.debug ('p_period_id ....'||p_period_id);
8636: pnp_debug_pkg.debug ('p_new_termn_date ...'||p_new_termn_date);
8637: pnp_debug_pkg.debug ('p_old_termn_date ....'||p_old_termn_date);

Line 8763: pnp_debug_pkg.debug ('pn_var_rent_pkg.early_terminate_period (-)');

8759: END IF;
8760:
8761: END LOOP;
8762:
8763: pnp_debug_pkg.debug ('pn_var_rent_pkg.early_terminate_period (-)');
8764:
8765: END early_terminate_period;
8766:
8767:

Line 8771: pnp_debug_pkg.debug ('pn_var_rent_pkg.delete_var_agreement (+)');

8767:
8768: PROCEDURE delete_var_agreement ( p_var_rent_id IN NUMBER)
8769: IS
8770: BEGIN
8771: pnp_debug_pkg.debug ('pn_var_rent_pkg.delete_var_agreement (+)');
8772:
8773: /* Delete the data from main tables */
8774: DELETE pn_var_vol_hist_all
8775: WHERE period_id IN (SELECT period_id

Line 8836: pnp_debug_pkg.debug ('pn_var_rent_pkg.delete_var_agreement (-)');

8832:
8833: DELETE pn_var_rents_all
8834: WHERE var_rent_id = p_var_rent_id;
8835:
8836: pnp_debug_pkg.debug ('pn_var_rent_pkg.delete_var_agreement (-)');
8837:
8838: END delete_var_agreement;
8839:
8840: -------------------------------------------------------------------------------

Line 8930: pnp_debug_pkg.debug ('pn_var_rent_pkg.process_vr_early_term (+)');

8926: WHERE var_rent_id = p_var_rent_id
8927: AND inv_end_date <= p_new_termn_date;
8928:
8929: BEGIN
8930: pnp_debug_pkg.debug ('pn_var_rent_pkg.process_vr_early_term (+)');
8931: pnp_debug_pkg.debug (' Parameters :');
8932: pnp_debug_pkg.debug (' ------------------------------------------- :');
8933: pnp_debug_pkg.debug ('p_lease_id..'||p_lease_id);
8934: pnp_debug_pkg.debug ('p_var_rent_id ...'||p_var_rent_id);

Line 9075: pnp_debug_pkg.debug ('pn_var_rent_pkg.process_vr_early_term (-)');

9071:
9072: END LOOP;
9073: END IF;
9074:
9075: pnp_debug_pkg.debug ('pn_var_rent_pkg.process_vr_early_term (-)');
9076:
9077: EXCEPTION
9078: WHEN OTHERS THEN
9079: pnp_debug_pkg.debug ('Process_vr_early_term Error:'||SQLERRM);

Line 9155: pnp_debug_pkg.debug ('pn_var_rent_pkg.extend_defaults (+)');

9151: l_ret_code VARCHAR2(250);
9152: l_bkpt_exists VARCHAR2(1);
9153:
9154: BEGIN
9155: pnp_debug_pkg.debug ('pn_var_rent_pkg.extend_defaults (+)');
9156: pnp_debug_pkg.debug ('p_var_rent_id .. '||p_var_rent_id);
9157: pnp_debug_pkg.debug ('p_old_termn_date ..'||p_old_termn_date);
9158: pnp_debug_pkg.debug ('p_new_termn_date ..'||p_new_termn_date);
9159:

Line 9217: pnp_debug_pkg.debug ('pn_var_rent_pkg.extend_defaults (-)');

9213:
9214: pn_var_defaults_pkg.create_default_constraints (x_var_rent_id => p_var_rent_id);
9215: END LOOP;
9216:
9217: pnp_debug_pkg.debug ('pn_var_rent_pkg.extend_defaults (-)');
9218: END;
9219:
9220: -------------------------------------------------------------------------------
9221: -- NAME : Create_setup_exp

Line 9395: pnp_debug_pkg.debug ('pn_var_rent_pkg.create_setup_exp (+)');

9391: l_constrnum NUMBER := NULL;
9392:
9393: BEGIN
9394:
9395: pnp_debug_pkg.debug ('pn_var_rent_pkg.create_setup_exp (+)');
9396: pnp_debug_pkg.debug ('p_var_rent_id .. '||p_var_rent_id);
9397: pnp_debug_pkg.debug ('p_period_id ..'||p_period_id);
9398:
9399: /* Fetch the end date of period which was the last one before expansion */

Line 9600: pnp_debug_pkg.debug ('pn_var_rent_pkg.create_setup_exp (-)');

9596: END LOOP;
9597:
9598: END LOOP;
9599:
9600: pnp_debug_pkg.debug ('pn_var_rent_pkg.create_setup_exp (-)');
9601: END;
9602:
9603: -------------------------------------------------------------------------------
9604: -- NAME : update_setup_exp

Line 9625: pnp_debug_pkg.debug ('pn_var_rent_pkg.update_setup_exp (+)');

9621: WHERE var_rent_id = p_var_rent_id
9622: AND period_id = p_period_id;
9623:
9624: BEGIN
9625: pnp_debug_pkg.debug ('pn_var_rent_pkg.update_setup_exp (+)');
9626: pnp_debug_pkg.debug ('p_var_rent_id .. '||p_var_rent_id);
9627: pnp_debug_pkg.debug ('p_old_termn_date ..'||p_old_termn_date);
9628:
9629: FOR period_rec IN period_cur LOOP

Line 9654: pnp_debug_pkg.debug ('pn_var_rent_pkg.update_setup_exp (-)');

9650: , p_period_id => p_period_id);
9651:
9652: END LOOP;
9653:
9654: pnp_debug_pkg.debug ('pn_var_rent_pkg.update_setup_exp (-)');
9655:
9656: END;
9657:
9658: -------------------------------------------------------------------------------

Line 9735: pnp_debug_pkg.debug ('pn_var_rent_pkg.create_rev_term_LY_FLY (+) ');

9731: l_actual_invoiced_amount NUMBER := 0;
9732: l_invoice_inserted BOOLEAN := FALSE;
9733: BEGIN
9734:
9735: pnp_debug_pkg.debug ('pn_var_rent_pkg.create_rev_term_LY_FLY (+) ');
9736:
9737: DELETE pn_payment_terms_all
9738: WHERE var_rent_inv_id IN (SELECT var_rent_inv_id
9739: FROM pn_var_rent_inv_all

Line 9836: pnp_debug_pkg.debug ('pn_var_rent_pkg.create_rev_term_LY_FLY (-) ');

9832: END LOOP;
9833: END IF;
9834: END LOOP;
9835:
9836: pnp_debug_pkg.debug ('pn_var_rent_pkg.create_rev_term_LY_FLY (-) ');
9837:
9838: END create_rev_term_LY_FLY;
9839:
9840: -------------------------------------------------------------------------------

Line 9905: pnp_debug_pkg.debug ('pn_var_rent_pkg.process_vr_ext (+)');

9901: l_retcode VARCHAR2(250);
9902: l_date DATE := SYSDATE;
9903:
9904: BEGIN
9905: pnp_debug_pkg.debug ('pn_var_rent_pkg.process_vr_ext (+)');
9906: pnp_debug_pkg.debug ('p_lease_id '||p_lease_id );
9907: pnp_debug_pkg.debug ('p_var_rent_id '||p_var_rent_id );
9908: pnp_debug_pkg.debug ('p_new_termn_date'||p_new_termn_date);
9909: pnp_debug_pkg.debug ('p_old_termn_date'||p_old_termn_date);

Line 9938: pn_var_rent_pkg.create_var_rent_periods_nocal(p_var_rent_id => main_vr_rec.var_rent_id ,

9934: beyond the old termination date */
9935: IF NVL(main_vr_rec.use_gl_calendar,'N') = 'N' THEN
9936:
9937: pnp_debug_pkg.debug ('making a call to create_var_rent_periods_nocal ...');
9938: pn_var_rent_pkg.create_var_rent_periods_nocal(p_var_rent_id => main_vr_rec.var_rent_id ,
9939: p_cumulative_vol => main_vr_rec.cumulative_vol ,
9940: p_yr_start_date => main_vr_rec.year_start_date);
9941:
9942: ELSIF NVL(main_vr_rec.use_gl_calendar,'N') = 'Y' THEN

Line 9944: pn_var_rent_pkg.create_var_rent_periods( p_var_rent_id => main_vr_rec.var_rent_id,

9940: p_yr_start_date => main_vr_rec.year_start_date);
9941:
9942: ELSIF NVL(main_vr_rec.use_gl_calendar,'N') = 'Y' THEN
9943: pnp_debug_pkg.debug ('making a call to create_var_rent_periods ...');
9944: pn_var_rent_pkg.create_var_rent_periods( p_var_rent_id => main_vr_rec.var_rent_id,
9945: p_cumulative_vol => main_vr_rec.cumulative_vol,
9946: p_comm_date => main_vr_rec.commencement_date,
9947: p_term_date => p_new_termn_date,
9948: p_create_flag => 'Y');

Line 10005: pnp_debug_pkg.debug ('pn_var_rent_pkg.process_vr_ext (-)');

10001: WHERE var_rent_id = main_vr_rec.var_rent_id;
10002:
10003: END LOOP;
10004:
10005: pnp_debug_pkg.debug ('pn_var_rent_pkg.process_vr_ext (-)');
10006:
10007: EXCEPTION
10008: WHEN OTHERS THEN
10009: pnp_debug_pkg.debug ('Process_vr_early_term Error:'||SQLERRM);

Line 10096: pnp_debug_pkg.log('pn_var_rent_pkg.process_vr_exp_con +Start+ (+)');

10092: FROM pn_lease_details_all
10093: WHERE lease_change_id = p_lease_change_id;
10094:
10095: BEGIN
10096: pnp_debug_pkg.log('pn_var_rent_pkg.process_vr_exp_con +Start+ (+)');
10097: pnp_debug_pkg.log('Lease_ID : '||p_lease_id);
10098: pnp_debug_pkg.log('Lease_Chang_ID : '||p_lease_change_id);
10099: pnp_debug_pkg.log('Old Termination date : '||p_old_term_date);
10100: pnp_debug_pkg.log('New Termination date : '||p_new_term_date);

Line 10219: pnp_debug_pkg.log('pn_var_rent_pkg.process_vr_exp_con +End+ (+)');

10215: END IF;
10216:
10217: END IF;
10218:
10219: pnp_debug_pkg.log('pn_var_rent_pkg.process_vr_exp_con +End+ (+)');
10220:
10221: EXCEPTION
10222: WHEN SCH_ITEMS_FAILED_EXCEPTION THEN
10223: fnd_message.set_name ('PN', 'PN_SCH_ITEMS_REQ_FAILED');

Line 10990: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_INV_EXP (+)');

10986: l_inv_exp NUMBER;
10987:
10988: BEGIN
10989:
10990: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_INV_EXP (+)');
10991:
10992: SELECT 1
10993: INTO l_inv_exp
10994: FROM dual

Line 11003: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_INV_EXP (-)');

10999: AND (forecasted_exp_code = 'Y'));
11000:
11001: RETURN l_inv_exp;
11002:
11003: pnp_debug_pkg.debug ('PN_VAR_RENT_PKG.FIND_IF_INV_EXP (-)');
11004:
11005: EXCEPTION
11006:
11007: WHEN OTHERS THEN

Line 11114: pnp_debug_pkg.log('pn_var_rent_pkg.rates_validation (+)');

11110: AND bkdt_end_date BETWEEN p_start_date AND p_end_date;
11111:
11112: BEGIN
11113:
11114: pnp_debug_pkg.log('pn_var_rent_pkg.rates_validation (+)');
11115:
11116: FOR var_rec in var_cur(p_vr_id => p_var_rent_id) LOOP
11117: IF p_agr_start_date IS NOT NULL THEN
11118: l_agr_start_date := p_agr_start_date;

Line 11366: pnp_debug_pkg.log('pn_var_rent_pkg.rates_validation (-)');

11362: END IF;
11363:
11364: RETURN l_return_status;
11365:
11366: pnp_debug_pkg.log('pn_var_rent_pkg.rates_validation (-)');
11367:
11368: END rates_validation;
11369:
11370:

Line 11371: END PN_VAR_RENT_PKG;

11367:
11368: END rates_validation;
11369:
11370:
11371: END PN_VAR_RENT_PKG;