205: -- Get the first period
206: CURSOR get_fy_prd_c(ip_var_rent_id NUMBER
207: ) IS
208: SELECT period_id
209: FROM pn_var_periods_all
210: WHERE start_date = (SELECT min(start_date) from pn_var_periods_all WHERE var_rent_id = ip_var_rent_id)
211: AND var_rent_id = ip_var_rent_id;
212:
213: CURSOR invoice_dates_fy_c(ip_period_id NUMBER
206: CURSOR get_fy_prd_c(ip_var_rent_id NUMBER
207: ) IS
208: SELECT period_id
209: FROM pn_var_periods_all
210: WHERE start_date = (SELECT min(start_date) from pn_var_periods_all WHERE var_rent_id = ip_var_rent_id)
211: AND var_rent_id = ip_var_rent_id;
212:
213: CURSOR invoice_dates_fy_c(ip_period_id NUMBER
214: ) IS
212:
213: CURSOR invoice_dates_fy_c(ip_period_id NUMBER
214: ) IS
215: SELECT per.start_date, per.end_date
216: FROM pn_var_periods_all per
217: WHERE period_id = ip_period_id;
218:
219:
220: l_abt_amt NUMBER;