[Home] [Help]
122: -- the case when conversion_status is null
123:
124: CURSOR check_conversion_status IS
125: select count(*)
126: from fa_mc_book_controls
127: where book_type_code = h_book
128: and nvl(conversion_status,' ') in ('S', 'R', 'E',' ')
129: and mrc_converted_flag = 'N'
130: and enabled_flag = 'Y';
130: and enabled_flag = 'Y';
131:
132: CURSOR check_reporting_deprn_open IS
133: select count(1)
134: from fa_mc_book_controls mcbk
135: where mcbk.book_type_code = h_book
136: and (mcbk.deprn_status <> 'C' OR
137: ((mcbk.last_period_counter <> h_last_period_counter + 1) AND
138: (mcbk.last_period_counter <> h_last_period_counter)))
139: and enabled_flag = 'Y';
140:
141: CURSOR check_reporting_deprn_close IS
142: select count(1)
143: from fa_mc_book_controls mcbk
144: where mcbk.book_type_code = h_book
145: and (mcbk.deprn_status <> 'C' OR
146: (mcbk.last_period_counter <> h_last_period_counter + 1))
147: and enabled_flag = 'Y';
147: and enabled_flag = 'Y';
148:
149: CURSOR check_reporting_mass IS
150: select count(1)
151: from fa_mc_book_controls mcbk
152: where mcbk.book_type_code = h_book
153: and (mcbk.deprn_status <> 'C' OR
154: (mcbk.last_period_counter <> h_last_period_counter) OR
155: (mcbk.mass_request_id is not null))
160: -- processed in faxcdr.
161:
162: CURSOR check_reporting_single IS
163: select count(1)
164: from fa_mc_book_controls mcbk
165: where mcbk.book_type_code = h_book
166: and (mcbk.deprn_status not in ('C', 'E') OR
167: (mcbk.last_period_counter <> h_last_period_counter) OR
168: (mcbk.mass_request_id is not null))
1610: if (h_mc_source_flag = 'Y' and h_mrc_sob_type_code = 'P') then
1611: SELECT count(*)
1612: INTO h_count
1613: FROM fa_mc_deprn_periods dp,
1614: fa_mc_book_controls bc
1615: WHERE bc.book_type_code = X_book
1616: AND bc.book_type_code = dp.book_type_code
1617: AND bc.set_of_books_id = dp.set_of_books_id
1618: AND bc.enabled_flag = 'Y'