[Home] [Help]
1572: -- Get the details of negative_rent
1573: CURSOR calc_freq_c(ip_var_rent_id NUMBER
1574: ) IS
1575: SELECT REPTG_FREQ_CODE
1576: FROM pn_var_rent_dates_all
1577: WHERE var_rent_id = ip_var_rent_id;
1578:
1579: -- Get the details of
1580: CURSOR inv_in_prd_c(ip_var_rent_id NUMBER,
1588: -- Get the number of inv which should exist for a period
1589: CURSOR num_inv_c(ip_var_rent_inv_id NUMBER
1590: ) IS
1591: 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
1592: FROM pn_var_rent_inv_all inv, pn_var_periods_all per, pn_var_rents_all vr, pn_var_rent_dates_all vrd
1593: WHERE per.period_id = inv.period_id
1594: AND inv.var_rent_inv_id = ip_var_rent_inv_id
1595: AND per.var_rent_id = vr.var_rent_id
1596: AND vrd.var_rent_id = vr.var_rent_id;