DBA Data[Home] [Help]

APPS.PN_VAR_RENT_CALC_PKG dependencies on PN_VAR_RENTS

Line 80: pn_var_rents_all

76: CURSOR vr_start_date_c(p_vr_id IN NUMBER) IS
77: SELECT
78: commencement_date
79: FROM
80: pn_var_rents_all
81: WHERE
82: var_rent_id = p_vr_id;
83:
84: /* get first period details */

Line 144: pn_var_rents_all

140: CURSOR vr_end_date_c(p_vr_id IN NUMBER) IS
141: SELECT
142: termination_date
143: FROM
144: pn_var_rents_all
145: WHERE
146: var_rent_id = p_vr_id;
147:
148: /* get last period details */

Line 564: pn_var_rents_all var

560: prd.period_id
561: ,prd.partial_period
562: FROM
563: pn_var_periods_all prd,
564: pn_var_rents_all var
565: WHERE
566: prd.var_rent_id = p_vr_id AND
567: prd.var_rent_id = var.var_rent_id AND
568: prd.end_date = var.termination_date;

Line 577: pn_var_rents_all var

573: prd.period_id
574: ,prd.partial_period
575: FROM
576: pn_var_periods_all prd,
577: pn_var_rents_all var
578: WHERE
579: prd.var_rent_id = p_vr_id AND
580: prd.var_rent_id = var.var_rent_id AND
581: prd.start_date = var.commencement_date;

Line 1831: FROM pn_var_rents_all

1827:
1828: /* get ORG ID */
1829: CURSOR org_c(p_vr_id IN NUMBER) IS
1830: SELECT org_id, commencement_date
1831: FROM pn_var_rents_all
1832: WHERE var_rent_id = p_vr_id;
1833:
1834:
1835: /* get FY sales */

Line 2205: FROM pn_var_rents_all

2201:
2202: /* get ORG ID */
2203: CURSOR org_c(p_vr_id IN NUMBER) IS
2204: SELECT org_id, termination_date
2205: FROM pn_var_rents_all
2206: WHERE var_rent_id = p_vr_id;
2207:
2208: /* get LY sales */
2209: CURSOR ly_sales_c( p_vr_id IN NUMBER

Line 2661: FROM PN_VAR_RENTS_ALL abat

2657: IS
2658: -- Allowances first ot abatements?
2659: CURSOR order_c(ip_var_rent_id NUMBER) IS
2660: SELECT ORDER_OF_APPL_CODE, invoice_on, termination_date
2661: FROM PN_VAR_RENTS_ALL abat
2662: WHERE abat.var_rent_id = ip_var_rent_id;
2663:
2664: -- Get the details of
2665: CURSOR inv_c( ip_var_rent_id NUMBER,

Line 2715: FROM pn_var_rents_all vr,

2711: G_INV_ON_ACTUAL, actual_exp_code,
2712: G_INV_ON_FORECASTED, variance_exp_code) AS
2713: exp_code,
2714: inv.actual_invoiced_amount
2715: FROM pn_var_rents_all vr,
2716: pn_var_rent_inv_all inv
2717: WHERE vr.var_rent_id = inv.var_rent_id
2718: AND inv.var_rent_inv_id = ip_var_rent_inv_id;
2719:

Line 2939: FROM pn_var_rents_all

2935: AND inv1.invoice_date = inv.invoice_date);
2936: CURSOR csr_get_abt(ip_var_rent_id NUMBER)
2937: IS
2938: SELECT negative_rent
2939: FROM pn_var_rents_all
2940: WHERE var_rent_id = ip_var_rent_id;
2941: -- Get the details of
2942: CURSOR temp_c(ip_var_rent_inv_id NUMBER
2943: ) IS

Line 2955: l_negative_rent_flag pn_var_rents.negative_rent%TYPE;

2951: l_negative_available NUMBER := 0;
2952: l_negative_applied NUMBER := 0;
2953: l_negative_remaining NUMBER;
2954: l_abated_rent NUMBER;
2955: l_negative_rent_flag pn_var_rents.negative_rent%TYPE;
2956: l_last_invoice_dt pn_var_grp_dates.invoice_date%TYPE;
2957: BEGIN
2958: pnp_debug_pkg.log('apply_neg_rent start(+)');
2959: -- Get the negative rent flag

Line 3101: FROM pn_var_rents_all

3097: AND inv1.invoice_date = inv.invoice_date);
3098: CURSOR csr_get_abt(ip_var_rent_id NUMBER)
3099: IS
3100: SELECT negative_rent
3101: FROM pn_var_rents_all
3102: WHERE var_rent_id = ip_var_rent_id;
3103:
3104:
3105: l_negative_rent pn_var_rent_inv.negative_rent%TYPE := 0;

Line 3110: l_negative_rent_flag pn_var_rents.negative_rent%TYPE;

3106: l_negative_available NUMBER := 0;
3107: l_negative_applied NUMBER := 0;
3108: l_negative_remaining NUMBER;
3109: l_abated_rent NUMBER;
3110: l_negative_rent_flag pn_var_rents.negative_rent%TYPE;
3111: l_last_invoice_dt pn_var_grp_dates.invoice_date%TYPE;
3112: BEGIN
3113: pnp_debug_pkg.log('apply_def_neg_rent start(+)');
3114: -- Get the negative rent flag

Line 3227: FROM pn_var_rents_all

3223:
3224: CURSOR csr_get_abt(ip_var_rent_id NUMBER)
3225: IS
3226: SELECT negative_rent
3227: FROM pn_var_rents_all
3228: WHERE var_rent_id = ip_var_rent_id;
3229:
3230: l_neg_rent_def NUMBER;
3231: l_negative_rent pn_var_rent_inv.negative_rent%TYPE := 0;

Line 3236: l_negative_rent_flag pn_var_rents.negative_rent%TYPE;

3232: l_negative_available NUMBER := 0;
3233: l_negative_applied NUMBER := 0;
3234: l_negative_remaining NUMBER;
3235: l_abated_rent NUMBER;
3236: l_negative_rent_flag pn_var_rents.negative_rent%TYPE;
3237: l_last_invoice_dt pn_var_grp_dates.invoice_date%TYPE;
3238: BEGIN
3239: pnp_debug_pkg.log('populate_neg_rent start(+)');
3240: -- Get the negative rent flag

Line 3332: FROM PN_VAR_RENTS_ALL ABAT

3328: AND type_code = pn_var_rent_calc_pkg.G_ABAT_TYPE_CODE_ABAT;
3329: -- Get the details of
3330: CURSOR EXCESS_ABAT_C(ip_var_rent_id NUMBER) IS
3331: SELECT EXCESS_ABAT_CODE
3332: FROM PN_VAR_RENTS_ALL ABAT
3333: WHERE abat.var_rent_id = ip_var_rent_id;
3334: -- Get the details of inv_start, end_date
3335: CURSOR invoice_dates_c(ip_var_rent_id NUMBER,
3336: ip_invoice_date DATE

Line 3377: FROM pn_var_rents_all

3373: -- Get the details of negative_rent
3374: CURSOR neg_rent_c(ip_var_rent_id NUMBER
3375: ) IS
3376: SELECT negative_rent
3377: FROM pn_var_rents_all
3378: WHERE var_rent_id = ip_var_rent_id;
3379: -- Get the proration type
3380: CURSOR proration_type_c(ip_var_rent_id NUMBER
3381: ) IS

Line 3383: FROM pn_var_rents_all

3379: -- Get the proration type
3380: CURSOR proration_type_c(ip_var_rent_id NUMBER
3381: ) IS
3382: SELECT proration_rule
3383: FROM pn_var_rents_all
3384: WHERE var_rent_id = ip_var_rent_id;
3385:
3386: -- Get the number of inv which should exist for a period
3387: CURSOR num_inv_c(ip_var_rent_inv_id NUMBER

Line 3390: FROM pn_var_rent_inv_all inv, pn_var_periods_all per, pn_var_rents_all vr, pn_var_rent_dates_all vrd

3386: -- Get the number of inv which should exist for a period
3387: CURSOR num_inv_c(ip_var_rent_inv_id NUMBER
3388: ) IS
3389: SELECT ceil(months_between(per.end_date, per.start_date)/decode(vrd.invg_freq_code,'YR', 12, 'SA', 6, 'QTR', 3, 'MON', 1, 1)) num_inv
3390: FROM pn_var_rent_inv_all inv, pn_var_periods_all per, pn_var_rents_all vr, pn_var_rent_dates_all vrd
3391: WHERE per.period_id = inv.period_id
3392: AND inv.var_rent_inv_id = ip_var_rent_inv_id
3393: AND per.var_rent_id = vr.var_rent_id
3394: AND vrd.var_rent_id = vr.var_rent_id;

Line 3402: FROM pn_var_rents_all vr,

3398: ) IS
3399: SELECT inv.invoice_date,
3400: inv.var_rent_inv_id,
3401: inv.period_id
3402: FROM pn_var_rents_all vr,
3403: pn_var_periods_all per,
3404: pn_var_rent_inv_all inv
3405: WHERE per.var_rent_id = vr.var_rent_id
3406: AND inv.period_id = per.period_id

Line 3638: FROM pn_var_rents_all

3634: -- Get the proration type
3635: CURSOR proration_type_c(ip_var_rent_id NUMBER
3636: ) IS
3637: SELECT proration_rule
3638: FROM pn_var_rents_all
3639: WHERE var_rent_id = ip_var_rent_id;
3640:
3641:
3642:

Line 3793: FROM pn_var_rents_all

3789: -- Get the proration type
3790: CURSOR proration_type_c(ip_var_rent_id NUMBER
3791: ) IS
3792: SELECT proration_rule
3793: FROM pn_var_rents_all
3794: WHERE var_rent_id = ip_var_rent_id;
3795:
3796:
3797: l_min_grp_date DATE;

Line 3980: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

3976:
3977: -- Get the details of
3978: CURSOR first_period_cur (p_var_rent_id NUMBER) IS
3979: SELECT pvp.period_id, pvp.partial_period
3980: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
3981: WHERE pvr.var_rent_id = p_var_rent_id
3982: AND pvp.var_rent_id = pvr.var_rent_id
3983: AND pvp.start_date = pvr.commencement_date;
3984:

Line 4665: FROM pn_var_rents_all

4661:
4662: /* get ORG ID */
4663: CURSOR org_c(p_vr_id IN NUMBER) IS
4664: SELECT org_id
4665: FROM pn_var_rents_all
4666: WHERE var_rent_id = p_vr_id;
4667:
4668: l_org_id NUMBER;
4669: l_precision NUMBER;

Line 5072: pn_var_rents_all var

5068: prd.period_id
5069: ,prd.partial_period
5070: FROM
5071: pn_var_periods_all prd,
5072: pn_var_rents_all var
5073: WHERE
5074: prd.var_rent_id = p_vr_id AND
5075: prd.var_rent_id = var.var_rent_id AND
5076: prd.end_date = var.termination_date;

Line 5085: pn_var_rents_all var

5081: prd.period_id
5082: ,prd.partial_period
5083: FROM
5084: pn_var_periods_all prd,
5085: pn_var_rents_all var
5086: WHERE
5087: prd.var_rent_id = p_vr_id AND
5088: prd.var_rent_id = var.var_rent_id AND
5089: prd.start_date = var.commencement_date;

Line 5616: FROM PN_VAR_RENTS_ALL var, PN_VAR_RENT_DATES_ALL dates

5612: ,'SA' ,6
5613: ,'YR' ,12
5614: ,NULL) invg_freq_code,
5615: var.proration_rule
5616: FROM PN_VAR_RENTS_ALL var, PN_VAR_RENT_DATES_ALL dates
5617: WHERE var.var_rent_id = vr_id
5618: AND dates.var_rent_id = var.var_rent_id;
5619:
5620:

Line 5712: FROM PN_VAR_RENTS_ALL var

5708: CURSOR inv_start_date_cur IS
5709: SELECT var.proration_rule,
5710: var.commencement_date,
5711: var.termination_date
5712: FROM PN_VAR_RENTS_ALL var
5713: WHERE var.var_rent_id = vr_id;
5714:
5715:
5716: CURSOR period_cur IS

Line 5806: FROM PN_VAR_RENTS_ALL var, PN_VAR_RENT_DATES_ALL dates

5802: ,'QTR',3
5803: ,'SA' ,6
5804: ,'YR' ,12
5805: ,NULL) invg_freq_code
5806: FROM PN_VAR_RENTS_ALL var, PN_VAR_RENT_DATES_ALL dates
5807: WHERE var.var_rent_id = vr_id
5808: AND dates.var_rent_id = var.var_rent_id;
5809:
5810: CURSOR last_period_cur IS

Line 6375: pn_var_rents_all pvr,

6371: pvr.rent_num,
6372: pl.org_id
6373: FROM pn_leases pl,
6374: pn_lease_details_all pld,
6375: pn_var_rents_all pvr,
6376: pn_locations_all ploc
6377: WHERE pl.lease_id = pvr.lease_id
6378: AND pld.lease_id = pvr.lease_id
6379: AND ploc.location_id = pvr.location_id

Line 6411: pn_var_rents_all pvr,

6407: pvr.rent_num,
6408: pl.org_id
6409: FROM pn_leases pl,
6410: pn_lease_details_all pld,
6411: pn_var_rents_all pvr,
6412: pn_locations_all ploc
6413: WHERE pl.lease_id = pvr.lease_id
6414: AND pld.lease_id = pvr.lease_id
6415: AND ploc.location_id = pvr.location_id

Line 6433: FROM pn_var_rents_all pvr,

6429: pvr.invoice_on,
6430: pvr.cumulative_vol,
6431: pvr.rent_num,
6432: pl.org_id
6433: FROM pn_var_rents_all pvr,
6434: pn_leases pl,
6435: pn_lease_details_all pld
6436: WHERE pl.lease_id = pvr.lease_id
6437: AND pld.lease_id = pvr.lease_id

Line 6461: l_var_rent_id pn_var_rents.var_rent_id%TYPE;

6457: AND period_num >= NVL(p_period_num_from,period_num)
6458: AND period_num <= NVL(p_period_num_to,period_num);
6459:
6460:
6461: l_var_rent_id pn_var_rents.var_rent_id%TYPE;
6462: l_invoice_on pn_var_rents.invoice_on%TYPE;
6463: l_cumulative pn_var_rents.cumulative_vol%TYPE;
6464: l_rent_num pn_var_rents.rent_num%TYPE;
6465: l_errbuf VARCHAR2(2000);

Line 6462: l_invoice_on pn_var_rents.invoice_on%TYPE;

6458: AND period_num <= NVL(p_period_num_to,period_num);
6459:
6460:
6461: l_var_rent_id pn_var_rents.var_rent_id%TYPE;
6462: l_invoice_on pn_var_rents.invoice_on%TYPE;
6463: l_cumulative pn_var_rents.cumulative_vol%TYPE;
6464: l_rent_num pn_var_rents.rent_num%TYPE;
6465: l_errbuf VARCHAR2(2000);
6466: l_retcode VARCHAR2(2000);

Line 6463: l_cumulative pn_var_rents.cumulative_vol%TYPE;

6459:
6460:
6461: l_var_rent_id pn_var_rents.var_rent_id%TYPE;
6462: l_invoice_on pn_var_rents.invoice_on%TYPE;
6463: l_cumulative pn_var_rents.cumulative_vol%TYPE;
6464: l_rent_num pn_var_rents.rent_num%TYPE;
6465: l_errbuf VARCHAR2(2000);
6466: l_retcode VARCHAR2(2000);
6467: l_ext_precision NUMBER;

Line 6464: l_rent_num pn_var_rents.rent_num%TYPE;

6460:
6461: l_var_rent_id pn_var_rents.var_rent_id%TYPE;
6462: l_invoice_on pn_var_rents.invoice_on%TYPE;
6463: l_cumulative pn_var_rents.cumulative_vol%TYPE;
6464: l_rent_num pn_var_rents.rent_num%TYPE;
6465: l_errbuf VARCHAR2(2000);
6466: l_retcode VARCHAR2(2000);
6467: l_ext_precision NUMBER;
6468: l_min_acct_unit NUMBER;

Line 6825: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

6821:
6822: -- Get the details of
6823: CURSOR first_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
6824: SELECT pvp.period_id, pvr.commencement_date
6825: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
6826: WHERE pvr.var_rent_id = p_var_rent_id
6827: AND pvp.period_id = p_period_id
6828: AND pvp.partial_period = 'Y'
6829: AND pvp.start_date = pvr.commencement_date;

Line 6835: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

6831:
6832: -- Get the details of
6833: CURSOR last_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
6834: SELECT pvp.period_id, pvr.termination_date
6835: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
6836: WHERE pvr.var_rent_id = p_var_rent_id
6837: AND pvp.period_id = p_period_id
6838: AND pvp.partial_period = 'Y'
6839: AND pvp.end_date = pvr.termination_date;

Line 6929: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

6925:
6926: -- Get the details of
6927: CURSOR first_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
6928: SELECT pvp.period_id, pvr.commencement_date
6929: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
6930: WHERE pvr.var_rent_id = p_var_rent_id
6931: AND pvp.period_id = p_period_id
6932: AND pvp.partial_period = 'Y'
6933: AND pvp.start_date = pvr.commencement_date;

Line 6939: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

6935:
6936: -- Get the details of
6937: CURSOR last_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
6938: SELECT pvp.period_id, pvr.termination_date
6939: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
6940: WHERE pvr.var_rent_id = p_var_rent_id
6941: AND pvp.period_id = p_period_id
6942: AND pvp.partial_period = 'Y'
6943: AND pvp.end_date = pvr.termination_date;

Line 7051: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

7047:
7048: -- Get the details of
7049: CURSOR first_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
7050: SELECT pvp.period_id, pvr.commencement_date
7051: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
7052: WHERE pvr.var_rent_id = p_var_rent_id
7053: AND pvp.period_id = p_period_id
7054: AND pvp.partial_period = 'Y'
7055: AND pvp.start_date = pvr.commencement_date;

Line 7061: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

7057:
7058: -- Get the details of
7059: CURSOR last_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
7060: SELECT pvp.period_id, pvr.termination_date
7061: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
7062: WHERE pvr.var_rent_id = p_var_rent_id
7063: AND pvp.period_id = p_period_id
7064: AND pvp.partial_period = 'Y'
7065: AND pvp.end_date = pvr.termination_date;

Line 7312: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

7308:
7309: -- Get the details of
7310: CURSOR first_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
7311: SELECT pvp.period_id, pvr.commencement_date
7312: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
7313: WHERE pvr.var_rent_id = p_var_rent_id
7314: AND pvp.period_id = p_period_id
7315: AND pvp.partial_period = 'Y'
7316: AND pvp.start_date = pvr.commencement_date;

Line 7322: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

7318:
7319: -- Get the details of
7320: CURSOR last_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
7321: SELECT pvp.period_id, pvr.termination_date
7322: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
7323: WHERE pvr.var_rent_id = p_var_rent_id
7324: AND pvp.period_id = p_period_id
7325: AND pvp.partial_period = 'Y'
7326: AND pvp.end_date = pvr.termination_date;

Line 7446: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

7442:
7443: -- Get the details of
7444: CURSOR first_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
7445: SELECT pvp.period_id, pvr.commencement_date
7446: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
7447: WHERE pvr.var_rent_id = p_var_rent_id
7448: AND pvp.period_id = p_period_id
7449: AND pvp.partial_period = 'Y'
7450: AND pvp.start_date = pvr.commencement_date;

Line 7456: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

7452:
7453: -- Get the details of
7454: CURSOR last_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
7455: SELECT pvp.period_id, pvr.termination_date
7456: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
7457: WHERE pvr.var_rent_id = p_var_rent_id
7458: AND pvp.period_id = p_period_id
7459: AND pvp.partial_period = 'Y'
7460: AND pvp.end_date = pvr.termination_date;

Line 7555: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

7551:
7552: -- Get the details of
7553: CURSOR first_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
7554: SELECT pvp.period_id, pvr.commencement_date
7555: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
7556: WHERE pvr.var_rent_id = p_var_rent_id
7557: AND pvp.period_id = p_period_id
7558: AND pvp.partial_period = 'Y'
7559: AND pvp.start_date = pvr.commencement_date;

Line 7565: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

7561:
7562: -- Get the details of
7563: CURSOR last_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
7564: SELECT pvp.period_id, pvr.termination_date
7565: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
7566: WHERE pvr.var_rent_id = p_var_rent_id
7567: AND pvp.period_id = p_period_id
7568: AND pvp.partial_period = 'Y'
7569: AND pvp.end_date = pvr.termination_date;

Line 7688: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

7684:
7685: -- Get the details of
7686: CURSOR first_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
7687: SELECT pvp.period_id, pvr.commencement_date
7688: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
7689: WHERE pvr.var_rent_id = p_var_rent_id
7690: AND pvp.period_id = p_period_id
7691: AND pvp.partial_period = 'Y'
7692: AND pvp.start_date = pvr.commencement_date;

Line 7698: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

7694:
7695: -- Get the details of
7696: CURSOR last_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
7697: SELECT pvp.period_id, pvr.termination_date
7698: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
7699: WHERE pvr.var_rent_id = p_var_rent_id
7700: AND pvp.period_id = p_period_id
7701: AND pvp.partial_period = 'Y'
7702: AND pvp.end_date = pvr.termination_date;

Line 7812: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

7808:
7809: -- Get the details of
7810: CURSOR first_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
7811: SELECT pvp.period_id, pvr.commencement_date
7812: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
7813: WHERE pvr.var_rent_id = p_var_rent_id
7814: AND pvp.period_id = p_period_id
7815: AND pvp.partial_period = 'Y'
7816: AND pvp.start_date = pvr.commencement_date;

Line 7822: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

7818:
7819: -- Get the details of
7820: CURSOR last_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
7821: SELECT pvp.period_id, pvr.termination_date
7822: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
7823: WHERE pvr.var_rent_id = p_var_rent_id
7824: AND pvp.period_id = p_period_id
7825: AND pvp.partial_period = 'Y'
7826: AND pvp.end_date = pvr.termination_date;

Line 7955: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

7951:
7952: -- Get the details of
7953: CURSOR first_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
7954: SELECT pvp.period_id, pvr.commencement_date
7955: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
7956: WHERE pvr.var_rent_id = p_var_rent_id
7957: AND pvp.period_id = p_period_id
7958: AND pvp.partial_period = 'Y'
7959: AND pvp.start_date = pvr.commencement_date;

Line 7965: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

7961:
7962: -- Get the details of
7963: CURSOR last_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
7964: SELECT pvp.period_id, pvr.termination_date
7965: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
7966: WHERE pvr.var_rent_id = p_var_rent_id
7967: AND pvp.period_id = p_period_id
7968: AND pvp.partial_period = 'Y'
7969: AND pvp.end_date = pvr.termination_date;

Line 8101: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

8097:
8098: -- Get the details of
8099: CURSOR first_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
8100: SELECT pvp.period_id, pvr.commencement_date
8101: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
8102: WHERE pvr.var_rent_id = p_var_rent_id
8103: AND pvp.period_id = p_period_id
8104: AND pvp.partial_period = 'Y'
8105: AND pvp.start_date = pvr.commencement_date;

Line 8111: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

8107:
8108: -- Get the details of
8109: CURSOR last_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
8110: SELECT pvp.period_id, pvr.termination_date
8111: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
8112: WHERE pvr.var_rent_id = p_var_rent_id
8113: AND pvp.period_id = p_period_id
8114: AND pvp.partial_period = 'Y'
8115: AND pvp.end_date = pvr.termination_date;

Line 8209: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

8205:
8206: -- Get the details of
8207: CURSOR first_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
8208: SELECT pvp.period_id, pvr.commencement_date
8209: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
8210: WHERE pvr.var_rent_id = p_var_rent_id
8211: AND pvp.period_id = p_period_id
8212: AND pvp.partial_period = 'Y'
8213: AND pvp.start_date = pvr.commencement_date;

Line 8219: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

8215:
8216: -- Get the details of
8217: CURSOR last_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
8218: SELECT pvp.period_id, pvr.termination_date
8219: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
8220: WHERE pvr.var_rent_id = p_var_rent_id
8221: AND pvp.period_id = p_period_id
8222: AND pvp.partial_period = 'Y'
8223: AND pvp.end_date = pvr.termination_date;

Line 8317: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

8313:
8314: -- Get the details of
8315: CURSOR first_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
8316: SELECT pvp.period_id, pvr.commencement_date
8317: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
8318: WHERE pvr.var_rent_id = p_var_rent_id
8319: AND pvp.period_id = p_period_id
8320: AND pvp.partial_period = 'Y'
8321: AND pvp.start_date = pvr.commencement_date;

Line 8326: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

8322:
8323: -- Get the details of
8324: CURSOR last_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
8325: SELECT pvp.period_id, pvr.termination_date
8326: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
8327: WHERE pvr.var_rent_id = p_var_rent_id
8328: AND pvp.period_id = p_period_id
8329: AND pvp.partial_period = 'Y'
8330: AND pvp.end_date = pvr.termination_date;

Line 8417: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

8413:
8414: -- Get the details of
8415: CURSOR first_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
8416: SELECT pvp.period_id, pvr.commencement_date
8417: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
8418: WHERE pvr.var_rent_id = p_var_rent_id
8419: AND pvp.period_id = p_period_id
8420: AND pvp.partial_period = 'Y'
8421: AND pvp.start_date = pvr.commencement_date;

Line 8426: FROM pn_var_periods_all pvp, pn_var_rents_all pvr

8422:
8423: -- Get the details of
8424: CURSOR last_period_cur (p_var_rent_id NUMBER, p_period_id NUMBER) IS
8425: SELECT pvp.period_id, pvr.termination_date
8426: FROM pn_var_periods_all pvp, pn_var_rents_all pvr
8427: WHERE pvr.var_rent_id = p_var_rent_id
8428: AND pvp.period_id = p_period_id
8429: AND pvp.partial_period = 'Y'
8430: AND pvp.end_date = pvr.termination_date;

Line 8528: pn_var_rents_all pvr

8524:
8525: CURSOR line_item_cur IS
8526: SELECT trx.line_item_group_id, pvr.commencement_date
8527: FROM pn_var_trx_headers_all trx,
8528: pn_var_rents_all pvr
8529: WHERE trx.var_rent_id = p_var_rent_id
8530: AND trx.var_rent_id = pvr.var_rent_id
8531: AND trx.line_item_id = p_line_item_id;
8532:

Line 8583: pn_var_rents_all pvr

8579:
8580: CURSOR line_item_cur IS
8581: SELECT trx.line_item_group_id, pvr.commencement_date
8582: FROM pn_var_trx_headers_all trx,
8583: pn_var_rents_all pvr
8584: WHERE trx.var_rent_id = p_var_rent_id
8585: AND trx.var_rent_id = pvr.var_rent_id
8586: AND trx.line_item_id = p_line_item_id;
8587:

Line 8638: pn_var_rents_all pvr

8634:
8635: CURSOR line_item_cur IS
8636: SELECT trx.line_item_group_id, pvr.commencement_date
8637: FROM pn_var_trx_headers_all trx,
8638: pn_var_rents_all pvr
8639: WHERE trx.var_rent_id = p_var_rent_id
8640: AND trx.var_rent_id = pvr.var_rent_id
8641: AND trx.line_item_id = p_line_item_id;
8642:

Line 8921: FROM pn_var_rents_all

8917: l_fst_inv_id NUMBER := NULL;
8918:
8919: CURSOR org_cur(p_var_rent_id IN NUMBER) IS
8920: SELECT org_id
8921: FROM pn_var_rents_all
8922: WHERE var_rent_id =p_var_rent_id;
8923:
8924: /*Cursor to get all pmt terms for a particular invoice*/
8925: CURSOR get_all_pmt_terms(p_inv_id IN NUMBER) IS

Line 8928: pn_var_rents_all vrent,

8924: /*Cursor to get all pmt terms for a particular invoice*/
8925: CURSOR get_all_pmt_terms(p_inv_id IN NUMBER) IS
8926: SELECT distinct pterm.payment_term_id payment_term_id
8927: FROM pn_payment_terms_all pterm,
8928: pn_var_rents_all vrent,
8929: pn_var_rent_inv_all vinv
8930: WHERE vrent.lease_id = pterm.lease_id
8931: AND vrent.var_rent_id = vinv.var_rent_id
8932: AND pterm.start_date <=

Line 9095: FROM pn_var_rents_all

9091: IS
9092: --- Get org_id
9093: CURSOR org_cur(p_var_rent_id IN NUMBER) IS
9094: SELECT org_id
9095: FROM pn_var_rents_all
9096: WHERE var_rent_id =p_var_rent_id;
9097:
9098: -- Get the last partial period id
9099: CURSOR get_last_partial_prd(p_var_rent_id IN NUMBER) IS

Line 9101: FROM pn_var_periods_all prd ,pn_var_rents_all vrent

9097:
9098: -- Get the last partial period id
9099: CURSOR get_last_partial_prd(p_var_rent_id IN NUMBER) IS
9100: SELECT prd.period_id
9101: FROM pn_var_periods_all prd ,pn_var_rents_all vrent
9102: WHERE prd.var_rent_id=p_var_rent_id
9103: AND vrent.var_rent_id = prd.var_rent_id
9104: AND prd.end_date = vrent.termination_date
9105: AND partial_period='Y';

Line 9292: pn_var_rents_all vrent,

9288: /*Cursor to get all pmt terms for a particular invoice*/
9289: CURSOR get_all_pmt_terms(p_inv_id IN NUMBER) IS
9290: SELECT distinct pterm.payment_term_id payment_term_id
9291: FROM pn_payment_terms_all pterm,
9292: pn_var_rents_all vrent,
9293: pn_var_rent_inv_all vinv
9294: WHERE vrent.lease_id = pterm.lease_id
9295: AND vrent.var_rent_id = vinv.var_rent_id
9296: AND pterm.start_date <=

Line 9336: FROM pn_var_rents_all

9332: AND adjust_num=0;
9333:
9334: CURSOR org_cur(p_var_rent_id IN NUMBER) IS
9335: SELECT org_id
9336: FROM pn_var_rents_all
9337: WHERE var_rent_id =p_var_rent_id;
9338:
9339: BEGIN
9340: /* Get 1st invoice */

Line 9491: FROM pn_var_rents_all

9487: AND var_rent_inv_id=invoice_id);
9488:
9489: CURSOR org_cur(p_var_rent_id IN NUMBER) IS
9490: SELECT org_id
9491: FROM pn_var_rents_all
9492: WHERE var_rent_id =p_var_rent_id;
9493: --Get invoice id of the 1st partial period
9494: CURSOR get_fst_inv_id(p_var_rent_id IN NUMBER) IS
9495: SELECT var_rent_inv_id

Line 9628: FROM pn_var_rents_all

9624: AND adjust_num=0;
9625:
9626: CURSOR org_cur(p_var_rent_id IN NUMBER) IS
9627: SELECT org_id
9628: FROM pn_var_rents_all
9629: WHERE var_rent_id =p_var_rent_id;
9630:
9631: l_abtmt_exists VARCHAR2(1) := NULL;
9632: l_inv_id NUMBER := NULL;

Line 9955: FROM pn_var_rents_all

9951: RETURN NUMBER IS
9952:
9953: CURSOR var_rent_type ( l_var_rent_id IN NUMBER ) IS
9954: SELECT invoice_on
9955: FROM pn_var_rents_all
9956: WHERE var_rent_id = l_var_rent_id
9957: AND invoice_on = 'FORECASTED';
9958:
9959:

Line 10336: FROM pn_var_rents_all

10332:
10333: /* get term template id for variable rent */
10334: CURSOR template_cur IS
10335: SELECT term_template_id
10336: FROM pn_var_rents_all
10337: WHERE var_rent_id = p_var_rent_id;
10338:
10339: /* get invoice dates for variable rent */
10340: CURSOR invoice_cur( p_vr_id IN NUMBER) IS

Line 10537: FROM pn_var_rents_all

10533:
10534: /* verifying if agreement's length is less than 24 */
10535: CURSOR vr_length IS
10536: SELECT var_rent_id, proration_rule, termination_date
10537: FROM pn_var_rents_all
10538: WHERE var_rent_id = p_varRentId
10539: AND proration_rule = 'FLY'
10540: AND MONTHS_BETWEEN(commencement_date, termination_date) < 24;
10541:

Line 10564: pn_var_rents_all var

10560: prd.period_id
10561: ,prd.partial_period
10562: FROM
10563: pn_var_periods_all prd,
10564: pn_var_rents_all var
10565: WHERE
10566: prd.var_rent_id = p_vr_id AND
10567: prd.var_rent_id = var.var_rent_id AND
10568: prd.start_date = var.commencement_date AND