14: l_end_date DATE;
15:
16: cursor c_end_date is
17: select schedule_close_date end_date
18: from org_acct_periods
19: where period_start_date = trunc(p_period_start_date)
20: and organization_id = p_organization_id
21: order by period_start_date asc;
22:
42: l_start_date DATE;
43:
44: cursor c_next_period(c_start_date DATE) is
45: /*select start_date
46: from org_acct_periods_v
47: where start_date >= c_start_date
48: and organization_id = p_organization_id
49: order by start_date asc;*/
50: select PERIOD_START_DATE
47: where start_date >= c_start_date
48: and organization_id = p_organization_id
49: order by start_date asc;*/
50: select PERIOD_START_DATE
51: from ORG_ACCT_PERIODS
52: where PERIOD_START_DATE >= c_start_date
53: and organization_id = p_organization_id
54: order by PERIOD_START_DATE asc;
55:
54: order by PERIOD_START_DATE asc;
55:
56: cursor c_previous_period(c_start_date DATE) is
57: /*select start_date
58: from org_acct_periods_v
59: where start_date < c_start_date
60: and organization_id = p_organization_id
61: order by start_date desc;*/
62: select PERIOD_START_DATE
59: where start_date < c_start_date
60: and organization_id = p_organization_id
61: order by start_date desc;*/
62: select PERIOD_START_DATE
63: from ORG_ACCT_PERIODS
64: where PERIOD_START_DATE < c_start_date
65: and organization_id = p_organization_id
66: order by PERIOD_START_DATE desc;
67: